Luigi Iotti > Squid-Guard-0.15 > Squid::Guard::Request

Download:
Squid-Guard-0.15.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.15   Source  

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: 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()

When called without arguments, returns a hash consisting of the extra key/value pairs found in the request. If an argument is supplied, it is taken as a key and the corresponding value (or undef) is returned. You can access the string of key/value pairs exactly as passed in the request by using _kvpairs instead

$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.

syntax highlighting: