Hello,
I came across a bug in CAP::Dispatch when trying to set a header under
mod_perl 2. It looks like the caching goes a little bit too far, so
that the apache request object ($r) is also cached which leads to some
unexpected results, e.g. when setting headers through the request
object.
As a quick fix I changed Dispatch.pm like this (around line 258):
if ( my $final_args = $self->_url_cache() ) {
if ($args{args_to_new}{PARAMS}{r}) {
$final_args->[2]{PARAMS}{r} =
$args{args_to_new}{PARAMS}{r};
}
By the way -- shouldn't CAPs header_add and friends handle the setting
of headers, no matter what the environment? At the moment I have to
test if I am running as normal CGI or under mod_perl2 (I think under
mod_perl1 it is still possible to just 'print' headers like in CGI).
No big deal, really but perhaps something for the next version.
-- Michael
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]