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

Last change on this file since 1138 was 1138, checked in by julian.reschke@…, 9 years ago

remove header field ABNF dependencies; replace with Overview tables (see #276)

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