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

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