httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cris Webea <>
Subject [users@httpd] Fixed Content-Length using mod_ext_filter in mode=input
Date Thu, 05 Feb 2009 17:59:48 GMT


I wrote an input filter using mod_ext_filter. In the filter "implementation" I get the post
data (from stdin) and modify it (to stdout) with no issues.. However, after changing the post
data, the Content-Length of the request still has the original value. For instance: 

Original post data: param1=12345 with Content-Length: 12
Post data after filter: param1=abcdefghij with Content-Length: 12 

Then because the Content-Length is not changed, when the request post data is received after
the filter, it will be truncated to the original Content-Length size (i.e. would get param1=abcde
in the previous example). 

The filter implementation is a Java program (speed is not an issue), and this is how the filter
definition looks: 

ExtFilterDefine filtername mode=input cmd="/path_to_java/java.exe -classpath /path_to_java_app"

As you can see, I am not using the PreservesContentLength flag. Also, this is running on Windows
XP, and using Apache 2.2.10 (I already verified and 2..2.11 does not mention anything like
this in the release notes). 

Has anyone seen this behavior before? Do you think this could be a bug? (as supposedly, not
using the PreservesContentLength flag should let the filter change the Content-Length). 

Any help is really appreciated. 



      Yahoo! Cocina
Recetas prácticas y comida saludable

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message