; <https://github.com/httpwg/http11bis/blob/master/latest/httpbis.abnf>
;
; the ABNF below was extracted from the IETF HTTPbis Internet Drafts
; please see
; <http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-latest.html#rfc.copyrightnotice>
; for copyright information.

Accept = [ ( "," / ( media-range [ accept-params ] ) ) *( OWS "," [ OWS ( media-range [ accept-params ] ) ] ) ]
Accept-Charset = *( "," OWS ) ( ( charset / "*" ) [ weight ] ) *( OWS "," [ OWS ( ( charset / "*" ) [ weight ] ) ] )
Accept-Encoding = [ ( "," / ( codings [ weight ] ) ) *( OWS "," [ OWS ( codings [ weight ] ) ] ) ]
Accept-Language = *( "," OWS ) ( language-range [ weight ] ) *( OWS "," [ OWS ( language-range [ weight ] ) ] )
Accept-Ranges = acceptable-ranges
Age = delta-seconds
Allow = [ ( "," / method ) *( OWS "," [ OWS method ] ) ]
Authorization = credentials
BWS = OWS
Cache-Control = *( "," OWS ) cache-directive *( OWS "," [ OWS cache-directive ] )
Connection = *( "," OWS ) connection-option *( OWS "," [ OWS connection-option ] )
Content-Encoding = *( "," OWS ) content-coding *( OWS "," [ OWS content-coding ] )
Content-Language = *( "," OWS ) language-tag *( OWS "," [ OWS language-tag ] )
Content-Length = 1*DIGIT
Content-Location = absolute-URI / partial-URI
Content-Range = byte-content-range / other-content-range
Content-Type = media-type
Date = HTTP-date
ETag = entity-tag
Expect = "100-continue"
Expires = HTTP-date
From = mailbox
GMT = %x47.4D.54 ; GMT

HTTP-date = IMF-fixdate / obs-date
HTTP-message = start-line *( header-field CRLF ) CRLF [ message-body ]
HTTP-name = %x48.54.54.50 ; HTTP

