summaryrefslogtreecommitdiff
path: root/Lib/SimpleXMLRPCServer.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-01 15:23:43 +0000
committerGeorg Brandl <georg@python.org>2009-04-01 15:23:43 +0000
commit61fce3877cd11508f43b4d4e71276b03c3ef2823 (patch)
treeccbc8caf671628f86bf0997dfd99543da5efabd3 /Lib/SimpleXMLRPCServer.py
parentc53306c21734e90a6bf2f6676eb9f0c9486548a4 (diff)
downloadcpython-git-61fce3877cd11508f43b4d4e71276b03c3ef2823.tar.gz
Fix test_xmlrpc and make the CGI handler work with no CONTENT_LENGTH.
Diffstat (limited to 'Lib/SimpleXMLRPCServer.py')
-rw-r--r--Lib/SimpleXMLRPCServer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/SimpleXMLRPCServer.py b/Lib/SimpleXMLRPCServer.py
index 4c286884a3..b304e45c11 100644
--- a/Lib/SimpleXMLRPCServer.py
+++ b/Lib/SimpleXMLRPCServer.py
@@ -600,7 +600,7 @@ class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
# 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)