S
sipitai
Hi everyone,
I have written a Perl script that allows a user to download a file,
but only if they have a valid key to download that file.
The idea being that instead of the user just clicking on a link to
download a file (i.e. http://www.domain.com/file.zip), they click on a
link to the script, which contains the file name and the key (i.e.
http://www.domain.com/script.cgi/xxxxx/file.zip with xxxxx being the
key), and if the key is valid, the script sends back the file for them
to download, otherwise it blocks the request.
Which all works fine, the problem im running into is that the file
download is timing out after 300 seconds. More specifically, if the
file takes longer than 300 seconds to download, regardless of how many
KB's have been downloaded, or how many KB/sec it is transferring at,
the file stops downloading and displays "Download Complete".
Its worth noting that the amount of time it takes to timeout is
directly related to the Timeout value in the /etc/apache/httpd.conf
file, for example if I change it to 30 seconds then the file download
times out in 30 seconds, etc.
From what I can tell the server doesnt appear to recognise that the
script is still running, and is closing the connection. But then again
that's just my assumption based on what ive seen so far.
So having said all that, does anyone know how to fix this problem?
Without modifying the /etc/apache/httpd.conf Timeout value that is.
Thanks!
I have written a Perl script that allows a user to download a file,
but only if they have a valid key to download that file.
The idea being that instead of the user just clicking on a link to
download a file (i.e. http://www.domain.com/file.zip), they click on a
link to the script, which contains the file name and the key (i.e.
http://www.domain.com/script.cgi/xxxxx/file.zip with xxxxx being the
key), and if the key is valid, the script sends back the file for them
to download, otherwise it blocks the request.
Which all works fine, the problem im running into is that the file
download is timing out after 300 seconds. More specifically, if the
file takes longer than 300 seconds to download, regardless of how many
KB's have been downloaded, or how many KB/sec it is transferring at,
the file stops downloading and displays "Download Complete".
Its worth noting that the amount of time it takes to timeout is
directly related to the Timeout value in the /etc/apache/httpd.conf
file, for example if I change it to 30 seconds then the file download
times out in 30 seconds, etc.
From what I can tell the server doesnt appear to recognise that the
script is still running, and is closing the connection. But then again
that's just my assumption based on what ive seen so far.
So having said all that, does anyone know how to fix this problem?
Without modifying the /etc/apache/httpd.conf Timeout value that is.
Thanks!