commit | 61fce3877cd11508f43b4d4e71276b03c3ef2823 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Wed Apr 01 15:23:43 2009 +0000 |
committer | Georg Brandl <georg@python.org> | Wed Apr 01 15:23:43 2009 +0000 |
tree | ccbc8caf671628f86bf0997dfd99543da5efabd3 | |
parent | c53306c21734e90a6bf2f6676eb9f0c9486548a4 [diff] [blame] |
Fix test_xmlrpc and make the CGI handler work with no CONTENT_LENGTH.
diff --git a/Lib/SimpleXMLRPCServer.py b/Lib/SimpleXMLRPCServer.py index 4c28688..b304e45 100644 --- a/Lib/SimpleXMLRPCServer.py +++ b/Lib/SimpleXMLRPCServer.py
@@ -600,7 +600,7 @@ # POST data is normally available through stdin try: length = int(os.environ.get('CONTENT_LENGTH', None)) - except ValueError: + except (TypeError, ValueError): length = -1 if request_text is None: request_text = sys.stdin.read(length)