Re: file download with mod_perl
Hi Axel, Sorry for replying you late and many thanks for the solution. It has really made my scripts working(or should I say running) well in mod_perl. But is this pure implementation of mod_perl, when I put PerlSendHeader On in Location? Waiting for your reply, Pritesh. On Friday, August 18, 2000 at 02:15:57 PM, Axel Gerstmair wrote: Hi Pritesh, However, the same code is not working under mod_perl. The file content is the same as original file, but filename is populated as download.cgi instead of actual file name. I think mod_perl is putting its own headers, while sending the data. Are you using the PerlSendHeader On directive in your httpd.conf file? If not put this into your Location section (or whatever) and it should cure your problem, e.g. Location /perl SetHandler perl-script PerlHandlerApache::Registry PerlSendHeader On Options+ExecCgi /Location See also the online mod_perl guide http://perl.apache.org/guide/porting.html#Generating_correct_HTTP_Headers I hope this helps, Axel pritesht e-mail: [EMAIL PROTECTED] Feed Your Greed !!! Get your 10MB Free space only at http://www.forindia.com NOW!
Re: file download with mod_perl
Hi Pritesh, Sorry for replying you late and many thanks for the solution. It has really made my scripts working(or should I say running) well in mod_perl. But is this pure implementation of mod_perl, when I put PerlSendHeader On in Location? I think this is the only way to go if you are porting or writing a CGI script that creates its own HTTP header. On the other hand if you are writing code directly for mod_perl you should use the interface of the request object, i.e. $r-send_http_header. I'm not quite sure, however, since I have not yet written a mod_perl handler. I'm currently using mod_perl only to speed up my CGI scripts. This way they stay independent of Apache and mod_perl. -- Axel.
Re: file download with mod_perl
Hi Pritesh, However, the same code is not working under mod_perl. The file content is the same as original file, but filename is populated as download.cgi instead of actual file name. I think mod_perl is putting its own headers, while sending the data. Are you using the PerlSendHeader On directive in your httpd.conf file? If not put this into your Location section (or whatever) and it should cure your problem, e.g. Location /perl SetHandler perl-script PerlHandlerApache::Registry PerlSendHeader On Options+ExecCgi /Location See also the online mod_perl guide http://perl.apache.org/guide/porting.html#Generating_correct_HTTP_Headers I hope this helps, Axel