This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author maker
Recipients maker
Date 2012-09-28.10:54:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348829642.54.0.0563748954245.issue16083@psf.upfronthosting.co.za>
In-reply-to
Content
Sending a "GET /\0" causes a TypeEror to be raised and the connection to be unexpectedly closed. 

$ python -m SimpleHTTPServer 8000
$ printf "GET /\00" | nc localhost 8000

TypeError: must be encoded string without NULL bytes, not str
----------------------------------------

I think raising a 400 error should be fine. Also, shouldn't the error message contain a repr(string)?

[From http://corte.si/posts/code/pathod/pythonservers/index.html]
History
Date User Action Args
2012-09-28 10:54:02makersetrecipients: + maker
2012-09-28 10:54:02makersetmessageid: <1348829642.54.0.0563748954245.issue16083@psf.upfronthosting.co.za>
2012-09-28 10:54:02makerlinkissue16083 messages
2012-09-28 10:54:01makercreate