Fix test_xmlrpc and make the CGI handler work with no CONTENT_LENGTH.

This commit is contained in:
Georg Brandl 2009-04-01 15:23:43 +00:00
parent c53306c217
commit 61fce3877c
2 changed files with 6 additions and 2 deletions

View file

@ -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)