read is blocking on win32 CGI

W

William

Hi,

I'm working on a CGI which invoked by IIS6.0. However, in the cgi perl
script, i have a read which should read all POST content. I found 2
things interesting

1. the read becomes blocking if I want to read more than it was
submitted
2. the $ENV{'CONTENT_LENGTH'} is not reliable. In my case, the content
is 16330 bytes but it tells me 16600.

Anyone see this behavior? How to do non-blocking read in CGI?

thanks,
william
 
M

Matt Garrish

William said:
Hi,

I'm working on a CGI which invoked by IIS6.0. However, in the cgi perl
script, i have a read which should read all POST content. I found 2
things interesting

1. the read becomes blocking if I want to read more than it was
submitted
2. the $ENV{'CONTENT_LENGTH'} is not reliable. In my case, the content
is 16330 bytes but it tells me 16600.

Let me guess, is the file 271 lines long?

Are you using CGI.pm? If not, you should be...

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top