[Python-checkins] r80112 - in python/branches/py3k: Lib/xmlrpc/server.py Misc/NEWS
victor.stinner
python-checkins at python.org
Fri Apr 16 15:28:06 CEST 2010
Author: victor.stinner
Date: Fri Apr 16 15:28:05 2010
New Revision: 80112
Log:
Issue #7606: XML-RPC traceback stored in X-traceback is now encoded to ASCII
using backslashreplace error handler.
Modified:
python/branches/py3k/Lib/xmlrpc/server.py
python/branches/py3k/Misc/NEWS
Modified: python/branches/py3k/Lib/xmlrpc/server.py
==============================================================================
--- python/branches/py3k/Lib/xmlrpc/server.py (original)
+++ python/branches/py3k/Lib/xmlrpc/server.py Fri Apr 16 15:28:05 2010
@@ -499,7 +499,9 @@
if hasattr(self.server, '_send_traceback_header') and \
self.server._send_traceback_header:
self.send_header("X-exception", str(e))
- self.send_header("X-traceback", traceback.format_exc())
+ trace = traceback.format_exc()
+ trace = str(trace.encode('ASCII', 'backslashreplace'), 'ASCII')
+ self.send_header("X-traceback", trace)
self.send_header("Content-length", "0")
self.end_headers()
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Fri Apr 16 15:28:05 2010
@@ -312,6 +312,9 @@
Library
-------
+- Issue #7606: XML-RPC traceback stored in X-traceback is now encoded to ASCII
+ using backslashreplace error handler
+
- Issue #8412: os.system() now accepts bytes, bytearray and str with
surrogates.
More information about the Python-checkins
mailing list