Subject: | CGI.pm: Server closed socket during multipart read (client aborted?). |
I am trying to use a cgi file-upload script. My server is Win XP
Pro/Apache2/Perl 5.8
The script dies on this line of code:
my $cg = new CGI();
It seems to be something to do with this in CGI.pm:
# An apparent bug in the Apache server causes the read()
# to return zero bytes repeatedly without blocking if the
# remote user aborts during a file transfer. I don't know how
# they manage this, but the workaround is to abort if we get
# more than SPIN_LOOP_MAX consecutive zero reads.
if ($bytesRead <= 0) {
die "CGI.pm: Server closed socket during multipart read (client
aborted?).\n"
if ($self->{ZERO_LOOP_COUNTER}++ >= $SPIN_LOOP_MAX);
} else {
$self->{ZERO_LOOP_COUNTER}=0;
}
I tried commenting out the die/if>SPIN_LOOP_MAX check, but then the
upload script just hangs there doing nothing, presumably stuck in a loop.
One thing I can say is that this is nothing to do with the remote user
(me) aborting during the file transfer. I get same error when uploading
from Firefox and MSIE. It seems there is a more fundamental problem here?