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

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