Edit report at http://bugs.php.net/bug.php?id=52674&edit=1
ID: 52674
Comment by: 1 dot david dot michael at gmail dot com
Reported by: php-bugs at majkl578 dot cz
Summary: [FPM] Status page returns inconsistent Content-Type
headers
Status: Closed
Type: Bug
Package: FPM related
Operating System: Linux Debian
PHP Version: 5.3.3
Assigned To: fat
Block user comment: N
Private report: N
New Comment:
Is there a work around with apache to avoid upgrading to 5.3.4 or 5.3.5?
Or is
upgrading the only option?
Previous Comments:
------------------------------------------------------------------------
[2010-08-23 22:41:56] [email protected]
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2010-08-23 22:40:46] [email protected]
Automatic comment from SVN on behalf of fat
Revision: http://svn.php.net/viewvc/?view=revision&revision=302721
Log: - Fixed bug #52674 (FPM Status page returns inconsistent
Content-Type headers).
------------------------------------------------------------------------
[2010-08-23 10:38:51] [email protected]
Moreover, the Content-Type used for json was not the best choice. It was
application/jsonrequest.
As specified in RFC4627, it should be application/json.
------------------------------------------------------------------------
[2010-08-23 10:28:43] [email protected]
The status page does not return a valid Content-Type header:
...
text/plain
Content-type: text/plain
...
it should be
...
Content-type: text/plain
...
It affects apache but also any other front web servers. Nginx is more
tolerant
and ignores unknown / malformed headers but text/html was use instead.
------------------------------------------------------------------------
[2010-08-23 04:23:08] php-bugs at majkl578 dot cz
Description:
------------
Apache 2 ends up with an error while trying to get content of /status
url. Ping url works fine.
Same problem with /status?json and /status?html.
Apache version: 2.2.16, mpm-worker
mod_fastcgi version: 2.4.6
Test script:
---------------
<IfModule mod_fastcgi.c>
FastCGIExternalServer /php5-fpm-handler -socket
"/var/run/php5-fpm.sock"
AddHandler php5-fcgi .php
<LocationMatch "/(ping|status)">
SetHandler php5-fcgi-virt
Action php5-fcgi-virt /php5-fpm-handler.fcgi virtual
</LocationMatch>
Action php5-fcgi /php5-fpm-handler.fcgi
ScriptAlias /php5-fpm-handler.fcgi /php5-fpm-handler
</IfModule>
Expected result:
----------------
FPM status page
Actual result:
--------------
500 Internal error
Logged in Apache's error log:
[Mon Aug 23 04:16:55 2010] [error] [client 127.0.0.1] FastCGI: comm with
server "/php5-fpm-handler" aborted: error parsing headers: malformed
header 'text/plain'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52674&edit=1