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 vstinner
Recipients ezio.melotti, flox, vstinner
Date 2010-01-21.01:34:27
SpamBayes Score 0.00013516586
Marked as misclassified No
Message-id <1264037670.24.0.373332454687.issue7708@psf.upfronthosting.co.za>
In-reply-to
Content
SimpleXMLRPCRequestHandler.do_POST() writes the traceback in the HTTP header "X-traceback". But an HTTP header value is ASCII only, whereas a traceback can contain any character (eg. an non-ASCII character from a directory name for this issue).

A simple fix would be to use the ASCII charset with the backslashreplace error handler. Attached patch uses:

   trace = str(trace.encode('ASCII', 'backslashreplace'), 'ASCII')

Is there an easier method to escape non-ASCII characters without double conversion (unicode->bytes and bytes->unicode)?
History
Date User Action Args
2010-01-21 01:34:30vstinnersetrecipients: + vstinner, ezio.melotti, flox
2010-01-21 01:34:30vstinnersetmessageid: <1264037670.24.0.373332454687.issue7708@psf.upfronthosting.co.za>
2010-01-21 01:34:28vstinnerlinkissue7708 messages
2010-01-21 01:34:28vstinnercreate