Page Speed Optimization Libraries
1.8.31.3
|
Public Member Functions | |
SystemRequestContext (AbstractMutex *logging_mutex, Timer *timer, StringPiece hostname, int local_port, StringPiece local_ip) | |
void | set_url (StringPiece url) |
int | local_port () const |
const GoogleString & | local_ip () const |
StringPiece | url () const |
Static Public Member Functions | |
static SystemRequestContext * | DynamicCast (RequestContext *rc) |
static StringPiece | MinimalPrivateSuffix (StringPiece hostname) |
net_instaweb::SystemRequestContext::SystemRequestContext | ( | AbstractMutex * | logging_mutex, |
Timer * | timer, | ||
StringPiece | hostname, | ||
int | local_port, | ||
StringPiece | local_ip | ||
) |
There are two ways a request may specify the hostname: with the Host header or on the initial request line. Callers need to check both places.
static SystemRequestContext* net_instaweb::SystemRequestContext::DynamicCast | ( | RequestContext * | rc | ) | [static] |
Returns rc as a SystemRequestContext* if it is one and CHECK fails if it is not. Returns NULL if rc is NULL.
Reimplemented in net_instaweb::ApacheRequestContext.
static StringPiece net_instaweb::SystemRequestContext::MinimalPrivateSuffix | ( | StringPiece | hostname | ) | [static] |
The public suffix of a hostname is the bit shared between multiple organizations. For example, anyone can register under ".com", ".co.uk", or ".appspot.com". The minimal private suffix goes one dotted section further, and is the name you would register when getting a domain: "google.com", "google.co.uk", "mysite.appspot.com". See system_request_context_test for more examples.
void net_instaweb::SystemRequestContext::set_url | ( | StringPiece | url | ) | [inline] |
Captures the original URL of the request, which is used to help authorize domains for fetches we do on behalf of that request.