New submission from steenie:
Using CGIXMLRPCRequestHandler results in a timeout if running behind
Internet Information Server/CGI. Maybe there is no eof on sys.stdin
under IIS and python continues to read even if there is no more data
available. The same runs without problems under Apache/CGI.
Reading only os.environ['CONTENT_LENGTH'] bytes from sys.stdin will as
well work under IIS (see patch).
----------
components: Windows
files: SimpleXMLRPCServer.diff
messages: 56168
nosy: steenie
severity: normal
status: open
title: Timeout in CGIXMLRPCRequestHandler under IIS
versions: Python 2.5, Python 2.6
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1214>
__________________________________
Index: Lib/SimpleXMLRPCServer.py
===================================================================
--- Lib/SimpleXMLRPCServer.py (revision 58273)
+++ Lib/SimpleXMLRPCServer.py (working copy)
@@ -599,7 +599,10 @@
else:
# POST data is normally available through stdin
if request_text is None:
- request_text = sys.stdin.read()
+ if os.environ.has_key('CONTENT_LENGTH'):
+ request_text = sys.stdin.read(int(os.environ['CONTENT_LENGTH']))
+ else:
+ request_text = sys.stdin.read()
self.handle_xmlrpc(request_text)
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com