summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/xmlrpc/server.py4
-rw-r--r--Misc/NEWS3
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py
index aef2eb2..04820bf 100644
--- a/Lib/xmlrpc/server.py
+++ b/Lib/xmlrpc/server.py
@@ -469,7 +469,9 @@ class SimpleXMLRPCRequestHandler(BaseHTTPRequestHandler):
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.end_headers()
else:
diff --git a/Misc/NEWS b/Misc/NEWS
index 1a6d17a..1ed921c 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -28,6 +28,9 @@ Core and Builtins
Library
-------
+- Issue #7606: XML-RPC traceback stored in X-traceback is now encoded to ASCII
+ using backslashreplace error handler
+
- Issue #5277: Fix quote counting when parsing RFC 2231 encoded parameters.
- Issue #8383: pickle and pickletools use surrogatepass error handler when