00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 kCacheControl[];
00035 static const char kConnection[];
00036 static const char kContentEncoding[];
00037 static const char kContentLanguage[];
00038 static const char kContentLength[];
00039 static const char kContentType[];
00040 static const char kCookie[];
00041 static const char kCookie2[];
00042 static const char kDate[];
00043 static const char kDeflate[];
00044 static const char kDnt[];
00045 static const char kEtag[];
00046 static const char kExpires[];
00047 static const char kGzip[];
00048 static const char kHost[];
00049 static const char kIfModifiedSince[];
00050 static const char kIfNoneMatch[];
00051 static const char kLastModified[];
00052 static const char kLocation[];
00053 static const char kNoCache[];
00054 static const char kPragma[];
00055 static const char kReferer[];
00056 static const char kServer[];
00057 static const char kSetCookie[];
00058 static const char kSetCookie2[];
00059 static const char kTransferEncoding[];
00060 static const char kUserAgent[];
00061 static const char kVary[];
00062 static const char kWarning[];
00063 static const char kXAssociatedContent[];
00064 static const char kXForwardedFor[];
00065 static const char kXGooglePagespeedClientId[];
00066 };
00067
00068 namespace HttpStatus {
00071 enum Code {
00072 kContinue = 100,
00073 kSwitchingProtocols = 101,
00074
00075 kOK = 200,
00076 kCreated = 201,
00077 kAccepted = 202,
00078 kNonAuthoritative = 203,
00079 kNoContent = 204,
00080 kResetContent = 205,
00081 kPartialContent = 206,
00082
00083 kMultipleChoices = 300,
00084 kMovedPermanently = 301,
00085 kFound = 302,
00086 kSeeOther = 303,
00087 kNotModified = 304,
00088 kUseProxy = 305,
00089 kSwitchProxy = 306,
00090 kTemporaryRedirect = 307,
00091
00092 kBadRequest = 400,
00093 kUnauthorized = 401,
00094 kPaymentRequired = 402,
00095 kForbidden = 403,
00096 kNotFound = 404,
00097 kMethodNotAllowed = 405,
00098 kNotAcceptable = 406,
00099 kProxyAuthRequired = 407,
00100 kRequestTimeout = 408,
00101 kConflict = 409,
00102 kGone = 410,
00103 kLengthRequired = 411,
00104 kPreconditionFailed = 412,
00105 kEntityTooLarge = 413,
00106 kUriTooLong = 414,
00107 kUnsupportedMediaType = 415,
00108 kRangeNotSatisfiable = 416,
00109 kExpectationFailed = 417,
00110 kImATeapot = 418,
00111
00112 kInternalServerError = 500,
00113 kNotImplemented = 501,
00114 kBadGateway = 502,
00115 kUnavailable = 503,
00116 kGatewayTimeout = 504,
00117 kHttpVersionNotSupported = 505,
00118
00120 kProxyPublisherFailure = 520,
00121 kProxyFailure = 521,
00122 kProxyConfigurationFailure = 522,
00123 kProxyDeclinedRequest = 523,
00124
00128 kRememberFetchFailedStatusCode = 10001,
00129 kRememberNotCacheableStatusCode = 10002,
00130 };
00131
00133 const char* GetReasonPhrase(Code rc);
00134
00135 }
00136
00137 }
00138
00139 #endif ///< NET_INSTAWEB_HTTP_PUBLIC_META_DATA_H_