You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Hamilton, Henrique H" <he...@merck.com> on 2004/02/05 21:57:09 UTC

Calling perl output filter before Includes filter

I am using apache2.0.48 and mod perl 1.99_12.
I've written a mod perl module as a perl output filter that rewrites image
links
to point to another server.[example: <img src="header.gif"> becomes <img
src="//someserver.net/www.mysite.com/header.gif">]
My problem is that my perl module doesn't play well with SSI's . 
I know if I call the perl module before it's processed by the ssi (INCLUDES
filter) everything will work fine.
Is there a way to force my perl output filter handler to be called BEFORE
the html is parsed by the INCLUDES output filter?

I've included the directive I use. Any help will be appreciated.


        <Files "*.html" >
                Options +Includes +ExecCGI MultiViews
                SetHandler modperl
                PerlOutputFilterHandler Apache::Fly
        </Files>

Thanks!
--Henrique


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
Jersey, USA 08889), and/or its affiliates (which may be known outside the
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan as
Banyu) that may be confidential, proprietary copyrighted and/or legally
privileged. It is intended solely for the use of the individual or entity
named on this message.  If you are not the intended recipient, and have
received this message in error, please notify us immediately by reply e-mail
and then delete it from your system.
------------------------------------------------------------------------------

-- 
Reporting bugs: 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: Calling perl output filter before Includes filter

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
whoops, wrong list.  sorry.

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Calling perl output filter before Includes filter

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

Hamilton, Henrique H wrote:
> I am using apache2.0.48 and mod perl 1.99_12.
> I've written a mod perl module as a perl output filter that rewrites image
> links
> to point to another server.[example: <img src="header.gif"> becomes <img
> src="//someserver.net/www.mysite.com/header.gif">]
> My problem is that my perl module doesn't play well with SSI's . 
> I know if I call the perl module before it's processed by the ssi (INCLUDES
> filter) everything will work fine.

that sounds like a problem with your logic, not a problem with your filter
order :)

> Is there a way to force my perl output filter handler to be called BEFORE
> the html is parsed by the INCLUDES output filter?

see PerlSetOuputFilter

http://perl.apache.org/docs/2.0/user/handlers/filters.html#C_PerlSetOutputFilter_

HTH

--Geoff





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Calling perl output filter before Includes filter

Posted by david <wh...@davidnicol.com>.

you could always just do a global search and replace on all the files
instead of defering this step to serving time


-- 
Reporting bugs: 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: Calling perl output filter before Includes filter

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

Hamilton, Henrique H wrote:
> I am using apache2.0.48 and mod perl 1.99_12.
> I've written a mod perl module as a perl output filter that rewrites image
> links
> to point to another server.[example: <img src="header.gif"> becomes <img
> src="//someserver.net/www.mysite.com/header.gif">]
> My problem is that my perl module doesn't play well with SSI's . 
> I know if I call the perl module before it's processed by the ssi (INCLUDES
> filter) everything will work fine.

that sounds like a problem with your logic, not a problem with your filter
order :)

> Is there a way to force my perl output filter handler to be called BEFORE
> the html is parsed by the INCLUDES output filter?

see PerlSetOuputFilter

http://perl.apache.org/docs/2.0/user/handlers/filters.html#C_PerlSetOutputFilter_

HTH

--Geoff





-- 
Reporting bugs: 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