Http Namespace Reference

Namespaces

 One
 

Classes

class  ContentLengthInterpreter
 
class  Message
 common parts of HttpRequest and HttpReply More...
 
class  HeaderTableRecord
 
class  HeaderLookupTable_t
 
class  StateFlags
 
class  StatusLine
 
class  Stream
 

Typedefs

typedef RefCount< Http::MessageMessagePointer
 
typedef RefCount< Http::StreamStreamPointer
 
typedef enum Http::_method_t MethodType
 

Enumerations

enum  _method_t {
  METHOD_NONE = 0,
  METHOD_GET,
  METHOD_POST,
  METHOD_PUT,
  METHOD_HEAD,
  METHOD_CONNECT,
  METHOD_TRACE,
  METHOD_OPTIONS,
  METHOD_DELETE,
  METHOD_CHECKOUT,
  METHOD_CHECKIN,
  METHOD_UNCHECKOUT,
  METHOD_MKWORKSPACE,
  METHOD_VERSION_CONTROL,
  METHOD_REPORT,
  METHOD_UPDATE,
  METHOD_LABEL,
  METHOD_MERGE,
  METHOD_BASELINE_CONTROL,
  METHOD_MKACTIVITY,
  METHOD_PROPFIND,
  METHOD_PROPPATCH,
  METHOD_MKCOL,
  METHOD_COPY,
  METHOD_MOVE,
  METHOD_LOCK,
  METHOD_UNLOCK,
  METHOD_SEARCH,
  METHOD_PRI,
  METHOD_PURGE,
  METHOD_OTHER,
  METHOD_ENUM_END
}
 
enum  HdrType {
  enumBegin_ = 0,
  ACCEPT = enumBegin_,
  ACCEPT_CHARSET,
  ACCEPT_ENCODING,
  ACCEPT_LANGUAGE,
  ACCEPT_RANGES,
  AGE,
  ALLOW,
  ALTERNATE_PROTOCOL,
  AUTHENTICATION_INFO,
  AUTHORIZATION,
  CACHE_CONTROL,
  CONNECTION,
  CONTENT_BASE,
  CONTENT_DISPOSITION,
  CONTENT_ENCODING,
  CONTENT_LANGUAGE,
  CONTENT_LENGTH,
  CONTENT_LOCATION,
  CONTENT_MD5,
  CONTENT_RANGE,
  CONTENT_TYPE,
  COOKIE,
  COOKIE2,
  DATE,
  ETAG,
  EXPECT,
  EXPIRES,
  FORWARDED,
  FROM,
  HOST,
  HTTP2_SETTINGS,
  IF_MATCH,
  IF_MODIFIED_SINCE,
  IF_NONE_MATCH,
  IF_RANGE,
  IF_UNMODIFIED_SINCE,
  KEEP_ALIVE,
  KEY,
  LAST_MODIFIED,
  LINK,
  LOCATION,
  MAX_FORWARDS,
  MIME_VERSION,
  NEGOTIATE,
  ORIGIN,
  PRAGMA,
  PROXY_AUTHENTICATE,
  PROXY_AUTHENTICATION_INFO,
  PROXY_AUTHORIZATION,
  PROXY_CONNECTION,
  PROXY_SUPPORT,
  PUBLIC,
  RANGE,
  REFERER,
  REQUEST_RANGE,
  RETRY_AFTER,
  SERVER,
  SET_COOKIE,
  SET_COOKIE2,
  TE,
  TITLE,
  TRAILER,
  TRANSFER_ENCODING,
  TRANSLATE,
  UNLESS_MODIFIED_SINCE,
  UPGRADE,
  USER_AGENT,
  VARY,
  VIA,
  WARNING,
  WWW_AUTHENTICATE,
  X_CACHE,
  X_CACHE_LOOKUP,
  X_FORWARDED_FOR,
  X_REQUEST_URI,
  X_SQUID_ERROR,
  HDR_X_ACCELERATOR_VARY,
  X_NEXT_SERVICES,
  SURROGATE_CAPABILITY,
  SURROGATE_CONTROL,
  FRONT_END_HTTPS,
  FTP_COMMAND,
  FTP_ARGUMENTS,
  FTP_PRE,
  FTP_STATUS,
  FTP_REASON,
  OTHER,
  BAD_HDR,
  enumEnd_
}
 
