Bug #53618 [Opn->Bgs]: malformed header key-value pair on status page
| From: | fat@php.net | Date: | Tue, 04 Jan 2011 19:17:21 +0000 |
| Subject: | Bug #53618 [Opn->Bgs]: malformed header key-value pair on status page | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157587@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53618&edit=1
ID: 53618
Updated by: fat@php.net
Reported by: pcting at gmail dot com
Summary: malformed header key-value pair on status page
-Status: Open
+Status: Bogus
Type: Bug
Package: FPM related
Operating System: Ubuntu 10.04 amd64
PHP Version: 5.3SVN-2010-12-28 (snap)
Block user comment: N
Private report: N
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2010-12-28 08:36:13] 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.
------------------------------------------------------------------------
[2010-12-28 08:18:53] 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}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53618&edit=1