Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 44922
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: murphy [...] genome.chop.edu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 5.822
Fixed in: (no value)



Subject: Doc change needed: LWP::UserAgent request method returns 500 for refused connections
This is a request for documentation change. Unfortunately, LWP::UserAgent->request return a valid response object marked with a 500 HTTP status code when a connection is refused or other meta-errors occur. Given that this (arguably very broken) behavior can't be changed because of concerns of backwards compatibility, *it must be documented*. Please document the situations in which HTTP status codes are overloaded to represent non-HTTP-response conditions.
On Fri Apr 10 10:51:26 2009, murphy@genome.chop.edu wrote: Show quoted text
> Please document the situations in which HTTP status codes are overloaded > to represent non-HTTP-response conditions.
Do you think http://github.com/gisle/libwww- perl/commit/75db7307013087994ed88e3b5bcaf86fa143dae9 is enough?
From: murphy [...] genome.chop.edu
On Mon Jun 15 12:08:03 2009, GAAS wrote: Show quoted text
> Do you think http://github.com/gisle/libwww- > perl/commit/75db7307013087994ed88e3b5bcaf86fa143dae9 is enough?
That's a wonderful addition, Gisle. Personally I recommend the following amended version of your paragraph: 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.
Thanks. Your version applied as <http://github.com/gisle/libwww- perl/commit/4d72e0d7be855de16983ceaa36105ea0e9fc5e44>