php.net |  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
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: pcting at gmail dot com
New email:
PHP Version: OS:

 

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

Test script:
---------------
#!/usr/bin/python
from StringIO import StringIO
from flup.client.fcgi_app import FCGIApp
from pprint import pprint
import urllib2

def start_response(status, headers):
    pass

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
application/jsonrequest
Content-type: text/html

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

Patches

Pull Requests

History

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] fat@php.net
-Status: Open +Status: Bogus
 [2011-01-04 20:17 UTC] fat@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 02:01:29 2024 UTC