[Python-checkins] r70942 - in python/branches/py3k: Lib/xmlrpc/server.py
georg.brandl
python-checkins at python.org
Wed Apr 1 06:27:47 CEST 2009
Author: georg.brandl
Date: Wed Apr 1 06:27:47 2009
New Revision: 70942
Log:
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.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/xmlrpc/server.py
Modified: python/branches/py3k/Lib/xmlrpc/server.py
==============================================================================
--- python/branches/py3k/Lib/xmlrpc/server.py (original)
+++ python/branches/py3k/Lib/xmlrpc/server.py Wed Apr 1 06:27:47 2009
@@ -588,8 +588,12 @@
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)
More information about the Python-checkins
mailing list