Page Speed Optimization Libraries  1.4.26.1
net/instaweb/http/public/meta_data.h
Go to the documentation of this file.
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 kAllow[];
00035   static const char kAuthorization[];
00036   static const char kCacheControl[];
00037   static const char kConnection[];
00038   static const char kContentEncoding[];
00039   static const char kContentLanguage[];
00040   static const char kContentLength[];
00041   static const char kContentType[];
00042   static const char kCookie[];
00043   static const char kCookie2[];
00044   static const char kDate[];
00045   static const char kDeflate[];
00046   static const char kDnt[];
00047   static const char kEtag[];
00048   static const char kExpires[];
00049   static const char kGzip[];
00050   static const char kHost[];
00051   static const char kIfModifiedSince[];
00052   static const char kIfNoneMatch[];
00053   static const char kLastModified[];
00054   static const char kLocation[];
00055   static const char kNoCache[];
00056   static const char kPragma[];
00057   static const char kProxyAuthorization[];
00058   static const char kReferer[]; 
00059   static const char kServer[];
00060   static const char kSetCookie[];
00061   static const char kSetCookie2[];
00062   static const char kTransferEncoding[];
00063   static const char kUserAgent[];
00064   static const char kVary[];
00065   static const char kWarning[];
00066   static const char kXmlHttpRequest[];
00067   static const char kXAssociatedContent[];
00068   static const char kXForwardedFor[];
00069   static const char kXForwardedProto[];
00070   static const char kXGooglePagespeedClientId[];
00071   static const char kXGoogleRequestEventId[];
00074   static const char kXPsaBlockingRewrite[];
00075 
00077   static const char kXPsaClientOptions[];
00078 
00080   static const char kXPsaLoadShed[];
00081 
00085   static const char kXPsaOptimizeForSpdy[];
00086 
00089   static const char kXPsaRequestMetadata[];
00090 
00093   static const char kXPsaResponseMetadata[];
00094 
00095   static const char kXRequestedWith[];
00096 
00099   static const char kXOriginalContentLength[];
00100   static const char kXUACompatible[];
00101 };
00102 
00103 namespace HttpStatus {
00106 enum Code {
00107   kContinue = 100,
00108   kSwitchingProtocols = 101,
00109 
00110   kOK = 200,
00111   kCreated = 201,
00112   kAccepted = 202,
00113   kNonAuthoritative = 203,
00114   kNoContent = 204,
00115   kResetContent = 205,
00116   kPartialContent = 206,
00117 
00118   kMultipleChoices = 300,
00119   kMovedPermanently = 301,
00120   kFound = 302,
00121   kSeeOther = 303,
00122   kNotModified = 304,
00123   kUseProxy = 305,
00124   kSwitchProxy = 306,  
00125   kTemporaryRedirect = 307,
00126 
00127   kBadRequest = 400,
00128   kUnauthorized = 401,
00129   kPaymentRequired = 402,
00130   kForbidden = 403,
00131   kNotFound = 404,
00132   kMethodNotAllowed = 405,
00133   kNotAcceptable = 406,
00134   kProxyAuthRequired = 407,
00135   kRequestTimeout = 408,
00136   kConflict = 409,
00137   kGone = 410,
00138   kLengthRequired = 411,
00139   kPreconditionFailed = 412,
00140   kEntityTooLarge = 413,
00141   kUriTooLong = 414,
00142   kUnsupportedMediaType = 415,
00143   kRangeNotSatisfiable = 416,
00144   kExpectationFailed = 417,
00145   kImATeapot = 418,
00146 
00147   kInternalServerError = 500,
00148   kNotImplemented = 501,
00149   kBadGateway = 502,
00150   kUnavailable = 503,
00151   kGatewayTimeout = 504,
00152   kHttpVersionNotSupported = 505,
00153 
00155   kProxyPublisherFailure = 520,
00156   kProxyFailure = 521,
00157   kProxyConfigurationFailure = 522,
00158   kProxyDeclinedRequest = 523,
00159   kProxyDnsLookupFailure = 524,
00160 
00164   kRememberFetchFailedStatusCode = 10001,
00167   kRememberNotCacheableStatusCode = 10002,
00169   kRememberNotCacheableAnd200StatusCode = 10003,
00172   kUnknownStatusCode = 10004,
00173 };
00174 
00176 const char* GetReasonPhrase(Code rc);
00177 
00178 }  
00179 
00180 }  
00181 
00182 #endif  ///< NET_INSTAWEB_HTTP_PUBLIC_META_DATA_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines