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.

作者 vstinner
收信人 loewis, pitrou, r.david.murray, vstinner
日期 2010-01-31.02:31:05
SpamBayes Score 1.8105913e-05
Marked as misclassified
Message-id <1264905067.69.0.975184416221.issue7606@psf.upfronthosting.co.za>
In-reply-to
内容
#7608 was a duplicate issue. Copy of my message (msg98091):
-----
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)?
-----
I also copied my patch to this issue.
历史
日期 用户 动作 参数
2010-01-31 02:31:07vstinner修改recipients: + vstinner, loewis, pitrou, r.david.murray
2010-01-31 02:31:07vstinner修改messageid: <1264905067.69.0.975184416221.issue7606@psf.upfronthosting.co.za>
2010-01-31 02:31:06vstinner链接issue7606 messages
2010-01-31 02:31:05vstinner创建