From 99412e559bea9179394366a95ae1a2c1b0723c47 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 1 Apr 2009 04:27:47 +0000 Subject: [PATCH] Merged revisions 70940 via svnmerge MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ........ 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. ........ --- Lib/xmlrpc/server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py index 4ddc0049d6..eb807c484b 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) -- 2.40.0