enum  HdrFieldType {
  HdrFieldType::ftInvalid,
  HdrFieldType::ftInt,
  HdrFieldType::ftInt64,
  HdrFieldType::ftStr,
  HdrFieldType::ftDate_1123,
  HdrFieldType::ftETag,
  HdrFieldType::ftPCc,
  HdrFieldType::ftPContRange,
  HdrFieldType::ftPRange,
  HdrFieldType::ftPSc,
  HdrFieldType::ftDate_1123_or_ETag
}
 
enum  HdrKind {
  None = 0,
  ListHeader = 1,
  RequestHeader = 1 << 1,
  ReplyHeader = 1 << 2,
  HopByHopHeader = 1 << 3,
  Denied304Header = 1 << 4,
  GeneralHeader = RequestHeader | ReplyHeader,
  EntityHeader = RequestHeader | ReplyHeader
}
 
enum  StatusCode {
  scNone = 0,
  scContinue = 100,
  scSwitchingProtocols = 101,
  scProcessing = 102,
  scEarlyHints = 103,
  scOkay = 200,
  scCreated = 201,
  scAccepted = 202,
  scNonAuthoritativeInformation = 203,
  scNoContent = 204,
  scResetContent = 205,
  scPartialContent = 206,
  scMultiStatus = 207,
  scAlreadyReported = 208,
  scImUsed = 226,
  scMultipleChoices = 300,
  scMovedPermanently = 301,
  scFound = 302,
  scSeeOther = 303,
  scNotModified = 304,
  scUseProxy = 305,
  scTemporaryRedirect = 307,
  scPermanentRedirect = 308,
  scBadRequest = 400,
  scUnauthorized = 401,
  scPaymentRequired = 402,
  scForbidden = 403,
  scNotFound = 404,
  scMethodNotAllowed = 405,
  scNotAcceptable = 406,
  scProxyAuthenticationRequired = 407,
  scRequestTimeout = 408,
  scConflict = 409,
  scGone = 410,
  scLengthRequired = 411,
  scPreconditionFailed = 412,
  scPayloadTooLarge = 413,
  scUriTooLong = 414,
  scUnsupportedMediaType = 415,
  scRequestedRangeNotSatisfied = 416,
  scExpectationFailed = 417,
  scMisdirectedRequest = 421,
  scUnprocessableEntity = 422,
  scLocked = 423,
  scFailedDependency = 424,
  scUpgradeRequired = 426,
  scPreconditionRequired = 428,
  scTooManyRequests = 429,
  scRequestHeaderFieldsTooLarge = 431,
  scUnavailableForLegalReasons = 451,
  scInternalServerError = 500,
  scNotImplemented = 501,
  scBadGateway = 502,
  scServiceUnavailable = 503,
  scGatewayTimeout = 504,
  scHttpVersionNotSupported = 505,
  scVariantAlsoNegotiates = 506,
  scInsufficientStorage = 507,
  scLoopDetected = 508,
  scNotExtended = 510,
  scNetworkAuthenticationRequired = 511,
  scInvalidHeader = 600,
  scHeaderTooLarge = 601
}
 

Functions

const SBufMethodStr (const MethodType m)
 
AnyP::ProtocolVersion ProtocolVersion (unsigned int aMajor, unsigned int aMinor)
 HTTP version label information. More...
 
AnyP::ProtocolVersion ProtocolVersion ()
 Protocol version to use in Http::Message structures wrapping FTP messages. More...
 
bool any_HdrType_enum_value (const Http::HdrType id)
 match any known header type, including OTHER and BAD More...
 
bool any_valid_header (const Http::HdrType id)
 match any valid header type, including OTHER but not BAD More...
 
bool any_registered_header (const Http::HdrType id)
 
const char * StatusCodeString (const Http::StatusCode status)
 
ConnStateDataNewServer (MasterXactionPointer &xact)
 create a new HTTP connection handler; never returns NULL More...
 

Variables

const SBuf MethodType_sb []
 
const HeaderLookupTable_t HeaderLookupTable
 

Typedef Documentation

Definition at line 17 of file forward.h.

Definition at line 20 of file forward.h.

Enumeration Type Documentation

Enumerator
METHOD_NONE 
METHOD_GET 
METHOD_POST 
METHOD_PUT 
METHOD_HEAD 
METHOD_CONNECT 
METHOD_TRACE 
METHOD_OPTIONS 
METHOD_DELETE 
METHOD_CHECKOUT 
METHOD_CHECKIN 
METHOD_UNCHECKOUT 
METHOD_MKWORKSPACE 
METHOD_VERSION_CONTROL 
METHOD_REPORT 
METHOD_UPDATE 
METHOD_LABEL 
METHOD_MERGE 
METHOD_BASELINE_CONTROL 
METHOD_MKACTIVITY 
METHOD_PROPFIND 
METHOD_PROPPATCH 
METHOD_MKCOL 
METHOD_COPY 
METHOD_MOVE 
METHOD_LOCK 
METHOD_UNLOCK 
METHOD_SEARCH 
METHOD_PRI 
METHOD_PURGE 
METHOD_OTHER 
METHOD_ENUM_END 

