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

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

(editorial) Consistently use lowercase for ABNF rule names other than header fields

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