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

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

Requirements are not allowed in appendices. They have been changed to prose.
Changes from RFC2616 have been rewritten for consistency and to remove changes
that are only editorial. Addresses #419

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