Definition at line 21 of file MethodType.h.

enum Http::HdrFieldType
strong

possible types for http header fields

Enumerator
ftInvalid 

to catch nasty errors with hdr_id<->fld_type clashes

ftInt 
ftInt64 
ftStr 
ftDate_1123 
ftETag 
ftPCc 
ftPContRange 
ftPRange 
ftPSc 
ftDate_1123_or_ETag 

Definition at line 127 of file RegisteredHeaders.h.

Enumerator
None 
ListHeader 
RequestHeader 
ReplyHeader 
HopByHopHeader 
Denied304Header 
GeneralHeader 
EntityHeader 

Definition at line 141 of file RegisteredHeaders.h.

recognized or "known" header fields; and the RFC which defines them (or not) http://www.iana.org/assignments/message-headers/message-headers.xhtml

Enumerator
enumBegin_ 
ACCEPT 

RFC 7231

ACCEPT_CHARSET 

RFC 7231

ACCEPT_ENCODING 

RFC 7231

ACCEPT_LANGUAGE 

RFC 7231

ACCEPT_RANGES 

RFC 7233

AGE 

RFC 7234

ALLOW 

RFC 7231

ALTERNATE_PROTOCOL 

GFE custom header we may have to erase

AUTHENTICATION_INFO 

RFC 2617

AUTHORIZATION 

RFC 7235, 4559

CACHE_CONTROL 

RFC 7234

CONNECTION 

RFC 7230

CONTENT_BASE 

obsoleted RFC 2068

CONTENT_DISPOSITION 

RFC 2183, 6266

CONTENT_ENCODING 

RFC 7231

CONTENT_LANGUAGE 

RFC 7231

CONTENT_LENGTH 

RFC 7230

CONTENT_LOCATION 

RFC 7231

CONTENT_MD5 

deprecated, RFC 2616

CONTENT_RANGE 

RFC 7233

CONTENT_TYPE 

RFC 7231

COOKIE 

RFC 6265 header we may need to erase

COOKIE2 

obsolete RFC 2965 header we may need to erase

DATE 

RFC 7231

ETAG 

RFC 7232

EXPECT 

RFC 7231

EXPIRES 

RFC 7234

FORWARDED 

RFC 7239

FROM 

RFC 7231

HOST 

RFC 7230

HTTP2_SETTINGS 

RFC 7540

IF_MATCH 

RFC 7232

IF_MODIFIED_SINCE 

RFC 7232

IF_NONE_MATCH 

RFC 7232

IF_RANGE 

RFC 7233

IF_UNMODIFIED_SINCE 

RFC 7232

KEEP_ALIVE 

obsoleted RFC 2068 header we may need to erase

KEY 

experimental RFC Draft draft-fielding-http-key-02

LAST_MODIFIED 

RFC 7232

LINK 

RFC 5988

LOCATION 

RFC 7231

MAX_FORWARDS 

RFC 7231

MIME_VERSION 

RFC 2045, 7231

NEGOTIATE 

experimental RFC 2295. Why only this one from 2295?

ORIGIN 
PRAGMA 

RFC 7234

PROXY_AUTHENTICATE 

RFC 7235

PROXY_AUTHENTICATION_INFO 

RFC 2617

PROXY_AUTHORIZATION 

RFC 7235

PROXY_CONNECTION 

obsolete Netscape header we may need to erase.

PROXY_SUPPORT 

RFC 4559

PUBLIC 

RFC 2068

RANGE 

RFC 7233

REFERER 

RFC 7231

REQUEST_RANGE 

some clients use this, sigh

RETRY_AFTER 

RFC 7231

SERVER 

RFC 7231

SET_COOKIE 

RFC 6265 header we may need to erase

SET_COOKIE2 

obsoleted RFC 2965 header we may need to erase

TE 

RFC 7230

TITLE 
TRAILER 

RFC 7230

TRANSFER_ENCODING 

RFC 7230

TRANSLATE 

IIS custom header we may need to erase

UNLESS_MODIFIED_SINCE 

IIS custom header we may need to erase

UPGRADE 

RFC 7230

USER_AGENT 

