IronPython freezes on stdin in IIS7 CGI when doing POST request bigger than 320 symbols
I'm have configured IIS 7 to use IronPython for CGI scripts ( http://www.tikalk.com/net/configuring-ironpython-cgi-iis-7 ).
Not let's say I have following Python script that simply reads from stdin
(that's done for POST requests). I have used python cgi module initially but it has been freezing for me for some reason and I have limited that to stdin eventually.
import sys
import os
print 'Status: 200 OK'
print 'Content-type: application/json'
print
data_len = int(os.environ.get('CONTENT_LENGTH', 0))
data = ''
if data_len != 0:
for i in xrange(data_len):
data += sys.stdin.read(1)
Now make Python POST request for this script that has more than 320 bytes of data. It will freeze for you and will not return any data.
Feel free to contact me if you have more questions.
IronPython versions used: 2.6 for .NET 4.0, 2.7
OS: Windows 7
The very same script works without problems when using CPython 2.6 under the same IIS 7 configuration.
Work Item Details
Original CodePlex Issue: Issue 33556 Status: Proposed Reason Closed: Unassigned Assigned to: Unassigned Reported on: Dec 11, 2012 at 10:37 AM Reported by: daliusd Updated on: Feb 22, 2013 at 2:08 AM Updated by: daliusd