HTTP-version = HTTP-name "/" DIGIT "." DIGIT
Host = uri-host [ ":" port ]
IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT
If-Match = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS entity-tag ] ) )
If-Modified-Since = HTTP-date
If-None-Match = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS entity-tag ] ) )
If-Range = entity-tag / HTTP-date
If-Unmodified-Since = HTTP-date
Last-Modified = HTTP-date
Location = URI-reference
Max-Forwards = 1*DIGIT
OWS = *( SP / HTAB )
Pragma = *( "," OWS ) pragma-directive *( OWS "," [ OWS pragma-directive ] )
Proxy-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge ] )
Proxy-Authorization = credentials
RWS = 1*( SP / HTAB )
Range = byte-ranges-specifier / other-ranges-specifier
Referer = absolute-URI / partial-URI
Retry-After = HTTP-date / delta-seconds
Server = product *( RWS ( product / comment ) )
TE = [ ( "," / t-codings ) *( OWS "," [ OWS t-codings ] ) ]
Trailer = *( "," OWS ) field-name *( OWS "," [ OWS field-name ] )
Transfer-Encoding = *( "," OWS ) transfer-coding *( OWS "," [ OWS transfer-coding ] )
URI-reference = <URI-reference, defined in [RFC3986], Section 4.1>
Upgrade = *( "," OWS ) protocol *( OWS "," [ OWS protocol ] )
User-Agent = product *( RWS ( product / comment ) )
Vary = "*" / ( *( "," OWS ) field-name *( OWS "," [ OWS field-name ] ) )
Via = *( "," OWS ) ( received-protocol RWS received-by [ RWS comment ] ) *( OWS "," [ OWS ( received-protocol RWS received-by [ RWS comment ] ) ] )
WWW-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge ] )
Warning = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ] )
absolute-URI = <absolute-URI, defined in [RFC3986], Section 4.3>
absolute-form = absolute-URI
absolute-path = 1*( "/" segment )
accept-ext = OWS ";" OWS token [ "=" word ]
accept-params = weight *accept-ext
acceptable-ranges = ( *( "," OWS ) range-unit *( OWS "," [ OWS range-unit ] ) ) / "none"
asctime-date = day-name SP date3 SP time-of-day SP year
asterisk-form = "*"
attribute = token
auth-param = token BWS "=" BWS ( token / quoted-string )
auth-scheme = token
authority = <authority, defined in [RFC3986], Section 3.2>
authority-form = authority
byte-content-range = bytes-unit SP ( byte-range-resp / unsatisfied-range )
byte-range = first-byte-pos "-" last-byte-pos
byte-range-resp = byte-range "/" ( complete-length / "*" )
byte-range-set = *( "," OWS ) ( byte-range-spec / suffix-byte-range-spec ) *( OWS "," [ OWS ( byte-range-spec / suffix-byte-range-spec ) ] )
byte-range-spec = first-byte-pos "-" [ last-byte-pos ]
byte-ranges-specifier = bytes-unit "=" byte-range-set
bytes-unit = "bytes"
cache-directive = token [ "=" ( token / quoted-string ) ]
challenge = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param ) *( OWS "," [ OWS auth-param ] ) ] ) ]
charset = token
chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF
chunk-data = 1*OCTET
chunk-ext = *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
chunk-ext-name = token
chunk-ext-val = token / quoted-str-nf
chunk-size = 1*HEXDIG
chunked-body = *chunk last-chunk trailer-part CRLF
codings = content-coding / "identity" / "*"
comment = "(" *( ctext / quoted-cpair / comment ) ")"
complete-length = 1*DIGIT
connection-option = token
content-coding = token
credentials = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param ) *( OWS "," [ OWS auth-param ] ) ] ) ]
ctext = HTAB / SP / %x21-27 ; '!'-'''
 / %x2A-5B ; '*'-'['
 / %x5D-7E ; ']'-'~'
 / obs-text
date1 = day SP month SP year
date2 = day "-" month "-" 2DIGIT
date3 = month SP ( 2DIGIT / ( SP DIGIT ) )
day = 2DIGIT
day-name = %x4D.6F.6E ; Mon
 / %x54.75.65 ; Tue
 / %x57.65.64 ; Wed
 / %x54.68.75 ; Thu
 / %x46.72.69 ; Fri
 / %x53.61.74 ; Sat
 / %x53.75.6E ; Sun

day-name-l = %x4D.6F.6E.64.61.79 ; Monday
 / %x54.75.65.73.64.61.79 ; Tuesday
 / %x57.65.64.6E.65.73.64.61.79 ; Wednesday
 / %x54.68.75.72.73.64.61.79 ; Thursday
 / %x46.72.69.64.61.79 ; Friday
 / %x53.61.74.75.72.64.61.79 ; Saturday
 / %x53.75.6E.64.61.79 ; Sunday

delta-seconds = 1*DIGIT
entity-tag = [ weak ] opaque-tag
etagc = "!" / %x23-7E ; '#'-'~'
 / obs-text
extension-pragma = token [ "=" ( token / quoted-string ) ]
field-content = *( HTAB / SP / VCHAR / obs-text )
field-name = token
field-value = *( field-content / obs-fold )
first-byte-pos = 1*DIGIT
fragment = <fragment, defined in [RFC3986], Section 3.5>
header-field = field-name ":" OWS field-value OWS
hour = 2DIGIT
http-URI = "http://" authority path-abempty [ "?" query ] [ "#" fragment ]
https-URI = "https://" authority path-abempty [ "?" query ] [ "#" fragment ]
language-range = <language-range, defined in [RFC4647], Section 2.1>
language-tag = <Language-Tag, defined in [RFC5646], Section 2.1>
last-byte-pos = 1*DIGIT
last-chunk = 1*"0" [ chunk-ext ] CRLF
mailbox = <mailbox, defined in [RFC5322], Section 3.4>
media-range = ( "*/*" / ( type "/*" ) / ( type "/" subtype ) ) *( OWS ";" OWS parameter )
media-type = type "/" subtype *( OWS ";" OWS parameter )
message-body = *OCTET
method = token
minute = 2DIGIT
month = %x4A.61.6E ; Jan
 / %x46.65.62 ; Feb
 / %x4D.61.72 ; Mar
 / %x41.70.72 ; Apr
 / %x4D.61.79 ; May
 / %x4A.75.6E ; Jun
 / %x4A.75.6C ; Jul
 / %x41.75.67 ; Aug
 / %x53.65.70 ; Sep
 / %x4F.63.74 ; Oct
 / %x4E.6F.76 ; Nov
 / %x44.65.63 ; Dec

obs-date = rfc850-date / asctime-date
obs-fold = CRLF ( SP / HTAB )
obs-text = %x80-FF
opaque-tag = DQUOTE *etagc DQUOTE
origin-form = absolute-path [ "?" query ]
other-content-range = other-range-unit SP other-range-resp
other-range-resp = *CHAR
other-range-set = 1*CHAR
other-range-unit = token
other-ranges-specifier = other-range-unit "=" other-range-set
parameter = attribute "=" value
partial-URI = relative-part [ "?" query ]
path-abempty = <path-abempty, defined in [RFC3986], Section 3.3>
port = <port, defined in [RFC3986], Section 3.2.3>
pragma-directive = "no-cache" / extension-pragma
product = token [ "/" product-version ]
product-version = token
protocol = protocol-name [ "/" protocol-version ]
protocol-name = token
protocol-version = token
pseudonym = token
qdtext = HTAB / SP / "!" / %x23-5B ; '#'-'['
 / %x5D-7E ; ']'-'~'
 / obs-text
qdtext-nf = HTAB / SP / "!" / %x23-5B ; '#'-'['
 / %x5D-7E ; ']'-'~'
 / obs-text
query = <query, defined in [RFC3986], Section 3.4>
quoted-cpair = "\" ( HTAB / SP / VCHAR / obs-text )
quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
quoted-str-nf = DQUOTE *( qdtext-nf / quoted-pair ) DQUOTE
quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
qvalue = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
range-unit = bytes-unit / other-range-unit
rank = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
reason-phrase = *( HTAB / SP / VCHAR / obs-text )
received-by = ( uri-host [ ":" port ] ) / pseudonym
received-protocol = [ protocol-name "/" ] protocol-version
relative-part = <relative-part, defined in [RFC3986], Section 4.2>
request-line = method SP request-target SP HTTP-version CRLF
request-target = origin-form / absolute-form / authority-form / asterisk-form
rfc850-date = day-name-l "," SP date2 SP time-of-day SP GMT
second = 2DIGIT
segment = <segment, defined in [RFC3986], Section 3.3>
special = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}"
start-line = request-line / status-line
status-code = 3DIGIT
status-line = HTTP-version SP status-code SP reason-phrase CRLF
subtype = token
suffix-byte-range-spec = "-" suffix-length
suffix-length = 1*DIGIT
t-codings = "trailers" / ( transfer-coding [ t-ranking ] )
t-ranking = OWS ";" OWS "q=" rank
tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
time-of-day = hour ":" minute ":" second
token = 1*tchar
token68 = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) *"="
trailer-part = *( header-field CRLF )
transfer-coding = "chunked" / "compress" / "deflate" / "gzip" / transfer-extension
transfer-extension = token *( OWS ";" OWS transfer-parameter )
transfer-parameter = attribute BWS "=" BWS value
type = token
unsatisfied-range = "*/" complete-length
uri-host = <host, defined in [RFC3986], Section 3.2.2>
value = word
warn-agent = ( uri-host [ ":" port ] ) / pseudonym
warn-code = 3DIGIT
warn-date = DQUOTE HTTP-date DQUOTE
warn-text = quoted-string
warning-value = warn-code SP warn-agent SP warn-text [ SP warn-date ]
weak = %x57.2F ; W/

weight = OWS ";" OWS "q=" qvalue
word = token / quoted-string
year = 4DIGIT
; Accept defined but not used
; Accept-Charset defined but not used
; Accept-Encoding defined but not used
; Accept-Language defined but not used
; Accept-Ranges defined but not used
; Age defined but not used
; Allow defined but not used
; Authorization defined but not used
; Cache-Control defined but not used
; Connection defined but not used
; Content-Encoding defined but not used
; Content-Language defined but not used
; Content-Length defined but not used
; Content-Location defined but not used
; Content-Range defined but not used
; Content-Type defined but not used
; Date defined but not used
; ETag defined but not used
; Expect defined but not used
; Expires defined but not used
; From defined but not used
; HTTP-message defined but not used
; Host defined but not used
; If-Match defined but not used
; If-Modified-Since defined but not used
; If-None-Match defined but not used
; If-Range defined but not used
; If-Unmodified-Since defined but not used
; Last-Modified defined but not used
; Location defined but not used
; Max-Forwards defined but not used
; Pragma defined but not used
; Proxy-Authenticate defined but not used
; Proxy-Authorization defined but not used
; Range defined but not used
; Referer defined but not used
; Retry-After defined but not used
; Server defined but not used
; TE defined but not used
; Trailer defined but not used
; Transfer-Encoding defined but not used
; Upgrade defined but not used
; User-Agent defined but not used
; Vary defined but not used
; Via defined but not used
; WWW-Authenticate defined but not used
; Warning defined but not used
; chunked-body defined but not used
; http-URI defined but not used
; https-URI defined but not used
; special defined but not used
