Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
header_util.h
Go to the documentation of this file.
1 // Copyright 2010 Google Inc. All Rights Reserved.
16 
17 #ifndef PAGESPEED_APACHE_HEADER_UTIL_H_
18 #define PAGESPEED_APACHE_HEADER_UTIL_H_
19 
20 #include <cstddef>
21 
24 
25 struct request_rec;
26 
27 namespace net_instaweb {
28 
29 class RequestHeaders;
31 
38 
46 void ApacheRequestToRequestHeaders(const request_rec& request,
47  RequestHeaders* request_headers,
48  HeaderPredicateFn* predicate);
49 
51 inline void ApacheRequestToRequestHeaders(const request_rec& request,
52  RequestHeaders* request_headers) {
53  return ApacheRequestToRequestHeaders(request, request_headers, NULL);
54 }
55 
61 void ApacheRequestToResponseHeaders(const request_rec& request,
62  ResponseHeaders* headers,
63  ResponseHeaders* err_headers);
64 
68 void ResponseHeadersToApacheRequest(const ResponseHeaders& response_headers,
69  request_rec* request);
70 
74 void ErrorHeadersToApacheRequest(const ResponseHeaders& err_response_headers,
75  request_rec* request);
76 
78 void DisableDownstreamHeaderFilters(request_rec* request);
79 
81 void PrintHeaders(request_rec* request);
82 
84 GoogleString HeadersOutToString(request_rec* request);
85 
87 GoogleString SubprocessEnvToString(request_rec* request);
88 
90 void DisableCachingRelatedHeaders(request_rec* request);
91 
94 void DisableCacheControlHeader(request_rec* request);
95 
96 }
97 
98 #endif
Read/write API for HTTP request (RequestHeaders is a misnomer).
Definition: request_headers.h:32
Callback2< StringPiece, bool * > HeaderPredicateFn
Definition: header_util.h:30
Definition: callback.h:167
void ResponseHeadersToApacheRequest(const ResponseHeaders &response_headers, request_rec *request)
void ErrorHeadersToApacheRequest(const ResponseHeaders &err_response_headers, request_rec *request)
void PrintHeaders(request_rec *request)
Debug utility for printing Apache headers to stdout.
Read/write API for HTTP response headers.
Definition: response_headers.h:37
void ApacheRequestToResponseHeaders(const request_rec &request, ResponseHeaders *headers, ResponseHeaders *err_headers)
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
void DisableDownstreamHeaderFilters(request_rec *request)
Remove downstream filters that might corrupt our caching headers.
void DisableCacheControlHeader(request_rec *request)
GoogleString SubprocessEnvToString(request_rec *request)
Get request->subprocess_env as a string, intended for tests.
void ApacheRequestToRequestHeaders(const request_rec &request, RequestHeaders *request_headers, HeaderPredicateFn *predicate)
void DisableCachingRelatedHeaders(request_rec *request)
Updates headers related to caching (but not Cache-Control).
GoogleString HeadersOutToString(request_rec *request)
Get request->headers_out as a string, intended for tests.