Issue #7606: XML-RPC traceback stored in X-traceback is now encoded to ASCII
using backslashreplace error handler.
This commit is contained in:
parent
876d7c84e6
commit
5bfe1467f7
|
@ -499,7 +499,9 @@ class SimpleXMLRPCRequestHandler(BaseHTTPRequestHandler):
|
||||||
if hasattr(self.server, '_send_traceback_header') and \
|
if hasattr(self.server, '_send_traceback_header') and \
|
||||||
self.server._send_traceback_header:
|
self.server._send_traceback_header:
|
||||||
self.send_header("X-exception", str(e))
|
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.send_header("Content-length", "0")
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
|
|
@ -312,6 +312,9 @@ C-API
|
||||||
Library
|
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
|
- Issue #8412: os.system() now accepts bytes, bytearray and str with
|
||||||
surrogates.
|
surrogates.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue