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

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

(editorial) Remove sections and ABNF defining Request and Response and
move status code semantics to p2. Add more xrefs to architecture intro.

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