Subject: | Cookies in response are ignored on redirect |
I hope this is the last one of the evening, but
POE::Component::Client::HTTP ignores cookies set by the server during a
redirect. I suggest the following around line 428 of
POE::Component::Client::HTTP::Request in check_redirect() to correct the
issue:
return undef unless ($self->[REQ_RESPONSE]->is_redirect);
+ # Make sure to frob any cookies set, redirect cookies are cookies too!
+ $self->[REQ_FACTORY]->frob_cookies($self->[REQ_RESPONSE]);
+
my $new_uri = $self->[REQ_RESPONSE]->header ('Location');
DEBUG and warn "REQ: Preparing redirect to $new_uri";