[Catalyst] Set-Cookie question

Andy Grundman andy at hybridized.org
Fri Dec 23 04:22:25 CET 2005


Rob Johnson wrote:
> I noticed that when I deployed a catalyst project under
> Apache, mod_perl2, my outbound cookies were being
> read twice by the browser (it would try to set the exact
> same cookie twice).  I tracked it down to this line in
> Engine/Apache.pm:
> 
> if ( $c->response->header('Set-Cookie') && $c->response->status >= 300 )
> {       
>     my @values = $c->response->header('Set-Cookie');
>     $self->apache->err_headers_out->add( 'Set-Cookie' => $_ ) for @values;
> }

I think perhaps that should be >= 400 codes, not 300.  We only need to save 
cookies with err_headers_out when the code is an error, and 300's are not errors.

-Andy



More information about the Catalyst mailing list