Page Speed Optimization Libraries  1.7.30.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
net_instaweb::ApacheServerContext Class Reference

#include "apache_server_context.h"

Inheritance diagram for net_instaweb::ApacheServerContext:
net_instaweb::SystemServerContext net_instaweb::ServerContext

List of all members.

Public Member Functions

 ApacheServerContext (ApacheRewriteDriverFactory *factory, server_rec *server, const StringPiece &version)
ApacheRewriteDriverFactoryapache_factory ()
ApacheConfigglobal_config ()
bool InitPath (const GoogleString &path)
ApacheConfigSpdyConfigOverlay ()
ApacheConfigNonSpdyConfigOverlay ()
bool has_spdy_config_overlay () const
bool has_non_spdy_config_overlay () const
void set_spdy_config_overlay (ApacheConfig *x)
 These two take ownership of their parameters.
void set_non_spdy_config_overlay (ApacheConfig *x)
ApacheConfigSpdyGlobalConfig ()
RewriteDriverPoolspdy_driver_pool ()
virtual void CollapseConfigOverlaysAndComputeSignatures ()
bool PoolDestroyed ()
const server_rec * server () const
virtual RewriteDriverPoolSelectDriverPool (bool using_spdy)
 Chooses a driver pool based on the request protocol.
virtual void MaybeApplySpdySessionFetcher (const RequestContextPtr &request, RewriteDriver *driver)
 Hook for implementations to support fetching directly from the spdy module.
ProxyFetchFactoryproxy_fetch_factory ()
void InitProxyFetchFactory ()
virtual bool ProxiesHtml () const
ApacheRequestContextNewApacheRequestContext (request_rec *request)
void ReportResourceNotFound (StringPiece message, request_rec *request)
void ReportStatisticsNotFound (StringPiece message, request_rec *request)
void ReportSlurpNotFound (StringPiece message, request_rec *request)

Static Public Member Functions

static void InitStats (Statistics *statistics)
 This must be called for every statistics object in use before using this.

Detailed Description

Creates an Apache-specific ServerContext. This differs from base class that it incorporates by adding per-VirtualHost configuration, including:


Member Function Documentation

This should be called after all configuration parsing is done to collapse configuration inside the config overlays into actual ApacheConfig objects. It will also compute signatures when done.

Reimplemented from net_instaweb::SystemServerContext.

These return true if the given overlays were constructed (in response to having something in config files to put in them).

Creates a request context which is suitable for resolving options, but is not yet suitable for establishing a context from which to do fetches. Establishing that context is slightly expensive so we want to only do that in request-paths that can lead to spdy fetches.

To enable a rewrite context for fetching, call apache_request_context->SetupSpdyConnectionIfNeeded(request); after the object is context is constructed.

Called on notification from Apache on child exit. Returns true if this is the last ServerContext that exists.

virtual bool net_instaweb::ApacheServerContext::ProxiesHtml ( ) const [inline, virtual]

We do not proxy external HTML from mod_pagespeed in Apache using the ProxyFetch flow. Currently we must rely on a separate module to let mod_pagespeed behave as an origin fetcher.

Implements net_instaweb::ServerContext.

void net_instaweb::ApacheServerContext::ReportResourceNotFound ( StringPiece  message,
request_rec *  request 
) [inline]

Reports an error status to the HTTP resource request, and logs the error as a Warning to the log file, and bumps a stat as needed.

void net_instaweb::ApacheServerContext::ReportSlurpNotFound ( StringPiece  message,
request_rec *  request 
) [inline]

Reports an error status to the HTTP slurp request, and logs the error as a Warning to the log file, and bumps a stat as needed.

void net_instaweb::ApacheServerContext::ReportStatisticsNotFound ( StringPiece  message,
request_rec *  request 
) [inline]

Reports an error status to the HTTP statistics request, and logs the error as a Warning to the log file, and bumps a stat as needed.

Pool to pass to NewRewriteDriverFromPool to get a RewriteDriver configured with SPDY-specific options. May be NULL in case there is no spdy-specific configuration.

These return configuration objects that hold settings from <ModPagespeedIf spdy>=""> and <ModPagespeedIf !spdy> sections of configuration. They initialize lazily, so are not thread-safe; however they are only meant to be used during configuration parsing. These methods should be called only if there is actually a need to put something in them, since otherwise we may end up constructing separate SPDY vs. non-SPDY configurations needlessly.

Returns special configuration that should be used for SPDY sessions instead of global_config(). Returns NULL if global_config() should be used instead.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines