[
https://issues.apache.org/jira/browse/VELOCITY-427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henning Schmiedehausen closed VELOCITY-427.
-------------------------------------------
> Content-Length in HTTP headers messed up by Velocimacro #macro definition
> -------------------------------------------------------------------------
>
> Key: VELOCITY-427
> URL: https://issues.apache.org/jira/browse/VELOCITY-427
> Project: Velocity
> Issue Type: Bug
> Affects Versions: 1.3.1
> Environment: SUSE 10.0 Linux
> Jakarta Velocity v1.3.1
> Apache Tomcat/5.0 Java 1.4.2_06-b03 Sun Microsystems Inc. Linux
> 2.6.13-15.7-default i386
> Reporter: Bryce Nesbitt
>
> I'm rather confused by this. If my velocity pages have a #macro definition
> in them, the HTTP header Content-Length: is messed up. A very simple macro
> shows this. The content length is 350 bytes, but only 249 bytes will be
> served. This causes some clients to work fine, others to blow chunks (that's
> a technical term :-).
> -----------------------------------------------
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> #macro( screwthingsupmacro $values )
> <p>I cause the Content-Length: header to be wrong!</p>
> #end
> <html>
> <head>
> <title>Individual Member Application</title>
> </head>
> <body>
> <form action="signup.action" method="POST">
> </form>
> </body>
> </html>
> -----------------------------------------------
> host> wget --save-headers http://localhost:8080/exploded/signup/e_test.html
> HTTP request sent, awaiting response... 200 OK
> Length: 350 [text/html]
> 71% [=========================> ] 249 --.--K/s
> ETA 00:02
> Connection closed at byte 249. Retrying.
> ----------------------------------------
> 2005-12-17 09:42:43,049 - SimpleLog4JLogSystem initialized using logfile
> 'velocity.log'
> 2005-12-17 09:42:43,049 - SimpleLog4JLogSystem initialized using logfile
> 'velocity.log'
> 2005-12-17 09:42:43,049 -
> **************************************************************
> 2005-12-17 09:42:43,049 -
> **************************************************************
> 2005-12-17 09:42:43,050 - Starting Jakarta Velocity v1.3.1
> 2005-12-17 09:42:43,050 - Starting Jakarta Velocity v1.3.1
> 2005-12-17 09:42:43,050 - RuntimeInstance initializing.
> 2005-12-17 09:42:43,050 - RuntimeInstance initializing.
> 2005-12-17 09:42:43,050 - Default Properties File:
> org/apache/velocity/runtime/defaults/velocity.properties
> 2005-12-17 09:42:43,050 - Default Properties File:
> org/apache/velocity/runtime/defaults/velocity.properties
> 2005-12-17 09:42:43,050 - Trying to use logger class
> org.apache.velocity.runtime.log.AvalonLogSystem
> 2005-12-17 09:42:43,050 - Trying to use logger class
> org.apache.velocity.runtime.log.AvalonLogSystem
> ....
> 2005-12-17 09:42:49,100 - ResourceManager : found test.html with loader
> org.apache.velocity.runtime.resource.loader.FileResourceLoader
> 2005-12-17 09:42:49,100 - ResourceManager : found test.html with loader
> org.apache.velocity.runtime.resource.loader.FileResourceLoader
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]