Subject: | mod_perl2 patch for Apache::Session::Wrapper |
A fix for getting mod_perl2 2.0.2 and Apache2 to return headers
correctly is to change Wrapper.pm:
if ( $cookie->can('bake') )
{
# Apache::Cookie
$cookie->bake;
}
else
{
my $header_object = $self->{header_object};
for my $meth (@HeaderMethods)
{
if ( $header_object->can($meth) )
{
* if ( $header_object->$meth->can('add') ) {
* $header_object->$meth->add( 'Set-Cookie' => $cookie );
* last;
* }
$header_object->$meth( 'Set-Cookie' => $cookie );
last;
}
}
}
adding the starred lines.
Previously I was getting the error message:
Usage: Apache2::RequestRec::err_headers_out(obj, val=NULL) at
/usr/share/perl5/Apache/Session/Wrapper.pm line 624.
Stack:
[/usr/share/perl5/HTML/Mason/ApacheHandler.pm:889]
[/usr/share/perl5/HTML/Mason/ApacheHandler.pm:829]
Peter