summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-04-16 15:48:19 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-04-16 15:48:19 (GMT)
commitf45c368f4dc40a9573a0464e3ac7c5c1678cb7f7 (patch)
tree076662be93172747bd238865b514ca864c42f4ea /Lib/xmlrpc
parent30ba25b8659119c2281e1e4046fb5ddf48c69d8a (diff)
downloadcpython-f45c368f4dc40a9573a0464e3ac7c5c1678cb7f7.zip
cpython-f45c368f4dc40a9573a0464e3ac7c5c1678cb7f7.tar.gz
cpython-f45c368f4dc40a9573a0464e3ac7c5c1678cb7f7.tar.bz2
Merged revisions 80112 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r80112 | victor.stinner | 2010-04-16 15:28:05 +0200 (ven., 16 avril 2010) | 3 lines Issue #7606: XML-RPC traceback stored in X-traceback is now encoded to ASCII using backslashreplace error handler. ........
Diffstat (limited to 'Lib/xmlrpc')
-rw-r--r--Lib/xmlrpc/server.py4
1 files changed, 3 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: