httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Westland <>
Subject Re: Input filter to process POST variables (e.g. mod_form)
Date Wed, 25 Mar 2009 14:34:53 GMT

----- Original Message ----

> From: Erik Westland <>
> To:
> Sent: Saturday, March 21, 2009 11:22:52 PM
> Subject: Input filter to process POST variables (e.g. mod_form)
> I am writing an output filter that needs to record request (headers and POST/GET 
> vars) and response data (status and content-length). I was planning to write an 
> input filter to capture/relay the POST/GET data (via "r->notes") to an output 
> filter for processing.
> It seems that "mod_form" (see: does the 
> parameter processing, but comes with the following ominous caveat:
> "mod_form works with GET but is largely untested under POST, and appears to have 
> problems with POST and HTTP Keepalive. That will be fixed, but it's not 
> currently a priority."
> Q: Does anyone know if this is safe to use? Their support page lists mod_form 
> as: "unlikely to represent value to you."
> Q: Is there another alternative to writing my own? If not, any idea what the 
> keepalive issue was?
> Q:  Apache processes variables in the URL (parses into r->args) during POST 
> requests, but the mod_form implementation doesn't look for r->args when handling 
> POST requests. Is this disallowed/discouraged in the spec or an oversight in the 
> implementation?

I did a quick comparison of the POST data handling in "mod_form"
with "mod_cgi" (see: cgi_handler()) and the approaches are similar. I
believe mod_cgid is a module (content generator versus input filter),
so it doesn't need to be concerned with being called multiple times per
request. I assume that is where the mysterious POST/Keepalive issues
surface in mod_form...

So, does anyone have experience with handling POST data in a filter?
Sure would like to find a rock solid version of mod_form to use for
logging request data in an output filter.



View raw message