[FASTCGI] Content-Length header should be set using ap_set_content_length

Artur Zaprzała arturz at ownmail.net
Tue Nov 4 10:16:53 EST 2008


Content-Length header should be set using ap_set_content_length() function in 
process_headers(). I fixed this about 3 years ago and I don't remember what was 
the problem with the current aproach, but it surely was.

Today I did some research to support my fix.

Currently process_headers() adds Content-Length to err_headers_out. Here is 
description of err_headers_out from Apache documentation:
> The difference between headers_out and err_headers_out is that the latter are printed even on error, and persist across internal redirects (so the headers printed for ErrorDocument handlers will have them).

And Content-Length shouldn't persist across internal redirects.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_fastcgi-clength.patch
Type: text/x-patch
Size: 539 bytes
Desc: not available
URL: <http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20081104/bf987631/attachment.bin>


More information about the FastCGI-developers mailing list