You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Cristóvão B. B. Dalla Costa" <cb...@fs.inf.br> on 2004/04/29 22:40:24 UTC

help with perlfixuphandler

Hello

We're developing an application which returns large files depending on 
the URL provided. For cleanliness and easier updates we do not want to 
set an Apache Alias for each file, instead we're looking them up in a 
database.

Originally, we had a PerlHandler identify the file and print it out, but 
it's obviously not the optimal solution, which would be to have Apache 
itself send the file.

We then set up a PerlFixupHandler which sets the file to send with 
$r->filename, but that's having no effect.

We're using mod_perl 1.29 with apache 1.3.19.

Thanks in advance,

Cristovao

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: help with perlfixuphandler

Posted by "Cristóvão B. B. Dalla Costa" <cb...@fs.inf.br>.
Geoffrey Young wrote:

>Cristóvão B. B. Dalla Costa wrote:
>  
>
>>We then set up a PerlFixupHandler which sets the file to send with
>>$r->filename, but that's having no effect.
>>    
>>
>
>that's odd.  if you set $r->filename($file) from a PerlFixupHandler and have
> apache's default handler (either no SetHandler or SetHandler
>default_handler) service the content phase, all should work out fin
>  
>
I figured out I have to set $r->path_info ('') and now it works fine.

Thanks.


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: help with perlfixuphandler

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Cristóvão B. B. Dalla Costa wrote:
> Hello
> 
> We're developing an application which returns large files depending on
> the URL provided. For cleanliness and easier updates we do not want to
> set an Apache Alias for each file, instead we're looking them up in a
> database.
> 
> Originally, we had a PerlHandler identify the file and print it out, but
> it's obviously not the optimal solution, which would be to have Apache
> itself send the file.
> 
> We then set up a PerlFixupHandler which sets the file to send with
> $r->filename, but that's having no effect.

that's odd.  if you set $r->filename($file) from a PerlFixupHandler and have
 apache's default handler (either no SetHandler or SetHandler
default_handler) service the content phase, all should work out fin

> 
> We're using mod_perl 1.29 with apache 1.3.19.

then see

http://search.cpan.org/~lindner/Apache-CacheContent-0.12/

for an example of how this kind of thing can work.  further discussion is in
recipe 14.5 in the mod_perl developer's cookbook.

HTH

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html