I have had a problem with sending a request with LWP::UserAgent to a server 
that returns multiple 100 Continue responses after the request has been 
written. The server responds with:

HTTP/1.1 100 Continue

HTTP/1.1 100 Continue

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
...

This works okay when I do it over telnet, but with LWP::UserAgent it doesn't. 
It seems to handle multiple 100 Continue responses while it is writing data, 
but after will only accept one. I have attached a patch to the file 
lib/LWP/Protocol/http.pm that seems to fix the problem.

Regards,
Thomas Yandell

--- lib/LWP/Protocol/http.pm~	2004-06-14 18:40:40.000000000 +0100
+++ lib/LWP/Protocol/http.pm	2004-10-14 17:11:02.979140012 +0100
@@ -305,7 +305,7 @@
     ($code, $mess, @h) = $socket->read_response_headers(laxed => 1, junk_out => [EMAIL PROTECTED])
 	unless $code;
     ($code, $mess, @h) = $socket->read_response_headers(laxed => 1, junk_out => [EMAIL PROTECTED])
-	if $code eq "100";
+	while $code eq "100";
 
     my $response = HTTP::Response->new($code, $mess);
     my $peer_http_version = $socket->peer_http_version;

Reply via email to