[wp-trac] Re: [WordPress Trac] #3886: wrong server protocol for
HTTP/1.0 requests resulting in uninterpreted chunked encoding
WordPress Trac
wp-trac at lists.automattic.com
Sat May 5 08:37:20 GMT 2007
#3886: wrong server protocol for HTTP/1.0 requests resulting in uninterpreted
chunked encoding
-----------------------+----------------------------------------------------
Reporter: abtime | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.3
Component: General | Version: 2.1.1
Severity: major | Resolution:
Keywords: has-patch |
-----------------------+----------------------------------------------------
Comment (by azza-bazoo):
Hi all,[[BR]]I think setting the milestone to 2.3 is underestimating the
severity of this problem. If gzip compression is on (as per default) and
chunked encoding is enabled in Apache, HTTP 1.0 clients that speak gzip
won't see anything, because the hex numbers corrupt the gzip stream.
Re ryan: As best as I can tell using grep and WP 2.1.3, calls to the
{{{status_header}}} function only ever use these codes, none of which
change between HTTP 1.0 and 1.1: 200, 302, 304, 404.
The proposed fix ( {{{$_SERVER["SERVER_PROTOCOL"]}}} ) was introduced in
PHP 4.1, and the WP docs list this as a minimum requirement, so I'd expect
no problems with PHP versions.
Actually, to support PHP between 4.1 and 4.3, maybe the next line should
be changed as well:
{{{
wp-includes/functions.php
- if ( version_compare(phpversion(), '4.3.0', '>=') )
- @header("HTTP/1.1 $header $text", true, $header);
- else
- @header("HTTP/1.1 $header $text");
+ if ( version_compare(phpversion(), '4.3.0', '>=') )
+ @header($_SERVER["SERVER_PROTOCOL"]." ".$header." ".$text,
true, $header);
+ else
+ @header($_SERVER["SERVER_PROTOCOL"]." ".$header."
".$text);
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/3886#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list