source: draft-ietf-httpbis/latest/httpbis.abnf @ 1236

Last change on this file since 1236 was 1236, checked in by julian.reschke@…, 9 years ago

rewrite header field ABNFs to only specify the field value (see #276)

  • Property svn:eol-style set to native
File size: 12.3 KB
Line 
1; the ABNF below was extracted from the IETF HTTPbis WG Internet Drafts
2; please see <http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging>
3; for copyright information.
4
5Accept = [ ( "," / ( media-range [ accept-params ] ) ) *( OWS "," [ OWS media-range [ accept-params ] ] ) ]
6Accept-Charset = *( "," OWS ) ( charset / "*" ) [ OWS ";" OWS "q=" qvalue ] *( OWS "," [ OWS ( charset / "*" ) [ OWS ";" OWS "q=" qvalue ] ] )
7Accept-Encoding = [ ( "," / ( codings [ OWS ";" OWS "q=" qvalue ] ) ) *( OWS "," [ OWS codings [ OWS ";" OWS "q=" qvalue ] ] ) ]
8Accept-Language = *( "," OWS ) language-range [ OWS ";" OWS "q=" qvalue ] *( OWS "," [ OWS language-range [ OWS ";" OWS "q=" qvalue ] ] )
9Accept-Ranges = acceptable-ranges
10Age = delta-seconds
11Allow = [ ( "," / Method ) *( OWS "," [ OWS Method ] ) ]
12Authorization = credentials
13BWS = OWS
14Cache-Control = *( "," OWS ) cache-directive *( OWS "," [ OWS cache-directive ] )
15Chunked-Body = *chunk last-chunk trailer-part CRLF
16Connection = *( "," OWS ) connection-token *( OWS "," [ OWS connection-token ] )
17Content-Encoding = *( "," OWS ) content-coding *( OWS "," [ OWS content-coding ] )
18Content-Language = *( "," OWS ) language-tag *( OWS "," [ OWS language-tag ] )
19Content-Length = 1*DIGIT
20Content-Location = absolute-URI / partial-URI
21Content-MD5 = <base64 of 128 bit MD5 digest as per [RFC1864]>
22Content-Range = content-range-spec
23Content-Type = media-type
24Date = HTTP-date
25ETag = entity-tag
26Expect = *( "," OWS ) expectation *( OWS "," [ OWS expectation ] )
27Expires = HTTP-date
28From = mailbox
29GMT = %x47.4D.54 ; GMT
30
31HTTP-Prot-Name = %x48.54.54.50 ; HTTP
32
33HTTP-Version = HTTP-Prot-Name "/" 1*DIGIT "." 1*DIGIT
34HTTP-date = rfc1123-date / obs-date
35HTTP-message = start-line *( header-field CRLF ) CRLF [ message-body ]
36Host = uri-host [ ":" port ]
37If-Match = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS entity-tag ] ) )
38If-Modified-Since = HTTP-date
39If-None-Match = "*" / ( *( "," OWS ) entity-tag *( OWS "," [ OWS entity-tag ] ) )
40If-Range = entity-tag / HTTP-date
41If-Unmodified-Since = HTTP-date
42Last-Modified = HTTP-date
43Location = URI-reference
44MIME-Version = 1*DIGIT "." 1*DIGIT
45Max-Forwards = 1*DIGIT
46Method = token
47OWS = *( [ obs-fold ] WSP )
48Pragma = *( "," OWS ) pragma-directive *( OWS "," [ OWS pragma-directive ] )
49Proxy-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge ] )
50Proxy-Authorization = credentials
51RWS = 1*( [ obs-fold ] WSP )
52Range = byte-ranges-specifier / other-ranges-specifier
53Reason-Phrase = *( WSP / VCHAR / obs-text )
54Referer = absolute-URI / partial-URI
55Request = Request-Line *( header-field CRLF ) CRLF [ message-body ]
56Request-Line = Method SP request-target SP HTTP-Version CRLF
57Response = Status-Line *( header-field CRLF ) CRLF [ message-body ]
58Retry-After = HTTP-date / delta-seconds
59Server = product *( RWS ( product / comment ) )
60Status-Code = 3DIGIT
61Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
62TE = [ ( "," / t-codings ) *( OWS "," [ OWS t-codings ] ) ]
63Trailer = *( "," OWS ) field-name *( OWS "," [ OWS field-name ] )
64Transfer-Encoding = *( "," OWS ) transfer-coding *( OWS "," [ OWS transfer-coding ] )
65URI-reference = <URI-reference, defined in [RFC3986], Section 4.1>
66Upgrade = *( "," OWS ) product *( OWS "," [ OWS product ] )
67User-Agent = product *( RWS ( product / comment ) )
68Vary = "*" / ( *( "," OWS ) field-name *( OWS "," [ OWS field-name ] ) )
69Via = *( "," OWS ) received-protocol RWS received-by [ RWS comment ] *( OWS "," [ OWS received-protocol RWS received-by [ RWS comment ] ] )
70WWW-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge ] )
71Warning = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ] )
72absolute-URI = <absolute-URI, defined in [RFC3986], Section 4.3>
73accept-ext = OWS ";" OWS token [ "=" word ]
74accept-params = OWS ";" OWS "q=" qvalue *accept-ext
75acceptable-ranges = ( *( "," OWS ) range-unit *( OWS "," [ OWS range-unit ] ) ) / "none"
76asctime-date = day-name SP date3 SP time-of-day SP year
77attribute = token
78auth-param = token "=" ( token / quoted-string )
79auth-scheme = token
80authority = <authority, defined in [RFC3986], Section 3.2>
81byte-content-range-spec = bytes-unit SP byte-range-resp-spec "/" ( instance-length / "*" )
82byte-range-resp-spec = ( first-byte-pos "-" last-byte-pos ) / "*"
83byte-range-set = ( *( "," OWS ) byte-range-spec ) / ( suffix-byte-range-spec *( OWS "," [ ( OWS byte-range-spec ) / suffix-byte-range-spec ] ) )
84byte-range-spec = first-byte-pos "-" [ last-byte-pos ]
85byte-ranges-specifier = bytes-unit "=" byte-range-set
86bytes-unit = "bytes"
87cache-directive = cache-request-directive / cache-response-directive
88cache-extension = token [ "=" ( token / quoted-string ) ]
89cache-request-directive = "no-cache" / "no-store" / ( "max-age=" delta-seconds ) / ( "max-stale" [ "=" delta-seconds ] ) / ( "min-fresh=" delta-seconds ) / "no-transform" / "only-if-cached" / cache-extension
90cache-response-directive = "public" / ( "private" [ "=" DQUOTE *( "," OWS ) field-name *( OWS "," [ OWS field-name ] ) DQUOTE ] ) / ( "no-cache" [ "=" DQUOTE *( "," OWS ) field-name *( OWS "," [ OWS field-name ] ) DQUOTE ] ) / "no-store" / "no-transform" / "must-revalidate" / "proxy-revalidate" / ( "max-age=" delta-seconds ) / ( "s-maxage=" delta-seconds ) / cache-extension
91challenge = auth-scheme 1*SP *( "," OWS ) auth-param *( OWS "," [ OWS auth-param ] )
92charset = token
93chunk = chunk-size *WSP [ chunk-ext ] CRLF chunk-data CRLF
94chunk-data = 1*OCTET
95chunk-ext = *( ";" *WSP chunk-ext-name [ "=" chunk-ext-val ] *WSP )
96chunk-ext-name = token
97chunk-ext-val = token / quoted-str-nf
98chunk-size = 1*HEXDIG
99codings = ( content-coding / "*" )
100comment = "(" *( ctext / quoted-cpair / comment ) ")"
101connection-token = token
102content-coding = token
103content-range-spec = byte-content-range-spec / other-content-range-spec
104credentials = auth-scheme ( token / quoted-string / [ ( "," / auth-param ) *( OWS "," [ OWS auth-param ] ) ] )
105ctext = OWS / %x21-27 ; '!'-'''
106 / %x2A-5B ; '*'-'['
107 / %x5D-7E ; ']'-'~'
108 / obs-text
109date1 = day SP month SP year
110date2 = day "-" month "-" 2DIGIT
111date3 = month SP ( 2DIGIT / ( SP DIGIT ) )
112day = 2DIGIT
113day-name = %x4D.6F.6E ; Mon
114 / %x54.75.65 ; Tue
115 / %x57.65.64 ; Wed
116 / %x54.68.75 ; Thu
117 / %x46.72.69 ; Fri
118 / %x53.61.74 ; Sat
119 / %x53.75.6E ; Sun
120
121day-name-l = %x4D.6F.6E.64.61.79 ; Monday
122 / %x54.75.65.73.64.61.79 ; Tuesday
123 / %x57.65.64.6E.65.73.64.61.79 ; Wednesday
124 / %x54.68.75.72.73.64.61.79 ; Thursday
125 / %x46.72.69.64.61.79 ; Friday
126 / %x53.61.74.75.72.64.61.79 ; Saturday
127 / %x53.75.6E.64.61.79 ; Sunday
128
129delta-seconds = 1*DIGIT
130entity-tag = [ weak ] opaque-tag
131expect-params = ";" token [ "=" ( token / quoted-string ) ]
132expectation = "100-continue" / expectation-extension
133expectation-extension = token [ "=" ( token / quoted-string ) *expect-params ]
134extension-pragma = token [ "=" ( token / quoted-string ) ]
135field-content = *( WSP / VCHAR / obs-text )
136field-name = token
137field-value = *( field-content / OWS )
138first-byte-pos = 1*DIGIT
139header-field = field-name ":" OWS [ field-value ] OWS
140hour = 2DIGIT
141http-URI = "http://" authority path-abempty [ "?" query ]
142https-URI = "https://" authority path-abempty [ "?" query ]
143instance-length = 1*DIGIT
144language-range = <language-range, defined in [RFC4647], Section 2.1>
145language-tag = <Language-Tag, defined in [RFC5646], Section 2.1>
146last-byte-pos = 1*DIGIT
147last-chunk = 1*"0" *WSP [ chunk-ext ] CRLF
148mailbox = <mailbox, defined in [RFC5322], Section 3.4>
149media-range = ( "*/*" / ( type "/*" ) / ( type "/" subtype ) ) *( OWS ";" OWS parameter )
150media-type = type "/" subtype *( OWS ";" OWS parameter )
151message-body = *OCTET
152minute = 2DIGIT
153month = %x4A.61.6E ; Jan
154 / %x46.65.62 ; Feb
155 / %x4D.61.72 ; Mar
156 / %x41.70.72 ; Apr
157 / %x4D.61.79 ; May
158 / %x4A.75.6E ; Jun
159 / %x4A.75.6C ; Jul
160 / %x41.75.67 ; Aug
161 / %x53.65.70 ; Sep
162 / %x4F.63.74 ; Oct
163 / %x4E.6F.76 ; Nov
164 / %x44.65.63 ; Dec
165
166obs-date = rfc850-date / asctime-date
167obs-fold = CRLF
168obs-text = %x80-FF
169opaque-tag = quoted-string
170other-content-range-spec = other-range-unit SP other-range-resp-spec
171other-range-resp-spec = *CHAR
172other-range-set = 1*CHAR
173other-range-unit = token
174other-ranges-specifier = other-range-unit "=" other-range-set
175parameter = attribute "=" value
176partial-URI = relative-part [ "?" query ]
177path-abempty = <path-abempty, defined in [RFC3986], Section 3.3>
178path-absolute = <path-absolute, defined in [RFC3986], Section 3.3>
179port = <port, defined in [RFC3986], Section 3.2.3>
180pragma-directive = "no-cache" / extension-pragma
181product = token [ "/" product-version ]
182product-version = token
183protocol-name = token
184protocol-version = token
185pseudonym = token
186qdtext = OWS / "!" / %x23-5B ; '#'-'['
187 / %x5D-7E ; ']'-'~'
188 / obs-text
189qdtext-nf = WSP / "!" / %x23-5B ; '#'-'['
190 / %x5D-7E ; ']'-'~'
191 / obs-text
192query = <query, defined in [RFC3986], Section 3.4>
193quoted-cpair = "\" ( WSP / VCHAR / obs-text )
194quoted-pair = "\" ( WSP / VCHAR / obs-text )
195quoted-str-nf = DQUOTE *( qdtext-nf / quoted-pair ) DQUOTE
196quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
197qvalue = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
198range-unit = bytes-unit / other-range-unit
199realm = "realm=" realm-value
200realm-value = quoted-string
201received-by = ( uri-host [ ":" port ] ) / pseudonym
202received-protocol = [ protocol-name "/" ] protocol-version
203relative-part = <relative-part, defined in [RFC3986], Section 4.2>
204request-target = "*" / absolute-URI / ( path-absolute [ "?" query ] ) / authority
205rfc1123-date = day-name "," SP date1 SP time-of-day SP GMT
206rfc850-date = day-name-l "," SP date2 SP time-of-day SP GMT
207second = 2DIGIT
208special = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}"
209start-line = Request-Line / Status-Line
210subtype = token
211suffix-byte-range-spec = "-" suffix-length
212suffix-length = 1*DIGIT
213t-codings = "trailers" / ( transfer-extension [ te-params ] )
214tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
215te-ext = OWS ";" OWS token [ "=" word ]
216te-params = OWS ";" OWS "q=" qvalue *te-ext
217time-of-day = hour ":" minute ":" second
218token = 1*tchar
219trailer-part = *( header-field CRLF )
220transfer-coding = "chunked" / "compress" / "deflate" / "gzip" / transfer-extension
221transfer-extension = token *( OWS ";" OWS transfer-parameter )
222transfer-parameter = attribute BWS "=" BWS value
223type = token
224uri-host = <host, defined in [RFC3986], Section 3.2.2>
225value = word
226warn-agent = ( uri-host [ ":" port ] ) / pseudonym
227warn-code = 3DIGIT
228warn-date = DQUOTE HTTP-date DQUOTE
229warn-text = quoted-string
230warning-value = warn-code SP warn-agent SP warn-text [ SP warn-date ]
231weak = %x57.2F ; W/
232
233word = token / quoted-string
234year = 4DIGIT
235; Accept defined but not used
236; Accept-Charset defined but not used
237; Accept-Encoding defined but not used
238; Accept-Language defined but not used
239; Accept-Ranges defined but not used
240; Age defined but not used
241; Allow defined but not used
242; Authorization defined but not used
243; Cache-Control defined but not used
244; Chunked-Body defined but not used
245; Connection defined but not used
246; Content-Encoding defined but not used
247; Content-Language defined but not used
248; Content-Length defined but not used
249; Content-Location defined but not used
250; Content-MD5 defined but not used
251; Content-Range defined but not used
252; Content-Type defined but not used
253; Date defined but not used
254; ETag defined but not used
255; Expect defined but not used
256; Expires defined but not used
257; From defined but not used
258; HTTP-message defined but not used
259; Host defined but not used
260; If-Match defined but not used
261; If-Modified-Since defined but not used
262; If-None-Match defined but not used
263; If-Range defined but not used
264; If-Unmodified-Since defined but not used
265; Last-Modified defined but not used
266; Location defined but not used
267; MIME-Version defined but not used
268; Max-Forwards defined but not used
269; Pragma defined but not used
270; Proxy-Authenticate defined but not used
271; Proxy-Authorization defined but not used
272; Range defined but not used
273; Referer defined but not used
274; Request defined but not used
275; Response defined but not used
276; Retry-After defined but not used
277; Server defined but not used
278; TE defined but not used
279; Trailer defined but not used
280; Transfer-Encoding defined but not used
281; Upgrade defined but not used
282; User-Agent defined but not used
283; Vary defined but not used
284; Via defined but not used
285; WWW-Authenticate defined but not used
286; Warning defined but not used
287; http-URI defined but not used
288; https-URI defined but not used
289; realm defined but not used
290; special defined but not used
Note: See TracBrowser for help on using the repository browser.