php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52674 [FPM] Status page returns inconsistent Content-Type headers
Submitted: 2010-08-23 04:23 UTC Modified: 2011-01-18 20:32 UTC
From: php-bugs at majkl578 dot cz Assigned: fat (profile)
Status: Closed Package: FPM related
PHP Version: 5.3.3 OS: Linux Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php-bugs at majkl578 dot cz
New email:
PHP Version: OS:

 

 [2010-08-23 04:23 UTC] 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'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-23 10:28 UTC] fat@php.net
-Summary: [FPM] Status page does not work under Apache 2.2 +Summary: [FPM] Status page returns inconsistent Content-Type headers -Status: Open +Status: Analyzed -Assigned To: +Assigned To: fat
 [2010-08-23 10:28 UTC] 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 10:38 UTC] fat@php.net
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 22:40 UTC] fat@php.net
Automatic comment from SVN on behalf of fat
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=302721
Log: - Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers).
 [2010-08-23 22:41 UTC] fat@php.net
-Status: Analyzed +Status: Closed
 [2010-08-23 22:41 UTC] fat@php.net
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.


 [2011-01-18 20:26 UTC] 1 dot david dot michael at gmail dot com
Is there a work around with apache to avoid upgrading to 5.3.4 or 5.3.5? Or is 
upgrading the only option?
 [2011-01-18 20:32 UTC] fat@php.net
this is an upgrade option only
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 02 23:01:29 2024 UTC