Subject: | SOAP::Transport::HTTP needs to call extract_cookies when dealing with a cookie jar |
When using XMLRPC::Lite as a client and assigning a HTTP::Cookie
cookie_jar, cookies are not extracted from the HTTP response header.
So each subsequent request does not pass the cookies back properly.
Adding the following lines to SOAP::Transport::HTTP allows this to work
properly.
--- lib/SOAP/Transport/HTTP.pm 2006-11-22 13:16:52.000000000 -0500
+++ /usr/lib/perl5/site_perl/5.8.8/SOAP/Transport/HTTP.pm
2007-04-16 14:18:55.000000000 -0400
@@ -234,6 +234,9 @@
$self->message($self->http_response->message);
$self->is_success($self->http_response->is_success);
$self->status($self->http_response->status_line);
+
+ # Pull out any cookies from the response headers.
+ $self->{'_cookie_jar'}->extract_cookies($self->http_response) if
$self->{'_cookie_jar'};
my $content =
($self->http_response->content_encoding || '')