idnits 2.17.1
draft-ietf-httpbis-messaging-16.txt:
Checking boilerplate required by RFC 5378 and the IETF Trust (see
https://trustee.ietf.org/license-info):
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt:
----------------------------------------------------------------------------
== There is 1 instance of lines with non-ascii characters in the document.
Checking nits according to https://www.ietf.org/id-info/checklist :
----------------------------------------------------------------------------
-- The draft header indicates that this document obsoletes RFC7230, but the
abstract doesn't seem to directly say this. It does mention RFC7230
though, so this could be OK.
Miscellaneous warnings:
----------------------------------------------------------------------------
== The copyright year in the IETF Trust and authors Copyright Line does not
match the current year
== The document seems to contain a disclaimer for pre-RFC5378 work, but was
first submitted on or after 10 November 2008. The disclaimer is usually
necessary only for documents that revise or obsolete older RFCs, and that
take significant amounts of text from those RFCs. If you can contact all
authors of the source material and they are willing to grant the BCP78
rights to the IETF Trust, you can and should remove the disclaimer.
Otherwise, the disclaimer is needed and you can ignore this comment.
(See the Legal Provisions document at
https://trustee.ietf.org/license-info for more information.)
-- The document date (27 May 2021) is 1058 days in the past. Is this
intentional?
Checking references for intended status: Proposed Standard
----------------------------------------------------------------------------
(See RFCs 3967 and 4897 for information about using normative references
to lower-maturity documents in RFCs)
== Unused Reference: 'RFC7231' is defined on line 2034, but no explicit
reference was found in the text
== Outdated reference: A later version (-19) exists of
draft-ietf-httpbis-cache-16
-- Possible downref: Normative reference to a draft: ref. 'Caching'
** Downref: Normative reference to an Informational RFC: RFC 1950
** Downref: Normative reference to an Informational RFC: RFC 1951
** Downref: Normative reference to an Informational RFC: RFC 1952
== Outdated reference: A later version (-19) exists of
draft-ietf-httpbis-semantics-16
-- Possible downref: Normative reference to a draft: ref. 'Semantics'
-- Possible downref: Non-RFC (?) normative reference: ref. 'USASCII'
-- Possible downref: Non-RFC (?) normative reference: ref. 'Welch'
-- Obsolete informational reference (is this intentional?): RFC 7230 (ref.
'Err4667') (Obsoleted by RFC 9110, RFC 9112)
-- Obsolete informational reference (is this intentional?): RFC 2068
(Obsoleted by RFC 2616)
-- Duplicate reference: RFC7230, mentioned in 'RFC7230', was also mentioned
in 'Err4667'.
-- Obsolete informational reference (is this intentional?): RFC 7230
(Obsoleted by RFC 9110, RFC 9112)
-- Obsolete informational reference (is this intentional?): RFC 7231
(Obsoleted by RFC 9110)
Summary: 3 errors (**), 0 flaws (~~), 6 warnings (==), 11 comments (--).
Run idnits with the --verbose option for more detailed information about
the items above.
--------------------------------------------------------------------------------
2 HTTP Working Group R. Fielding, Ed.
3 Internet-Draft Adobe
4 Obsoletes: 7230 (if approved) M. Nottingham, Ed.
5 Intended status: Standards Track Fastly
6 Expires: 28 November 2021 J. Reschke, Ed.
7 greenbytes
8 27 May 2021
10 HTTP/1.1
11 draft-ietf-httpbis-messaging-16
13 Abstract
15 The Hypertext Transfer Protocol (HTTP) is a stateless application-
16 level protocol for distributed, collaborative, hypertext information
17 systems. This document specifies the HTTP/1.1 message syntax,
18 message parsing, connection management, and related security
19 concerns.
21 This document obsoletes portions of RFC 7230.
23 Editorial Note
25 This note is to be removed before publishing as an RFC.
27 Discussion of this draft takes place on the HTTP working group
28 mailing list (ietf-http-wg@w3.org), which is archived at
29 .
31 Working Group information can be found at ;
32 source code and issues list for this draft can be found at
33 .
35 The changes in this draft are summarized in Appendix D.17.
37 Status of This Memo
39 This Internet-Draft is submitted in full conformance with the
40 provisions of BCP 78 and BCP 79.
42 Internet-Drafts are working documents of the Internet Engineering
43 Task Force (IETF). Note that other groups may also distribute
44 working documents as Internet-Drafts. The list of current Internet-
45 Drafts is at https://datatracker.ietf.org/drafts/current/.
47 Internet-Drafts are draft documents valid for a maximum of six months
48 and may be updated, replaced, or obsoleted by other documents at any
49 time. It is inappropriate to use Internet-Drafts as reference
50 material or to cite them other than as "work in progress."
52 This Internet-Draft will expire on 28 November 2021.
54 Copyright Notice
56 Copyright (c) 2021 IETF Trust and the persons identified as the
57 document authors. All rights reserved.
59 This document is subject to BCP 78 and the IETF Trust's Legal
60 Provisions Relating to IETF Documents (https://trustee.ietf.org/
61 license-info) in effect on the date of publication of this document.
62 Please review these documents carefully, as they describe your rights
63 and restrictions with respect to this document. Code Components
64 extracted from this document must include Simplified BSD License text
65 as described in Section 4.e of the Trust Legal Provisions and are
66 provided without warranty as described in the Simplified BSD License.
68 This document may contain material from IETF Documents or IETF
69 Contributions published or made publicly available before November
70 10, 2008. The person(s) controlling the copyright in some of this
71 material may not have granted the IETF Trust the right to allow
72 modifications of such material outside the IETF Standards Process.
73 Without obtaining an adequate license from the person(s) controlling
74 the copyright in such materials, this document may not be modified
75 outside the IETF Standards Process, and derivative works of it may
76 not be created outside the IETF Standards Process, except to format
77 it for publication as an RFC or to translate it into languages other
78 than English.
80 Table of Contents
82 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
83 1.1. Requirements Notation . . . . . . . . . . . . . . . . . . 5
84 1.2. Syntax Notation . . . . . . . . . . . . . . . . . . . . . 5
85 2. Message . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
86 2.1. Message Format . . . . . . . . . . . . . . . . . . . . . 6
87 2.2. Message Parsing . . . . . . . . . . . . . . . . . . . . . 7
88 2.3. HTTP Version . . . . . . . . . . . . . . . . . . . . . . 8
89 3. Request Line . . . . . . . . . . . . . . . . . . . . . . . . 9
90 3.1. Method . . . . . . . . . . . . . . . . . . . . . . . . . 10
91 3.2. Request Target . . . . . . . . . . . . . . . . . . . . . 10
92 3.2.1. origin-form . . . . . . . . . . . . . . . . . . . . . 11
93 3.2.2. absolute-form . . . . . . . . . . . . . . . . . . . . 11
94 3.2.3. authority-form . . . . . . . . . . . . . . . . . . . 12
95 3.2.4. asterisk-form . . . . . . . . . . . . . . . . . . . . 13
96 3.3. Reconstructing the Target URI . . . . . . . . . . . . . . 13
97 4. Status Line . . . . . . . . . . . . . . . . . . . . . . . . . 15
98 5. Field Syntax . . . . . . . . . . . . . . . . . . . . . . . . 16
99 5.1. Field Line Parsing . . . . . . . . . . . . . . . . . . . 16
100 5.2. Obsolete Line Folding . . . . . . . . . . . . . . . . . . 17
101 6. Message Body . . . . . . . . . . . . . . . . . . . . . . . . 17
102 6.1. Transfer-Encoding . . . . . . . . . . . . . . . . . . . . 18
103 6.2. Content-Length . . . . . . . . . . . . . . . . . . . . . 19
104 6.3. Message Body Length . . . . . . . . . . . . . . . . . . . 20
105 7. Transfer Codings . . . . . . . . . . . . . . . . . . . . . . 22
106 7.1. Chunked Transfer Coding . . . . . . . . . . . . . . . . . 23
107 7.1.1. Chunk Extensions . . . . . . . . . . . . . . . . . . 23
108 7.1.2. Chunked Trailer Section . . . . . . . . . . . . . . . 24
109 7.1.3. Decoding Chunked . . . . . . . . . . . . . . . . . . 24
110 7.2. Transfer Codings for Compression . . . . . . . . . . . . 25
111 7.3. Transfer Coding Registry . . . . . . . . . . . . . . . . 25
112 7.4. Negotiating Transfer Codings . . . . . . . . . . . . . . 26
113 8. Handling Incomplete Messages . . . . . . . . . . . . . . . . 27
114 9. Connection Management . . . . . . . . . . . . . . . . . . . . 28
115 9.1. Establishment . . . . . . . . . . . . . . . . . . . . . . 28
116 9.2. Associating a Response to a Request . . . . . . . . . . . 28
117 9.3. Persistence . . . . . . . . . . . . . . . . . . . . . . . 29
118 9.3.1. Retrying Requests . . . . . . . . . . . . . . . . . . 30
119 9.3.2. Pipelining . . . . . . . . . . . . . . . . . . . . . 30
120 9.4. Concurrency . . . . . . . . . . . . . . . . . . . . . . . 31
121 9.5. Failures and Timeouts . . . . . . . . . . . . . . . . . . 31
122 9.6. Tear-down . . . . . . . . . . . . . . . . . . . . . . . . 32
123 9.7. TLS Connection Initiation . . . . . . . . . . . . . . . . 34
124 9.8. TLS Connection Closure . . . . . . . . . . . . . . . . . 34
125 10. Enclosing Messages as Data . . . . . . . . . . . . . . . . . 35
126 10.1. Media Type message/http . . . . . . . . . . . . . . . . 35
127 10.2. Media Type application/http . . . . . . . . . . . . . . 36
128 11. Security Considerations . . . . . . . . . . . . . . . . . . . 37
129 11.1. Response Splitting . . . . . . . . . . . . . . . . . . . 37
130 11.2. Request Smuggling . . . . . . . . . . . . . . . . . . . 38
131 11.3. Message Integrity . . . . . . . . . . . . . . . . . . . 39
132 11.4. Message Confidentiality . . . . . . . . . . . . . . . . 39
133 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 40
134 12.1. Field Name Registration . . . . . . . . . . . . . . . . 40
135 12.2. Media Type Registration . . . . . . . . . . . . . . . . 40
136 12.3. Transfer Coding Registration . . . . . . . . . . . . . . 40
137 12.4. ALPN Protocol ID Registration . . . . . . . . . . . . . 41
138 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 42
139 13.1. Normative References . . . . . . . . . . . . . . . . . . 42
140 13.2. Informative References . . . . . . . . . . . . . . . . . 43
141 Appendix A. Collected ABNF . . . . . . . . . . . . . . . . . . . 44
142 Appendix B. Differences between HTTP and MIME . . . . . . . . . 46
143 B.1. MIME-Version . . . . . . . . . . . . . . . . . . . . . . 46
144 B.2. Conversion to Canonical Form . . . . . . . . . . . . . . 46
145 B.3. Conversion of Date Formats . . . . . . . . . . . . . . . 47
146 B.4. Conversion of Content-Encoding . . . . . . . . . . . . . 47
147 B.5. Conversion of Content-Transfer-Encoding . . . . . . . . . 47
148 B.6. MHTML and Line Length Limitations . . . . . . . . . . . . 48
149 Appendix C. Changes from previous RFCs . . . . . . . . . . . . . 48
150 C.1. Changes from HTTP/0.9 . . . . . . . . . . . . . . . . . . 48
151 C.2. Changes from HTTP/1.0 . . . . . . . . . . . . . . . . . . 48
152 C.2.1. Multihomed Web Servers . . . . . . . . . . . . . . . 48
153 C.2.2. Keep-Alive Connections . . . . . . . . . . . . . . . 49
154 C.2.3. Introduction of Transfer-Encoding . . . . . . . . . . 49
155 C.3. Changes from RFC 7230 . . . . . . . . . . . . . . . . . . 49
156 Appendix D. Change Log . . . . . . . . . . . . . . . . . . . . . 50
157 D.1. Between RFC7230 and draft 00 . . . . . . . . . . . . . . 50
158 D.2. Since draft-ietf-httpbis-messaging-00 . . . . . . . . . . 51
159 D.3. Since draft-ietf-httpbis-messaging-01 . . . . . . . . . . 51
160 D.4. Since draft-ietf-httpbis-messaging-02 . . . . . . . . . . 52
161 D.5. Since draft-ietf-httpbis-messaging-03 . . . . . . . . . . 52
162 D.6. Since draft-ietf-httpbis-messaging-04 . . . . . . . . . . 52
163 D.7. Since draft-ietf-httpbis-messaging-05 . . . . . . . . . . 52
164 D.8. Since draft-ietf-httpbis-messaging-06 . . . . . . . . . . 53
165 D.9. Since draft-ietf-httpbis-messaging-07 . . . . . . . . . . 53
166 D.10. Since draft-ietf-httpbis-messaging-08 . . . . . . . . . . 54
167 D.11. Since draft-ietf-httpbis-messaging-09 . . . . . . . . . . 54
168 D.12. Since draft-ietf-httpbis-messaging-10 . . . . . . . . . . 54
169 D.13. Since draft-ietf-httpbis-messaging-11 . . . . . . . . . . 54
170 D.14. Since draft-ietf-httpbis-messaging-12 . . . . . . . . . . 55
171 D.15. Since draft-ietf-httpbis-messaging-13 . . . . . . . . . . 55
172 D.16. Since draft-ietf-httpbis-messaging-14 . . . . . . . . . . 55
173 D.17. Since draft-ietf-httpbis-messaging-15 . . . . . . . . . . 56
174 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 56
175 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
176 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 59
178 1. Introduction
180 The Hypertext Transfer Protocol (HTTP) is a stateless application-
181 level request/response protocol that uses extensible semantics and
182 self-descriptive messages for flexible interaction with network-based
183 hypertext information systems. HTTP/1.1 is defined by:
185 * This document
187 * "HTTP Semantics" [Semantics]
189 * "HTTP Caching" [Caching]
190 This document specifies how HTTP semantics are conveyed using the
191 HTTP/1.1 message syntax, framing and connection management
192 mechanisms. Its goal is to define the complete set of requirements
193 for HTTP/1.1 message parsers and message-forwarding intermediaries.
195 This document obsoletes the portions of RFC 7230 related to HTTP/1.1
196 messaging and connection management, with the changes being
197 summarized in Appendix C.3. The other parts of RFC 7230 are
198 obsoleted by "HTTP Semantics" [Semantics].
200 1.1. Requirements Notation
202 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
203 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
204 "OPTIONAL" in this document are to be interpreted as described in BCP
205 14 [RFC2119] [RFC8174] when, and only when, they appear in all
206 capitals, as shown here.
208 Conformance criteria and considerations regarding error handling are
209 defined in Section 2 of [Semantics].
211 1.2. Syntax Notation
213 This specification uses the Augmented Backus-Naur Form (ABNF)
214 notation of [RFC5234], extended with the notation for case-
215 sensitivity in strings defined in [RFC7405].
217 It also uses a list extension, defined in Section 5.6.1 of
218 [Semantics], that allows for compact definition of comma-separated
219 lists using a '#' operator (similar to how the '*' operator indicates
220 repetition). Appendix A shows the collected grammar with all list
221 operators expanded to standard ABNF notation.
223 As a convention, ABNF rule names prefixed with "obs-" denote
224 "obsolete" grammar rules that appear for historical reasons.
226 The following core rules are included by reference, as defined in
227 [RFC5234], Appendix B.1: ALPHA (letters), CR (carriage return), CRLF
228 (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote),
229 HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line
230 feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any
231 visible [USASCII] character).
233 The rules below are defined in [Semantics]:
235 BWS =
236 OWS =
237 RWS =
238 absolute-path =
239 field-name =
240 field-value =
241 obs-text =
242 quoted-string =
243 token =
244 transfer-coding =
245
247 The rules below are defined in [RFC3986]:
249 absolute-URI =
250 authority =
251 uri-host =
252 port =
253 query =
255 2. Message
257 2.1. Message Format
259 An HTTP/1.1 message consists of a start-line followed by a CRLF and a
260 sequence of octets in a format similar to the Internet Message Format
261 [RFC5322]: zero or more header field lines (collectively referred to
262 as the "headers" or the "header section"), an empty line indicating
263 the end of the header section, and an optional message body.
265 HTTP-message = start-line CRLF
266 *( field-line CRLF )
267 CRLF
268 [ message-body ]
270 A message can be either a request from client to server or a response
271 from server to client. Syntactically, the two types of message
272 differ only in the start-line, which is either a request-line (for
273 requests) or a status-line (for responses), and in the algorithm for
274 determining the length of the message body (Section 6).
276 start-line = request-line / status-line
278 In theory, a client could receive requests and a server could receive
279 responses, distinguishing them by their different start-line formats.
280 In practice, servers are implemented to only expect a request (a
281 response is interpreted as an unknown or invalid request method) and
282 clients are implemented to only expect a response.
284 Although HTTP makes use of some protocol elements similar to the
285 Multipurpose Internet Mail Extensions (MIME) [RFC2045], see
286 Appendix B for the differences between HTTP and MIME messages.
288 2.2. Message Parsing
290 The normal procedure for parsing an HTTP message is to read the
291 start-line into a structure, read each header field line into a hash
292 table by field name until the empty line, and then use the parsed
293 data to determine if a message body is expected. If a message body
294 has been indicated, then it is read as a stream until an amount of
295 octets equal to the message body length is read or the connection is
296 closed.
298 A recipient MUST parse an HTTP message as a sequence of octets in an
299 encoding that is a superset of US-ASCII [USASCII]. Parsing an HTTP
300 message as a stream of Unicode characters, without regard for the
301 specific encoding, creates security vulnerabilities due to the
302 varying ways that string processing libraries handle invalid
303 multibyte character sequences that contain the octet LF (%x0A).
304 String-based parsers can only be safely used within protocol elements
305 after the element has been extracted from the message, such as within
306 a header field line value after message parsing has delineated the
307 individual field lines.
309 Although the line terminator for the start-line and fields is the
310 sequence CRLF, a recipient MAY recognize a single LF as a line
311 terminator and ignore any preceding CR.
313 A sender MUST NOT generate a bare CR (a CR character not immediately
314 followed by LF) within any protocol elements other than the content.
315 A recipient of such a bare CR MUST consider that element to be
316 invalid or replace each bare CR with SP before processing the element
317 or forwarding the message.
319 Older HTTP/1.0 user agent implementations might send an extra CRLF
320 after a POST request as a workaround for some early server
321 applications that failed to read message body content that was not
322 terminated by a line-ending. An HTTP/1.1 user agent MUST NOT preface
323 or follow a request with an extra CRLF. If terminating the request
324 message body with a line-ending is desired, then the user agent MUST
325 count the terminating CRLF octets as part of the message body length.
327 In the interest of robustness, a server that is expecting to receive
328 and parse a request-line SHOULD ignore at least one empty line (CRLF)
329 received prior to the request-line.
331 A sender MUST NOT send whitespace between the start-line and the
332 first header field. A recipient that receives whitespace between the
333 start-line and the first header field MUST either reject the message
334 as invalid or consume each whitespace-preceded line without further
335 processing of it (i.e., ignore the entire line, along with any
336 subsequent lines preceded by whitespace, until a properly formed
337 header field is received or the header section is terminated).
339 The presence of such whitespace in a request might be an attempt to
340 trick a server into ignoring that field line or processing the line
341 after it as a new request, either of which might result in a security
342 vulnerability if other implementations within the request chain
343 interpret the same message differently. Likewise, the presence of
344 such whitespace in a response might be ignored by some clients or
345 cause others to cease parsing.
347 When a server listening only for HTTP request messages, or processing
348 what appears from the start-line to be an HTTP request message,
349 receives a sequence of octets that does not match the HTTP-message
350 grammar aside from the robustness exceptions listed above, the server
351 SHOULD respond with a 400 (Bad Request) response and close the
352 connection.
354 2.3. HTTP Version
356 HTTP uses a "." numbering scheme to indicate versions
357 of the protocol. This specification defines version "1.1".
358 Section 2.5 of [Semantics] specifies the semantics of HTTP version
359 numbers.
361 The version of an HTTP/1.x message is indicated by an HTTP-version
362 field in the start-line. HTTP-version is case-sensitive.
364 HTTP-version = HTTP-name "/" DIGIT "." DIGIT
365 HTTP-name = %s"HTTP"
367 When an HTTP/1.1 message is sent to an HTTP/1.0 recipient [RFC1945]
368 or a recipient whose version is unknown, the HTTP/1.1 message is
369 constructed such that it can be interpreted as a valid HTTP/1.0
370 message if all of the newer features are ignored. This specification
371 places recipient-version requirements on some new features so that a
372 conformant sender will only use compatible features until it has
373 determined, through configuration or the receipt of a message, that
374 the recipient supports HTTP/1.1.
376 Intermediaries that process HTTP messages (i.e., all intermediaries
377 other than those acting as tunnels) MUST send their own HTTP-version
378 in forwarded messages, unless it is purposefully downgraded as a
379 workaround for an upstream issue. In other words, an intermediary is
380 not allowed to blindly forward the start-line without ensuring that
381 the protocol version in that message matches a version to which that
382 intermediary is conformant for both the receiving and sending of
383 messages. Forwarding an HTTP message without rewriting the HTTP-
384 version might result in communication errors when downstream
385 recipients use the message sender's version to determine what
386 features are safe to use for later communication with that sender.
388 A server MAY send an HTTP/1.0 response to an HTTP/1.1 request if it
389 is known or suspected that the client incorrectly implements the HTTP
390 specification and is incapable of correctly processing later version
391 responses, such as when a client fails to parse the version number
392 correctly or when an intermediary is known to blindly forward the
393 HTTP-version even when it doesn't conform to the given minor version
394 of the protocol. Such protocol downgrades SHOULD NOT be performed
395 unless triggered by specific client attributes, such as when one or
396 more of the request header fields (e.g., User-Agent) uniquely match
397 the values sent by a client known to be in error.
399 3. Request Line
401 A request-line begins with a method token, followed by a single space
402 (SP), the request-target, another single space (SP), and ends with
403 the protocol version.
405 request-line = method SP request-target SP HTTP-version
407 Although the request-line grammar rule requires that each of the
408 component elements be separated by a single SP octet, recipients MAY
409 instead parse on whitespace-delimited word boundaries and, aside from
410 the CRLF terminator, treat any form of whitespace as the SP separator
411 while ignoring preceding or trailing whitespace; such whitespace
412 includes one or more of the following octets: SP, HTAB, VT (%x0B), FF
413 (%x0C), or bare CR. However, lenient parsing can result in request
414 smuggling security vulnerabilities if there are multiple recipients
415 of the message and each has its own unique interpretation of
416 robustness (see Section 11.2).
418 HTTP does not place a predefined limit on the length of a request-
419 line, as described in Section 2 of [Semantics]. A server that
420 receives a method longer than any that it implements SHOULD respond
421 with a 501 (Not Implemented) status code. A server that receives a
422 request-target longer than any URI it wishes to parse MUST respond
423 with a 414 (URI Too Long) status code (see Section 15.5.15 of
424 [Semantics]).
426 Various ad hoc limitations on request-line length are found in
427 practice. It is RECOMMENDED that all HTTP senders and recipients
428 support, at a minimum, request-line lengths of 8000 octets.
430 3.1. Method
432 The method token indicates the request method to be performed on the
433 target resource. The request method is case-sensitive.
435 method = token
437 The request methods defined by this specification can be found in
438 Section 9 of [Semantics], along with information regarding the HTTP
439 method registry and considerations for defining new methods.
441 3.2. Request Target
443 The request-target identifies the target resource upon which to apply
444 the request. The client derives a request-target from its desired
445 target URI. There are four distinct formats for the request-target,
446 depending on both the method being requested and whether the request
447 is to a proxy.
449 request-target = origin-form
450 / absolute-form
451 / authority-form
452 / asterisk-form
454 No whitespace is allowed in the request-target. Unfortunately, some
455 user agents fail to properly encode or exclude whitespace found in
456 hypertext references, resulting in those disallowed characters being
457 sent as the request-target in a malformed request-line.
459 Recipients of an invalid request-line SHOULD respond with either a
460 400 (Bad Request) error or a 301 (Moved Permanently) redirect with
461 the request-target properly encoded. A recipient SHOULD NOT attempt
462 to autocorrect and then process the request without a redirect, since
463 the invalid request-line might be deliberately crafted to bypass
464 security filters along the request chain.
466 A client MUST send a Host header field in all HTTP/1.1 request
467 messages. If the target URI includes an authority component, then a
468 client MUST send a field value for Host that is identical to that
469 authority component, excluding any userinfo subcomponent and its "@"
470 delimiter (Section 4.2.1 of [Semantics]). If the authority component
471 is missing or undefined for the target URI, then a client MUST send a
472 Host header field with an empty field value.
474 A server MUST respond with a 400 (Bad Request) status code to any
475 HTTP/1.1 request message that lacks a Host header field and to any
476 request message that contains more than one Host header field line or
477 a Host header field with an invalid field value.
479 3.2.1. origin-form
481 The most common form of request-target is the _origin-form_.
483 origin-form = absolute-path [ "?" query ]
485 When making a request directly to an origin server, other than a
486 CONNECT or server-wide OPTIONS request (as detailed below), a client
487 MUST send only the absolute path and query components of the target
488 URI as the request-target. If the target URI's path component is
489 empty, the client MUST send "/" as the path within the origin-form of
490 request-target. A Host header field is also sent, as defined in
491 Section 7.2 of [Semantics].
493 For example, a client wishing to retrieve a representation of the
494 resource identified as
496 http://www.example.org/where?q=now
498 directly from the origin server would open (or reuse) a TCP
499 connection to port 80 of the host "www.example.org" and send the
500 lines:
502 GET /where?q=now HTTP/1.1
503 Host: www.example.org
505 followed by the remainder of the request message.
507 3.2.2. absolute-form
509 When making a request to a proxy, other than a CONNECT or server-wide
510 OPTIONS request (as detailed below), a client MUST send the target
511 URI in _absolute-form_ as the request-target.
513 absolute-form = absolute-URI
515 The proxy is requested to either service that request from a valid
516 cache, if possible, or make the same request on the client's behalf
517 to either the next inbound proxy server or directly to the origin
518 server indicated by the request-target. Requirements on such
519 "forwarding" of messages are defined in Section 7.6 of [Semantics].
521 An example absolute-form of request-line would be:
523 GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1
525 A client MUST send a Host header field in an HTTP/1.1 request even if
526 the request-target is in the absolute-form, since this allows the
527 Host information to be forwarded through ancient HTTP/1.0 proxies
528 that might not have implemented Host.
530 When a proxy receives a request with an absolute-form of request-
531 target, the proxy MUST ignore the received Host header field (if any)
532 and instead replace it with the host information of the request-
533 target. A proxy that forwards such a request MUST generate a new
534 Host field value based on the received request-target rather than
535 forward the received Host field value.
537 When an origin server receives a request with an absolute-form of
538 request-target, the origin server MUST ignore the received Host
539 header field (if any) and instead use the host information of the
540 request-target. Note that if the request-target does not have an
541 authority component, an empty Host header field will be sent in this
542 case.
544 To allow for transition to the absolute-form for all requests in some
545 future version of HTTP, a server MUST accept the absolute-form in
546 requests, even though HTTP/1.1 clients will only send them in
547 requests to proxies.
549 3.2.3. authority-form
551 The _authority-form_ of request-target is only used for CONNECT
552 requests (Section 9.3.6 of [Semantics]). It consists of only the
553 uri-host and port number of the tunnel destination, separated by a
554 colon (":").
556 authority-form = uri-host ":" port
558 When making a CONNECT request to establish a tunnel through one or
559 more proxies, a client MUST send only the host and port of the tunnel
560 destination as the request-target. The client obtains the host and
561 port from the target URI's authority component, except that it sends
562 the scheme's default port if the target URI elides the port. For
563 example, a CONNECT request to "http://www.example.com" looks like
565 CONNECT www.example.com:80 HTTP/1.1
566 Host: www.example.com
568 3.2.4. asterisk-form
570 The _asterisk-form_ of request-target is only used for a server-wide
571 OPTIONS request (Section 9.3.7 of [Semantics]).
573 asterisk-form = "*"
575 When a client wishes to request OPTIONS for the server as a whole, as
576 opposed to a specific named resource of that server, the client MUST
577 send only "*" (%x2A) as the request-target. For example,
579 OPTIONS * HTTP/1.1
581 If a proxy receives an OPTIONS request with an absolute-form of
582 request-target in which the URI has an empty path and no query
583 component, then the last proxy on the request chain MUST send a
584 request-target of "*" when it forwards the request to the indicated
585 origin server.
587 For example, the request
589 OPTIONS http://www.example.org:8001 HTTP/1.1
591 would be forwarded by the final proxy as
593 OPTIONS * HTTP/1.1
594 Host: www.example.org:8001
596 after connecting to port 8001 of host "www.example.org".
598 3.3. Reconstructing the Target URI
600 The target URI is the request-target when the request-target is in
601 absolute-form. In that case, a server will parse the URI into its
602 generic components for further evaluation.
604 Otherwise, the server reconstructs the target URI from the connection
605 context and various parts of the request message in order to identify
606 the target resource (Section 7.1 of [Semantics]):
608 * If the server's configuration provides for a fixed URI scheme, or
609 a scheme is provided by a trusted outbound gateway, that scheme is
610 used for the target URI. This is common in large-scale
611 deployments because a gateway server will receive the client's
612 connection context and replace that with their own connection to
613 the inbound server. Otherwise, if the request is received over a
614 secured connection, the target URI's scheme is "https"; if not,
615 the scheme is "http".
617 * If the request-target is in authority-form, the target URI's
618 authority component is the request-target. Otherwise, the target
619 URI's authority component is the field value of the Host header
620 field. If there is no Host header field or if its field value is
621 empty or invalid, the target URI's authority component is empty.
623 * If the request-target is in authority-form or asterisk-form, the
624 target URI's combined path and query component is empty.
625 Otherwise, the target URI's combined path and query component is
626 the request-target.
628 * The components of a reconstructed target URI, once determined as
629 above, can be recombined into absolute-URI form by concatenating
630 the scheme, "://", authority, and combined path and query
631 component.
633 Example 1: the following message received over a secure connection
635 GET /pub/WWW/TheProject.html HTTP/1.1
636 Host: www.example.org
638 has a target URI of
640 https://www.example.org/pub/WWW/TheProject.html
642 Example 2: the following message received over an insecure connection
644 OPTIONS * HTTP/1.1
645 Host: www.example.org:8080
647 has a target URI of
649 http://www.example.org:8080
651 If the target URI's authority component is empty and its URI scheme
652 requires a non-empty authority (as is the case for "http" and
653 "https"), the server can reject the request or determine whether a
654 configured default applies that is consistent with the incoming
655 connection's context. Context might include connection details like
656 address and port, what security has been applied, and locally-defined
657 information specific to that server's configuration. An empty
658 authority is replaced with the configured default before further
659 processing of the request.
661 Supplying a default name for authority within the context of a
662 secured connection is inherently unsafe if there is any chance that
663 the user agent's intended authority might differ from the selected
664 default. A server that can uniquely identify an authority from the
665 request context MAY use that identity as a default without this risk.
666 Alternatively, it might be better to redirect the request to a safe
667 resource that explains how to obtain a new client.
669 Note that reconstructing the client's target URI is only half of the
670 process for identifying a target resource. The other half is
671 determining whether that target URI identifies a resource for which
672 the server is willing and able to send a response, as defined in
673 Section 7.4 of [Semantics].
675 4. Status Line
677 The first line of a response message is the status-line, consisting
678 of the protocol version, a space (SP), the status code, another
679 space, and ending with an OPTIONAL textual phrase describing the
680 status code.
682 status-line = HTTP-version SP status-code SP [reason-phrase]
684 Although the status-line grammar rule requires that each of the
685 component elements be separated by a single SP octet, recipients MAY
686 instead parse on whitespace-delimited word boundaries and, aside from
687 the line terminator, treat any form of whitespace as the SP separator
688 while ignoring preceding or trailing whitespace; such whitespace
689 includes one or more of the following octets: SP, HTAB, VT (%x0B), FF
690 (%x0C), or bare CR. However, lenient parsing can result in response
691 splitting security vulnerabilities if there are multiple recipients
692 of the message and each has its own unique interpretation of
693 robustness (see Section 11.1).
695 The status-code element is a 3-digit integer code describing the
696 result of the server's attempt to understand and satisfy the client's
697 corresponding request. The rest of the response message is to be
698 interpreted in light of the semantics defined for that status code.
699 See Section 15 of [Semantics] for information about the semantics of
700 status codes, including the classes of status code (indicated by the
701 first digit), the status codes defined by this specification,
702 considerations for the definition of new status codes, and the IANA
703 registry.
705 status-code = 3DIGIT
707 The reason-phrase element exists for the sole purpose of providing a
708 textual description associated with the numeric status code, mostly
709 out of deference to earlier Internet application protocols that were
710 more frequently used with interactive text clients.
712 reason-phrase = 1*( HTAB / SP / VCHAR / obs-text )
714 A client SHOULD ignore the reason-phrase content because it is not a
715 reliable channel for information (it might be translated for a given
716 locale, overwritten by intermediaries, or discarded when the message
717 is forwarded via other versions of HTTP). A server MUST send the
718 space that separates status-code from the reason-phrase even when the
719 reason-phrase is absent (i.e., the status-line would end with the
720 three octets SP CR LF).
722 5. Field Syntax
724 Each field line consists of a case-insensitive field name followed by
725 a colon (":"), optional leading whitespace, the field line value, and
726 optional trailing whitespace.
728 field-line = field-name ":" OWS field-value OWS
730 Most HTTP field names and the rules for parsing within field values
731 are defined in Section 6.3 of [Semantics]. This section covers the
732 generic syntax for header field inclusion within, and extraction
733 from, HTTP/1.1 messages.
735 5.1. Field Line Parsing
737 Messages are parsed using a generic algorithm, independent of the
738 individual field names. The contents within a given field line value
739 are not parsed until a later stage of message interpretation (usually
740 after the message's entire field section has been processed).
742 No whitespace is allowed between the field name and colon. In the
743 past, differences in the handling of such whitespace have led to
744 security vulnerabilities in request routing and response handling. A
745 server MUST reject any received request message that contains
746 whitespace between a header field name and colon with a response
747 status code of 400 (Bad Request). A proxy MUST remove any such
748 whitespace from a response message before forwarding the message
749 downstream.
751 A field line value might be preceded and/or followed by optional
752 whitespace (OWS); a single SP preceding the field line value is
753 preferred for consistent readability by humans. The field line value
754 does not include any leading or trailing whitespace: OWS occurring
755 before the first non-whitespace octet of the field line value or
756 after the last non-whitespace octet of the field line value ought to
757 be excluded by parsers when extracting the field line value from a
758 field line.
760 5.2. Obsolete Line Folding
762 Historically, HTTP field line values could be extended over multiple
763 lines by preceding each extra line with at least one space or
764 horizontal tab (obs-fold). This specification deprecates such line
765 folding except within the message/http media type (Section 10.1).
767 obs-fold = OWS CRLF RWS
768 ; obsolete line folding
770 A sender MUST NOT generate a message that includes line folding
771 (i.e., that has any field line value that contains a match to the
772 obs-fold rule) unless the message is intended for packaging within
773 the message/http media type.
775 A server that receives an obs-fold in a request message that is not
776 within a message/http container MUST either reject the message by
777 sending a 400 (Bad Request), preferably with a representation
778 explaining that obsolete line folding is unacceptable, or replace
779 each received obs-fold with one or more SP octets prior to
780 interpreting the field value or forwarding the message downstream.
782 A proxy or gateway that receives an obs-fold in a response message
783 that is not within a message/http container MUST either discard the
784 message and replace it with a 502 (Bad Gateway) response, preferably
785 with a representation explaining that unacceptable line folding was
786 received, or replace each received obs-fold with one or more SP
787 octets prior to interpreting the field value or forwarding the
788 message downstream.
790 A user agent that receives an obs-fold in a response message that is
791 not within a message/http container MUST replace each received
792 obs-fold with one or more SP octets prior to interpreting the field
793 value.
795 6. Message Body
797 The message body (if any) of an HTTP/1.1 message is used to carry
798 content (Section 6.4 of [Semantics]) for the request or response.
799 The message body is identical to the content unless a transfer coding
800 has been applied, as described in Section 6.1.
802 message-body = *OCTET
804 The rules for determining when a message body is present in an
805 HTTP/1.1 message differ for requests and responses.
807 The presence of a message body in a request is signaled by a
808 Content-Length or Transfer-Encoding header field. Request message
809 framing is independent of method semantics.
811 The presence of a message body in a response depends on both the
812 request method to which it is responding and the response status code
813 (Section 4), and corresponds to when content is allowed; see
814 Section 6.4 of [Semantics].
816 6.1. Transfer-Encoding
818 The Transfer-Encoding header field lists the transfer coding names
819 corresponding to the sequence of transfer codings that have been (or
820 will be) applied to the content in order to form the message body.
821 Transfer codings are defined in Section 7.
823 Transfer-Encoding = #transfer-coding
824 ; defined in [Semantics], Section 10.1.4
826 Transfer-Encoding is analogous to the Content-Transfer-Encoding field
827 of MIME, which was designed to enable safe transport of binary data
828 over a 7-bit transport service ([RFC2045], Section 6). However, safe
829 transport has a different focus for an 8bit-clean transfer protocol.
830 In HTTP's case, Transfer-Encoding is primarily intended to accurately
831 delimit dynamically generated content and to distinguish encodings
832 that are only applied for transport efficiency or security from those
833 that are characteristics of the selected resource.
835 A recipient MUST be able to parse the chunked transfer coding
836 (Section 7.1) because it plays a crucial role in framing messages
837 when the content size is not known in advance. A sender MUST NOT
838 apply chunked more than once to a message body (i.e., chunking an
839 already chunked message is not allowed). If any transfer coding
840 other than chunked is applied to a request's content, the sender MUST
841 apply chunked as the final transfer coding to ensure that the message
842 is properly framed. If any transfer coding other than chunked is
843 applied to a response's content, the sender MUST either apply chunked
844 as the final transfer coding or terminate the message by closing the
845 connection.
847 For example,
849 Transfer-Encoding: gzip, chunked
851 indicates that the content has been compressed using the gzip coding
852 and then chunked using the chunked coding while forming the message
853 body.
855 Unlike Content-Encoding (Section 8.4.1 of [Semantics]), Transfer-
856 Encoding is a property of the message, not of the representation, and
857 any recipient along the request/response chain MAY decode the
858 received transfer coding(s) or apply additional transfer coding(s) to
859 the message body, assuming that corresponding changes are made to the
860 Transfer-Encoding field value. Additional information about the
861 encoding parameters can be provided by other header fields not
862 defined by this specification.
864 Transfer-Encoding MAY be sent in a response to a HEAD request or in a
865 304 (Not Modified) response (Section 15.4.5 of [Semantics]) to a GET
866 request, neither of which includes a message body, to indicate that
867 the origin server would have applied a transfer coding to the message
868 body if the request had been an unconditional GET. This indication
869 is not required, however, because any recipient on the response chain
870 (including the origin server) can remove transfer codings when they
871 are not needed.
873 A server MUST NOT send a Transfer-Encoding header field in any
874 response with a status code of 1xx (Informational) or 204 (No
875 Content). A server MUST NOT send a Transfer-Encoding header field in
876 any 2xx (Successful) response to a CONNECT request (Section 9.3.6 of
877 [Semantics]).
879 Transfer-Encoding was added in HTTP/1.1. It is generally assumed
880 that implementations advertising only HTTP/1.0 support will not
881 understand how to process transfer-encoded content. A client MUST
882 NOT send a request containing Transfer-Encoding unless it knows the
883 server will handle HTTP/1.1 requests (or later minor revisions); such
884 knowledge might be in the form of specific user configuration or by
885 remembering the version of a prior received response. A server MUST
886 NOT send a response containing Transfer-Encoding unless the
887 corresponding request indicates HTTP/1.1 (or later minor revisions).
889 A server that receives a request message with a transfer coding it
890 does not understand SHOULD respond with 501 (Not Implemented).
892 6.2. Content-Length
894 When a message does not have a Transfer-Encoding header field, a
895 Content-Length header field (Section 8.6 of [Semantics]) can provide
896 the anticipated size, as a decimal number of octets, for potential
897 content. For messages that do include content, the Content-Length
898 field value provides the framing information necessary for
899 determining where the data (and message) ends. For messages that do
900 not include content, the Content-Length indicates the size of the
901 selected representation (Section 8.6 of [Semantics]).
903 A sender MUST NOT send a Content-Length header field in any message
904 that contains a Transfer-Encoding header field.
906 | *Note:* HTTP's use of Content-Length for message framing
907 | differs significantly from the same field's use in MIME, where
908 | it is an optional field used only within the "message/external-
909 | body" media-type.
911 6.3. Message Body Length
913 The length of a message body is determined by one of the following
914 (in order of precedence):
916 1. Any response to a HEAD request and any response with a 1xx
917 (Informational), 204 (No Content), or 304 (Not Modified) status
918 code is always terminated by the first empty line after the
919 header fields, regardless of the header fields present in the
920 message, and thus cannot contain a message body or trailer
921 section.
923 2. Any 2xx (Successful) response to a CONNECT request implies that
924 the connection will become a tunnel immediately after the empty
925 line that concludes the header fields. A client MUST ignore any
926 Content-Length or Transfer-Encoding header fields received in
927 such a message.
929 3. If a message is received with both a Transfer-Encoding and a
930 Content-Length header field, the Transfer-Encoding overrides the
931 Content-Length. Such a message might indicate an attempt to
932 perform request smuggling (Section 11.2) or response splitting
933 (Section 11.1) and ought to be handled as an error. An
934 intermediary that chooses to forward the message MUST first
935 remove the received Content-Length field and process the
936 Transfer-Encoding (as described below) prior to forwarding the
937 message downstream.
939 4. If a Transfer-Encoding header field is present and the chunked
940 transfer coding (Section 7.1) is the final encoding, the message
941 body length is determined by reading and decoding the chunked
942 data until the transfer coding indicates the data is complete.
944 If a Transfer-Encoding header field is present in a response and
945 the chunked transfer coding is not the final encoding, the
946 message body length is determined by reading the connection until
947 it is closed by the server.
949 If a Transfer-Encoding header field is present in a request and
950 the chunked transfer coding is not the final encoding, the
951 message body length cannot be determined reliably; the server
952 MUST respond with the 400 (Bad Request) status code and then
953 close the connection.
955 5. If a message is received without Transfer-Encoding and with an
956 invalid Content-Length header field, then the message framing is
957 invalid and the recipient MUST treat it as an unrecoverable
958 error, unless the field value can be successfully parsed as a
959 comma-separated list (Section 5.6.1 of [Semantics]), all values
960 in the list are valid, and all values in the list are the same.
961 If this is a request message, the server MUST respond with a 400
962 (Bad Request) status code and then close the connection. If this
963 is a response message received by a proxy, the proxy MUST close
964 the connection to the server, discard the received response, and
965 send a 502 (Bad Gateway) response to the client. If this is a
966 response message received by a user agent, the user agent MUST
967 close the connection to the server and discard the received
968 response.
970 6. If a valid Content-Length header field is present without
971 Transfer-Encoding, its decimal value defines the expected message
972 body length in octets. If the sender closes the connection or
973 the recipient times out before the indicated number of octets are
974 received, the recipient MUST consider the message to be
975 incomplete and close the connection.
977 7. If this is a request message and none of the above are true, then
978 the message body length is zero (no message body is present).
980 8. Otherwise, this is a response message without a declared message
981 body length, so the message body length is determined by the
982 number of octets received prior to the server closing the
983 connection.
985 Since there is no way to distinguish a successfully completed, close-
986 delimited response message from a partially received message
987 interrupted by network failure, a server SHOULD generate encoding or
988 length-delimited messages whenever possible. The close-delimiting
989 feature exists primarily for backwards compatibility with HTTP/1.0.
991 | *Note:* Request messages are never close-delimited because they
992 | are always explicitly framed by length or transfer coding, with
993 | the absence of both implying the request ends immediately after
994 | the header section.
996 A server MAY reject a request that contains a message body but not a
997 Content-Length by responding with 411 (Length Required).
999 Unless a transfer coding other than chunked has been applied, a
1000 client that sends a request containing a message body SHOULD use a
1001 valid Content-Length header field if the message body length is known
1002 in advance, rather than the chunked transfer coding, since some
1003 existing services respond to chunked with a 411 (Length Required)
1004 status code even though they understand the chunked transfer coding.
1005 This is typically because such services are implemented via a gateway
1006 that requires a content-length in advance of being called and the
1007 server is unable or unwilling to buffer the entire request before
1008 processing.
1010 A user agent that sends a request that contains a message body MUST
1011 send either a valid Content-Length header field or use the chunked
1012 transfer coding. A client MUST NOT use the chunked transfer encoding
1013 unless it knows the server will handle HTTP/1.1 (or later) requests;
1014 such knowledge can be in the form of specific user configuration or
1015 by remembering the version of a prior received response.
1017 If the final response to the last request on a connection has been
1018 completely received and there remains additional data to read, a user
1019 agent MAY discard the remaining data or attempt to determine if that
1020 data belongs as part of the prior message body, which might be the
1021 case if the prior message's Content-Length value is incorrect. A
1022 client MUST NOT process, cache, or forward such extra data as a
1023 separate response, since such behavior would be vulnerable to cache
1024 poisoning.
1026 7. Transfer Codings
1028 Transfer coding names are used to indicate an encoding transformation
1029 that has been, can be, or might need to be applied to a message's
1030 content in order to ensure "safe transport" through the network.
1031 This differs from a content coding in that the transfer coding is a
1032 property of the message rather than a property of the representation
1033 that is being transferred.
1035 All transfer-coding names are case-insensitive and ought to be
1036 registered within the HTTP Transfer Coding registry, as defined in
1037 Section 7.3. They are used in the Transfer-Encoding (Section 6.1)
1038 and TE (Section 10.1.4 of [Semantics]) header fields (the latter also
1039 defining the "transfer-coding" grammar).
1041 7.1. Chunked Transfer Coding
1043 The chunked transfer coding wraps content in order to transfer it as
1044 a series of chunks, each with its own size indicator, followed by an
1045 OPTIONAL trailer section containing trailer fields. Chunked enables
1046 content streams of unknown size to be transferred as a sequence of
1047 length-delimited buffers, which enables the sender to retain
1048 connection persistence and the recipient to know when it has received
1049 the entire message.
1051 chunked-body = *chunk
1052 last-chunk
1053 trailer-section
1054 CRLF
1056 chunk = chunk-size [ chunk-ext ] CRLF
1057 chunk-data CRLF
1058 chunk-size = 1*HEXDIG
1059 last-chunk = 1*("0") [ chunk-ext ] CRLF
1061 chunk-data = 1*OCTET ; a sequence of chunk-size octets
1063 The chunk-size field is a string of hex digits indicating the size of
1064 the chunk-data in octets. The chunked transfer coding is complete
1065 when a chunk with a chunk-size of zero is received, possibly followed
1066 by a trailer section, and finally terminated by an empty line.
1068 A recipient MUST be able to parse and decode the chunked transfer
1069 coding.
1071 HTTP/1.1 does not define any means to limit the size of a chunked
1072 response such that an intermediary can be assured of buffering the
1073 entire response. Additionally, very large chunk sizes may cause
1074 overflows or loss of precision if their values are not represented
1075 accurately in a receiving implementation. Therefore, recipients MUST
1076 anticipate potentially large decimal numerals and prevent parsing
1077 errors due to integer conversion overflows or precision loss due to
1078 integer representation.
1080 The chunked encoding does not define any parameters. Their presence
1081 SHOULD be treated as an error.
1083 7.1.1. Chunk Extensions
1085 The chunked encoding allows each chunk to include zero or more chunk
1086 extensions, immediately following the chunk-size, for the sake of
1087 supplying per-chunk metadata (such as a signature or hash), mid-
1088 message control information, or randomization of message body size.
1090 chunk-ext = *( BWS ";" BWS chunk-ext-name
1091 [ BWS "=" BWS chunk-ext-val ] )
1093 chunk-ext-name = token
1094 chunk-ext-val = token / quoted-string
1096 The chunked encoding is specific to each connection and is likely to
1097 be removed or recoded by each recipient (including intermediaries)
1098 before any higher-level application would have a chance to inspect
1099 the extensions. Hence, use of chunk extensions is generally limited
1100 to specialized HTTP services such as "long polling" (where client and
1101 server can have shared expectations regarding the use of chunk
1102 extensions) or for padding within an end-to-end secured connection.
1104 A recipient MUST ignore unrecognized chunk extensions. A server
1105 ought to limit the total length of chunk extensions received in a
1106 request to an amount reasonable for the services provided, in the
1107 same way that it applies length limitations and timeouts for other
1108 parts of a message, and generate an appropriate 4xx (Client Error)
1109 response if that amount is exceeded.
1111 7.1.2. Chunked Trailer Section
1113 A trailer section allows the sender to include additional fields at
1114 the end of a chunked message in order to supply metadata that might
1115 be dynamically generated while the content is sent, such as a message
1116 integrity check, digital signature, or post-processing status. The
1117 proper use and limitations of trailer fields are defined in
1118 Section 6.5 of [Semantics].
1120 trailer-section = *( field-line CRLF )
1122 A recipient that decodes and removes the chunked encoding from a
1123 message (e.g., for storage or forwarding to a non-HTTP/1.1 peer) MUST
1124 discard any received trailer fields, store/forward them separately
1125 from the header fields, or selectively merge into the header section
1126 only those trailer fields corresponding to header field definitions
1127 that are understood by the recipient to explicitly permit and define
1128 how their corresponding trailer field value can be safely merged.
1130 7.1.3. Decoding Chunked
1132 A process for decoding the chunked transfer coding can be represented
1133 in pseudo-code as:
1135 length := 0
1136 read chunk-size, chunk-ext (if any), and CRLF
1137 while (chunk-size > 0) {
1138 read chunk-data and CRLF
1139 append chunk-data to content
1140 length := length + chunk-size
1141 read chunk-size, chunk-ext (if any), and CRLF
1142 }
1143 read trailer field
1144 while (trailer field is not empty) {
1145 if (trailer fields are stored/forwarded separately) {
1146 append trailer field to existing trailer fields
1147 }
1148 else if (trailer field is understood and defined as mergeable) {
1149 merge trailer field with existing header fields
1150 }
1151 else {
1152 discard trailer field
1153 }
1154 read trailer field
1155 }
1156 Content-Length := length
1157 Remove "chunked" from Transfer-Encoding
1159 7.2. Transfer Codings for Compression
1161 The following transfer coding names for compression are defined by
1162 the same algorithm as their corresponding content coding:
1164 compress (and x-compress)
1165 See Section 8.4.1.1 of [Semantics].
1167 deflate
1168 See Section 8.4.1.2 of [Semantics].
1170 gzip (and x-gzip)
1171 See Section 8.4.1.3 of [Semantics].
1173 The compression codings do not define any parameters. Their presence
1174 SHOULD be treated as an error.
1176 7.3. Transfer Coding Registry
1178 The "HTTP Transfer Coding Registry" defines the namespace for
1179 transfer coding names. It is maintained at
1180 .
1182 Registrations MUST include the following fields:
1184 * Name
1186 * Description
1188 * Pointer to specification text
1190 Names of transfer codings MUST NOT overlap with names of content
1191 codings (Section 8.4.1 of [Semantics]) unless the encoding
1192 transformation is identical, as is the case for the compression
1193 codings defined in Section 7.2.
1195 The TE header field (Section 10.1.4 of [Semantics]) uses a pseudo
1196 parameter named "q" as rank value when multiple transfer codings are
1197 acceptable. Future registrations of transfer codings SHOULD NOT
1198 define parameters called "q" (case-insensitively) in order to avoid
1199 ambiguities.
1201 Values to be added to this namespace require IETF Review (see
1202 Section 4.8 of [RFC8126]), and MUST conform to the purpose of
1203 transfer coding defined in this specification.
1205 Use of program names for the identification of encoding formats is
1206 not desirable and is discouraged for future encodings.
1208 7.4. Negotiating Transfer Codings
1210 The TE field (Section 10.1.4 of [Semantics]) is used in HTTP/1.1 to
1211 indicate what transfer-codings, besides chunked, the client is
1212 willing to accept in the response, and whether or not the client is
1213 willing to preserve trailer fields in a chunked transfer coding.
1215 A client MUST NOT send the chunked transfer coding name in TE;
1216 chunked is always acceptable for HTTP/1.1 recipients.
1218 Three examples of TE use are below.
1220 TE: deflate
1221 TE:
1222 TE: trailers, deflate;q=0.5
1224 When multiple transfer codings are acceptable, the client MAY rank
1225 the codings by preference using a case-insensitive "q" parameter
1226 (similar to the qvalues used in content negotiation fields,
1227 Section 12.4.2 of [Semantics]). The rank value is a real number in
1228 the range 0 through 1, where 0.001 is the least preferred and 1 is
1229 the most preferred; a value of 0 means "not acceptable".
1231 If the TE field value is empty or if no TE field is present, the only
1232 acceptable transfer coding is chunked. A message with no transfer
1233 coding is always acceptable.
1235 The keyword "trailers" indicates that the sender will not discard
1236 trailer fields, as described in Section 6.5 of [Semantics].
1238 Since the TE header field only applies to the immediate connection, a
1239 sender of TE MUST also send a "TE" connection option within the
1240 Connection header field (Section 7.6.1 of [Semantics]) in order to
1241 prevent the TE header field from being forwarded by intermediaries
1242 that do not support its semantics.
1244 8. Handling Incomplete Messages
1246 A server that receives an incomplete request message, usually due to
1247 a canceled request or a triggered timeout exception, MAY send an
1248 error response prior to closing the connection.
1250 A client that receives an incomplete response message, which can
1251 occur when a connection is closed prematurely or when decoding a
1252 supposedly chunked transfer coding fails, MUST record the message as
1253 incomplete. Cache requirements for incomplete responses are defined
1254 in Section 3 of [Caching].
1256 If a response terminates in the middle of the header section (before
1257 the empty line is received) and the status code might rely on header
1258 fields to convey the full meaning of the response, then the client
1259 cannot assume that meaning has been conveyed; the client might need
1260 to repeat the request in order to determine what action to take next.
1262 A message body that uses the chunked transfer coding is incomplete if
1263 the zero-sized chunk that terminates the encoding has not been
1264 received. A message that uses a valid Content-Length is incomplete
1265 if the size of the message body received (in octets) is less than the
1266 value given by Content-Length. A response that has neither chunked
1267 transfer coding nor Content-Length is terminated by closure of the
1268 connection and, if the header section was received intact, is
1269 considered complete unless an error was indicated by the underlying
1270 connection (e.g., an "incomplete close" in TLS would leave the
1271 response incomplete, as described in Section 9.8).
1273 9. Connection Management
1275 HTTP messaging is independent of the underlying transport- or
1276 session-layer connection protocol(s). HTTP only presumes a reliable
1277 transport with in-order delivery of requests and the corresponding
1278 in-order delivery of responses. The mapping of HTTP request and
1279 response structures onto the data units of an underlying transport
1280 protocol is outside the scope of this specification.
1282 As described in Section 7.3 of [Semantics], the specific connection
1283 protocols to be used for an HTTP interaction are determined by client
1284 configuration and the target URI. For example, the "http" URI scheme
1285 (Section 4.2.1 of [Semantics]) indicates a default connection of TCP
1286 over IP, with a default TCP port of 80, but the client might be
1287 configured to use a proxy via some other connection, port, or
1288 protocol.
1290 HTTP implementations are expected to engage in connection management,
1291 which includes maintaining the state of current connections,
1292 establishing a new connection or reusing an existing connection,
1293 processing messages received on a connection, detecting connection
1294 failures, and closing each connection. Most clients maintain
1295 multiple connections in parallel, including more than one connection
1296 per server endpoint. Most servers are designed to maintain thousands
1297 of concurrent connections, while controlling request queues to enable
1298 fair use and detect denial-of-service attacks.
1300 9.1. Establishment
1302 It is beyond the scope of this specification to describe how
1303 connections are established via various transport- or session-layer
1304 protocols. Each connection applies to only one transport link.
1306 9.2. Associating a Response to a Request
1308 HTTP/1.1 does not include a request identifier for associating a
1309 given request message with its corresponding one or more response
1310 messages. Hence, it relies on the order of response arrival to
1311 correspond exactly to the order in which requests are made on the
1312 same connection. More than one response message per request only
1313 occurs when one or more informational responses (1xx, see
1314 Section 15.2 of [Semantics]) precede a final response to the same
1315 request.
1317 A client that has more than one outstanding request on a connection
1318 MUST maintain a list of outstanding requests in the order sent and
1319 MUST associate each received response message on that connection to
1320 the highest ordered request that has not yet received a final (non-
1321 1xx) response.
1323 If an HTTP/1.1 client receives data on a connection that doesn't have
1324 any outstanding requests, it MUST NOT consider them to be a response
1325 to a not-yet-issued request; it SHOULD close the connection, since
1326 message delimitation is now ambiguous, unless the data consists only
1327 of one or more CRLF (which can be discarded, as per Section 2.2).
1329 9.3. Persistence
1331 HTTP/1.1 defaults to the use of _persistent connections_, allowing
1332 multiple requests and responses to be carried over a single
1333 connection. HTTP implementations SHOULD support persistent
1334 connections.
1336 A recipient determines whether a connection is persistent or not
1337 based on the most recently received message's protocol version and
1338 Connection header field (Section 7.6.1 of [Semantics]), if any:
1340 * If the close connection option is present (Section 9.6), the
1341 connection will not persist after the current response; else,
1343 * If the received protocol is HTTP/1.1 (or later), the connection
1344 will persist after the current response; else,
1346 * If the received protocol is HTTP/1.0, the "keep-alive" connection
1347 option is present, either the recipient is not a proxy or the
1348 message is a response, and the recipient wishes to honor the
1349 HTTP/1.0 "keep-alive" mechanism, the connection will persist after
1350 the current response; otherwise,
1352 * The connection will close after the current response.
1354 A client that does not support persistent connections MUST send the
1355 close connection option in every request message.
1357 A server that does not support persistent connections MUST send the
1358 close connection option in every response message that does not have
1359 a 1xx (Informational) status code.
1361 A client MAY send additional requests on a persistent connection
1362 until it sends or receives a close connection option or receives an
1363 HTTP/1.0 response without a "keep-alive" connection option.
1365 In order to remain persistent, all messages on a connection need to
1366 have a self-defined message length (i.e., one not defined by closure
1367 of the connection), as described in Section 6. A server MUST read
1368 the entire request message body or close the connection after sending
1369 its response, since otherwise the remaining data on a persistent
1370 connection would be misinterpreted as the next request. Likewise, a
1371 client MUST read the entire response message body if it intends to
1372 reuse the same connection for a subsequent request.
1374 A proxy server MUST NOT maintain a persistent connection with an
1375 HTTP/1.0 client (see Section 19.7.1 of [RFC2068] for information and
1376 discussion of the problems with the Keep-Alive header field
1377 implemented by many HTTP/1.0 clients).
1379 See Appendix C.2.2 for more information on backwards compatibility
1380 with HTTP/1.0 clients.
1382 9.3.1. Retrying Requests
1384 Connections can be closed at any time, with or without intention.
1385 Implementations ought to anticipate the need to recover from
1386 asynchronous close events. The conditions under which a client can
1387 automatically retry a sequence of outstanding requests are defined in
1388 Section 9.2.2 of [Semantics].
1390 9.3.2. Pipelining
1392 A client that supports persistent connections MAY _pipeline_ its
1393 requests (i.e., send multiple requests without waiting for each
1394 response). A server MAY process a sequence of pipelined requests in
1395 parallel if they all have safe methods (Section 9.2.1 of
1396 [Semantics]), but it MUST send the corresponding responses in the
1397 same order that the requests were received.
1399 A client that pipelines requests SHOULD retry unanswered requests if
1400 the connection closes before it receives all of the corresponding
1401 responses. When retrying pipelined requests after a failed
1402 connection (a connection not explicitly closed by the server in its
1403 last complete response), a client MUST NOT pipeline immediately after
1404 connection establishment, since the first remaining request in the
1405 prior pipeline might have caused an error response that can be lost
1406 again if multiple requests are sent on a prematurely closed
1407 connection (see the TCP reset problem described in Section 9.6).
1409 Idempotent methods (Section 9.2.2 of [Semantics]) are significant to
1410 pipelining because they can be automatically retried after a
1411 connection failure. A user agent SHOULD NOT pipeline requests after
1412 a non-idempotent method, until the final response status code for
1413 that method has been received, unless the user agent has a means to
1414 detect and recover from partial failure conditions involving the
1415 pipelined sequence.
1417 An intermediary that receives pipelined requests MAY pipeline those
1418 requests when forwarding them inbound, since it can rely on the
1419 outbound user agent(s) to determine what requests can be safely
1420 pipelined. If the inbound connection fails before receiving a
1421 response, the pipelining intermediary MAY attempt to retry a sequence
1422 of requests that have yet to receive a response if the requests all
1423 have idempotent methods; otherwise, the pipelining intermediary
1424 SHOULD forward any received responses and then close the
1425 corresponding outbound connection(s) so that the outbound user
1426 agent(s) can recover accordingly.
1428 9.4. Concurrency
1430 A client ought to limit the number of simultaneous open connections
1431 that it maintains to a given server.
1433 Previous revisions of HTTP gave a specific number of connections as a
1434 ceiling, but this was found to be impractical for many applications.
1435 As a result, this specification does not mandate a particular maximum
1436 number of connections but, instead, encourages clients to be
1437 conservative when opening multiple connections.
1439 Multiple connections are typically used to avoid the "head-of-line
1440 blocking" problem, wherein a request that takes significant server-
1441 side processing and/or transfers very large content would block
1442 subsequent requests on the same connection. However, each connection
1443 consumes server resources. Furthermore, using multiple connections
1444 can cause undesirable side effects in congested networks.
1446 Note that a server might reject traffic that it deems abusive or
1447 characteristic of a denial-of-service attack, such as an excessive
1448 number of open connections from a single client.
1450 9.5. Failures and Timeouts
1452 Servers will usually have some timeout value beyond which they will
1453 no longer maintain an inactive connection. Proxy servers might make
1454 this a higher value since it is likely that the client will be making
1455 more connections through the same proxy server. The use of
1456 persistent connections places no requirements on the length (or
1457 existence) of this timeout for either the client or the server.
1459 A client or server that wishes to time out SHOULD issue a graceful
1460 close on the connection. Implementations SHOULD constantly monitor
1461 open connections for a received closure signal and respond to it as
1462 appropriate, since prompt closure of both sides of a connection
1463 enables allocated system resources to be reclaimed.
1465 A client, server, or proxy MAY close the transport connection at any
1466 time. For example, a client might have started to send a new request
1467 at the same time that the server has decided to close the "idle"
1468 connection. From the server's point of view, the connection is being
1469 closed while it was idle, but from the client's point of view, a
1470 request is in progress.
1472 A server SHOULD sustain persistent connections, when possible, and
1473 allow the underlying transport's flow-control mechanisms to resolve
1474 temporary overloads, rather than terminate connections with the
1475 expectation that clients will retry. The latter technique can
1476 exacerbate network congestion or server load.
1478 A client sending a message body SHOULD monitor the network connection
1479 for an error response while it is transmitting the request. If the
1480 client sees a response that indicates the server does not wish to
1481 receive the message body and is closing the connection, the client
1482 SHOULD immediately cease transmitting the body and close its side of
1483 the connection.
1485 9.6. Tear-down
1487 The "close" connection option is defined as a signal that the sender
1488 will close this connection after completion of the response. A
1489 sender SHOULD send a Connection header field (Section 7.6.1 of
1490 [Semantics]) containing the close connection option when it intends
1491 to close a connection. For example,
1493 Connection: close
1495 as a request header field indicates that this is the last request
1496 that the client will send on this connection, while in a response the
1497 same field indicates that the server is going to close this
1498 connection after the response message is complete.
1500 Note that the field name "Close" is reserved, since using that name
1501 as a header field might conflict with the close connection option.
1503 A client that sends a close connection option MUST NOT send further
1504 requests on that connection (after the one containing the close) and
1505 MUST close the connection after reading the final response message
1506 corresponding to this request.
1508 A server that receives a close connection option MUST initiate
1509 closure of the connection (see below) after it sends the final
1510 response to the request that contained the close connection option.
1511 The server SHOULD send a close connection option in its final
1512 response on that connection. The server MUST NOT process any further
1513 requests received on that connection.
1515 A server that sends a close connection option MUST initiate closure
1516 of the connection (see below) after it sends the response containing
1517 the close connection option. The server MUST NOT process any further
1518 requests received on that connection.
1520 A client that receives a close connection option MUST cease sending
1521 requests on that connection and close the connection after reading
1522 the response message containing the close connection option; if
1523 additional pipelined requests had been sent on the connection, the
1524 client SHOULD NOT assume that they will be processed by the server.
1526 If a server performs an immediate close of a TCP connection, there is
1527 a significant risk that the client will not be able to read the last
1528 HTTP response. If the server receives additional data from the
1529 client on a fully closed connection, such as another request sent by
1530 the client before receiving the server's response, the server's TCP
1531 stack will send a reset packet to the client; unfortunately, the
1532 reset packet might erase the client's unacknowledged input buffers
1533 before they can be read and interpreted by the client's HTTP parser.
1535 To avoid the TCP reset problem, servers typically close a connection
1536 in stages. First, the server performs a half-close by closing only
1537 the write side of the read/write connection. The server then
1538 continues to read from the connection until it receives a
1539 corresponding close by the client, or until the server is reasonably
1540 certain that its own TCP stack has received the client's
1541 acknowledgement of the packet(s) containing the server's last
1542 response. Finally, the server fully closes the connection.
1544 It is unknown whether the reset problem is exclusive to TCP or might
1545 also be found in other transport connection protocols.
1547 Note that a TCP connection that is half-closed by the client does not
1548 delimit a request message, nor does it imply that the client is no
1549 longer interested in a response. In general, transport signals
1550 cannot be relied upon to signal edge cases, since HTTP/1.1 is
1551 independent of transport.
1553 9.7. TLS Connection Initiation
1555 Conceptually, HTTP/TLS is simply sending HTTP messages over a
1556 connection secured via TLS [RFC8446].
1558 The HTTP client also acts as the TLS client. It initiates a
1559 connection to the server on the appropriate port and sends the TLS
1560 ClientHello to begin the TLS handshake. When the TLS handshake has
1561 finished, the client may then initiate the first HTTP request. All
1562 HTTP data MUST be sent as TLS "application data", but is otherwise
1563 treated like a normal connection for HTTP (including potential reuse
1564 as a persistent connection).
1566 9.8. TLS Connection Closure
1568 TLS provides a facility for secure connection closure. When a valid
1569 closure alert is received, an implementation can be assured that no
1570 further data will be received on that connection. TLS
1571 implementations MUST initiate an exchange of closure alerts before
1572 closing a connection. A TLS implementation MAY, after sending a
1573 closure alert, close the connection without waiting for the peer to
1574 send its closure alert, generating an "incomplete close". This
1575 SHOULD only be done when the application knows (typically through
1576 detecting HTTP message boundaries) that it has sent or received all
1577 the message data that it cares about.
1579 An incomplete close does not call into question the security of the
1580 data already received, but it could indicate that subsequent data
1581 might have been truncated. As TLS is not directly aware of HTTP
1582 message framing, it is necessary to examine the HTTP data itself to
1583 determine whether messages were complete. Handing of incomplete
1584 messages is defined in Section 8.
1586 When encountering an incomplete close, a client SHOULD treat as
1587 completed all requests for which it has received as much data as
1588 specified in the Content-Length header or, when a Transfer-Encoding
1589 of chunked is used, for which the terminal zero-length chunk has been
1590 received. A response that has neither chunked transfer coding nor
1591 Content-Length is complete only if a valid closure alert has been
1592 received. Treating an incomplete message as complete could expose
1593 implementations to attack.
1595 A client detecting an incomplete close SHOULD recover gracefully.
1597 Clients MUST send a closure alert before closing the connection.
1598 Clients that do not expect to receive any more data MAY choose not to
1599 wait for the server's closure alert and simply close the connection,
1600 thus generating an incomplete close on the server side.
1602 Servers SHOULD be prepared to receive an incomplete close from the
1603 client, since the client can often determine when the end of server
1604 data is.
1606 Servers MUST attempt to initiate an exchange of closure alerts with
1607 the client before closing the connection. Servers MAY close the
1608 connection after sending the closure alert, thus generating an
1609 incomplete close on the client side.
1611 10. Enclosing Messages as Data
1613 10.1. Media Type message/http
1615 The message/http media type can be used to enclose a single HTTP
1616 request or response message, provided that it obeys the MIME
1617 restrictions for all "message" types regarding line length and
1618 encodings.
1620 Type name: message
1622 Subtype name: http
1624 Required parameters: N/A
1626 Optional parameters: version, msgtype
1628 version: The HTTP-version number of the enclosed message (e.g.,
1629 "1.1"). If not present, the version can be determined from the
1630 first line of the body.
1632 msgtype: The message type - "request" or "response". If not
1633 present, the type can be determined from the first line of the
1634 body.
1636 Encoding considerations: only "7bit", "8bit", or "binary" are
1637 permitted
1639 Security considerations: see Section 11
1641 Interoperability considerations: N/A
1643 Published specification: This specification (see Section 10.1).
1645 Applications that use this media type: N/A
1647 Fragment identifier considerations: N/A
1649 Additional information: Magic number(s): N/A
1650 Deprecated alias names for this type: N/A
1652 File extension(s): N/A
1654 Macintosh file type code(s): N/A
1656 Person and email address to contact for further information: See Aut
1657 hors' Addresses section.
1659 Intended usage: COMMON
1661 Restrictions on usage: N/A
1663 Author: See Authors' Addresses section.
1665 Change controller: IESG
1667 10.2. Media Type application/http
1669 The application/http media type can be used to enclose a pipeline of
1670 one or more HTTP request or response messages (not intermixed).
1672 Type name: application
1674 Subtype name: http
1676 Required parameters: N/A
1678 Optional parameters: version, msgtype
1680 version: The HTTP-version number of the enclosed messages (e.g.,
1681 "1.1"). If not present, the version can be determined from the
1682 first line of the body.
1684 msgtype: The message type - "request" or "response". If not
1685 present, the type can be determined from the first line of the
1686 body.
1688 Encoding considerations: HTTP messages enclosed by this type are in
1689 "binary" format; use of an appropriate Content-Transfer-Encoding
1690 is required when transmitted via email.
1692 Security considerations: see Section 11
1694 Interoperability considerations: N/A
1696 Published specification: This specification (see Section 10.2).
1698 Applications that use this media type: N/A
1700 Fragment identifier considerations: N/A
1702 Additional information: Deprecated alias names for this type: N/A
1704 Magic number(s): N/A
1706 File extension(s): N/A
1708 Macintosh file type code(s): N/A
1710 Person and email address to contact for further information: See Aut
1711 hors' Addresses section.
1713 Intended usage: COMMON
1715 Restrictions on usage: N/A
1717 Author: See Authors' Addresses section.
1719 Change controller: IESG
1721 11. Security Considerations
1723 This section is meant to inform developers, information providers,
1724 and users of known security considerations relevant to HTTP message
1725 syntax and parsing. Security considerations about HTTP semantics,
1726 content, and routing are addressed in [Semantics].
1728 11.1. Response Splitting
1730 Response splitting (a.k.a, CRLF injection) is a common technique,
1731 used in various attacks on Web usage, that exploits the line-based
1732 nature of HTTP message framing and the ordered association of
1733 requests to responses on persistent connections [Klein]. This
1734 technique can be particularly damaging when the requests pass through
1735 a shared cache.
1737 Response splitting exploits a vulnerability in servers (usually
1738 within an application server) where an attacker can send encoded data
1739 within some parameter of the request that is later decoded and echoed
1740 within any of the response header fields of the response. If the
1741 decoded data is crafted to look like the response has ended and a
1742 subsequent response has begun, the response has been split and the
1743 content within the apparent second response is controlled by the
1744 attacker. The attacker can then make any other request on the same
1745 persistent connection and trick the recipients (including
1746 intermediaries) into believing that the second half of the split is
1747 an authoritative answer to the second request.
1749 For example, a parameter within the request-target might be read by
1750 an application server and reused within a redirect, resulting in the
1751 same parameter being echoed in the Location header field of the
1752 response. If the parameter is decoded by the application and not
1753 properly encoded when placed in the response field, the attacker can
1754 send encoded CRLF octets and other content that will make the
1755 application's single response look like two or more responses.
1757 A common defense against response splitting is to filter requests for
1758 data that looks like encoded CR and LF (e.g., "%0D" and "%0A").
1759 However, that assumes the application server is only performing URI
1760 decoding, rather than more obscure data transformations like charset
1761 transcoding, XML entity translation, base64 decoding, sprintf
1762 reformatting, etc. A more effective mitigation is to prevent
1763 anything other than the server's core protocol libraries from sending
1764 a CR or LF within the header section, which means restricting the
1765 output of header fields to APIs that filter for bad octets and not
1766 allowing application servers to write directly to the protocol
1767 stream.
1769 11.2. Request Smuggling
1771 Request smuggling ([Linhart]) is a technique that exploits
1772 differences in protocol parsing among various recipients to hide
1773 additional requests (which might otherwise be blocked or disabled by
1774 policy) within an apparently harmless request. Like response
1775 splitting, request smuggling can lead to a variety of attacks on HTTP
1776 usage.
1778 This specification has introduced new requirements on request
1779 parsing, particularly with regard to message framing in Section 6.3,
1780 to reduce the effectiveness of request smuggling.
1782 11.3. Message Integrity
1784 HTTP does not define a specific mechanism for ensuring message
1785 integrity, instead relying on the error-detection ability of
1786 underlying transport protocols and the use of length or chunk-
1787 delimited framing to detect completeness. Historically, the lack of
1788 a single integrity mechanism has been justified by the informal
1789 nature of most HTTP communication. However, the prevalence of HTTP
1790 as an information access mechanism has resulted in its increasing use
1791 within environments where verification of message integrity is
1792 crucial.
1794 The mechanisms provided with the "https" scheme, such as
1795 authenticated encryption, provide protection against modification of
1796 messages. Care is needed however to ensure that connection closure
1797 cannot be used to truncate messages (see Section 9.8). User agents
1798 might refuse to accept incomplete messages or treat them specially.
1799 For example, a browser being used to view medical history or drug
1800 interaction information needs to indicate to the user when such
1801 information is detected by the protocol to be incomplete, expired, or
1802 corrupted during transfer. Such mechanisms might be selectively
1803 enabled via user agent extensions or the presence of message
1804 integrity metadata in a response.
1806 The "http" scheme provides no protection against accidental or
1807 malicious modification of messages.
1809 Extensions to the protocol might be used to mitigate the risk of
1810 unwanted modification of messages by intermediaries, even when the
1811 "https" scheme is used. Integrity might be assured by using hash
1812 functions or digital signatures that are selectively added to
1813 messages via extensible metadata fields.
1815 11.4. Message Confidentiality
1817 HTTP relies on underlying transport protocols to provide message
1818 confidentiality when that is desired. HTTP has been specifically
1819 designed to be independent of the transport protocol, such that it
1820 can be used over many different forms of encrypted connection, with
1821 the selection of such transports being identified by the choice of
1822 URI scheme or within user agent configuration.
1824 The "https" scheme can be used to identify resources that require a
1825 confidential connection, as described in Section 4.2.2 of
1826 [Semantics].
1828 12. IANA Considerations
1830 The change controller for the following registrations is: "IETF
1831 (iesg@ietf.org) - Internet Engineering Task Force".
1833 12.1. Field Name Registration
1835 First, introduce the new "Hypertext Transfer Protocol (HTTP) Field
1836 Name Registry" at as
1837 described in Section 18.4 of [Semantics].
1839 Then, please update the registry with the field names listed in the
1840 table below:
1842 +===================+==========+======+============+
1843 | Field Name | Status | Ref. | Comments |
1844 +===================+==========+======+============+
1845 | Close | standard | 9.6 | (reserved) |
1846 +-------------------+----------+------+------------+
1847 | MIME-Version | standard | B.1 | |
1848 +-------------------+----------+------+------------+
1849 | Transfer-Encoding | standard | 6.1 | |
1850 +-------------------+----------+------+------------+
1852 Table 1
1854 12.2. Media Type Registration
1856 Please update the "Media Types" registry at
1857 with the registration
1858 information in Section 10.1 and Section 10.2 for the media types
1859 "message/http" and "application/http", respectively.
1861 12.3. Transfer Coding Registration
1863 Please update the "HTTP Transfer Coding Registry" at
1864 with the
1865 registration procedure of Section 7.3 and the content coding names
1866 summarized in the table below.
1868 +============+===============================+===========+
1869 | Name | Description | Reference |
1870 +============+===============================+===========+
1871 | chunked | Transfer in a series of | Section |
1872 | | chunks | 7.1 |
1873 +------------+-------------------------------+-----------+
1874 | compress | UNIX "compress" data format | Section |
1875 | | [Welch] | 7.2 |
1876 +------------+-------------------------------+-----------+
1877 | deflate | "deflate" compressed data | Section |
1878 | | ([RFC1951]) inside the "zlib" | 7.2 |
1879 | | data format ([RFC1950]) | |
1880 +------------+-------------------------------+-----------+
1881 | gzip | GZIP file format [RFC1952] | Section |
1882 | | | 7.2 |
1883 +------------+-------------------------------+-----------+
1884 | trailers | (reserved) | Section |
1885 | | | 12.3 |
1886 +------------+-------------------------------+-----------+
1887 | x-compress | Deprecated (alias for | Section |
1888 | | compress) | 7.2 |
1889 +------------+-------------------------------+-----------+
1890 | x-gzip | Deprecated (alias for gzip) | Section |
1891 | | | 7.2 |
1892 +------------+-------------------------------+-----------+
1894 Table 2
1896 | *Note:* the coding name "trailers" is reserved because its use
1897 | would conflict with the keyword "trailers" in the TE header
1898 | field (Section 10.1.4 of [Semantics]).
1900 12.4. ALPN Protocol ID Registration
1902 Please update the "TLS Application-Layer Protocol Negotiation (ALPN)
1903 Protocol IDs" registry at with the
1905 registration below:
1907 +==========+=============================+================+
1908 | Protocol | Identification Sequence | Reference |
1909 +==========+=============================+================+
1910 | HTTP/1.1 | 0x68 0x74 0x74 0x70 0x2f | (this |
1911 | | 0x31 0x2e 0x31 ("http/1.1") | specification) |
1912 +----------+-----------------------------+----------------+
1914 Table 3
1916 13. References
1918 13.1. Normative References
1920 [Caching] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,
1921 Ed., "HTTP Caching", Work in Progress, Internet-Draft,
1922 draft-ietf-httpbis-cache-16, 27 May 2021,
1923 .
1925 [RFC1950] Deutsch, L.P. and J-L. Gailly, "ZLIB Compressed Data
1926 Format Specification version 3.3", RFC 1950,
1927 DOI 10.17487/RFC1950, May 1996,
1928 .
1930 [RFC1951] Deutsch, P., "DEFLATE Compressed Data Format Specification
1931 version 1.3", RFC 1951, DOI 10.17487/RFC1951, May 1996,
1932 .
1934 [RFC1952] Deutsch, P., Gailly, J-L., Adler, M., Deutsch, L.P., and
1935 G. Randers-Pehrson, "GZIP file format specification
1936 version 4.3", RFC 1952, DOI 10.17487/RFC1952, May 1996,
1937 .
1939 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
1940 Requirement Levels", BCP 14, RFC 2119,
1941 DOI 10.17487/RFC2119, March 1997,
1942 .
1944 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
1945 Resource Identifier (URI): Generic Syntax", STD 66,
1946 RFC 3986, DOI 10.17487/RFC3986, January 2005,
1947 .
1949 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
1950 Specifications: ABNF", STD 68, RFC 5234,
1951 DOI 10.17487/RFC5234, January 2008,
1952 .
1954 [RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF",
1955 RFC 7405, DOI 10.17487/RFC7405, December 2014,
1956 .
1958 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
1959 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
1960 May 2017, .
1962 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
1963 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
1964 .
1966 [Semantics]
1967 Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,
1968 Ed., "HTTP Semantics", Work in Progress, Internet-Draft,
1969 draft-ietf-httpbis-semantics-16, 27 May 2021,
1970 .
1973 [USASCII] American National Standards Institute, "Coded Character
1974 Set -- 7-bit American Standard Code for Information
1975 Interchange", ANSI X3.4, 1986.
1977 [Welch] Welch, T. A., "A Technique for High-Performance Data
1978 Compression", IEEE Computer 17(6), June 1984.
1980 13.2. Informative References
1982 [Err4667] RFC Errata, Erratum ID 4667, RFC 7230,
1983 .
1985 [Klein] Klein, A., "Divide and Conquer - HTTP Response Splitting,
1986 Web Cache Poisoning Attacks, and Related Topics", March
1987 2004, .
1990 [Linhart] Linhart, C., Klein, A., Heled, R., and S. Orrin, "HTTP
1991 Request Smuggling", June 2005,
1992 .
1995 [RFC1945] Berners-Lee, T., Fielding, R.T., and H.F. Nielsen,
1996 "Hypertext Transfer Protocol -- HTTP/1.0", RFC 1945,
1997 DOI 10.17487/RFC1945, May 1996,
1998 .
2000 [RFC2045] Freed, N. and N.S. Borenstein, "Multipurpose Internet Mail
2001 Extensions (MIME) Part One: Format of Internet Message
2002 Bodies", RFC 2045, DOI 10.17487/RFC2045, November 1996,
2003 .
2005 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
2006 Extensions (MIME) Part Two: Media Types", RFC 2046,
2007 DOI 10.17487/RFC2046, November 1996,
2008 .
2010 [RFC2049] Freed, N. and N.S. Borenstein, "Multipurpose Internet Mail
2011 Extensions (MIME) Part Five: Conformance Criteria and
2012 Examples", RFC 2049, DOI 10.17487/RFC2049, November 1996,
2013 .
2015 [RFC2068] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., and T.
2016 Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1",
2017 RFC 2068, DOI 10.17487/RFC2068, January 1997,
2018 .
2020 [RFC2557] Palme, F., Hopmann, A., Shelness, N., and E. Stefferud,
2021 "MIME Encapsulation of Aggregate Documents, such as HTML
2022 (MHTML)", RFC 2557, DOI 10.17487/RFC2557, March 1999,
2023 .
2025 [RFC5322] Resnick, P., "Internet Message Format", RFC 5322,
2026 DOI 10.17487/RFC5322, October 2008,
2027 .
2029 [RFC7230] Fielding, R., Ed. and J. F. Reschke, Ed., "Hypertext
2030 Transfer Protocol (HTTP/1.1): Message Syntax and Routing",
2031 RFC 7230, DOI 10.17487/RFC7230, June 2014,
2032 .
2034 [RFC7231] Fielding, R., Ed. and J. F. Reschke, Ed., "Hypertext
2035 Transfer Protocol (HTTP/1.1): Semantics and Content",
2036 RFC 7231, DOI 10.17487/RFC7231, June 2014,
2037 .
2039 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for
2040 Writing an IANA Considerations Section in RFCs", BCP 26,
2041 RFC 8126, DOI 10.17487/RFC8126, June 2017,
2042 .
2044 Appendix A. Collected ABNF
2046 In the collected ABNF below, list rules are expanded as per
2047 Section 5.6.1.1 of [Semantics].
2049 BWS =
2051 HTTP-message = start-line CRLF *( field-line CRLF ) CRLF [
2052 message-body ]
2053 HTTP-name = %x48.54.54.50 ; HTTP
2054 HTTP-version = HTTP-name "/" DIGIT "." DIGIT
2056 OWS =
2057 RWS =
2059 Transfer-Encoding = [ transfer-coding *( OWS "," OWS transfer-coding
2060 ) ]
2062 absolute-URI =
2063 absolute-form = absolute-URI
2064 absolute-path =
2065 asterisk-form = "*"
2066 authority =
2067 authority-form = uri-host ":" port
2069 chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF
2070 chunk-data = 1*OCTET
2071 chunk-ext = *( BWS ";" BWS chunk-ext-name [ BWS "=" BWS chunk-ext-val
2072 ] )
2073 chunk-ext-name = token
2074 chunk-ext-val = token / quoted-string
2075 chunk-size = 1*HEXDIG
2076 chunked-body = *chunk last-chunk trailer-section CRLF
2078 field-line = field-name ":" OWS field-value OWS
2079 field-name =
2080 field-value =
2082 last-chunk = 1*"0" [ chunk-ext ] CRLF
2084 message-body = *OCTET
2085 method = token
2087 obs-fold = OWS CRLF RWS
2088 obs-text =
2089 origin-form = absolute-path [ "?" query ]
2091 port =
2093 query =
2094 quoted-string =
2096 reason-phrase = 1*( HTAB / SP / VCHAR / obs-text )
2097 request-line = method SP request-target SP HTTP-version
2098 request-target = origin-form / absolute-form / authority-form /
2099 asterisk-form
2101 start-line = request-line / status-line
2102 status-code = 3DIGIT
2103 status-line = HTTP-version SP status-code SP [ reason-phrase ]
2104 token =
2105 trailer-section = *( field-line CRLF )
2106 transfer-coding =
2108 uri-host =
2110 Appendix B. Differences between HTTP and MIME
2112 HTTP/1.1 uses many of the constructs defined for the Internet Message
2113 Format [RFC5322] and the Multipurpose Internet Mail Extensions (MIME)
2114 [RFC2045] to allow a message body to be transmitted in an open
2115 variety of representations and with extensible fields. However, RFC
2116 2045 is focused only on email; applications of HTTP have many
2117 characteristics that differ from email; hence, HTTP has features that
2118 differ from MIME. These differences were carefully chosen to
2119 optimize performance over binary connections, to allow greater
2120 freedom in the use of new media types, to make date comparisons
2121 easier, and to acknowledge the practice of some early HTTP servers
2122 and clients.
2124 This appendix describes specific areas where HTTP differs from MIME.
2125 Proxies and gateways to and from strict MIME environments need to be
2126 aware of these differences and provide the appropriate conversions
2127 where necessary.
2129 B.1. MIME-Version
2131 HTTP is not a MIME-compliant protocol. However, messages can include
2132 a single MIME-Version header field to indicate what version of the
2133 MIME protocol was used to construct the message. Use of the MIME-
2134 Version header field indicates that the message is in full
2135 conformance with the MIME protocol (as defined in [RFC2045]).
2136 Senders are responsible for ensuring full conformance (where
2137 possible) when exporting HTTP messages to strict MIME environments.
2139 B.2. Conversion to Canonical Form
2141 MIME requires that an Internet mail body part be converted to
2142 canonical form prior to being transferred, as described in Section 4
2143 of [RFC2049], and that content with a type of "text" represent line
2144 breaks as CRLF, forbidding the use of CR or LF outside of line break
2145 sequences [RFC2046]. In contrast, HTTP does not care whether CRLF,
2146 bare CR, or bare LF are used to indicate a line break within content.
2148 A proxy or gateway from HTTP to a strict MIME environment ought to
2149 translate all line breaks within text media types to the RFC 2049
2150 canonical form of CRLF. Note, however, this might be complicated by
2151 the presence of a Content-Encoding and by the fact that HTTP allows
2152 the use of some charsets that do not use octets 13 and 10 to
2153 represent CR and LF, respectively.
2155 Conversion will break any cryptographic checksums applied to the
2156 original content unless the original content is already in canonical
2157 form. Therefore, the canonical form is recommended for any content
2158 that uses such checksums in HTTP.
2160 B.3. Conversion of Date Formats
2162 HTTP/1.1 uses a restricted set of date formats (Section 5.6.7 of
2163 [Semantics]) to simplify the process of date comparison. Proxies and
2164 gateways from other protocols ought to ensure that any Date header
2165 field present in a message conforms to one of the HTTP/1.1 formats
2166 and rewrite the date if necessary.
2168 B.4. Conversion of Content-Encoding
2170 MIME does not include any concept equivalent to HTTP/1.1's Content-
2171 Encoding header field. Since this acts as a modifier on the media
2172 type, proxies and gateways from HTTP to MIME-compliant protocols
2173 ought to either change the value of the Content-Type header field or
2174 decode the representation before forwarding the message. (Some
2175 experimental applications of Content-Type for Internet mail have used
2176 a media-type parameter of ";conversions=" to perform
2177 a function equivalent to Content-Encoding. However, this parameter
2178 is not part of the MIME standards).
2180 B.5. Conversion of Content-Transfer-Encoding
2182 HTTP does not use the Content-Transfer-Encoding field of MIME.
2183 Proxies and gateways from MIME-compliant protocols to HTTP need to
2184 remove any Content-Transfer-Encoding prior to delivering the response
2185 message to an HTTP client.
2187 Proxies and gateways from HTTP to MIME-compliant protocols are
2188 responsible for ensuring that the message is in the correct format
2189 and encoding for safe transport on that protocol, where "safe
2190 transport" is defined by the limitations of the protocol being used.
2191 Such a proxy or gateway ought to transform and label the data with an
2192 appropriate Content-Transfer-Encoding if doing so will improve the
2193 likelihood of safe transport over the destination protocol.
2195 B.6. MHTML and Line Length Limitations
2197 HTTP implementations that share code with MHTML [RFC2557]
2198 implementations need to be aware of MIME line length limitations.
2199 Since HTTP does not have this limitation, HTTP does not fold long
2200 lines. MHTML messages being transported by HTTP follow all
2201 conventions of MHTML, including line length limitations and folding,
2202 canonicalization, etc., since HTTP transfers message-bodies without
2203 modification and, aside from the "multipart/byteranges" type
2204 (Section 14.6 of [Semantics]), does not interpret the content or any
2205 MIME header lines that might be contained therein.
2207 Appendix C. Changes from previous RFCs
2209 C.1. Changes from HTTP/0.9
2211 Since HTTP/0.9 did not support header fields in a request, there is
2212 no mechanism for it to support name-based virtual hosts (selection of
2213 resource by inspection of the Host header field). Any server that
2214 implements name-based virtual hosts ought to disable support for
2215 HTTP/0.9. Most requests that appear to be HTTP/0.9 are, in fact,
2216 badly constructed HTTP/1.x requests caused by a client failing to
2217 properly encode the request-target.
2219 C.2. Changes from HTTP/1.0
2221 C.2.1. Multihomed Web Servers
2223 The requirements that clients and servers support the Host header
2224 field (Section 7.2 of [Semantics]), report an error if it is missing
2225 from an HTTP/1.1 request, and accept absolute URIs (Section 3.2) are
2226 among the most important changes defined by HTTP/1.1.
2228 Older HTTP/1.0 clients assumed a one-to-one relationship of IP
2229 addresses and servers; there was no other established mechanism for
2230 distinguishing the intended server of a request than the IP address
2231 to which that request was directed. The Host header field was
2232 introduced during the development of HTTP/1.1 and, though it was
2233 quickly implemented by most HTTP/1.0 browsers, additional
2234 requirements were placed on all HTTP/1.1 requests in order to ensure
2235 complete adoption. At the time of this writing, most HTTP-based
2236 services are dependent upon the Host header field for targeting
2237 requests.
2239 C.2.2. Keep-Alive Connections
2241 In HTTP/1.0, each connection is established by the client prior to
2242 the request and closed by the server after sending the response.
2243 However, some implementations implement the explicitly negotiated
2244 ("Keep-Alive") version of persistent connections described in
2245 Section 19.7.1 of [RFC2068].
2247 Some clients and servers might wish to be compatible with these
2248 previous approaches to persistent connections, by explicitly
2249 negotiating for them with a "Connection: keep-alive" request header
2250 field. However, some experimental implementations of HTTP/1.0
2251 persistent connections are faulty; for example, if an HTTP/1.0 proxy
2252 server doesn't understand Connection, it will erroneously forward
2253 that header field to the next inbound server, which would result in a
2254 hung connection.
2256 One attempted solution was the introduction of a Proxy-Connection
2257 header field, targeted specifically at proxies. In practice, this
2258 was also unworkable, because proxies are often deployed in multiple
2259 layers, bringing about the same problem discussed above.
2261 As a result, clients are encouraged not to send the Proxy-Connection
2262 header field in any requests.
2264 Clients are also encouraged to consider the use of Connection: keep-
2265 alive in requests carefully; while they can enable persistent
2266 connections with HTTP/1.0 servers, clients using them will need to
2267 monitor the connection for "hung" requests (which indicate that the
2268 client ought stop sending the header field), and this mechanism ought
2269 not be used by clients at all when a proxy is being used.
2271 C.2.3. Introduction of Transfer-Encoding
2273 HTTP/1.1 introduces the Transfer-Encoding header field (Section 6.1).
2274 Transfer codings need to be decoded prior to forwarding an HTTP
2275 message over a MIME-compliant protocol.
2277 C.3. Changes from RFC 7230
2279 Most of the sections introducing HTTP's design goals, history,
2280 architecture, conformance criteria, protocol versioning, URIs,
2281 message routing, and header fields have been moved to [Semantics].
2282 This document has been reduced to just the messaging syntax and
2283 connection management requirements specific to HTTP/1.1.
2285 Prohibited generation of bare CRs outside of content. (Section 2.2)
2286 The ABNF definition of authority-form has changed from the more
2287 general authority component of a URI (in which port is optional) to
2288 the specific host:port format that is required by CONNECT.
2289 (Section 3.2.3)
2291 In the ABNF for chunked extensions, re-introduced (bad) whitespace
2292 around ";" and "=". Whitespace was removed in [RFC7230], but that
2293 change was found to break existing implementations (see [Err4667]).
2294 (Section 7.1.1)
2296 Trailer field semantics now transcend the specifics of chunked
2297 encoding. The decoding algorithm for chunked (Section 7.1.3) has
2298 been updated to encourage storage/forwarding of trailer fields
2299 separately from the header section, to only allow merging into the
2300 header section if the recipient knows the corresponding field
2301 definition permits and defines how to merge, and otherwise to discard
2302 the trailer fields instead of merging. The trailer part is now
2303 called the trailer section to be more consistent with the header
2304 section and more distinct from a body part. (Section 7.1.2)
2306 Disallowed transfer coding parameters called "q" in order to avoid
2307 conflicts with the use of ranks in the TE header field.
2308 (Section 7.3)
2310 Appendix D. Change Log
2312 This section is to be removed before publishing as an RFC.
2314 D.1. Between RFC7230 and draft 00
2316 The changes were purely editorial:
2318 * Change boilerplate and abstract to indicate the "draft" status,
2319 and update references to ancestor specifications.
2321 * Adjust historical notes.
2323 * Update links to sibling specifications.
2325 * Replace sections listing changes from RFC 2616 by new empty
2326 sections referring to RFC 723x.
2328 * Remove acknowledgements specific to RFC 723x.
2330 * Move "Acknowledgements" to the very end and make them unnumbered.
2332 D.2. Since draft-ietf-httpbis-messaging-00
2334 The changes in this draft are editorial, with respect to HTTP as a
2335 whole, to move all core HTTP semantics into [Semantics]:
2337 * Moved introduction, architecture, conformance, and ABNF extensions
2338 from RFC 7230 (Messaging) to semantics [Semantics].
2340 * Moved discussion of MIME differences from RFC 7231 (Semantics) to
2341 Appendix B since they mostly cover transforming 1.1 messages.
2343 * Moved all extensibility tips, registration procedures, and
2344 registry tables from the IANA considerations to normative
2345 sections, reducing the IANA considerations to just instructions
2346 that will be removed prior to publication as an RFC.
2348 D.3. Since draft-ietf-httpbis-messaging-01
2350 * Cite RFC 8126 instead of RFC 5226 ()
2353 * Resolved erratum 4779, no change needed here
2354 (,
2355 )
2357 * In Section 7, fixed prose claiming transfer parameters allow bare
2358 names (,
2359 )
2361 * Resolved erratum 4225, no change needed here
2362 (,
2363 )
2365 * Replace "response code" with "response status code"
2366 (,
2367 )
2369 * In Section 9.3, clarify statement about HTTP/1.0 keep-alive
2370 (,
2371 )
2373 * In Section 7.1.1, re-introduce (bad) whitespace around ";" and "="
2374 (,
2375 , )
2378 * In Section 7.3, state that transfer codings should not use
2379 parameters named "q" (, )
2382 * In Section 7, mark coding name "trailers" as reserved in the IANA
2383 registry ()
2385 D.4. Since draft-ietf-httpbis-messaging-02
2387 * In Section 4, explain why the reason phrase should be ignored by
2388 clients ().
2390 * Add Section 9.2 to explain how request/response correlation is
2391 performed ()
2393 D.5. Since draft-ietf-httpbis-messaging-03
2395 * In Section 9.2, caution against treating data on a connection as
2396 part of a not-yet-issued request ()
2399 * In Section 7, remove the predefined codings from the ABNF and make
2400 it generic instead ()
2403 * Use RFC 7405 ABNF notation for case-sensitive string constants
2404 ()
2406 D.6. Since draft-ietf-httpbis-messaging-04
2408 * In Section 7.8 of [Semantics], clarify that protocol-name is to be
2409 matched case-insensitively ()
2412 * In Section 5.2, add leading optional whitespace to obs-fold ABNF
2413 (,
2414 )
2416 * In Section 4, add clarifications about empty reason phrases
2417 ()
2419 * Move discussion of retries from Section 9.3.1 into [Semantics]
2420 ()
2422 D.7. Since draft-ietf-httpbis-messaging-05
2423 * In Section 7.1.2, the trailer part has been renamed the trailer
2424 section (for consistency with the header section) and trailers are
2425 no longer merged as header fields by default, but rather can be
2426 discarded, kept separate from header fields, or merged with header
2427 fields only if understood and defined as being mergeable
2428 ()
2430 * In Section 2.1 and related Sections, move the trailing CRLF from
2431 the line grammars into the message format
2432 ()
2434 * Moved Section 2.3 down ()
2437 * In Section 7.8 of [Semantics], use 'websocket' instead of
2438 'HTTP/2.0' in examples ()
2441 * Move version non-specific text from Section 6 into semantics as
2442 "payload" ()
2444 * In Section 9.8, add text from RFC 2818
2445 ()
2447 D.8. Since draft-ietf-httpbis-messaging-06
2449 * In Section 12.4, update the APLN protocol id for HTTP/1.1
2450 ()
2452 * In Section 5, align with updates to field terminology in semantics
2453 ()
2455 * In Section 7.6.1 of [Semantics], clarify that new connection
2456 options indeed need to be registered ()
2459 * In Section 1.1, reference RFC 8174 as well
2460 ()
2462 D.9. Since draft-ietf-httpbis-messaging-07
2464 * Move TE: trailers into [Semantics] ()
2467 * In Section 6.3, adjust requirements for handling multiple content-
2468 length values ()
2470 * Throughout, replace "effective request URI" with "target URI"
2471 ()
2473 * In Section 6.1, don't claim Transfer-Encoding is supported by
2474 HTTP/2 or later ()
2476 D.10. Since draft-ietf-httpbis-messaging-08
2478 * In Section 2.2, disallow bare CRs ()
2481 * Appendix A now uses the sender variant of the "#" list expansion
2482 ()
2484 * In Section 5, adjust IANA "Close" entry for new registry format
2485 ()
2487 D.11. Since draft-ietf-httpbis-messaging-09
2489 * Switch to xml2rfc v3 mode for draft generation
2490 ()
2492 D.12. Since draft-ietf-httpbis-messaging-10
2494 * In Section 6.3, note that TCP half-close does not delimit a
2495 request; talk about corresponding server-side behaviour in
2496 Section 9.6 ()
2498 * Moved requirements specific to HTTP/1.1 from [Semantics] into
2499 Section 3.2 ()
2501 * In Section 6.1 (Transfer-Encoding), adjust ABNF to allow empty
2502 lists ()
2504 * In Section 9.7, add text from RFC 2818
2505 ()
2507 * Moved definitions of "TE" and "Upgrade" into [Semantics]
2508 ()
2510 * Moved definition of "Connection" into [Semantics]
2511 ()
2513 D.13. Since draft-ietf-httpbis-messaging-11
2515 * Move IANA Upgrade Token Registry instructions to [Semantics]
2516 ()
2518 D.14. Since draft-ietf-httpbis-messaging-12
2520 * Moved content of history appendix to Semantics
2521 ()
2523 * Moved note about "close" being reserved as field name to
2524 Section 9.3 ()
2526 * Moved table of transfer codings into Section 12.3
2527 ()
2529 * In Section 13.2, updated the URI for the [Linhart] paper
2530 ()
2532 * Changed document title to just "HTTP/1.1"
2533 ()
2535 * In Section 7, moved transfer-coding ABNF to Section 10.1.4 of
2536 [Semantics] ()
2538 * Changed to using "payload data" when defining requirements about
2539 the data being conveyed within a message, instead of the terms
2540 "payload body" or "response body" or "representation body", since
2541 they often get confused with the HTTP/1.1 message body (which
2542 includes transfer coding) ()
2545 D.15. Since draft-ietf-httpbis-messaging-13
2547 * In Section 6.3, clarify that a message needs to be checked for
2548 both Content-Length and Transfer-Encoding, before processing
2549 Transfer-Encoding, and that ought to be treated as an error, but
2550 an intermediary can choose to forward the message downstream after
2551 removing the Content-Length and processing the Transfer-Encoding
2552 ()
2554 * Changed to using "content" instead of "payload" or "payload data"
2555 to avoid confusion with the payload of version-specific messaging
2556 frames ()
2558 D.16. Since draft-ietf-httpbis-messaging-14
2560 * In Section 9.6, define the close connection option, since its
2561 definition was removed from the Connection header field for being
2562 specific to 1.1 ()
2564 * In Section 3.3, clarify how the target URI is reconstructed when
2565 the request-target is not in absolute-form and highlight risk in
2566 selecting a default host ()
2569 * In Section 7.1, clarify large chunk handling issues
2570 ()
2572 * In Section 2.2, explicitly close the connection after sending a
2573 400 ()
2575 * In Section 2.3, refine version requirements for intermediaries
2576 ()
2578 * In Section 7.1.3, don't remove the Trailer header field
2579 ()
2581 * In Section 3.2.3, changed the ABNF definition of authority-form
2582 from the authority component (in which port is optional) to the
2583 host:port format that has always been required by CONNECT
2584 ()
2586 D.17. Since draft-ietf-httpbis-messaging-15
2588 * None.
2590 Acknowledgments
2592 See Appendix "Acknowledgments" of [Semantics].
2594 Index
2596 A C D F G H M O R T X
2598 A
2600 absolute-form (of request-target) Section 3.2.2
2601 application/http Media Type Section 10.2
2602 asterisk-form (of request-target) Section 3.2.4
2603 authority-form (of request-target) Section 3.2.3
2605 C
2607 Connection header field Section 9.6
2608 Content-Length header field Section 6.2
2609 Content-Transfer-Encoding header field Appendix B.5
2610 chunked (Coding Format) Section 6.1; Section 6.3
2611 chunked (transfer coding) Section 7.1
2612 close Section 9.3; Section 9.6
2613 compress (transfer coding) Section 7.2
2615 D
2617 deflate (transfer coding) Section 7.2
2619 F
2621 Fields
2622 Close Section 9.6, Paragraph 4
2623 MIME-Version Appendix B.1
2624 Transfer-Encoding Section 6.1
2626 G
2628 Grammar
2629 ALPHA Section 1.2
2630 CR Section 1.2
2631 CRLF Section 1.2
2632 CTL Section 1.2
2633 DIGIT Section 1.2
2634 DQUOTE Section 1.2
2635 HEXDIG Section 1.2
2636 HTAB Section 1.2
2637 HTTP-message Section 2.1
2638 HTTP-name Section 2.3
2639 HTTP-version Section 2.3
2640 LF Section 1.2
2641 OCTET Section 1.2
2642 SP Section 1.2
2643 Transfer-Encoding Section 6.1
2644 VCHAR Section 1.2
2645 absolute-form Section 3.2; Section 3.2.2
2646 asterisk-form Section 3.2; Section 3.2.4
2647 authority-form Section 3.2; Section 3.2.3
2648 chunk Section 7.1
2649 chunk-data Section 7.1
2650 chunk-ext Section 7.1; Section 7.1.1
2651 chunk-ext-name Section 7.1.1
2652 chunk-ext-val Section 7.1.1
2653 chunk-size Section 7.1
2654 chunked-body Section 7.1
2655 field-line Section 5; Section 7.1.2
2656 field-name Section 5
2657 field-value Section 5
2658 last-chunk Section 7.1
2659 message-body Section 6
2660 method Section 3.1
2661 obs-fold Section 5.2
2662 origin-form Section 3.2; Section 3.2.1
2663 reason-phrase Section 4
2664 request-line Section 3
2665 request-target Section 3.2
2666 start-line Section 2.1
2667 status-code Section 4
2668 status-line Section 4
2669 trailer-section Section 7.1; Section 7.1.2
2670 gzip (transfer coding) Section 7.2
2672 H
2674 Header Fields
2675 MIME-Version Appendix B.1
2676 Transfer-Encoding Section 6.1
2677 header line Section 2.1
2678 header section Section 2.1
2679 headers Section 2.1
2681 M
2683 MIME-Version header field Appendix B.1
2684 Media Type
2685 application/http Section 10.2
2686 message/http Section 10.1
2687 message/http Media Type Section 10.1
2688 method Section 3.1
2690 O
2692 origin-form (of request-target) Section 3.2.1
2694 R
2696 request-target Section 3.2
2698 T
2700 Transfer-Encoding header field Section 6.1
2702 X
2704 x-compress (transfer coding) Section 7.2
2705 x-gzip (transfer coding) Section 7.2
2707 Authors' Addresses
2709 Roy T. Fielding (editor)
2710 Adobe
2711 345 Park Ave
2712 San Jose, CA 95110
2713 United States of America
2715 Email: fielding@gbiv.com
2716 URI: https://roy.gbiv.com/
2718 Mark Nottingham (editor)
2719 Fastly
2720 Prahran VIC
2721 Australia
2723 Email: mnot@mnot.net
2724 URI: https://www.mnot.net/
2726 Julian Reschke (editor)
2727 greenbytes GmbH
2728 Hafenweg 16
2729 48155 Münster
2730 Germany
2732 Email: julian.reschke@greenbytes.de
2733 URI: https://greenbytes.de/tech/webdav/