NAME
Squid::Guard::Request - A request to Squid::Guard
SYNOPSYS
use Squid::Guard::Request;
my $req = Squid::Guard->new($str);
DESCRIPTION
Initializes a new Request object based on the string coming from Squid to the redirector.
Squid::Guard::Request->new( $str )
API call to create a new object. The $str parameter should be in the format used by Squid to pass a request to the redirection program: C<url addr/fqdn user method kvpairs>.
$req->url()
Get request url
$req->addr()
Get request address
$req->fqdn()
Get request fqdn
$req->ident()
Get request ident
$req->method()
Get request method
$req->kvpairs()
Get request kvpairs
$req->_scheme() $req->scheme() $req->authority() $req->host() $req->_port() $req->port() $req->path() $req->query() $req->path_query() $req->authority_path_query() $req->fragment()
Get url components. These methods are inspired form the URI module.
If a port is not specified explicitly in the request, then $req->port returns the scheme's default port.
If you don't want the default port substituted, then you can use the $uri->_port method instead. (behaviour consistent with URI module)
Similarly, $req->_scheme reports the scheme explicitly specified in the requested url, or undef if not present (this is cthe case of CONNECT requests).
When $req->_scheme is undef and $uri->_port is defined, $req->scheme is set to the port's default scheme.