[wp-trac] [WordPress Trac] #7361: Fixes for wp-app with PHP-CGI
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 14 12:39:50 UTC 2009
#7361: Fixes for wp-app with PHP-CGI
-----------------------------------+----------------------------------------
Reporter: yonosoytu | Owner: anonymous
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 2.9
Component: AtomPub | Version: 2.9
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion |
-----------------------------------+----------------------------------------
Comment(by tenpura):
Setting two lines together like below seems to output a proper status
header with various server setups.
{{{
header('Status: 403 Forbidden', true, 403);
header('HTTP/1.1 403 Forbidden', true, 403);
}}}
I have tested with these and their status headers look ok so far.
* Apache 1.3.41, PHP 4.4.8, php_sapi: cgi (This one exhibits the issue as
seen in demo.)
* Apache version unknown, PHP 5.2.9, php_sapi: cgi-fcgi
* Apache version unknown, PHP 5.2.11, php_sapi: apache
One side effect of this is that unnecessary "Status: XXX" line is added to
headers under non cgi setups. However, it appears to be harmless.
{{{
HTTP/1.1 403 Forbidden
Date: Mon, 14 Dec 2009 07:53:12 GMT
Server: Apache
Status: 403 Forbidden // added line
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 3
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/7361#comment:19>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list