Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
http_names.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http:///www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
20 
21 #ifndef PAGESPEED_KERNEL_HTTP_HTTP_NAMES_H_
22 #define PAGESPEED_KERNEL_HTTP_HTTP_NAMES_H_
23 
25 
26 namespace net_instaweb {
27 
33  static const char kAccept[];
34  static const char kAcceptEncoding[];
35  static const char kAcceptRanges[];
36  static const char kAccessControlAllowOrigin[];
37  static const char kAccessControlAllowCredentials[];
38  static const char kAge[];
39  static const char kAllow[];
40  static const char kAltSvc[];
41  static const char kAlternateProtocol[];
42  static const char kAttachment[];
43  static const char kAuthorization[];
44  static const char kCacheControl[];
45  static const char kConnection[];
46  static const char kContentEncoding[];
47  static const char kContentDisposition[];
48  static const char kContentLanguage[];
49  static const char kContentLength[];
50  static const char kContentSecurityPolicy[];
51  static const char kContentType[];
52  static const char kCookie[];
53  static const char kCookie2[];
54  static const char kDate[];
55  static const char kDeflate[];
56  static const char kDnt[];
57  static const char kEtag[];
58  static const char kExpires[];
59  static const char kGzip[];
60  static const char kHost[];
61  static const char kIfModifiedSince[];
62  static const char kIfNoneMatch[];
63  static const char kKeepAlive[];
64  static const char kLastModified[];
65  static const char kLink[];
66  static const char kLocation[];
67  static const char kMaxAge[];
68  static const char kNoCache[];
69  static const char kNoCacheMaxAge0[];
70  static const char kNoStore[];
71  static const char kNosniff[];
72  static const char kOrigin[];
73  static const char kPragma[];
74  static const char kPrivate[];
75  static const char kProxyAuthenticate[];
76  static const char kProxyAuthorization[];
77  static const char kPublic[];
78  static const char kPurpose[];
79  static const char kReferer[];
80  static const char kRefresh[];
81  static const char kSaveData[];
82  static const char kServer[];
83  static const char kSetCookie[];
84  static const char kSetCookie2[];
85  static const char kTE[];
86  static const char kTrailers[];
87  static const char kTransferEncoding[];
88  static const char kUpgrade[];
89  static const char kUserAgent[];
90  static const char kVary[];
91  static const char kVia[];
92  static const char kWarning[];
93  static const char kXmlHttpRequest[];
94  static const char kXAssociatedContent[];
95  static const char kXContentTypeOptions[];
96  static const char kXForwardedFor[];
97  static const char kXForwardedProto[];
98  static const char kXGooglePagespeedClientId[];
99  static const char kXGoogleRequestEventId[];
102  static const char kXPsaBlockingRewrite[];
105  static const char kXPsaBlockingRewriteMode[];
109  static const char kXPsaBlockingRewriteModeSlow[];
110 
112  static const char kXPsaClientOptions[];
113 
115  static const char kXPsaLoadShed[];
116 
117  static const char kXRequestedWith[];
118 
121  static const char kXOriginalContentLength[];
122  static const char kXUACompatible[];
123 
125  static const char kXSendfile[];
126  static const char kXAccelRedirect[];
128  static const char kXPageSpeedLoop[];
129 
135  static const StringPieceVector& SortedEndToEndHeaders();
136 
145  static const StringPieceVector& SortedHopByHopHeaders();
146 
153  static const StringPieceVector& CachingHeadersToBeRemoved();
154 };
155 
156 namespace HttpStatus {
159 enum Code {
160  kContinue = 100,
161  kSwitchingProtocols = 101,
162 
163  kOK = 200,
164  kCreated = 201,
165  kAccepted = 202,
166  kNonAuthoritative = 203,
167  kNoContent = 204,
168  kResetContent = 205,
169  kPartialContent = 206,
170 
171  kMultipleChoices = 300,
172  kMovedPermanently = 301,
173  kFound = 302,
174  kSeeOther = 303,
175  kNotModified = 304,
176  kUseProxy = 305,
177  kSwitchProxy = 306,
178  kTemporaryRedirect = 307,
179 
180  kBadRequest = 400,
181  kUnauthorized = 401,
182  kPaymentRequired = 402,
183  kForbidden = 403,
184  kNotFound = 404,
185  kMethodNotAllowed = 405,
186  kNotAcceptable = 406,
187  kProxyAuthRequired = 407,
188  kRequestTimeout = 408,
189  kConflict = 409,
190  kGone = 410,
191  kLengthRequired = 411,
192  kPreconditionFailed = 412,
193  kEntityTooLarge = 413,
194  kUriTooLong = 414,
195  kUnsupportedMediaType = 415,
196  kRangeNotSatisfiable = 416,
197  kExpectationFailed = 417,
198  kImATeapot = 418,
199 
200  kInternalServerError = 500,
201  kNotImplemented = 501,
202  kBadGateway = 502,
203  kUnavailable = 503,
204  kGatewayTimeout = 504,
205  kHttpVersionNotSupported = 505,
206 
208  kProxyPublisherFailure = 520,
209  kProxyFailure = 521,
210  kProxyConfigurationFailure = 522,
211  kProxyDeclinedRequest = 523,
212  kProxyDnsLookupFailure = 524,
213 
218  kRememberFailureRangeStart = 10001,
219 
221  kRememberFetchFailedStatusCode = 10001,
222 
225  kRememberNotCacheableStatusCode = 10002,
226 
229  kRememberNotCacheableAnd200StatusCode = 10003,
230 
232  kRememberFetchFailed4xxCode = 10004,
233 
236  kRememberEmptyStatusCode = 10005,
237 
240  kRememberDroppedStatusCode = 10006,
241 
243  kRememberFailureRangeEnd,
244 
247  kUnknownStatusCode = 10020,
248 };
249 
251 const char* GetReasonPhrase(Code rc);
252 
253 }
254 
255 }
256 
257 #endif
static const StringPieceVector & CachingHeadersToBeRemoved()
static const char kXPsaLoadShed[]
This header is set on optional fetches that got dropped due to load.
Definition: http_names.h:115
static const StringPieceVector & SortedHopByHopHeaders()
static const char kXPsaBlockingRewriteModeSlow[]
Definition: http_names.h:109
Definition: http_names.h:32
static const char kReferer[]
sic
Definition: http_names.h:79
static const char kXPsaClientOptions[]
A request header for client to specify client options.
Definition: http_names.h:112
static const StringPieceVector & SortedEndToEndHeaders()
static const char kXPageSpeedLoop[]
PageSpeed Loop detection for proxy mode.
Definition: http_names.h:128
static const char kXPsaBlockingRewrite[]
Definition: http_names.h:102
static const char kXPsaBlockingRewriteMode[]
Definition: http_names.h:105
static const char kXSendfile[]
Sendfile type responses.
Definition: http_names.h:125
static const char kXOriginalContentLength[]
Definition: http_names.h:121