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

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

Fix incorrect definition of line folding (obs-fold) from [351].
Remove optional WSP from chunked encoding grammar added in [353].
Do not use WSP anywhere (it is misleading because it dosn't match the real
definition of whitespace).

Related to #36

  • Property svn:eol-style set to native
File size: 12.3 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 = Request-Line *( header-field CRLF ) CRLF [ message-body ]
55Request-Line = Method SP request-target SP HTTP-Version CRLF
56Response = Status-Line *( header-field CRLF ) CRLF [ message-body ]
57Retry-After = HTTP-date / delta-seconds
58Server = product *( RWS ( product / comment ) )
59Status-Code = 3DIGIT
60Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
61TE = [ ( "," / t-codings ) *( OWS "," [ OWS t-codings ] ) ]
62Trailer = *( "," OWS ) field-name *( OWS "," [ OWS field-name ] )
63Transfer-Encoding = *( "," OWS ) transfer-coding *( OWS "," [ OWS transfer-coding ] )
64URI-reference = <URI-reference, defined in [RFC3986], Section 4.1>
65Upgrade = *( "," OWS ) product *( OWS "," [ OWS product ] )
66User-Agent = product *( RWS ( product / comment ) )
67Vary = "*" / ( *( "," OWS ) field-name *( OWS "," [ OWS field-name ] ) )
68Via = *( "," OWS ) received-protocol RWS received-by [ RWS comment ] *( OWS "," [ OWS received-protocol RWS received-by [ RWS comment ] ] )
69WWW-Authenticate = *( "," OWS ) challenge *( OWS "," [ OWS challenge ] )
70Warning = *( "," OWS ) warning-value *( OWS "," [ OWS warning-value ] )
71absolute-URI = <absolute-URI, defined in [RFC3986], Section 4.3>
72accept-ext = OWS ";" OWS token [ "=" word ]
73accept-params = OWS ";" OWS "q=" qvalue *accept-ext
74acceptable-ranges = ( *( "," OWS ) range-unit *( OWS "," [ OWS range-unit ] ) ) / "none"
75asctime-date = day-name SP date3 SP time-of-day SP year
76attribute = token
77auth-param = token BWS "=" BWS ( token / quoted-string )
78auth-scheme = token
79authority = <authority, defined in [RFC3986], Section 3.2>
80b64token = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) *"="
81byte-content-range-spec = bytes-unit SP byte-range-resp-spec "/" ( instance-length / "*" )
82byte-range-resp-spec = ( first-byte-pos "-" last-byte-pos ) / "*"
83byte-range-set = ( *( "," OWS ) byte-range-spec ) / ( suffix-byte-range-spec *( OWS "," [ ( OWS byte-range-spec ) / suffix-byte-range-spec ] ) )
84byte-range-spec = first-byte-pos "-" [ last-byte-pos ]
85byte-ranges-specifier = bytes-unit "=" byte-range-set
86bytes-unit = "bytes"
87cache-directive = cache-request-directive / cache-response-directive
88cache-extension = token [ "=" ( token / quoted-string ) ]
89cache-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
90cache-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
91challenge = auth-scheme [ 1*SP ( b64token / [ ( "," / auth-param ) *( OWS "," [ OWS auth-param ] ) ] ) ]
92charset = token
93chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF
94chunk-data = 1*OCTET
95chunk-ext = *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
96chunk-ext-name = token
97chunk-ext-val = token / quoted-str-nf
98chunk-size = 1*HEXDIG
99codings = content-coding / "identity" / "*"
100comment = "(" *( ctext / quoted-cpair / comment ) ")"
101connection-token = token
102content-coding = token
103credentials = auth-scheme [ 1*SP ( b64token / [ ( "," / auth-param ) *( OWS "," [ OWS auth-param ] ) ] ) ]
104ctext = OWS / %x21-27 ; '!'-'''
105 / %x2A-5B ; '*'-'['
106 / %x5D-7E ; ']'-'~'
107 / obs-text
108date1 = day SP month SP year
109date2 = day "-" month "-" 2DIGIT
110date3 = month SP ( 2DIGIT / ( SP DIGIT ) )
111day = 2DIGIT
112day-name = %x4D.6F.6E ; Mon
113 / %x54.75.65 ; Tue
114 / %x57.65.64 ; Wed
115 / %x54.68.75 ; Thu
116 / %x46.72.69 ; Fri
117 / %x53.61.74 ; Sat
118 / %x53.75.6E ; Sun
119
120day-name-l = %x4D.6F.6E.64.61.79 ; Monday
121 / %x54.75.65.73.64.61.79 ; Tuesday
122 / %x57.65.64.6E.65.73.64.61.79 ; Wednesday
123 / %x54.68.75.72.73.64.61.79 ; Thursday
124 / %x46.72.69.64.61.79 ; Friday
125 / %x53.61.74.75.72.64.61.79 ; Saturday
126 / %x53.75.6E.64.61.79 ; Sunday
127
128delta-seconds = 1*DIGIT
129entity-tag = [ weak ] opaque-tag
130expect-params = ";" token [ "=" ( token / quoted-string ) ]
131expectation = "100-continue" / expectation-extension
132expectation-extension = token [ "=" ( token / quoted-string ) *expect-params ]
133extension-pragma = token [ "=" ( token / quoted-string ) ]
134field-content = *( HTAB / SP / VCHAR / obs-text )
135field-name = token
136field-value = *( field-content / obs-fold )
137first-byte-pos = 1*DIGIT
138header-field = field-name ":" OWS field-value BWS
139hour = 2DIGIT
140http-URI = "http://" authority path-abempty [ "?" query ]
141https-URI = "https://" authority path-abempty [ "?" query ]
142instance-length = 1*DIGIT
143language-range = <language-range, defined in [RFC4647], Section 2.1>
144language-tag = <Language-Tag, defined in [RFC5646], Section 2.1>
145last-byte-pos = 1*DIGIT
146last-chunk = 1*"0" [ chunk-ext ] CRLF
147mailbox = <mailbox, defined in [RFC5322], Section 3.4>
148media-range = ( "*/*" / ( type "/*" ) / ( type "/" subtype ) ) *( OWS ";" OWS parameter )
149media-type = type "/" subtype *( OWS ";" OWS parameter )
150message-body = *OCTET
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 = quoted-string
169other-content-range-spec = other-range-unit SP other-range-resp-spec
170other-range-resp-spec = *CHAR
171other-range-set = 1*CHAR
172other-range-unit = token
173other-ranges-specifier = other-range-unit "=" other-range-set
174parameter = attribute "=" value
175partial-URI = relative-part [ "?" query ]
176path-abempty = <path-abempty, defined in [RFC3986], Section 3.3>
177path-absolute = <path-absolute, defined in [RFC3986], Section 3.3>
178port = <port, defined in [RFC3986], Section 3.2.3>
179pragma-directive = "no-cache" / extension-pragma
180product = token [ "/" product-version ]
181product-version = token
182protocol-name = token
183protocol-version = token
184pseudonym = token
185qdtext = OWS / "!" / %x23-5B ; '#'-'['
186 / %x5D-7E ; ']'-'~'
187 / obs-text
188qdtext-nf = HTAB / SP / "!" / %x23-5B ; '#'-'['
189 / %x5D-7E ; ']'-'~'
190 / obs-text
191query = <query, defined in [RFC3986], Section 3.4>
192quoted-cpair = "\" ( HTAB / SP / VCHAR / obs-text )
193quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
194quoted-str-nf = DQUOTE *( qdtext-nf / quoted-pair ) DQUOTE
195quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
196qvalue = ( "0" [ "." *3DIGIT ] ) / ( "1" [ "." *3"0" ] )
197range-unit = bytes-unit / other-range-unit
198realm = "realm" BWS "=" BWS realm-value
199realm-value = quoted-string
200received-by = ( uri-host [ ":" port ] ) / pseudonym
201received-protocol = [ protocol-name "/" ] protocol-version
202relative-part = <relative-part, defined in [RFC3986], Section 4.2>
203request-target = "*" / absolute-URI / ( path-absolute [ "?" query ] ) / authority
204rfc1123-date = day-name "," SP date1 SP time-of-day SP GMT
205rfc850-date = day-name-l "," SP date2 SP time-of-day SP GMT
206second = 2DIGIT
207special = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}"
208start-line = Request-Line / Status-Line
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; Chunked-Body defined but not used
244; Connection defined but not used
245; Content-Encoding defined but not used
246; Content-Language defined but not used
247; Content-Length defined but not used
248; Content-Location defined but not used
249; Content-Range defined but not used
250; Content-Type defined but not used
251; Date defined but not used
252; ETag defined but not used
253; Expect defined but not used
254; Expires defined but not used
255; From defined but not used
256; HTTP-message defined but not used
257; Host defined but not used
258; If-Match defined but not used
259; If-Modified-Since defined but not used
260; If-None-Match defined but not used
261; If-Range defined but not used
262; If-Unmodified-Since defined but not used
263; Last-Modified defined but not used
264; Location defined but not used
265; MIME-Version defined but not used
266; Max-Forwards defined but not used
267; Pragma defined but not used
268; Proxy-Authenticate defined but not used
269; Proxy-Authorization defined but not used
270; Range defined but not used
271; Referer defined but not used
272; Request defined but not used
273; Response defined but not used
274; Retry-After defined but not used
275; Server defined but not used
276; TE defined but not used
277; Trailer defined but not used
278; Transfer-Encoding defined but not used
279; Upgrade defined but not used
280; User-Agent defined but not used
281; Vary defined but not used
282; Via defined but not used
283; WWW-Authenticate defined but not used
284; Warning defined but not used
285; http-URI defined but not used
286; https-URI defined but not used
287; realm defined but not used
288; special defined but not used
Note: See TracBrowser for help on using the repository browser.