|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53618 malformed header key-value pair on status page
Submitted: 2010-12-28 08:18 UTC Modified: 2011-01-04 20:17 UTC
From: pcting at gmail dot com Assigned:
Status: Not a bug Package: FPM related
PHP Version: 5.3SVN-2010-12-28 (snap) OS: Ubuntu 10.04 amd64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
50 - 47 = ?
Subscribe to this entry?

 [2010-12-28 08:18 UTC] pcting at gmail dot com
The header response on the status page is malformed; the content-type is outputted incorrectly.

Test script:
from StringIO import StringIO
from flup.client.fcgi_app import FCGIApp
from pprint import pprint
import urllib2

def start_response(status, headers):

if __name__ == '__main__':
    app = FCGIApp(connect=('localhost', 9000), filterEnviron=False)

    env = {
        'QUERY_STRING': 'html',
        'REQUEST_METHOD': 'GET',
        'SCRIPT_FILENAME': '/status',
        'SCRIPT_NAME': '/status',
        'wsgi.input': StringIO(),
        'wsgi.errors': StringIO()

    result = app(environ=env, start_response=start_response)

Expected result:
X-Powered-By: PHP/5.3.3-1ubuntu9pre1~lucid
Content-type: application/jsonrequest

{"accepted conn":50,"pool":"www","process manager":"dynamic","idle processes":2,"active processes":0,"total processes":2}

Actual result:
X-Powered-By: PHP/5.3.3-1ubuntu9pre1~lucid
Content-type: text/html

{"accepted conn":50,"pool":"www","process manager":"dynamic","idle processes":2,"active processes":0,"total processes":2}


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-28 08:36 UTC] pcting at gmail dot com
Just to note, the sample test python script will fail because of the lack of error checking in the header of the response. Once the bug is fixed, the script should work just fine.
 [2011-01-04 20:17 UTC]
-Status: Open +Status: Bogus
 [2011-01-04 20:17 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Already fixed, see #52674
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Nov 27 05:03:20 2021 UTC