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

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