20 #ifndef PAGESPEED_APACHE_INSTAWEB_HANDLER_H_
21 #define PAGESPEED_APACHE_INSTAWEB_HANDLER_H_
24 #include "net/instaweb/http/public/request_context.h"
27 #include "net/instaweb/rewriter/public/rewrite_query.h"
38 #include "apr_pools.h"
44 namespace net_instaweb {
47 class ApacheRequestContext;
48 class ApacheRewriteDriverFactory;
49 class ApacheServerContext;
50 class InPlaceResourceRecorder;
72 bool use_custom_options()
const {
return custom_options_.get() != NULL; }
73 const QueryParams& query_params() {
return rewrite_query_.query_params(); }
74 const QueryParams& pagespeed_query_params() {
75 return rewrite_query_.pagespeed_query_params();
77 const QueryParams& pagespeed_option_cookies() {
78 return rewrite_query_.pagespeed_option_cookies();
81 void RemoveStrippedResponseHeadersFromApacheRequest();
100 const GoogleString& url,
bool buffered, StringPiece debug_info);
105 return MakeFetch(original_url_, buffered, debug_info);
144 RequestHeaders* ReleaseRequestHeaders() {
return request_headers_.release(); }
183 void ComputeCustomOptions();
185 static bool IsCompressibleContentType(
const char* content_type);
187 static void send_out_headers_and_body(
188 request_rec* request,
196 request_rec* request,
201 static void write_handler_response(
const StringPiece& output,
202 request_rec* request,
204 const StringPiece& cache_control);
205 static void write_handler_response(
const StringPiece& output,
206 request_rec* request);
213 static const char* get_instaweb_resource_url(
219 static int log_request_headers(
void* logging_data,
const char* key,
222 static void instaweb_static_handler(request_rec* request,
225 static apr_status_t instaweb_statistics_handler(
234 static bool parse_query_params(
const request_rec* request,
GoogleString* data,
240 static bool parse_body_from_post(
const request_rec* request,
243 static apr_status_t instaweb_beacon_handler(
249 request_rec* request_;
270 int num_response_attributes_;
Definition: instaweb_handler.h:64
class GoogleUrl
Definition: google_url.h:58
Definition: apache_fetch.h:44
Definition: rewrite_query.h:41
Definition: in_place_resource_recorder.h:43
void HandleAsPagespeedResource()
Definition: apache_config.h:31
static apr_status_t instaweb_map_to_storage(request_rec *request)
static bool is_pagespeed_subrequest(request_rec *request)
ApacheFetch * MakeFetch(const GoogleString &url, bool buffered, StringPiece debug_info)
Definition: rewrite_options.h:474
ApacheFetch * MakeFetch(bool buffered, StringPiece debug_info)
Definition: instaweb_handler.h:104
Definition: scoped_ptr.h:30
Definition: apache_server_context.h:52
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
RewriteDriver * MakeDriver()
const GoogleUrl & stripped_gurl() const
Any PageSpeed query params are removed.
Definition: instaweb_handler.h:70
Definition: rewrite_driver.h:100
static apr_status_t instaweb_handler(request_rec *request)
Definition: content_type.h:31
void DisownDriver()
Prevent "this" from cleaning up rewrite_driver_ at destruction.
static apr_status_t save_url_hook(request_rec *request)
static void AboutToBeDoneWithRecorder(request_rec *request, InPlaceResourceRecorder *recorder)
const ApacheConfig * options()
Definition: instaweb_handler.h:148
Creates an Apache RewriteDriver.
Definition: apache_rewrite_driver_factory.h:47
void HandleAsProxyForAll()
Definition: apache_request_context.h:37
static apr_status_t save_url_in_note(request_rec *request, ApacheServerContext *server_context)