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

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