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

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