Page Speed Optimization Libraries
1.7.30.2
|
#include "instaweb_context.h"
Public Types | |
enum | ContentEncoding { kNone, kGzip, kDeflate, kOther } |
enum | ContentDetectionState { kStart, kHtml, kNotHtml } |
Public Member Functions | |
InstawebContext (request_rec *request, RequestHeaders *request_headers, const ContentType &content_type, ApacheServerContext *server_context, const GoogleString &base_url, const RequestContextPtr &request_context, bool use_custom_options, const RewriteOptions &options) | |
Takes ownership of request_headers. | |
void | Rewrite (const char *input, int size) |
void | Flush () |
void | Finish () |
apr_bucket_brigade * | bucket_brigade () const |
ContentEncoding | content_encoding () const |
ApacheServerContext * | apache_server_context () |
const GoogleString & | output () |
bool | empty () const |
void | clear () |
ResponseHeaders * | response_headers () |
bool | sent_headers () |
void | set_sent_headers (bool sent) |
void | PopulateHeaders (request_rec *request) |
Populated response_headers_ with the request's headers_out table. | |
Static Public Member Functions | |
static ApacheServerContext * | ServerContextFromServerRec (server_rec *server) |
static const char * | MakeRequestUrl (const RewriteOptions &global_options, request_rec *request) |
Returns a fetchable URI from a request, using the request pool. |
Context for an HTML rewrite.
One is created for responses that appear to be HTML (although there is a basic sanity check that the first non-space char is '<').
The rewriter will put the rewritten content into the output string when flushed or finished. We call Flush when we see the FLUSH bucket, and call Finish when we see the EOS bucket.
ResponseHeaders* net_instaweb::InstawebContext::response_headers | ( | ) | [inline] |
static ApacheServerContext* net_instaweb::InstawebContext::ServerContextFromServerRec | ( | server_rec * | server | ) | [static] |
Looks up the apache server context from the server rec.