Permalink
Browse files

derive the message argument from status code if it was not provided

  • Loading branch information...
1 parent 4a4ed7b commit 60777a2abe97151a649e3f1b3266366c19a80413 @karenetheridge committed Aug 14, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/LWP/UserAgent.pm
@@ -1036,6 +1036,7 @@ sub no_proxy {
sub _new_response {
my($request, $code, $message, $content) = @_;
+ $message ||= HTTP::Status::status_message($code);
my $response = HTTP::Response->new($code, $message);
$response->request($request);
$response->header("Client-Date" => HTTP::Date::time2str(time));

0 comments on commit 60777a2

Please sign in to comment.