Skip Menu |

This queue is for tickets about the Apache-Session-Wrapper CPAN distribution.

Report information
The Basics
Id: 9333
Status: resolved
Priority: 0/
Queue: Apache-Session-Wrapper

People
Owner: DROLSKY [...] cpan.org
Requestors: ned [...] n3dst4.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.17
Fixed in: 0.19



Subject: Making Apache::Session::Wrapper understand Apache:RequestRec (patch)
I tried to use Apache::Session::Wrapper-0.17 in my shiny new Apache 2 / mod_perl 2.0 installation, but Apache::Session::Wrapper got upset because $r is now an Apache::RequestRec, which doesn't know about header_out or err_header_out methods. Anyway, I fixed it, and here's a patch for Apache::Session::Wrapper (attached). Hope it's some use.
88c88,90 < sub { $_[0]->can('err_header_out') || $_[0]->can('header_out' ) } }, --- > sub { $_[0]->can('err_header_out') > || $_[0]->can('header_out' ) > || $_[0]->can('headers_out') } }, 618,620c620,625 < my $meth = $header_object->can('err_header_out') ? 'err_header_out' : 'header_out'; < < $header_object->$meth( 'Set-Cookie' => $cookie ); --- > if ($header_object->can('headers_out')) { > $header_object->headers_out->set('Cookie', $cookie); > } else { > my $meth = $header_object->can('err_header_out') ? 'err_header_out' : 'header_out'; > $header_object->$meth( 'Set-Cookie' => $cookie ); > }