Edit report at http://bugs.php.net/bug.php?id=53618&edit=1
ID: 53618 Comment by: pcting at gmail dot com Reported by: pcting at gmail dot com Summary: malformed header key-value pair on status page Status: Open 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: 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. Previous Comments: ------------------------------------------------------------------------ [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