Page Speed Optimization Libraries
1.3.25.1
|
00001 /* 00002 * Copyright 2010 Google Inc. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http:///www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00022 00023 #ifndef NET_INSTAWEB_HTTP_PUBLIC_META_DATA_H_ 00024 #define NET_INSTAWEB_HTTP_PUBLIC_META_DATA_H_ 00025 00026 namespace net_instaweb { 00027 00032 struct HttpAttributes { 00033 static const char kAcceptEncoding[]; 00034 static const char kAuthorization[]; 00035 static const char kCacheControl[]; 00036 static const char kConnection[]; 00037 static const char kContentEncoding[]; 00038 static const char kContentLanguage[]; 00039 static const char kContentLength[]; 00040 static const char kContentType[]; 00041 static const char kCookie[]; 00042 static const char kCookie2[]; 00043 static const char kDate[]; 00044 static const char kDeflate[]; 00045 static const char kDnt[]; 00046 static const char kEtag[]; 00047 static const char kExpires[]; 00048 static const char kGzip[]; 00049 static const char kHost[]; 00050 static const char kIfModifiedSince[]; 00051 static const char kIfNoneMatch[]; 00052 static const char kLastModified[]; 00053 static const char kLocation[]; 00054 static const char kNoCache[]; 00055 static const char kPragma[]; 00056 static const char kProxyAuthorization[]; 00057 static const char kReferer[]; 00058 static const char kServer[]; 00059 static const char kSetCookie[]; 00060 static const char kSetCookie2[]; 00061 static const char kTransferEncoding[]; 00062 static const char kUserAgent[]; 00063 static const char kVary[]; 00064 static const char kWarning[]; 00065 static const char kXmlHttpRequest[]; 00066 static const char kXAssociatedContent[]; 00067 static const char kXForwardedFor[]; 00068 static const char kXForwardedProto[]; 00069 static const char kXGooglePagespeedClientId[]; 00070 static const char kXGoogleRequestEventId[]; 00073 static const char kXPsaBlockingRewrite[]; 00074 00078 static const char kXPsaOptimizeForSpdy[]; 00079 00081 static const char kXPsaLoadShed[]; 00082 static const char kXRequestedWith[]; 00083 00086 static const char kXOriginalContentLength[]; 00087 static const char kXUACompatible[]; 00088 }; 00089 00090 namespace HttpStatus { 00093 enum Code { 00094 kContinue = 100, 00095 kSwitchingProtocols = 101, 00096 00097 kOK = 200, 00098 kCreated = 201, 00099 kAccepted = 202, 00100 kNonAuthoritative = 203, 00101 kNoContent = 204, 00102 kResetContent = 205, 00103 kPartialContent = 206, 00104 00105 kMultipleChoices = 300, 00106 kMovedPermanently = 301, 00107 kFound = 302, 00108 kSeeOther = 303, 00109 kNotModified = 304, 00110 kUseProxy = 305, 00111 kSwitchProxy = 306, 00112 kTemporaryRedirect = 307, 00113 00114 kBadRequest = 400, 00115 kUnauthorized = 401, 00116 kPaymentRequired = 402, 00117 kForbidden = 403, 00118 kNotFound = 404, 00119 kMethodNotAllowed = 405, 00120 kNotAcceptable = 406, 00121 kProxyAuthRequired = 407, 00122 kRequestTimeout = 408, 00123 kConflict = 409, 00124 kGone = 410, 00125 kLengthRequired = 411, 00126 kPreconditionFailed = 412, 00127 kEntityTooLarge = 413, 00128 kUriTooLong = 414, 00129 kUnsupportedMediaType = 415, 00130 kRangeNotSatisfiable = 416, 00131 kExpectationFailed = 417, 00132 kImATeapot = 418, 00133 00134 kInternalServerError = 500, 00135 kNotImplemented = 501, 00136 kBadGateway = 502, 00137 kUnavailable = 503, 00138 kGatewayTimeout = 504, 00139 kHttpVersionNotSupported = 505, 00140 00142 kProxyPublisherFailure = 520, 00143 kProxyFailure = 521, 00144 kProxyConfigurationFailure = 522, 00145 kProxyDeclinedRequest = 523, 00146 kProxyDnsLookupFailure = 524, 00147 00151 kRememberFetchFailedStatusCode = 10001, 00154 kRememberNotCacheableStatusCode = 10002, 00156 kRememberNotCacheableAnd200StatusCode = 10003, 00159 kUnknownStatusCode = 10004, 00160 }; 00161 00163 const char* GetReasonPhrase(Code rc); 00164 00165 } 00166 00167 } 00168 00169 #endif ///< NET_INSTAWEB_HTTP_PUBLIC_META_DATA_H_