perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: [mp2] CONTENT_LENGTH & input filter
Date Mon, 03 May 2004 17:06:06 GMT
Micah Johnson wrote:
> Hi,
> I'm trying to use a pre-existing CGI script without
> modification.  I'd like to use an input filter to tack
> on something to the POST string.  My filter adds the
> string, but the CGI sees a CONTENT_LENGTH
> environmental variable that corresponds to its
> original length.  How do I update the CONTENT_LENGTH?

You can do that only in the Connection level filter, Request level filter is 
too late.

> I've tried setting %ENV in my filter, setting
> CONTENT_LENGTH with $f->r->subprocess_env, and using
> headers_out->set('Content-Length').  In the first two

That's headers *out* (==response), you want headers_in. I haven't tried that, 
but it may work in any phase before the response handler (instead of 
connection filter).

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

Report problems:
Mail list info:
List etiquette:

View raw message