Forum

Cygwin and CGI post

Elad Niram
22 February 2009, 22:06
I have installed the Windows/Cygwin port, and tried writing a CGI script in Python (2.5.3 and 3.0.1) and they work as long as the method isn't POST.
When calling stdin.read(), the function never returns. I'm guessing this is probably because Hiawatha never closes the input pipe, so the read operation never returns EOF as it should to signal all input has been read.
Hugo Leisink
23 February 2009, 00:16
POST requests with the Windows version of Hiawatha work fine. Tested and used it myself many times. It must be something with your CGi script. I don't know Python, so I can't help you with example scripts. The evironment variable CONTENT_LENGTH contains the amount of bytes available via stdin. Have you tried reading that amount of bytes instead of reading until a EOF byte?
This topic has been closed.