kprasanna_79 has asked for the wisdom of the Perl Monks concerning the following question:

Revered Monks,
I am using perl to download file from the server using apache. I am using the below code to write the file to output.
my $buf; binmode STDOUT; while (read($fh,$buf,1024)) { if ($params->{win32_text}) { $buf =~ s/\n/\r\n/g; } print $buf; } } undef $fh;
But i am getting The connection with the server was reset error. I am using IE and Apache 1.3. Any suggestion would be appreciated.

UPDATE
This is working fine when i try with http, but throwing error when uses HTTPS

-Prasanna.K

Replies are listed 'Best First'.
Re: The connection with the server was reset
by Anonymous Monk on Aug 13, 2009 at 11:40 UTC
    1. Don't do that :) save converted file on disk, then return a link (or redirect) to converted file
    2. adjust apache timeout settings (its apache who resets connection).
    3. Let apache serve unconverted files, and teach your users how-to use unix2dos/dos2unix.