|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-05 18:59 UTC] svn@php.net
[2010-02-05 18:59 UTC] rasmus@php.net
[2010-02-05 19:34 UTC] svn@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 06:00:01 2025 UTC |
Description: ------------ The following SAPI that handle Apache are doing the content length setting wrong: apache, apache2handler, apache2filter The problems when you do: header("Content-Length: 20"); the SAPI module would just set the header doing a table set on r->headers_out, but not update r->clength. Instead of doing a table set it should be calling ap_set_content_length, which sets clength and does the table set for you. I found this in Apache 2.x because we have a filter that appends data to the end of the content. It uses r->clength and updates with the additionally data value, but it doesn't work correctly if you use the above header PHP call. The following patch fixes the problem: http://www.brianfrance.com/software/php/sapi_content_length.txt Let me know if you have any questions.