http.abnf 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;
  3. ; RFC 5234 - ABNF CORE RULES
  4. ;
  5. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6. OCTET= %x00-FF ; 8 bits of data
  7. CHAR= %x01-7F ; any 7-bit US-ASCII character, excluding NUL
  8. VCHAR= %x21-7E ; visible (printing) characters
  9. ALPHA= %x41-5A / %x61-7A ; A-Z / a-z
  10. DIGIT= %x30-39 ; 0-9
  11. CTL= %x00-1F / %x7F ; any US-ASCII control character: ; (octets 0 - 31) and DEL (127)
  12. HTAB= %x09 ; horizontal tab
  13. LF= %x0A ; linefeed
  14. CR= %x0D ; carriage return
  15. SP= %x20 ; space
  16. DQUOTE= %x22 ; " (Double Quote)
  17. BIT= "0" / "1"
  18. HEXDIG= DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
  19. CRLF= CR LF ; Internet standard newline
  20. WSP= SP / HTAB ; white space
  21. LWSP= *(WSP / CRLF WSP) ; linear white space (past newline)
  22. ;---------------------------------------------------------------------------------------------------------
  23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  24. ;
  25. ; RFC 2396 - URI
  26. ;
  27. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  28. ;;;; 1.6. Syntax Notation and Common Elements
  29. ;alpha = lowalpha / upalpha
  30. lowalpha = "a" / "b" / "c" / "d" / "e" / "f" / "g" / "h" / "i" / "j" / "k" / "l" / "m" / "n" / "o" / "p" / "q" / "r" / "s" / "t" / "u" / "v" / "w" / "x" / "y" / "z"
  31. upalpha = "A" / "B" / "C" / "D" / "E" / "F" / "G" / "H" / "I" / "J" / "K" / "L" / "M" / "N" / "O" / "P" / "Q" / "R" / "S" / "T" / "U" / "V" / "W" / "X" / "Y" / "Z"
  32. ;digit = "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"
  33. alphanum = alpha / digit
  34. ;;;; 2. URI Characters and Escape Sequences
  35. urlc = reserved / unreserved / escaped
  36. ;;;; 2.2. Reserved Characters
  37. reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / ","
  38. ;;;; 2.3. Unreserved Characters
  39. unreserved = alphanum / mark
  40. mark = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")"
  41. ;;;; 2.4.1. Escaped Encoding
  42. escaped = "%" hex hex
  43. hex = digit / "A" / "B" / "C" / "D" / "E" / "F" / "a" / "b" / "c" / "d" / "e" / "f"
  44. ;;;; 2.4.3. Excluded US-ASCII Characters
  45. control = %x00-1F / %x7F ;<US-ASCII coded characters 00-1F and 7F hexadecimal>
  46. space = %x20 ;<US-ASCII coded character 20 hexadecimal>
  47. delims = "<" / ">" / "#" / "%" / DQUOTE
  48. unwise = "{" / "}" / "/" / "\" / "^" / "[" / "]" / "`"
  49. ;;;; 3. URI Syntactic Components
  50. absoluteURI = scheme ":" ( hier-part / opaque-part )
  51. hier-part = ( net-path / abs-path ) [ "?" query ]
  52. net-path = "//" authority [ abs-path ]
  53. abs-path = "/" path-segments
  54. opaque-part = urlc-no-slash *urlc
  55. urlc-no-slash = unreserved / escaped / ";" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / ","
  56. ;;;; 3.1. Scheme Component
  57. scheme = alpha *( alpha / digit / "+" / "-" / "." )
  58. ;;;; 3.2. Authority Component
  59. authority = server / reg-name
  60. ;;;; Registry-based Naming Authority
  61. reg-name = 1*( unreserved / escaped / "$" / "," / ";" / ":" / "@" / "&" / "=" / "+" )
  62. ;;;; 3.2.2. Server-based Naming Authority
  63. server = [ [ userinfo "@" ] hostport ]
  64. userinfo = *( unreserved / escaped / ";" / ":" / "&" / "=" / "+" / "$" / "," )
  65. hostport = host [ ":" port ]
  66. host = hostname / IPv4address
  67. hostname = *( domainlabel "." ) toplabel [ "." ]
  68. domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum
  69. toplabel = alpha / alpha *( alphanum / "-" ) alphanum
  70. IPv4address = 1*digit "." 1*digit "." 1*digit "." 1*digit
  71. port = *digit
  72. ;;;; 3.3. Path Component
  73. path = [ abs-path / opaque-part ]
  74. path-segments = segment *( "/" segment )
  75. segment = *pchar *( ";" param )
  76. param = *pchar
  77. pchar = unreserved / escaped / ":" / "@" / "&" / "=" / "+" / "$" / ","
  78. ;;;; 3.4. Query Component
  79. query = *urlc
  80. ;;;; 4. URI References
  81. URI-reference = [ absoluteURI / relativeURI ] [ "#" fragment ]
  82. ;;;; 4.1. Fragment Identifier
  83. fragment = *urlc
  84. ;;;; 5. Relative URI References
  85. relativeURI = ( net-path / abs-path / rel-path ) [ "?" query ]
  86. rel-path = rel-segment [ abs-path ]
  87. rel-segment = 1*( unreserved / escaped / ";" / "@" / "&" / "=" / "+" / "$" / "," )
  88. ;---------------------------------------------------------------------------------------------------------
  89. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  90. ;
  91. ; HTTP digest authentication (2617) - ABNF
  92. ;
  93. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  94. ;;;; 1.2 Access Authentication Framework
  95. auth-scheme = token
  96. auth-param = token "=" ( token / quoted-string )
  97. challenge = auth-scheme 1*SP auth-param *(COMMA auth-param)
  98. realm = "realm" "=" realm-value
  99. realm-value = quoted-string
  100. ;;;; 2 Basic Authentication Scheme
  101. basic-challenge = "Basic" realm
  102. basic-credentials = "Basic" basic-credentials-value
  103. basic-credentials-value = base64-user-pass
  104. base64-user-pass = token ;<base64 [4] encoding of user-pass, except not limited to 76 char/line>
  105. user-pass = userid ":" password
  106. userid = *TEXT ;*<TEXT excluding ":">
  107. password = *TEXT
  108. ;;;; 3.2.1 The WWW-Authenticate Response Header
  109. ;challenge = "Digest" digest-challenge
  110. digest-challenge = digest-challenge-value *(COMMA digest-challenge-value)
  111. digest-challenge-value = ( realm / [ domain ] / nonce / [ opaque ] /[ stale ] / [ algorithm ] / [ qop-options ] / [auth-param] )
  112. domain = "domain" "=" <"> URI ( 1*SP URI ) <">
  113. URI = absoluteURI / abs-path
  114. nonce = "nonce" "=" nonce-value
  115. nonce-value = quoted-string
  116. opaque = "opaque" "=" quoted-string
  117. stale = "stale" "=" ( "true" / "false" )
  118. algorithm = "algorithm" "=" ( "MD5" / "MD5-sess" / token )
  119. qop-options = "qop" "=" DQUOTE qop-value *(COMMA qop-value) DQUOTE
  120. qop-value = "auth" / "auth-int" / token
  121. ;;;; 3.2.2 The Authorization Request Header
  122. credentials = "Digest" digest-response
  123. digest-response = digest-response-value *(COMMA digest-response-value)
  124. digest-response-value = ( username / realm / nonce / digest-url / auth-response / [ algorithm ] / [cnonce] / [opaque] / [message-qop] / [nonce-count] / [auth-param] )
  125. username = "username" "=" username-value
  126. username-value = quoted-string
  127. digest-url = "url" "=" digest-url-value
  128. digest-url-value = request-url ; As specified by HTTP/1.1
  129. message-qop = "qop" "=" qop-value
  130. cnonce = "cnonce" "=" cnonce-value
  131. cnonce-value = nonce-value
  132. nonce-count = "nc" "=" nc-value
  133. nc-value = 8LHEX
  134. auth-response = "response" "=" request-digest
  135. request-digest = DQUOTE 32LHEX DQUOTE
  136. LHEX = "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / "a" / "b" / "c" / "d" / "e" / "f"
  137. ;;;; 3.2.3 The Authentication-Info Header
  138. AuthenticationInfo = "Authentication-Info" ":" auth-info
  139. auth-info = auth-info-value *(COMMA auth-info-value)
  140. auth-info-value = (nextnonce / [ message-qop ] / [ response-auth ] / [ cnonce ] / [nonce-count] )
  141. nextnonce = "nextnonce" "=" nonce-value
  142. response-auth = "rspauth" "=" response-digest
  143. response-digest = DQUOTE *LHEX DQUOTE
  144. ;---------------------------------------------------------------------------------------------------------
  145. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  146. ;
  147. ; HTTP (2616) - ABNF
  148. ;
  149. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  150. HT = %x09; <US-ASCII HT, horizontal-tab (9)>
  151. separators = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}" / SP / HTAB
  152. token = 1*( alphanum / separators ) ; *<any CHAR except CTLs or separators>
  153. LWS = [*WSP CRLF] 1*WSP ; linear whitespace
  154. SWS = [LWS] ; sep whitespace
  155. TEXT = 1*(token / LWS) ; <any OCTET except CTLs, but including LWS>
  156. COMMA = SWS "," SWS ; comma
  157. ;;;; text (from http ==> is it right?)
  158. TEXT-UTF8-TRIM = 1*TEXT-UTF8char *(*LWS TEXT-UTF8char)
  159. TEXT-UTF8char = %x21-7E / UTF8-NONASCII
  160. UTF8-NONASCII = %xC0-DF 1UTF8-CONT / %xE0-EF 2UTF8-CONT / %xF0-F7 3UTF8-CONT / %xF8-FB 4UTF8-CONT / %xFC-FD 5UTF8-CONT
  161. UTF8-CONT = %x80-BF
  162. comment = "(" *( ctext / quoted-pair / comment ) ")"
  163. ctext = %x21-27 / %x2A-5B / %x5D-7E / UTF8-NONASCII / LWS ; <any TEXT excluding "(" and ")">
  164. ;;;; quoted-string
  165. quoted-string = ( DQUOTE *(qdtext / quoted-pair ) DQUOTE )
  166. qdtext = LWS / %x21 / %x23-5B / %x5D-7E / UTF8-NONASCII ; <any TEXT except DQUOTE>
  167. quoted-pair = "\" CHAR
  168. ;;;; HTTP-Version
  169. HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
  170. ;;;; HTTP-date
  171. HTTP-date = rfc1123-date / rfc850-date / asctime-date
  172. rfc1123-date = wkday "," SP date1 SP time SP "GMT"
  173. rfc850-date = weekday "," SP date2 SP time SP "GMT"
  174. asctime-date = wkday SP date3 SP time SP 4DIGIT
  175. date1 = 2DIGIT SP month SP 4DIGIT ; day month year (e.g., 02 Jun 1982)
  176. date2 = 2DIGIT "-" month "-" 2DIGIT ; day-month-year (e.g., 02-Jun-82)
  177. date3 = month SP ( 2DIGIT / ( SP 1DIGIT )) ; month day (e.g., Jun 2)
  178. time = 2DIGIT ":" 2DIGIT ":" 2DIGIT ; 00:00:00 - 23:59:59
  179. wkday = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun"
  180. weekday = "Monday" / "Tuesday" / "Wednesday" / "Thursday" / "Friday" / "Saturday" / "Sunday"
  181. month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec"
  182. ;;;; 3.3.2 Delta Seconds
  183. delta-seconds = 1*DIGIT
  184. ;;;; 3.4 Character Sets
  185. charset = token
  186. ;;;; 3.5 Content Codings
  187. content-coding = token
  188. ;;;; 3.6 Transfer Codings
  189. transfer-coding = "chunked" / transfer-extension
  190. transfer-extension = token *( ";" parameter )
  191. parameter = attribute "=" value
  192. attribute = token
  193. value = token / quoted-string
  194. ;;;; 3.6.1 Chunked Transfer Coding
  195. Chunked-Body = *chunk last-chunk chunck-trailer CRLF
  196. chunk = chunk-size [ chunk-extension ] CRLF chunk-data CRLF
  197. chunk-size = 1*HEX
  198. last-chunk = 1*("0") [ chunk-extension ] CRLF
  199. chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
  200. chunk-ext-name = token
  201. chunk-ext-val = token / quoted-string
  202. chunk-data = chunk-size
  203. chunck-trailer = *(entity-header CRLF)
  204. ;;;; 3.7 Media Types
  205. media-type = type "/" subtype *( ";" parameter )
  206. type = token
  207. subtype = token
  208. ;;;; 3.8 Product Tokens
  209. product = token ["/" product-version]
  210. product-version = token
  211. ;;;;3.9 Quality Values
  212. qvalue = ( "0" [ "." 0*3DIGIT ] ) / ( "1" [ "." 0*3("0") ] )
  213. ;;;; 3.10 Language Tags
  214. language-tag = primary-tag *( "-" subtag )
  215. primary-tag = 1*8ALPHA
  216. subtag = 1*8ALPHA
  217. ;;;; 3.11 Entity Tags
  218. entity-tag = [ weak ] opaque-tag
  219. weak = "W/"
  220. opaque-tag = quoted-string
  221. ;;;; 3.12 Range Units
  222. range-unit = bytes-unit / other-range-unit
  223. bytes-unit = "bytes"
  224. other-range-unit = token
  225. ;;;; 4.1 Message Types
  226. HTTP-message = Request / Response ; HTTP/1.1 messages
  227. generic-message = start-line *(message-header CRLF) CRLF [ message-body ]
  228. start-line = Request-Line / Status-Line
  229. ;;;;4.2 Message Headers
  230. message-header = field-name ":" [ field-value ]
  231. field-name = token
  232. field-value = *( field-content / LWS )
  233. field-content = token ;<the OCTETs making up the field-value and consisting of either *TEXT or combinations of token, separators, and quoted-string>
  234. ;;;; 4.3 Message Body
  235. message-body = entity-body ;/ <entity-body encoded as per Transfer-Encoding>
  236. ;;;; 4.5 General Header Fields
  237. general-header = Cache-Control / Connection / Date / Pragma / Trailer / Transfer-Encoding / Upgrade / Via / Warning
  238. ;Cache-Control = "Cache-Control" ":" [ field-value ]
  239. ;Connection = "Connection" ":" [ field-value ]
  240. ;Date = "Date" ":" [ field-value ]
  241. ;Pragma = "Pragma" ":" [ field-value ]
  242. ;Trailer = "Trailer" ":" [ field-value ]
  243. ;Transfer-Encoding = "Transfer-Encoding" ":" [ field-value ]
  244. ;Upgrade = "Upgrade" ":" [ field-value ]
  245. ;Via = "Via" ":" [ field-value ]
  246. ;Warning = "Warning" ":" [ field-value ]
  247. ;;;; 5 Request
  248. Request = Request-Line *(( general-header / request-header / entity-header ) CRLF) CRLF [ message-body ]
  249. ;;;; 5.1 Request-Line
  250. Request-Line = Method SP Request-URI SP HTTP-Version CRLF
  251. ;;;; 5.1.1 Method
  252. Method = "OPTIONS" / "GET" / "HEAD" / "POST" / "PUT" / "DELETE" / "TRACE" / "CONNECT" / extension-method
  253. extension-method = token
  254. ;;;; 5.1.2 Request-URI
  255. Request-URI = "*" / absoluteURI / abs-path / authority
  256. ;;;; 5.3 Request Header Fields
  257. request-header = Accept / Accept-Charset / Accept-Encoding / Accept-Language / Authorization / Expect / From / Host / If-Match / If-Modified-Since / If-None-Match / If-Range / If-Unmodified-Since / Max-Forwards / Proxy-Authorization / Range / Referer / TE / User-Agent
  258. ;;;; 6 Response
  259. Response = Status-Line *(( general-header / response-header / entity-header ) CRLF) CRLF [ message-body ]
  260. ;;;; 6.1 Status-Line
  261. Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
  262. ;;;; 6.1.1 Status Code and Reason Phrase
  263. Status-Code = "100" / "101" / "200" / "201" / "202" / "203" / "204" / "205" / "206" / "300" / "301" / "302" / "303" / "304" / "305" / "307" / "400" / "401" / "402" / "403" / "404" / "405" / "406" / "407" / "408" / "409" / "410" / "411" / "412" / "413" / "414" / "415" / "416" / "417" / "500" / "501" / "502" / "503" / "504" / "505" / extension-code
  264. extension-code = 3DIGIT
  265. Reason-Phrase = *( reserved / unreserved / escaped / UTF8-NONASCII / UTF8-CONT / SP / HTAB ) ;*<TEXT, excluding CR, LF>
  266. ;;;; 6.2 Response Header Fields
  267. response-header = Accept-Ranges / Age / ETag / Location / Proxy-Authenticate / Retry-After / Server / Vary / WWW-Authenticate
  268. ;;;; 7.1 Entity Header Fields
  269. entity-header = Allow / Content-Encoding / Content-Language / Content-Length / Content-Location / Content-MD5 / Content-Range / Content-Type / Expires / Last-Modified / extension-header
  270. extension-header = message-header
  271. ;;;; 7.2 Entity Body
  272. entity-body = *OCTET
  273. ;;;; 7.2.1 Type
  274. ;entity-body := Content-Encoding( Content-Type( data ) )
  275. ;;;; 14.1 Accept
  276. Accept = "Accept" ":" [ media-range [ accept-params ] ]
  277. media-range = ( "*/*" / ( type "/" "*" ) / ( type "/" subtype )) *( ";" parameter )
  278. accept-params = ";" "q" "=" qvalue *( accept-extension )
  279. accept-extension = ";" token [ "=" ( token / quoted-string ) ]
  280. ;;;; 14.2 Accept-Charset
  281. Accept-Charset = "Accept-Charset" ":" Accept-Charset-Value *(COMMA Accept-Charset-Value)
  282. Accept-Charset-Value = token;FIXME:( charset / "*" )[ ";" "q" "=" qvalue ] )
  283. ;;;; 14.3 Accept-Encoding
  284. Accept-Encoding = "Accept-Encoding" ":" Accept-Encoding-Value *(COMMA Accept-Encoding-Value)
  285. Accept-Encoding-Value = ( codings [ ";" "q" "=" qvalue ] )
  286. codings = ( content-coding / "*" )
  287. ;;;; 14.4 Accept-Language
  288. Accept-Language = "Accept-Language" ":" Accept-Language-Value *(COMMA Accept-Language-Value)
  289. Accept-Language-Value = ( language-range [ ";" "q" "=" qvalue ] )
  290. language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) / "*" )
  291. ;;;; 14.5 Accept-Ranges
  292. Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges
  293. acceptable-ranges = (range-unit *(COMMA range-unit)) / "none"
  294. ;;;; 14.6 Age
  295. Age = "Age" ":" age-value
  296. age-value = delta-seconds
  297. ;;;; 14.7 Allow
  298. Allow = "Allow" ":" [Method]
  299. ;;;; 14.8 Authorization
  300. Authorization = "Authorization" ":" credentials
  301. ;;;; 14.9 Cache-Control
  302. Cache-Control = "Cache-Control" ":" cache-directive *(COMMA cache-directive)
  303. cache-directive = cache-request-directive / cache-response-directive
  304. cache-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
  305. cache-response-directive = "public" / "private" [ "=" DQUOTE field-name *(COMMA field-name) DQUOTE ] / "no-cache" [ "=" DQUOTE field-name *(COMMA field-name) DQUOTE ] / "no-store" / "no-transform" / "must-revalidate" / "proxy-revalidate" / "max-age" "=" delta-seconds / "s-maxage" "=" delta-seconds / cache-extension
  306. cache-extension = token [ "=" ( token / quoted-string ) ]
  307. ;;;; 14.9.6 Cache Control Extensions
  308. ;Cache-Control: private, community="UCI"
  309. ;;;; 14.10 Connection
  310. Connection = "Connection" ":" (connection-token) *(COMMA connection-token)
  311. connection-token = token
  312. ;;;; 14.11 Content-Encoding
  313. Content-Encoding = "Content-Encoding" ":" content-coding *(COMMA content-coding)
  314. ;;;; 14.12 Content-Language
  315. Content-Language = "Content-Language" ":" language-tag *(COMMA language-tag)
  316. ;;;; 14.13 Content-Length
  317. Content-Length = "Content-Length" ":" 1*DIGIT
  318. ;;;; 14.14 Content-Location
  319. Content-Location = "Content-Location" ":" ( absoluteURI / relativeURI )
  320. ;;;; 14.15 Content-MD5
  321. Content-MD5 = "Content-MD5" ":" md5-digest
  322. md5-digest = *OCTET ;<base64 of 128 bit MD5 digest as per RFC 1864>
  323. ;;;; 14.16 Content-Range
  324. Content-Range = "Content-Range" ":" content-range-spec
  325. content-range-spec = byte-content-range-spec
  326. byte-content-range-spec = bytes-unit SP byte-range-resp-spec "/" ( instance-length / "*" )
  327. byte-range-resp-spec = (first-byte-pos "-" last-byte-pos) / "*"
  328. instance-length = 1*DIGIT
  329. ;;;; 14.17 Content-Type
  330. Content-Type = "Content-Type" ":" media-type
  331. ;;;; 14.18 Date
  332. Date = "Date" ":" HTTP-date
  333. ;;;; 14.19 ETag
  334. ETag = "ETag" ":" entity-tag
  335. ;;;; 14.20 Expect
  336. Expect = "Expect" ":" expectation *(COMMA expectation)
  337. expectation = "100-continue" / expectation-extension
  338. expectation-extension = token [ "=" ( token / quoted-string ) *expect-params ]
  339. expect-params = ";" token [ "=" ( token / quoted-string ) ]
  340. ;;;; 14.21 Expires
  341. Expires = "Expires" ":" HTTP-date
  342. ;;;; 14.22 From
  343. From = "From" ":" mailbox
  344. mailbox = token ; FIXME
  345. ;;;; 14.23 Host
  346. Host = "Host" ":" host [ ":" port ] ; Section 3.2.2
  347. ;;;; 14.24 If-Match
  348. If-Match = "If-Match" ":" ( "*" / entity-tag *(COMMA entity-tag) )
  349. ;;;; 14.25 If-Modified-Since
  350. If-Modified-Since = "If-Modified-Since" ":" HTTP-date
  351. ;;;; 14.26 If-None-Match
  352. If-None-Match = "If-None-Match" ":" ( "*" / entity-tag *(COMMA entity-tag) )
  353. ;;;; 14.27 If-Range
  354. If-Range = "If-Range" ":" ( entity-tag / HTTP-date )
  355. ;;;; 14.28 If-Unmodified-Since
  356. If-Unmodified-Since = "If-Unmodified-Since" ":" HTTP-date
  357. ;;;; 14.29 Last-Modified
  358. Last-Modified = "Last-Modified" ":" HTTP-date
  359. ;;;; 14.30 Location
  360. Location = "Location" ":" absoluteURI
  361. ;;;; 14.31 Max-Forwards
  362. Max-Forwards = "Max-Forwards" ":" 1*DIGIT
  363. ;;;; 14.32 Pragma
  364. Pragma = "Pragma" ":" pragma-directive *(COMMA pragma-directive)
  365. pragma-directive = "no-cache" / extension-pragma
  366. extension-pragma = token [ "=" ( token / quoted-string ) ]
  367. ;;;; 14.33 Proxy-Authenticate
  368. Proxy-Authenticate = "Proxy-Authenticate" ":" challenge *(COMMA challenge)
  369. ;;;; 14.34 Proxy-Authorization
  370. Proxy-Authorization = "Proxy-Authorization" ":" credentials
  371. ;;;; 14.35.1 Byte Ranges
  372. ranges-specifier = byte-ranges-specifier
  373. byte-ranges-specifier = bytes-unit "=" byte-range-set
  374. byte-range-set = byte-range-set-value *(COMMA byte-range-set-value)
  375. byte-range-set-value = ( byte-range-spec / suffix-byte-range-spec )
  376. byte-range-spec = first-byte-pos "-" [last-byte-pos]
  377. first-byte-pos = 1*DIGIT
  378. last-byte-pos = 1*DIGIT
  379. suffix-byte-range-spec = "-" suffix-length
  380. suffix-length = 1*DIGIT
  381. ;;;; 14.35.2 Range Retrieval Requests
  382. Range = "Range" ":" ranges-specifier
  383. ;;;; 14.36 Referer
  384. Referer = "Referer" ":" ( absoluteURI / relativeURI )
  385. ;;;; 14.37 Retry-After
  386. Retry-After = "Retry-After" ":" ( HTTP-date / delta-seconds )
  387. ;;;; 14.38 Server
  388. Server = "Server" ":" 1*( product / comment )
  389. ;;;; 14.39 TE
  390. TE = "TE" ":" [t-codings *(COMMA t-codings)]
  391. t-codings = "trailers" / ( transfer-extension [ accept-params ] )
  392. ;;;; 14.40 Trailer
  393. Trailer = "Trailer" ":" field-name *(COMMA field-name)
  394. ;;;; 14.41 Transfer-Encoding
  395. Transfer-Encoding = "Transfer-Encoding" ":" transfer-coding *(COMMA transfer-coding)
  396. ;;;; 14.42 Upgrade
  397. Upgrade = "Upgrade" ":" product *(COMMA product)
  398. ;;;; 14.43 User-Agent
  399. User-Agent = "User-Agent" ":" 1*( product / comment )
  400. ;;;; 14.44 Vary
  401. Vary = "Vary" ":" ( "*" / field-name *(COMMA field-name) )
  402. ;;;; 14.45 Via
  403. Via = "Via" ":" Via-Value *(COMMA Via-Value)
  404. Via-Value = ( received-protocol received-by [ comment ] )
  405. received-protocol = [ protocol-name "/" ] protocol-version
  406. protocol-name = token
  407. protocol-version = token
  408. received-by = ( host [ ":" port ] ) / pseudonym
  409. pseudonym = token
  410. ;;;; 14.46 Warning
  411. Warning = "Warning" ":" warning-value *(COMMA warning-value)
  412. warning-value = warn-code SP warn-agent SP warn-text [SP warn-date]
  413. warn-code = 3DIGIT
  414. warn-agent = ( host [ ":" port ] ) / pseudonym ; the name or pseudonym of the server adding ; the Warning header, for use in debugging
  415. warn-text = quoted-string
  416. warn-date = DQUOTE HTTP-date DQUOTE
  417. ;;;; 14.47 WWW-Authenticate
  418. WWW-Authenticate = "WWW-Authenticate" ":" challenge *(COMMA challenge)