#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, ApacheResourceManager *manager, const GoogleString &base_url, 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 |
ApacheResourceManager * | manager () |
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 ApacheResourceManager * | ManagerFromServerRec (server_rec *server) |
static const char * | MakeRequestUrl (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.
static ApacheResourceManager* net_instaweb::InstawebContext::ManagerFromServerRec | ( | server_rec * | server | ) | [static] |
Looks up the manager from the server rec.
ResponseHeaders* net_instaweb::InstawebContext::response_headers | ( | ) | [inline] |