I need to download a 200MB file from server. I wrote a server side porgram in perl like this
[CODE=perl]$ID = $xmlPath."PSIRT _EOX_OFFLINE.tx t";
if ($ID eq '') {
print "Content-type: text/html\n\n";
print "You must specify a file to download.";
} else {
print "Content-Type:applicatio n/x-download\n";
print "Content-Disposition:att achment;filenam e=PSIRT_EOX_OFF LINE.txt\n\n";
open(DLFILE, "$ID") || Error();
@fileholder = <DLFILE>;
#binmode(DLFILE );
close (DLFILE) || Error ('close', 'file');
print "Content-Type:applicatio n/x-download\n";
print "Content-Length: $size\n";
print "Content-Disposition:att achment;filenam e=PSIRT_EOX_OFF LINE.txt\n\n";
print @fileholder ;[/CODE]
When I execute the perl script through browser, it takes around two mins time to popup the file download dialog. How can the time be reduced? Any help?
[CODE=perl]$ID = $xmlPath."PSIRT _EOX_OFFLINE.tx t";
if ($ID eq '') {
print "Content-type: text/html\n\n";
print "You must specify a file to download.";
} else {
print "Content-Type:applicatio n/x-download\n";
print "Content-Disposition:att achment;filenam e=PSIRT_EOX_OFF LINE.txt\n\n";
open(DLFILE, "$ID") || Error();
@fileholder = <DLFILE>;
#binmode(DLFILE );
close (DLFILE) || Error ('close', 'file');
print "Content-Type:applicatio n/x-download\n";
print "Content-Length: $size\n";
print "Content-Disposition:att achment;filenam e=PSIRT_EOX_OFF LINE.txt\n\n";
print @fileholder ;[/CODE]
When I execute the perl script through browser, it takes around two mins time to popup the file download dialog. How can the time be reduced? Any help?
Comment