diff options
author | Guido van Rossum <guido@python.org> | 2007-11-21 22:09:45 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-11-21 22:09:45 (GMT) |
commit | 8a392d7387c9992537b0e1f66de989e34bd4eb4e (patch) | |
tree | 689dd92ee0ca56b2464982cb07b398af03f81f19 /Lib/SimpleXMLRPCServer.py | |
parent | b08340053cb10af7290628ed624e4f7ec6be398b (diff) | |
download | cpython-8a392d7387c9992537b0e1f66de989e34bd4eb4e.zip cpython-8a392d7387c9992537b0e1f66de989e34bd4eb4e.tar.gz cpython-8a392d7387c9992537b0e1f66de989e34bd4eb4e.tar.bz2 |
Convert the socket module to insist on bytes for input, and to return bytes
(not bytearray) on output. Discovered a bunch of places that were still
depending on it accepting text strings.
Diffstat (limited to 'Lib/SimpleXMLRPCServer.py')
-rw-r--r-- | Lib/SimpleXMLRPCServer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/SimpleXMLRPCServer.py b/Lib/SimpleXMLRPCServer.py index 5f6e9d0..f74ca54 100644 --- a/Lib/SimpleXMLRPCServer.py +++ b/Lib/SimpleXMLRPCServer.py @@ -464,7 +464,8 @@ class SimpleXMLRPCRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): self.end_headers() else: - # got a valid XML RPC response + # Got a valid XML RPC response; convert to bytes first + response = response.encode("utf-8") self.send_response(200) self.send_header("Content-type", "text/xml") self.send_header("Content-length", str(len(response))) |