Security Advisories (4)
CPANSA-libwww-perl-2017-01 (2017-11-06)

LWP::Protocol::file can open existent file from file:// scheme. However, current version of LWP uses open FILEHANDLE,EXPR and it has ability to execute arbitrary command

CVE-2011-0633 (2011-01-20)

The Net::HTTPS module in libwww-perl (LWP) before 6.00, as used in WWW::Mechanize, LWP::UserAgent, and other products, when running in environments that do not set the If-SSL-Cert-Subject header, does not enable full validation of SSL certificates by default, which allows remote attackers to spoof servers via man-in-the-middle (MITM) attacks involving hostnames that are not properly validated.

CVE-2010-2253 (2010-07-06)

lwp-download in libwww-perl before 5.835 does not reject downloads to filenames that begin with a . (dot) character, which allows remote servers to create or overwrite files via (1) a 3xx redirect to a URL with a crafted filename or (2) a Content-Disposition header that suggests a crafted filename, and possibly execute arbitrary code as a consequence of writing to a dotfile in a home directory.

CPANSA-libwww-perl-2001-01 (2001-03-14)

If LWP::UserAgent::env_proxy is called in a CGI environment, the case-insensitivity when looking for "http_proxy" permits "HTTP_PROXY" to be found, but this can be trivially set by the web client using the "Proxy:" header.

NAME

HTTP::Response - Class encapsulating HTTP Responses

SYNOPSIS

require HTTP::Response;

DESCRIPTION

HTTP::Response is a class encapsulating HTTP style responses, consisting of a response line, a MIME header, and usually content. Note that the LWP library also uses this HTTP style responses for non-HTTP protocols.

Instances of this class are usually created by calling the request() method of an LWP::UserAgent object:

...
$response = $ua->request($request)
if ($response->is_success) {
    print $response->content;
} else {
    print $response->error_as_HTML;
}

METHODS

HTTP::Response is a subclass of HTTP::Message and therefore inherits its methods. The inherited methods are header(), push_header(), remove_header() headers_as_string() and content(). See HTTP::Message for details.

$r = new HTTP::Response ($rc [, $msg])

Constructs a new HTTP::Response object describing a response with response code $rc and optional message $msg

$r->code([$code])

$r->message([$message])

$r->request([$request])

$r->previous([$previousResponse])

These methods provide public access to the member variables. The first two containing respectively the response code and the message of the response.

The request attribute is a reference the request that gave this response. It might not be the same request that was passed to the $ua->request() method, because there might have been redirects and authorization retries.

The previous attribute is used to link together chains of responses. You get chains of responses if the first response is redirect or unauthorized.

$r->base

Returns the base URL for this response. The base URL can come from 3 sources:

1.  Embedded in the document content, for instance <BASE HREF="...">
2.  A "Base:" header in the response
3.  The URL used to request this response

$r->as_string()

Method returning a textual representation of the request. Mainly useful for debugging purposes. It takes no arguments.

$r->is_info

$r->is_success

$r->is_redirect

$r->is_error

These methods indicate if the response was informational, sucessful, a redirection, or an error.

error_as_HTML()

Return string with a complete HTML document indicating what error occurred