Message 183437 - Python tracker

Message183437

Author kedder
Recipients kedder
Date 2013-03-04.12:27:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1362400053.87.0.0342035983925.issue17349@psf.upfronthosting.co.za>
In-reply-to
Content
Under certain circumstances, wsgiref.simple_server.demo_app may return unicode data, but that is prohibited by PEP-3333.

This happens if environ with unicode key is passed to demo_app. Unicode keys are then written to StringIO instance, automatically making its value unicode.

Type of environ keys is not strictly mandated by PEP-3333, however output of WSGI application is:

  "When called by the server, the application object must return an iterable yielding zero or more bytestrings.", see http://www.python.org/dev/peps/pep-3333/#specification-details

Test case is attached.
History
Date User Action Args
2013-03-04 12:27:33keddersetrecipients: + kedder
2013-03-04 12:27:33keddersetmessageid: <1362400053.87.0.0342035983925.issue17349@psf.upfronthosting.co.za>
2013-03-04 12:27:33kedderlinkissue17349 messages
2013-03-04 12:27:33keddercreate