Skip to content

Commit

Permalink
Merge pull request #1 from karenetheridge/topic/lwpua_derive_message
Browse files Browse the repository at this point in the history
Derive the message from status code if it was not provided
  • Loading branch information
gisle committed Aug 15, 2012
2 parents 4a4ed7b + 60777a2 commit a5044f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/LWP/UserAgent.pm
Expand Up @@ -1036,6 +1036,7 @@ sub no_proxy {


sub _new_response { sub _new_response {
my($request, $code, $message, $content) = @_; my($request, $code, $message, $content) = @_;
$message ||= HTTP::Status::status_message($code);
my $response = HTTP::Response->new($code, $message); my $response = HTTP::Response->new($code, $message);
$response->request($request); $response->request($request);
$response->header("Client-Date" => HTTP::Date::time2str(time)); $response->header("Client-Date" => HTTP::Date::time2str(time));
Expand Down

0 comments on commit a5044f7

Please sign in to comment.