Subject: | Client-Warning: Internal response sometimes reset |
Date: | Sat, 3 Nov 2012 18:17:51 +0300 |
To: | bug-libwww-perl [...] rt.cpan.org |
From: | Victor Efimov <victor [...] vsespb.ru> |
In the docs there are:
There will still be a response object returned when LWP can't connect to the
server specified in the URL or when other failures in protocol handlers occur.
These internal responses use the standard HTTP status codes, so the responses
can't be differentiated by testing the response status code alone. Error
responses that LWP generates internally will have the "Client-Warning" header
set to the value "Internal response". If you need to differentiate these
internal responses from responses that a remote server actually generates, you
need to test this header value.
However this does not work when you set max_redirects to 0.
I am getting the following:
500 Can't connect to 1.2.3.4:443 (Connection timed
out)
Content-Type:
text/plain
Client-Date: Sat, 03 Nov 2012 14:32:56
GMT
Client-Warning: Redirect loop detected (max_redirect =
0)
(Client-Warning overwrited with another message about redirect loop)