RFC 7231

VARY 

RFC 7231

VIA 

RFC 7230

WARNING 

RFC 7234

WWW_AUTHENTICATE 

RFC 7235, 4559

X_CACHE 

Squid custom header

X_CACHE_LOOKUP 

Squid custom header. temporary hack that became de-facto. TODO remove

X_FORWARDED_FOR 

obsolete Squid custom header, RFC 7239

X_REQUEST_URI 

Squid custom header appended if ADD_X_REQUEST_URI is defined

X_SQUID_ERROR 

Squid custom header on generated error responses

HDR_X_ACCELERATOR_VARY 

obsolete Squid custom header.

X_NEXT_SERVICES 

Squid custom ICAP header

SURROGATE_CAPABILITY 

Edge Side Includes (ESI) header

SURROGATE_CONTROL 

Edge Side Includes (ESI) header

FRONT_END_HTTPS 

MS Exchange custom header we may have to add

FTP_COMMAND 

Internal header for FTP command

FTP_ARGUMENTS 

Internal header for FTP command arguments

FTP_PRE 

Internal header containing leading FTP control response lines

FTP_STATUS 

Internal header for FTP reply status

FTP_REASON 

Internal header for FTP reply reason

OTHER 

internal tag value for "unknown" headers

BAD_HDR 

Invalid header

enumEnd_ 

Definition at line 21 of file RegisteredHeaders.h.

These basic HTTP reply status codes are defined by RFC 2616 unless otherwise stated. The IANA registry for HTTP status codes can be found at: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

Enumerator
scNone 
scContinue 
scSwitchingProtocols 
scProcessing 

RFC2518 section 10.1

scEarlyHints 

draft-kazuho-early-hints-status-code

scOkay 
scCreated 
scAccepted 
scNonAuthoritativeInformation 
scNoContent 
scResetContent 
scPartialContent 
scMultiStatus 

RFC2518 section 10.2 / RFC4918

scAlreadyReported 

RFC5842

scImUsed 

RFC3229

scMultipleChoices 
scMovedPermanently 
scFound 
scSeeOther 
scNotModified 
scUseProxy 
scTemporaryRedirect 
scPermanentRedirect 

RFC7538

scBadRequest 
scUnauthorized 
scPaymentRequired 
scForbidden 
scNotFound 
scMethodNotAllowed 
scNotAcceptable 
scProxyAuthenticationRequired 
scRequestTimeout 
scConflict 
scGone 
scLengthRequired 
scPreconditionFailed 
scPayloadTooLarge 
scUriTooLong 
scUnsupportedMediaType 
scRequestedRangeNotSatisfied 
scExpectationFailed 
scMisdirectedRequest 

RFC7540 section 9.1.2

scUnprocessableEntity 

RFC2518 section 10.3 / RFC4918

scLocked 

RFC2518 section 10.4 / RFC4918

scFailedDependency 

RFC2518 section 10.5 / RFC4918

scUpgradeRequired 
scPreconditionRequired 

RFC6585

scTooManyRequests 

RFC6585

scRequestHeaderFieldsTooLarge 

RFC6585

scUnavailableForLegalReasons 

RFC7725

scInternalServerError 
scNotImplemented 
scBadGateway 
scServiceUnavailable 
scGatewayTimeout 
scHttpVersionNotSupported 
scVariantAlsoNegotiates 

RFC2295

scInsufficientStorage 

RFC2518 section 10.6 / RFC4918

scLoopDetected 

RFC5842

scNotExtended 

RFC2774

scNetworkAuthenticationRequired 

RFC6585

scInvalidHeader 

Squid header parsing error

scHeaderTooLarge 

Definition at line 20 of file StatusCode.h.

Function Documentation

bool Http::any_HdrType_enum_value ( const Http::HdrType  id)
inline
bool Http::any_registered_header ( const Http::HdrType  id)
inline
bool Http::any_valid_header ( const Http::HdrType  id)
inline

Definition at line 213 of file RegisteredHeaders.h.

References ACCEPT, and BAD_HDR.

Referenced by HttpHeader::clean(), httpHeaderFieldStatDumper(), and HttpHeader::insertEntry().

const SBuf& Http::MethodStr ( const MethodType  m)
inline

Definition at line 102 of file MethodType.h.

References MethodType_sb.

ConnStateData * Http::NewServer ( MasterXactionPointer xact)

Definition at line 352 of file Http1Server.cc.

Referenced by httpAccept().

Variable Documentation

const SBuf Http::MethodType_sb[]

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors