mirror of
https://github.com/python/cpython.git
synced 2025-09-10 18:58:35 +00:00
The SimpleXMLRPCServer's CGI handler now runs like a pony.
This commit is contained in:
parent
02cb0eb231
commit
e92d4b6f57
2 changed files with 7 additions and 1 deletions
|
@ -598,8 +598,12 @@ class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
|
|||
self.handle_get()
|
||||
else:
|
||||
# POST data is normally available through stdin
|
||||
try:
|
||||
length = int(os.environ.get('CONTENT_LENGTH', None))
|
||||
except ValueError:
|
||||
length = -1
|
||||
if request_text is None:
|
||||
request_text = sys.stdin.read()
|
||||
request_text = sys.stdin.read(length)
|
||||
|
||||
self.handle_xmlrpc(request_text)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue