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

Last change on this file since 1587 was 1581, checked in by fielding@…, 8 years ago

cleanup the phrasing of requirements in request-target and Host to
disambiguate the four cases and make the client responsible for compliance.

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