diff options
author | Georg Brandl <georg@python.org> | 2009-04-01 04:27:47 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-04-01 04:27:47 (GMT) |
commit | 99412e559bea9179394366a95ae1a2c1b0723c47 (patch) | |
tree | ad3c83405761a7bbbbea6ed9c4ed235af64bbd33 /Lib/xmlrpc/server.py | |
parent | e0cbd69659ab4a270abf166fef3d01cb560d01f7 (diff) | |
download | cpython-99412e559bea9179394366a95ae1a2c1b0723c47.zip cpython-99412e559bea9179394366a95ae1a2c1b0723c47.tar.gz cpython-99412e559bea9179394366a95ae1a2c1b0723c47.tar.bz2 |
Merged revisions 70940 via svnmerge
........
r70940 | georg.brandl | 2009-03-31 23:21:14 -0500 (Di, 31 Mär 2009) | 2 lines
The SimpleXMLRPCServer's CGI handler now runs like a pony.
........
Diffstat (limited to 'Lib/xmlrpc/server.py')
-rw-r--r-- | Lib/xmlrpc/server.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py index 4ddc004..eb807c4 100644 --- a/Lib/xmlrpc/server.py +++ b/Lib/xmlrpc/server.py @@ -588,8 +588,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) |