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

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