Bug #52674 [Com]: [FPM] Status page returns inconsistent Content-Type headers
Edit report at http://bugs.php.net/bug.php?id=52674&edit=1
ID: 52674
Comment by: fat@php.net
Reported by: php-bugs at majkl578 dot cz
Summary: [FPM] Status page returns inconsistent Content-Type
headers
Status: Analyzed
Type: Bug
Package: FPM related
Operating System: Linux Debian
PHP Version: 5.3.3
Assigned To: fat
Block user comment: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2010-08-23 10:28:43] fat@php.net
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
Thread (6 messages)