[wp-trac] Re: [WordPress Trac] #3528: HTTP 304 status not sent
correctly on PHP 5.2, breaking conditional GET on feeds
WordPress Trac
wp-trac at lists.automattic.com
Sat Jan 6 06:30:44 GMT 2007
#3528: HTTP 304 status not sent correctly on PHP 5.2, breaking conditional GET on
feeds
---------------------+------------------------------------------------------
Reporter: kelson | Owner: anonymous
Type: defect | Status: new
Priority: high | Milestone: 2.0.7
Component: General | Version: 2.0.6
Severity: major | Resolution:
Keywords: |
---------------------+------------------------------------------------------
Comment (by kelson):
Some additional info from MediaWiki developer Brion, posted in the
comments at my writeup:
This is the breaking change:
{{{
- @header("HTTP/1.1 $header $text");
- @header("Status: $header $text");
+ if ( substr(php_sapi_name(), 0, 3) == 'cgi' )
+ @header("HTTP/1.1 $header $text");
+ else
+ @header("Status: $header $text");
}}}
Thus instead of hedging its bets by sending both forms to the server,
it's only sending one form depending on how PHP's set up.
If I'm not mistaken, the condition should be reversed: the 'Status'
pseudoheader should be used only for CGI, while Apache/mod_php and other
environments want the HTTP/1.x line directly.
In MediaWiki we use the HTTP/1.x form pretty exclusively, actually, and
it's fine with my lighttpd/FastCGI test box as well as our production
apache/mod_php boxes... I'm not entirely sure what it __does__ break with.
--
Ticket URL: <http://trac.wordpress.org/ticket/3528#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list