You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Bill Moseley <mo...@hank.org> on 2000/08/21 01:08:50 UTC
filtering outgoing headers
Hi,
In the converted AuthCookie (AuthCookieURL?) that also handles sessions by
URL, I need a way to add the session back on the URL when Apache generates
a redirect to someplace within the site (e.g. when a request is for a
directory).
Currently, I'm registering a 301 and 302 ErrorDocument to prefix the
Location: header with the session ID. I don't like this method as it
requires the ErrorDocument and prevents other ErrorDocument handlers, and
adds ugly configuration in httpd.conf. And it won't work in CGI scripts
that just print a Location: header.
Is there a mod_perl solution to this problem without using an
ErrorDocument? Could I override $r->send_http_header or would that not
work with internal Apache redirects? Shooting in the dark, I tried to tie
*STDOUT in a fixup handler, but the PRINT method never gets called. But
this isn't really a pipelined handler operation -- perhaps mod_perl ties
*STDOUT after the fixup handler?
It would be nice in mod_perl to be able to filter everything that's going
to the client -- even non-mod_perl generated responses in ways other than
using pipelined PerlHandlers.
Anyway, I'm searching for suggestions as at this point I'm just guessing...
Thanks,
Bill Moseley
mailto:moseley@hank.org