Re: PERL CGI SCRIPT killed by apache on client abort

[email protected] (Mike Williams) Sun, 27 Mar 2011 16:10:37 -0400
Newsgroups perl.beginners.cgi
Message-ID <[email protected]>
2011/3/26 Przemys=C5=82aw Rejf <[email protected]>:
> Hi,
> My upload script which uses upload hook works really nice. After the uplo=
ad
> ends it writes some debug stuff to log file and sends some info to other
> host.
> When client aborts the upload the reminder of the script after hook is no=
t
> executed and i get an error in my apache log:
> [Sat Mar 26 14:53:09 2011] [error] [client xxx.xxx.xxx.xxx] (70014)End
> + of file found: Error reading request entity data, referer: http://lo
> +calhost/upload
> [download]
> I'm thinking its the fault of apache, because without abort the script wo=
rks
> just fine. Does anyone have any clue about it ? The script:

Excuse me if I've grabbed the wrong end of the stick here, but it
looks to me like apache is doing the right thing.  If the user aborts
the upload then there is an error reading the data, which apache
reports.

From a practical standpoint, if the user aborts the upload, they
should know that they aborted the upload and expect to see an error.
Furthermore, if they aborted the upload, it seems most likely that
they canceled the upload because they realized that they had selected
the wrong file and will try again with the correct file.

What difference does it make whether they get an error from your
script or from apache, if they expected an error and intend to try
again?

Mike