#175 Only last Cookie Set

0.71
closed
Martin Kutter
Transport (26)
5
2010-03-15
2010-02-04
Mockodin
No

http://rt.cpan.org/Ticket/Display.html?id=54106

SOAP::Transport::HTTP
> if ( $self->{'MOD_PERL_VERSION'} > 1 ) {
> $self->response->headers->scan( sub { $r->headers_out->set(@_) } ); #<- line 807
> $r->content_type( join '; ', $self->response->content_type );
> }
> else {
> $self->response->headers->scan( sub { $r->header_out(@_) } );
> $r->send_http_header( join '; ', $self->response->content_type );
> }
> $r->print( $self->response->content );
> return $self->{OK};

Should be:
$self->response->headers->scan( sub { $r->headers_out->add(@_) } );

$r->headers_out->set() appears to keep overwriting the same cookie
header with each subsequent cookie, there by setting only the last

$r->headers_out->add() on the other hand properly adds each uniquely

Issue found will debugging login issues in Bugzilla::WebService::XMLRPC

~Mockodin

Discussion

  • Mockodin
    Mockodin
    2010-02-26

    Patch v1

     
  • Martin Kutter
    Martin Kutter
    2010-02-28

    • status: open --> pending
     
    • status: pending --> closed
     
  • This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).