You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Andrew Koebrick <An...@state.mn.us> on 2004/12/14 23:30:32 UTC
regular expressions on $Response ?
Hoping somebody can offer a suggestion on how best to do my headers and
footers. I bumped into problems getting Apache::ASP, Apache 2.0 and filters
working. I was using mod_ext_filter to replace my <body> and </body> tags
(using a simple sed command) with a SSI directive, which in turn pulled in
complex headers and footers.
When I moved to Fedora 3 this scheme started failing. My options are to
move off of Apache::ASP for my embedded perl (perhaps to Mason), or to try
to do the replaces above in a manner more internal to Apache::ASP.
I have not been using the $Response->AddHeader($name, $value) because I
need to keep the existing headers from the HTML files (they contain lots of
metadata.
So, is there a way to do regular expressions agains the $Resoponse object?
Something akin to (escaping ignored):
$Response =~ s/<body>/<!--#include virtual='/inc/header.inc'-><body>/g
I am not currently using a global.asa file, but I guess I could start if I
need to.
Thanks for any suggestions.
Andrew Koebrick
Andrew Koebrick
Web Coordinator / Librarian
Dept. of Administration
State of Minnesota
658 Cedar St.
St. Paul, MN 55155
651-296-4156
http://server.admin.state.mn.us <http://server.admin.state.mn.us>
Andrew Koebrick
Web Coordinator / Librarian
Dept. of Administration
State of Minnesota
658 Cedar St.
St. Paul, MN 55155
651-296-4156
http://server.admin.state.mn.us <http://server.admin.state.mn.us>