mirror of
https://github.com/python/cpython.git
synced 2025-09-12 19:57:40 +00:00
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.
This commit is contained in:
parent
b08340053c
commit
8a392d7387
8 changed files with 42 additions and 43 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue