[wp-trac] [WordPress Trac] #3886: wrong server protocol for
HTTP/1.0 requests resulting in uninterpreted chunked encoding
WordPress Trac
wp-trac at lists.automattic.com
Tue Feb 27 19:51:48 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:
Component: General | Version: 2.1.1
Severity: major | Keywords:
---------------------+------------------------------------------------------
After upgrading to php5.2.1 we found "strange hex numbers" at the
beginning and in the middle of the html code, occasionally blank pages,
and malfunctioning javascripts.
This behaviour was only visible when using a proxy, e.g. squid or Novell
Bordermanager.
On closer inspection of the request and response headers, we found out
that (some) proxies use HTTP/1.0, but WordPress always returned a HTTP/1.1
header.
We were able to fix this problem by changing the response header in wp-
inclues/functions.php in the function status_header().
{{{
wp-includes/functions.php
- @header("HTTP/1.1 $header $text", true, $header);
+ @header($_SERVER["SERVER_PROTOCOL"]." ".$header." ".$text,
true, $header);
}}}
I am not sure if this breaks any other functionality, and whether a patch
is needed for earlier php versions.
--
Ticket URL: <http://trac.wordpress.org/ticket/3886>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list