RFC 9110 - HTTP Semantics
RFC 9110 - HTTP Semantics
Fielding, Editor
Request for Comments: 9110 Adobe
Obsoletes: 2818, 7230, 7231, 7232, 7233, 7235, 7538, M. Nottingham,
7615, 7694 Editor
STD: 97 Fastly
Updates: 3864 J. Reschke, Editor
Category: Standards Track greenbytes
ISSN: 2070-1721 June 2022
HTTP Semantics
Abstract
The Hypertext Transfer Protocol (HTTP) is a stateless
application-level protocol for distributed, collaborative,
hypertext information systems. This document describes the
overall architecture of HTTP, establishes common terminology,
and defines aspects of the protocol that are shared by all
versions. In this definition are core protocol elements,
extensibility mechanisms, and the "http" and "https" Uniform
Resource Identifier (URI) schemes.
Information about the current status of this document, any errata, and
how to provide feedback on it may be obtained at https://www.rfc-
editor.org/info/rfc9110.
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the document
authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions
Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect
on the date of publication of this document. Please review these
documents carefully, as they describe your rights and restrictions with
respect to this document. Code Components extracted from this
document must include Revised BSD License text as described in Section
4.e of the Trust Legal Provisions and are provided without warranty as
described in the Revised BSD License.
1. Introduction
1.1. Purpose
1.2. History and Evolution
1.3. Core Semantics
1.4. Specifications Obsoleted by This Document
2. Conformance
2.1. Syntax Notation
2.2. Requirements Notation
2.3. Length Requirements
2.4. Error Handling
2.5. Protocol Version
3. Terminology and Core Concepts
3.1. Resources
3.2. Representations
3.3. Connections, Clients, and Servers
3.4. Messages
3.5. User Agents
3.6. Origin Server
3.7. Intermediaries
3.8. Caches
3.9. Example Message Exchange
4. Identifiers in HTTP
4.1. URI References
4.2. HTTP-Related URI Schemes
4.2.1. http URI Scheme
4.2.2. https URI Scheme
4.2.3. http(s) Normalization and Comparison
4.2.4. Deprecation of userinfo in http(s) URIs
4.2.5. http(s) References with Fragment Identifiers
4.3. Authoritative Access
4.3.1. URI Origin
4.3.2. http Origins
4.3.3. https Origins
4.3.4. https Certificate Verification
4.3.5. IP-ID Reference Identity
5. Fields
5.1. Field Names
5.2. Field Lines and Combined Field Value
5.3. Field Order
5.4. Field Limits
5.5. Field Values
5.6. Common Rules for Defining Field Values
5.6.1. Lists (#rule ABNF Extension)
5.6.1.1. Sender Requirements
5.6.1.2. Recipient Requirements
5.6.2. Tokens
5.6.3. Whitespace
5.6.4. Quoted Strings
5.6.5. Comments
5.6.6. Parameters
5.6.7. Date/Time Formats
6. Message Abstraction
6.1. Framing and Completeness
6.2. Control Data
6.3. Header Fields
6.4. Content
6.4.1. Content Semantics
6.4.2. Identifying Content
6.5. Trailer Fields
6.5.1. Limitations on Use of Trailers
6.5.2. Processing Trailer Fields
6.6. Message Metadata
6.6.1. Date
6.6.2. Trailer
7. Routing HTTP Messages
7.1. Determining the Target Resource
7.2. Host and :authority
7.3. Routing Inbound Requests
7.3.1. To a Cache
7.3.2. To a Proxy
7.3.3. To the Origin
7.4. Rejecting Misdirected Requests
7.5. Response Correlation
7.6. Message Forwarding
7.6.1. Connection
7.6.2. Max-Forwards
7.6.3. Via
7.7. Message Transformations
7.8. Upgrade
8. Representation Data and Metadata
8.1. Representation Data
8.2. Representation Metadata
8.3. Content-Type
8.3.1. Media Type
8.3.2. Charset
8.3.3. Multipart Types
8.4. Content-Encoding
8.4.1. Content Codings
8.4.1.1. Compress Coding
8.4.1.2. Deflate Coding
8.4.1.3. Gzip Coding
8.5. Content-Language
8.5.1. Language Tags
8.6. Content-Length
8.7. Content-Location
8.8. Validator Fields
8.8.1. Weak versus Strong
8.8.2. Last-Modified
8.8.2.1. Generation
8.8.2.2. Comparison
8.8.3. ETag
8.8.3.1. Generation
8.8.3.2. Comparison
8.8.3.3. Example: Entity Tags Varying on Content-
Negotiated Resources
9. Methods
9.1. Overview
9.2. Common Method Properties
9.2.1. Safe Methods
9.2.2. Idempotent Methods
9.2.3. Methods and Caching
9.3. Method Definitions
9.3.1. GET
9.3.2. HEAD
9.3.3. POST
9.3.4. PUT
9.3.5. DELETE
9.3.6. CONNECT
9.3.7. OPTIONS
9.3.8. TRACE
10. Message Context
10.1. Request Context Fields
10.1.1. Expect
10.1.2. From
10.1.3. Referer
10.1.4. TE
10.1.5. User-Agent
10.2. Response Context Fields
10.2.1. Allow
10.2.2. Location
10.2.3. Retry-After
10.2.4. Server
11. HTTP Authentication
11.1. Authentication Scheme
11.2. Authentication Parameters
11.3. Challenge and Response
11.4. Credentials
11.5. Establishing a Protection Space (Realm)
11.6. Authenticating Users to Origin Servers
11.6.1. WWW-Authenticate
11.6.2. Authorization
11.6.3. Authentication-Info
11.7. Authenticating Clients to Proxies
11.7.1. Proxy-Authenticate
11.7.2. Proxy-Authorization
11.7.3. Proxy-Authentication-Info
12. Content Negotiation
12.1. Proactive Negotiation
12.2. Reactive Negotiation
12.3. Request Content Negotiation
12.4. Content Negotiation Field Features
12.4.1. Absence
12.4.2. Quality Values
12.4.3. Wildcard Values
12.5. Content Negotiation Fields
12.5.1. Accept
12.5.2. Accept-Charset
12.5.3. Accept-Encoding
12.5.4. Accept-Language
12.5.5. Vary
13. Conditional Requests
13.1. Preconditions
13.1.1. If-Match
13.1.2. If-None-Match
13.1.3. If-Modified-Since
13.1.4. If-Unmodified-Since
13.1.5. If-Range
13.2. Evaluation of Preconditions
13.2.1. When to Evaluate
13.2.2. Precedence of Preconditions
14. Range Requests
14.1. Range Units
14.1.1. Range Specifiers
14.1.2. Byte Ranges
14.2. Range
14.3. Accept-Ranges
14.4. Content-Range
14.5. Partial PUT
14.6. Media Type multipart/byteranges
15. Status Codes
15.1. Overview of Status Codes
15.2. Informational 1xx
15.2.1. 100 Continue
15.2.2. 101 Switching Protocols
15.3. Successful 2xx
15.3.1. 200 OK
15.3.2. 201 Created
15.3.3. 202 Accepted
15.3.4. 203 Non-Authoritative Information
15.3.5. 204 No Content
15.3.6. 205 Reset Content
15.3.7. 206 Partial Content
15.3.7.1. Single Part
15.3.7.2. Multiple Parts
15.3.7.3. Combining Parts
15.4. Redirection 3xx
15.4.1. 300 Multiple Choices
15.4.2. 301 Moved Permanently
15.4.3. 302 Found
15.4.4. 303 See Other
15.4.5. 304 Not Modified
15.4.6. 305 Use Proxy
15.4.7. 306 (Unused)
15.4.8. 307 Temporary Redirect
15.4.9. 308 Permanent Redirect
15.5. Client Error 4xx
15.5.1. 400 Bad Request
15.5.2. 401 Unauthorized
15.5.3. 402 Payment Required
15.5.4. 403 Forbidden
15.5.5. 404 Not Found
15.5.6. 405 Method Not Allowed
15.5.7. 406 Not Acceptable
15.5.8. 407 Proxy Authentication Required
15.5.9. 408 Request Timeout
15.5.10. 409 Conflict
15.5.11. 410 Gone
15.5.12. 411 Length Required
15.5.13. 412 Precondition Failed
15.5.14. 413 Content Too Large
15.5.15. 414 URI Too Long
15.5.16. 415 Unsupported Media Type
15.5.17. 416 Range Not Satisfiable
15.5.18. 417 Expectation Failed
15.5.19. 418 (Unused)
15.5.20. 421 Misdirected Request
15.5.21. 422 Unprocessable Content
15.5.22. 426 Upgrade Required
15.6. Server Error 5xx
15.6.1. 500 Internal Server Error
15.6.2. 501 Not Implemented
15.6.3. 502 Bad Gateway
15.6.4. 503 Service Unavailable
15.6.5. 504 Gateway Timeout
15.6.6. 505 HTTP Version Not Supported
16. Extending HTTP
16.1. Method Extensibility
16.1.1. Method Registry
16.1.2. Considerations for New Methods
16.2. Status Code Extensibility
16.2.1. Status Code Registry
16.2.2. Considerations for New Status Codes
16.3. Field Extensibility
16.3.1. Field Name Registry
16.3.2. Considerations for New Fields
16.3.2.1. Considerations for New Field Names
16.3.2.2. Considerations for New Field Values
16.4. Authentication Scheme Extensibility
16.4.1. Authentication Scheme Registry
16.4.2. Considerations for New Authentication Schemes
16.5. Range Unit Extensibility
16.5.1. Range Unit Registry
16.5.2. Considerations for New Range Units
16.6. Content Coding Extensibility
16.6.1. Content Coding Registry
16.6.2. Considerations for New Content Codings
16.7. Upgrade Token Registry
17. Security Considerations
17.1. Establishing Authority
17.2. Risks of Intermediaries
17.3. Attacks Based on File and Path Names
17.4. Attacks Based on Command, Code, or Query Injection
17.5. Attacks via Protocol Element Length
17.6. Attacks Using Shared-Dictionary Compression
17.7. Disclosure of Personal Information
17.8. Privacy of Server Log Information
17.9. Disclosure of Sensitive Information in URIs
17.10. Application Handling of Field Names
17.11. Disclosure of Fragment after Redirects
17.12. Disclosure of Product Information
17.13. Browser Fingerprinting
17.14. Validator Retention
17.15. Denial-of-Service Attacks Using Range
17.16. Authentication Considerations
17.16.1. Confidentiality of Credentials
17.16.2. Credentials and Idle Clients
17.16.3. Protection Spaces
17.16.4. Additional Response Fields
18. IANA Considerations
18.1. URI Scheme Registration
18.2. Method Registration
18.3. Status Code Registration
18.4. Field Name Registration
18.5. Authentication Scheme Registration
18.6. Content Coding Registration
18.7. Range Unit Registration
18.8. Media Type Registration
18.9. Port Registration
18.10. Upgrade Token Registration
19. References
19.1. Normative References
19.2. Informative References
Appendix A. Collected ABNF
Appendix B. Changes from Previous RFCs
B.1. Changes from RFC 2818
B.2. Changes from RFC 7230
B.3. Changes from RFC 7231
B.4. Changes from RFC 7232
B.5. Changes from RFC 7233
B.6. Changes from RFC 7235
B.7. Changes from RFC 7538
B.8. Changes from RFC 7615
B.9. Changes from RFC 7694
Acknowledgements
Index
Authors' Addresses
1. Introduction
1.1. Purpose
The Hypertext Transfer Protocol (HTTP) is a family of stateless,
application-level, request/response protocols that share a generic
interface, extensible semantics, and self-descriptive messages to enable
flexible interaction with network-based hypertext information systems.
All three major versions of HTTP rely on the semantics defined by this
document. They have not obsoleted each other because each one has
specific benefits and limitations depending on the context of use.
Implementations are expected to choose the most appropriate transport
and messaging syntax for their particular context.
Table 1
Title Reference See
HTTP/1.1 Message Syntax and Routing [*] [RFC7230] B.2
HTTP/1.1 Semantics and Content [RFC7231] B.3
HTTP/1.1 Conditional Requests [RFC7232] B.4
HTTP/1.1 Range Requests [RFC7233] B.5
HTTP/1.1 Authentication [RFC7235] B.6
HTTP Status Code 308 (Permanent Redirect) [RFC7538] B.7
HTTP Authentication-Info and Proxy-
[RFC7615] B.8
Authentication-Info Response Header Fields
HTTP Client-Initiated Content-Encoding [RFC7694] B.9
[*] This document only obsoletes the portions of RFC 7230 that are
independent of the HTTP/1.1 messaging syntax and connection
management; the remaining bits of RFC 7230 are obsoleted by
"HTTP/1.1" [HTTP/1.1].
2. Conformance
2.1. Syntax Notation
This specification uses the Augmented Backus-Naur Form (ABNF)
notation of [RFC5234], extended with the notation for case-sensitivity in
strings defined in [RFC7405].
It also uses a list extension, defined in Section 5.6.1, that allows for
compact definition of comma-separated lists using a "#" operator
(similar to how the "*" operator indicates repetition). Appendix A shows
the collected grammar with all list operators expanded to standard ABNF
notation.
Section 5.6 defines some generic syntactic components for field values.
This specification uses the terms "character", "character encoding
scheme", "charset", and "protocol element" as they are defined in
[RFC6365].
A sender MUST NOT generate protocol elements that do not match the
grammar defined by the corresponding ABNF rules. Within a given
message, a sender MUST NOT generate protocol elements or syntax
alternatives that are only allowed to be generated by participants in
other roles (i.e., a role that the sender does not have for that message).
HTTP does not have specific length limitations for many of its protocol
elements because the lengths that might be appropriate will vary widely,
depending on the deployment context and purpose of the
implementation. Hence, interoperability between senders and recipients
depends on shared expectations regarding what is a reasonable length
for each protocol element. Furthermore, what is commonly understood
to be a reasonable length for some protocol elements has changed over
the course of the past three decades of HTTP use and is expected to
continue changing in the future.
Many received protocol elements are only parsed to the extent necessary
to identify and forward that element downstream. For example, an
intermediary might parse a received field into its field name and field
value components, but then forward the field without further parsing
inside the field value.
When a major version of HTTP does not define any minor versions, the
minor version "0" is implied. The "0" is used when referring to that
protocol within elements that require a minor version identifier.
3.1. Resources
The target of an HTTP request is called a resource. HTTP does not limit
the nature of a resource; it merely defines an interface that might be
used to interact with resources. Most resources are identified by a
Uniform Resource Identifier (URI), as described in Section 4.
HTTP relies upon the Uniform Resource Identifier (URI) standard [URI] to
indicate the target resource (Section 7.1) and relationships between
resources.
3.2. Representations
A representation is information that is intended to reflect a past, current,
or desired state of a given resource, in a format that can be readily
communicated via the protocol. A representation consists of a set of
representation metadata and a potentially unbounded stream of
representation data (Section 8).
The terms client and server refer only to the roles that these programs
perform for a particular connection. The same program might act as a
client on some connections and a server on others.
As a result, a server MUST NOT assume that two requests on the same
connection are from the same user agent unless the connection is
secured and specific to that agent. Some non-standard HTTP extensions
(e.g., [RFC4559]) have been known to violate this requirement, resulting
in security and interoperability problems.
3.4. Messages
HTTP is a stateless request/response protocol for exchanging messages
across a connection. The terms sender and recipient refer to any
implementation that sends or receives a given message, respectively.
Being a user agent does not imply that there is a human user directly
interacting with the software agent at the time of a request. In many
cases, a user agent is installed or configured to run in the background
and save its results for later inspection (or save only a subset of those
results that might be interesting or erroneous). Spiders, for example, are
typically given a start URI and configured to follow certain behavior while
crawling the Web as a hypertext graph.
Many user agents cannot, or choose not to, make interactive suggestions
to their user or provide adequate warning for security or privacy
concerns. In the few cases where this specification requires reporting of
errors to the user, it is acceptable for such reporting to only be
observable in an error console or log file. Likewise, requirements that an
automated action be confirmed by the user before proceeding might be
met via advance configuration choices, run-time options, or simple
avoidance of the unsafe action; confirmation does not imply any specific
user interface or interruption of normal processing if the user has already
made that choice.
The most familiar form of origin server are large public websites.
However, like user agents being equated with browsers, it is easy to be
misled into thinking that all origin servers are alike. Common origin
servers also include home automation units, configurable networking
components, office machines, autonomous robots, news feeds, traffic
cameras, real-time ad selectors, and video-on-demand platforms.
Most HTTP communication consists of a retrieval request (GET) for a
representation of some resource identified by a URI. In the simplest case,
this might be accomplished via a single bidirectional connection (===)
between the user agent (UA) and the origin server (O).
request >
UA ======================================= O
< response
3.7. Intermediaries
HTTP enables the use of intermediaries to satisfy requests through a
chain of connections. There are three common forms of HTTP
intermediary: proxy, gateway, and tunnel. In some cases, a single
intermediary might act as an origin server, proxy, gateway, or tunnel,
switching behavior based on the nature of each request.
The figure above shows three intermediaries (A, B, and C) between the
user agent and origin server. A request or response message that travels
the whole chain will pass through four separate connections. Some HTTP
communication options might apply only to the connection with the
nearest, non-tunnel neighbor, only to the endpoints of the chain, or to
all connections along the chain. Although the diagram is linear, each
participant might be engaged in multiple, simultaneous communications.
For example, B might be receiving requests from many clients other than
A, and/or forwarding requests to servers other than C, at the same time
that it is handling A's request. Likewise, later requests might be sent
through a different path of connections, often based on dynamic
configuration for load balancing.
3.8. Caches
A cache is a local store of previous response messages and the
subsystem that controls its message storage, retrieval, and deletion. A
cache stores cacheable responses in order to reduce the response time
and network bandwidth consumption on future, equivalent requests. Any
client or server MAY employ a cache, though a cache cannot be used
while acting as a tunnel.
> >
UA =========== A =========== B - - - - - - C - - - - - - O
< <
Client request:
Server response:
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
ETag: "34aa387-d-1568eb00"
Accept-Ranges: bytes
Content-Length: 51
Vary: Accept-Encoding
Content-Type: text/plain
4. Identifiers in HTTP
Uniform Resource Identifiers (URIs) [URI] are used throughout HTTP as
the means for identifying resources (Section 3.1).
Each protocol element in HTTP that allows a URI reference will indicate in
its ABNF production whether the element allows any form of reference
(URI-reference), only a URI in absolute form (absolute-URI), only the path
and optional query components (partial-URI), or some combination of
the above. Unless otherwise indicated, URI references are parsed relative
to the target URI (Section 7.1).
Table 2
Note that the presence of an "http" or "https" URI does not imply that
there is always an HTTP server at the identified origin listening for
connections. Anyone can mint a URI, whether or not a server exists and
whether or not that server currently maps that identifier to a resource.
The delegated nature of registered names and IP addresses creates a
federated namespace whether or not an HTTP server is present.
A client MUST ensure that its HTTP requests for an "https" resource are
secured, prior to being communicated, and that it only accepts secured
responses to those requests. Note that the definition of what
cryptographic mechanisms are acceptable to client and server are usually
negotiated and can change over time.
Resources made available via the "https" scheme have no shared identity
with the "http" scheme. They are distinct origins with separate
namespaces. However, extensions to HTTP that are defined as applying
to all origins with the same host, such as the Cookie protocol [COOKIE],
allow information set by one service to impact communication with other
services within a matching group of host domains. Such extensions
ought to be designed with great care to prevent information obtained
from a secured connection being inadvertently exchanged within an
unsecured context.
HTTP does not require the use of a specific method for determining
equivalence. For example, a cache key might be compared as a simple
string, after syntax-based normalization, or after scheme-based
normalization.
Scheme-based normalization (Section 6.2.3 of [URI]) of "http" and "https"
URIs involves the following additional rules:
• If the port is equal to the default port for a scheme, the normal form
is to omit the port subcomponent.
• When not being used as the target of an OPTIONS request, an
empty path component is equivalent to an absolute path of "/", so
the normal form is to provide a path of "/" instead.
• The scheme and host are case-insensitive and normally provided in
lowercase; all other components are compared in a case-sensitive
manner.
• Characters other than those in the "reserved" set are equivalent to
their percent-encoded octets: the normal form is to not encode
them (see Sections 2.1 and 2.2 of [URI]).
http://example.com:80/~smith/home.html
http://EXAMPLE.com/%7Esmith/home.html
http://EXAMPLE.com:/%7esmith/home.html
Two HTTP URIs that are equivalent after normalization (using any
method) can be assumed to identify the same resource, and any HTTP
component MAY perform normalization. As a result, distinct resources
SHOULD NOT be identified by HTTP URIs that are equivalent after
normalization (using any method defined in Section 6.2 of [URI]).
A sender MUST NOT generate the userinfo subcomponent (and its "@"
delimiter) when an "http" or "https" URI reference is generated within a
message as a target URI or field value.
Before making use of an "http" or "https" URI reference received from an
untrusted source, a recipient SHOULD parse for userinfo and treat its
presence as an error; it is likely being used to obscure the authority for
the sake of phishing attacks.
Section 4.3.1 defines the concept of an origin as an aid to such uses, and
the subsequent subsections explain how to establish that a peer has the
authority to represent an origin.
which can also be described as the normalized URI prefix with port
always present:
https://example.com:443
Each origin defines its own namespace and controls how identifiers
within that namespace are mapped to resources. In turn, how the origin
responds to valid requests, consistently over time, determines the
semantics that users will associate with a URI, and the usefulness of
those semantics is what ultimately transforms these mechanisms into a
resource for users to reference and access in the future.
Two origins are distinct if they differ in scheme, host, or port. Even when
it can be verified that the same entity controls two distinct origins, the
two namespaces under those origins are distinct unless explicitly aliased
by a server authoritative for that origin.
Origin is also used within HTML and related Web protocols, beyond the
scope of this document, as described in [RFC6454].
Note, however, that the above is not the only means for obtaining an
authoritative response, nor does it imply that an authoritative response is
always necessary (see [CACHING]). For example, the Alt-Svc header field
[ALTSVC] allows an origin server to identify other services that are also
authoritative for that origin. Access to "http" identified resources might
also be provided by protocols outside the scope of this document.
The request target's host and port value are passed within each HTTP
request, identifying the origin and distinguishing it from other
namespaces that might be controlled by the same server (Section 7.2). It
is the origin's responsibility to ensure that any services provided with
control over its certificate's private key are equally responsible for
managing the corresponding "https" namespaces or at least prepared to
reject requests that appear to have been misdirected (Section 7.4).
Note that the "https" scheme does not rely on TCP and the connected
port number for associating authority, since both are outside the secured
communication and thus cannot be trusted as definitive. Hence, the
HTTP communication might take place over any channel that has been
secured, as defined in Section 4.2.2, including protocols that don't use
TCP.
When an "https" URI is used within a context that calls for access to the
indicated resource, a client MAY attempt access by resolving the host
identifier to an IP address, establishing a TCP connection to that address
on the indicated port, securing the connection end-to-end by
successfully initiating TLS over TCP with confidentiality and integrity
protection, and sending over that connection an HTTP request message
containing a request target that matches the client's target URI (Section
7.1).
Note, however, that the above is not the only means for obtaining an
authoritative response, nor does it imply that an authoritative response is
always necessary (see [CACHING]).
4.3.4. https Certificate Verification
To establish a secured connection to dereference a URI, a client MUST
verify that the service's identity is an acceptable match for the URI's
origin server. Certificate verification is used to prevent server
impersonation by an on-path attacker or by an attacker that controls
name resolution. This process requires that a client be configured with a
set of trust anchors.
In general, a client MUST verify the service identity using the verification
process defined in Section 6 of [RFC6125]. The client MUST construct a
reference identity from the service's host: if the host is a literal IP address
(Section 4.3.5), the reference identity is an IP-ID, otherwise the host is a
name and the reference identity is a DNS-ID.
If the certificate is not valid for the target URI's origin, a user agent MUST
either obtain confirmation from the user before proceeding (see Section
3.5) or terminate the connection with a bad certificate error. Automated
clients MUST log the error to an appropriate audit log (if available) and
SHOULD terminate the connection (with a bad certificate error).
Automated clients MAY provide a configuration setting that disables this
check, but MUST provide a setting which enables it.
5. Fields
HTTP uses fields to provide data in the form of extensible name/value
pairs with a registered key namespace. Fields are sent and received
within the header and trailer sections of messages (Section 6).
field-name = token
When a field name is only present once in a section, the combined field
value for that field consists of the corresponding field line value. When a
field name is repeated within a section, its combined field value consists
of the list of corresponding field line values within that section,
concatenated in order, with each field line value separated by a comma.
contains two field lines, both with the field name "Example-Field". The
first field line has a field line value of "Foo, Bar", while the second field
line value is "Baz". The field value for "Example-Field" is the list "Foo, Bar,
Baz".
The order in which field lines with the same name are received is
therefore significant to the interpretation of the field value; a proxy
MUST NOT change the order of these field line values when forwarding a
message.
This means that, aside from the well-known exception noted below, a
sender MUST NOT generate multiple field lines with the same name in a
message (whether in the headers or trailers) or append a field line when
a field line of the same name already exists in the message, unless that
field's definition allows multiple field line values to be recombined as a
comma-separated list (i.e., at least one alternative of the field's definition
allows a comma-separated list, such as an ABNF rule of #(values) defined
in Section 5.6.1).
The order in which field lines with differing field names are received in a
section is not significant. However, it is good practice to send header
fields that contain additional control data first, such as Host on requests
and Date on responses, so that implementations can decide when not to
handle a message as early as possible.
A server that receives a request header field line, field value, or set of
fields larger than it wishes to process MUST respond with an appropriate
4xx (Client Error) status code. Ignoring such header fields would increase
the server's vulnerability to request smuggling attacks (Section 11.2 of
[HTTP/1.1]).
A client MAY discard or truncate received field lines that are larger than
the client wishes to process if the field semantics are such that the
dropped value(s) can be safely ignored without changing the message
framing or response semantics.
field-value = *field-content
field-content = field-vchar
[ 1*( SP / HTAB / field-vchar ) field-vchar ]
field-vchar = VCHAR / obs-text
obs-text = %x80-FF
Field values containing CR, LF, or NUL characters are invalid and
dangerous, due to the varying ways that implementations might parse
and interpret those characters; a recipient of CR, LF, or NUL within a field
value MUST either reject the message or replace each of those characters
with SP before further processing or forwarding of that message. Field
values containing other CTL characters are also invalid; however,
recipients MAY retain such characters for the sake of robustness when
they appear within a safe context (e.g., an application-specific quoted
string that will not be processed by any downstream HTTP parser).
Fields that only anticipate a single member as the field value are referred
to as singleton fields.
Fields that allow multiple members as the field value are referred to as
list-based fields. The list operator extension of Section 5.6.1 is used as a
common notation for defining field values that can contain multiple
members.
Because commas (",") are used as the delimiter between members, they
need to be treated with care if they are allowed as data within a member.
This is true for both list-based and singleton fields, since a singleton field
might be erroneously sent with multiple members and detecting such
errors improves interoperability. Fields that expect to contain a comma
within a member, such as within an HTTP-date or URI-reference element,
ought to be defined with delimiters around that element to distinguish
any comma within that data from potential list separators.
For example, a textual date and a URI (either of which might contain a
comma) could be safely carried in list-based field values like these:
Example-URIs: "http://example.com/a.html,foo",
"http://without-a-comma.example.com/"
Example-Dates: "Sat, 04 May 1996", "Wed, 14 Sep 2005"
Note that double-quote delimiters are almost always used with the
quoted-string production (Section 5.6.4); using a different syntax inside
double-quotes will likely cause unnecessary confusion.
Note: For defining field value syntax, this specification uses an ABNF rule
named after the field name to define the allowed grammar for that
field's value (after said value has been extracted from the underlying
messaging syntax and multiple instances combined into a list).
and:
Appendix A shows the collected ABNF for senders after the list
constructs have been expanded.
Note that because of the potential presence of empty list elements, the
RFC 5234 ABNF cannot enforce the cardinality of list elements, and
consequently all cases are mapped as if there was no cardinality
specified.
example-list = 1#example-list-elmt
example-list-elmt = token ; see Section 5.6.2
Then the following are valid values for example-list (not including the
double quotes, which are present for delimitation only):
"foo,bar"
"foo ,bar,"
"foo , ,bar,charlie"
In contrast, the following values would be invalid, since at least one non-
empty element is required by the example-list production:
""
","
", ,"
5.6.2. Tokens
Tokens are short textual identifiers that do not include whitespace or
delimiters.
token = 1*tchar
Many HTTP field values are defined using common syntax components,
separated by whitespace or specific delimiting characters. Delimiters are
chosen from the set of US-ASCII visual characters not allowed in a token
(DQUOTE and "(),/:;<=>?@[\]{}").
5.6.3. Whitespace
This specification uses three rules to denote the use of linear whitespace:
OWS (optional whitespace), RWS (required whitespace), and BWS ("bad"
whitespace).
The OWS rule is used where zero or more linear whitespace octets might
appear. For protocol elements where optional whitespace is preferred to
improve readability, a sender SHOULD generate the optional whitespace
as a single SP; otherwise, a sender SHOULD NOT generate optional
whitespace except as needed to overwrite invalid or unwanted protocol
elements during in-place message filtering.
The RWS rule is used when at least one linear whitespace octet is
required to separate field tokens. A sender SHOULD generate RWS as a
single SP.
OWS and RWS have the same semantics as a single SP. Any content
known to be defined as OWS or RWS MAY be replaced with a single SP
before interpreting it or forwarding the message downstream.
The BWS rule is used where the grammar allows optional whitespace
only for historical reasons. A sender MUST NOT generate BWS in
messages. A recipient MUST parse for such bad whitespace and remove
it before interpreting the protocol element.
OWS = *( SP / HTAB )
; optional whitespace
RWS = 1*( SP / HTAB )
; required whitespace
BWS = OWS
; "bad" whitespace
5.6.5. Comments
Comments can be included in some HTTP fields by surrounding the
comment text with parentheses. Comments are only allowed in fields
containing "comment" as part of their field value definition.
5.6.6. Parameters
Parameters are instances of name/value pairs; they are often used in field
values as a common syntax for appending auxiliary information to an
item. Each parameter is usually delimited by an immediately preceding
semicolon.
Preferred format:
day = 2DIGIT
month = %s"Jan" / %s"Feb" / %s"Mar" / %s"Apr"
/ %s"May" / %s"Jun" / %s"Jul" / %s"Aug"
/ %s"Sep" / %s"Oct" / %s"Nov" / %s"Dec"
year = 4DIGIT
GMT = %s"GMT"
Obsolete formats:
In HTTP/1.1 ([HTTP/1.1]) and earlier, control data is sent as the first line
of a message. In HTTP/2 ([HTTP/2]) and HTTP/3 ([HTTP/3]), control data
is sent as pseudo-header fields with a reserved name prefix (e.g.,
":authority").
A client MAY send a lower request version if it is known that the server
incorrectly implements the HTTP specification, but only after the client
has attempted at least one normal request and determined from the
response status code or header fields (e.g., Server) that the server
improperly handles higher request versions.
6.4. Content
HTTP messages often transfer a complete or partial representation as the
message content: a stream of octets sent after the header section, as
delineated by the message framing.
This abstract definition of content reflects the data after it has been
extracted from the message framing. For example, an HTTP/1.1 message
body (Section 6 of [HTTP/1.1]) might consist of a stream of data encoded
with the chunked transfer coding — a sequence of data chunks, one
zero-length chunk, and a trailer section — whereas the content of that
same message includes only the data stream after the transfer coding
has been decoded; it does not include the chunk lengths, chunked
framing syntax, nor the trailer fields (Section 6.5).
All 1xx (Informational), 204 (No Content), and 304 (Not Modified)
responses do not include content.
For a response message, the following rules are applied in order until a
match is found:
Trailer fields ought to be processed and stored separately from the fields
in the header section to avoid contradicting message semantics known
at the time the header section was complete. The presence or absence of
certain header fields might impact choices made for the routing or
processing of the message as a whole before the trailers are received;
those choices cannot be unmade by the later discovery of trailer fields.
Like header fields, trailer fields with the same name are processed in the
order received; multiple trailer field lines with the same name have the
equivalent semantics as appending the multiple values as a list of
members. Trailer fields that might be generated more than once during a
message MUST be defined as a list-based field even if each member
value is only processed once per field line received.
At the end of a message, a recipient MAY treat the set of received trailer
fields as a data structure of name/value pairs, similar to (but separate
from) the header fields. Additional processing expectations, if any, can be
defined within the field specification for a field intended for use in
trailers.
6.6.1. Date
The "Date" header field represents the date and time at which the
message was originated, having the same semantics as the Origination
Date Field (orig-date) defined in Section 3.6.1 of [RFC5322]. The field
value is an HTTP-date, as defined in Section 5.6.7.
Date = HTTP-date
An example is
A sender that generates a Date header field SHOULD generate its field
value as the best available approximation of the date and time of
message generation. In theory, the date ought to represent the moment
just before generating the message content. In practice, a sender can
generate the date value at any time during message origination.
An origin server with a clock (as defined in Section 5.6.7) MUST generate
a Date header field in all 2xx (Successful), 3xx (Redirection), and 4xx
(Client Error) responses, and MAY generate a Date header field in 1xx
(Informational) and 5xx (Server Error) responses.
An origin server without a clock MUST NOT generate a Date header field.
6.6.2. Trailer
The "Trailer" header field provides a list of field names that the sender
anticipates sending as trailer fields within that message. This allows a
recipient to prepare for receipt of the indicated metadata before it starts
processing the content.
Trailer = #field-name
There are two unusual cases for which the request target components
are in a method-specific form:
• For CONNECT (Section 9.3.6), the request target is the host name
and port number of the tunnel destination, separated by a colon.
• For OPTIONS (Section 9.3.7), the request target can be a single
asterisk ("*").
See the respective method definitions for details. These forms MUST NOT
be used with other methods.
In HTTP/2 [HTTP/2] and HTTP/3 [HTTP/3], the Host header field is, in
some cases, supplanted by the ":authority" pseudo-header field of a
request's control data.
7.3.1. To a Cache
If the client has a cache [CACHING] and the request can be satisfied by it,
then the request is usually directed there first.
7.3.2. To a Proxy
If the request is not satisfied by a cache, then a typical client will check its
configuration to determine whether a proxy is to be used to satisfy the
request. Proxy configuration is implementation-dependent, but is often
based on URI prefix matching, selective authority matching, or both, and
the proxy itself is usually identified by an "http" or "https" URI.
7.6.1. Connection
The "Connection" header field allows the sender to list desired control
options for the current connection.
Connection = #connection-option
connection-option = token
7.6.2. Max-Forwards
The "Max-Forwards" header field provides a mechanism with the TRACE
(Section 9.3.8) and OPTIONS (Section 9.3.7) request methods to limit the
number of times that the request is forwarded by proxies. This can be
useful when the client is attempting to trace a request that appears to be
failing or looping mid-chain.
Max-Forwards = 1*DIGIT
7.6.3. Via
The "Via" header field indicates the presence of intermediate protocols
and recipients between the user agent and the server (on requests) or
between the origin server and the client (on responses), similar to the
"Received" header field in email (Section 3.6.7 of [RFC5322]). Via can be
used for tracking message forwards, avoiding request loops, and
identifying the protocol capabilities of senders along the request/
response chain.
Each member of the Via field value represents a proxy or gateway that
has forwarded the message. Each intermediary appends its own
information about how the message was received, such that the end
result is ordered according to the sequence of forwarding recipients.
The received-by portion is normally the host and optional port number
of a recipient server or client that subsequently forwarded the message.
However, if the real host is considered to be sensitive information, a
sender MAY replace it with a pseudonym. If a port is not provided, a
recipient MAY interpret that as meaning it was received on the default
port, if any, for the received-protocol.
could be collapsed to
A sender SHOULD NOT combine multiple list members unless they are
all under the same organizational control and the hosts have already
been replaced by pseudonyms. A sender MUST NOT combine members
that have different received-protocol values.
If a proxy receives a target URI with a host name that is not a fully
qualified domain name, it MAY add its own domain to the host name it
received when forwarding the request. A proxy MUST NOT change the
host name if the target URI contains a fully qualified domain name.
A proxy MUST NOT modify the "absolute-path" and "query" parts of the
received target URI when forwarding it to the next inbound server except
as required by that forwarding protocol. For example, a proxy forwarding
a request to an origin server via HTTP/1.1 will replace an empty path with
"/" (Section 3.2.1 of [HTTP/1.1]) or "*" (Section 3.2.4 of [HTTP/1.1]),
depending on the request method.
A proxy MAY transform the content of a message that does not contain a
no-transform cache directive. A proxy that transforms the content of a
200 (OK) response can inform downstream recipients that a
transformation has been applied by changing the response status code
to 203 (Non-Authoritative Information) (Section 15.3.4).
A client MAY send a list of protocol names in the Upgrade header field of
a request to invite the server to switch to one or more of the named
protocols, in order of descending preference, before sending the final
response. A server MAY ignore a received Upgrade header field if it
wishes to continue using the current protocol on that connection.
Upgrade cannot be used to insist on a protocol change.
Upgrade = #protocol
For example, if the Upgrade header field is received in a GET request and
the server decides to switch protocols, it first responds with a 101
(Switching Protocols) message in HTTP/1.1 and then immediately follows
that with the new protocol's equivalent of a response to a GET on the
target resource. This allows a connection to be upgraded to protocols
with the same semantics as HTTP without the latency cost of an
additional round trip. A server MUST NOT switch protocols unless the
received message semantics can be honored by the new protocol; an
OPTIONS request can be honored by any protocol.
This specification only defines the protocol name "HTTP" for use by the
family of Hypertext Transfer Protocols, as defined by the HTTP version
rules of Section 2.5 and future updates to this specification. Additional
protocol names ought to be registered using the registration procedure
defined in Section 16.7.
The data type of the representation data is determined via the header
fields Content-Type and Content-Encoding. These define a two-layer,
ordered encoding model:
8.3. Content-Type
The "Content-Type" header field indicates the media type of the
associated representation: either the representation enclosed in the
message content or the selected representation, as determined by the
message semantics. The indicated media type defines both the data
format and how that data is intended to be processed by a recipient,
within the scope of the received message semantics, after any content
codings indicated by Content-Encoding are decoded.
Content-Type = media-type
text/html;charset=utf-8
Text/HTML;Charset="utf-8"
text/html; charset="utf-8"
text/html;charset=UTF-8
8.3.2. Charset
HTTP uses charset names to indicate or negotiate the character encoding
scheme ([RFC6365], Section 2) of a textual representation. In the fields
defined by this document, charset names appear either in parameters
(Content-Type), or, for Accept-Encoding, in the form of a plain token. In
both cases, charset names are matched case-insensitively.
8.4. Content-Encoding
The "Content-Encoding" header field indicates what content codings
have been applied to the representation, beyond those inherent in the
media type, and thus what decoding mechanisms have to be applied in
order to obtain data in the media type referenced by the Content-Type
header field. Content-Encoding is primarily used to allow a
representation's data to be compressed without losing the identity of its
underlying media type.
Content-Encoding = #content-coding
Content-Encoding: gzip
content-coding = token
8.5. Content-Language
The "Content-Language" header field describes the natural language(s)
of the intended audience for the representation. Note that this might not
be equivalent to all the languages used within the representation.
Content-Language = #language-tag
Content-Language: da
Content-Language: mi, en
Content-Length = 1*DIGIT
An example is
Content-Length: 3495
8.7. Content-Location
The "Content-Location" header field references a URI that can be used as
an identifier for a specific resource corresponding to the representation
in this message's content. In other words, if one were to perform a GET
request on this URI at the time of this message's generation, then a 200
(OK) response would contain the same representation that is enclosed as
content in this message.
A strong validator might change for reasons other than a change to the
representation data, such as when a semantically significant part of the
representation metadata is changed (e.g., Content-Type), but it is in the
best interests of the origin server to only change the value when it is
necessary to invalidate the stored responses held by remote caches and
authoring tools.
There are a variety of strong validators used in practice. The best are
based on strict revision control, wherein each change to a representation
always results in a unique node name and revision identifier being
assigned before the representation is made accessible to GET. A
collision-resistant hash function applied to the representation data is
also sufficient if the data is available prior to the response header fields
being sent and the digest does not need to be recalculated every time a
validation request is received. However, if a resource has distinct
representations that differ only in their metadata, such as might occur
with content negotiation over media types that happen to share the
same data format, then the origin server needs to incorporate additional
information in the validator to distinguish those representations.
Strong validators are usable for all conditional requests, including cache
validation, partial content ranges, and "lost update" avoidance. Weak
validators are only usable when the client does not require exact equality
with previously obtained representation data, such as when validating a
cache entry or limiting a web traversal to recent changes.
8.8.2. Last-Modified
The "Last-Modified" header field in a response provides a timestamp
indicating the date and time at which the origin server believes the
selected representation was last modified, as determined at the
conclusion of handling the request.
Last-Modified = HTTP-date
8.8.2.1. Generation
An origin server SHOULD send Last-Modified for any selected
representation for which a last modification date can be reasonably and
consistently determined, since its use in conditional requests and
evaluating cache freshness ([CACHING]) can substantially reduce
unnecessary transfers and significantly improve service availability and
scalability.
An origin server with a clock (as defined in Section 5.6.7) MUST NOT
generate a Last-Modified date that is later than the server's time of
message origination (Date, Section 6.6.1). If the last modification time is
derived from implementation-specific metadata that evaluates to some
time in the future, according to the origin server's clock, then the origin
server MUST replace that value with the message origination date. This
prevents a future modification date from having an adverse impact on
cache validation.
8.8.2.2. Comparison
A Last-Modified time, when used as a validator in a request, is implicitly
weak unless it is possible to deduce that it is strong, using the following
rules:
or
This method relies on the fact that if two different responses were sent
by the origin server during the same second, but both had the same
Last-Modified time, then at least one of those responses would have a
Date value equal to its Last-Modified time.
8.8.3. ETag
The "ETag" field in a response provides the current entity tag for the
selected representation, as determined at the conclusion of handling the
request. An entity tag is an opaque validator for differentiating between
multiple representations of the same resource, regardless of whether
those multiple representations are due to resource state changes over
time, content negotiation resulting in multiple representations being
valid at the same time, or both. An entity tag consists of an opaque
quoted string, possibly prefixed by a weakness indicator.
ETag = entity-tag
An entity tag can be more reliable for validation than a modification date
in situations where it is inconvenient to store modification dates, where
the one-second resolution of HTTP-date values is not sufficient, or where
modification dates are not consistently maintained.
Examples:
ETag: "xyzzy"
ETag: W/"xyzzy"
ETag: ""
An entity tag can be either a weak or strong validator, with strong being
the default. If an origin server provides an entity tag for a representation
and the generation of that entity tag does not satisfy all of the
characteristics of a strong validator (Section 8.8.1), then the origin server
MUST mark the entity tag as weak by prefixing its opaque value with
"W/" (case-sensitive).
A sender MAY send the ETag field in a trailer section (see Section 6.5).
However, since trailers are often ignored, it is preferable to send ETag as
a header field unless the entity tag is generated while sending the
content.
8.8.3.1. Generation
The principle behind entity tags is that only the service author knows the
implementation of a resource well enough to select the most accurate
and efficient validation mechanism for that resource, and that any such
mechanism can be mapped to a simple sequence of octets for easy
comparison. Since the value is opaque, there is no need for the client to
be aware of how each entity tag is constructed.
8.8.3.2. Comparison
There are two entity tag comparison functions, depending on whether or
not the comparison context allows the use of weak validators:
Strong comparison: two entity tags are equivalent if both are not
weak and their opaque-tags match character-by-character.
The example below shows the results for a set of entity tag pairs and
both the weak and strong comparison function results:
Table 3
>> Request:
In this case, the response might or might not use the gzip content
coding. If it does not, the response might look like:
>> Response:
HTTP/1.1 200 OK
Date: Fri, 26 Mar 2010 00:05:00 GMT
ETag: "123-a"
Content-Length: 70
Vary: Accept-Encoding
Content-Type: text/plain
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
>> Response:
HTTP/1.1 200 OK
Date: Fri, 26 Mar 2010 00:05:00 GMT
ETag: "123-b"
Content-Length: 43
Vary: Accept-Encoding
Content-Type: text/plain
Content-Encoding: gzip
...binary data...
9. Methods
9.1. Overview
The request method token is the primary source of request semantics; it
indicates the purpose for which the client has made this request and
what is expected by the client as a successful result.
method = token
Method
Description Section
Name
Transfer a current representation of the
GET 9.3.1
target resource.
Same as GET, but do not transfer the
HEAD 9.3.2
response content.
Perform resource-specific processing on the
POST 9.3.3
request content.
Replace all current representations of the
PUT 9.3.4
target resource with the request content.
Remove all current representations of the
DELETE 9.3.5
target resource.
Establish a tunnel to the server identified by
CONNECT 9.3.6
the target resource.
Table 4
Method
Description Section
Name
Describe the communication options for
OPTIONS 9.3.7
the target resource.
Perform a message loop-back test along
TRACE 9.3.8
the path to the target resource.
All general-purpose servers MUST support the methods GET and HEAD.
All other methods are OPTIONAL.
Like the definition of safe, the idempotent property only applies to what
has been requested by the user; a server is free to log each request
separately, retain a revision control history, or implement other non-
idempotent side effects for each idempotent request.
This specification defines caching semantics for GET, HEAD, and POST,
although the overwhelming majority of cache implementations only
support GET and HEAD.
9.3.2. HEAD
The HEAD method is identical to GET except that the server MUST NOT
send content in the response. HEAD is used to obtain metadata about
the selected representation without transferring its representation data,
often for the sake of testing hypertext links or finding recent
modifications.
The server SHOULD send the same header fields in response to a HEAD
request as it would have sent if the request method had been GET.
However, a server MAY omit header fields for which a value is
determined only while generating the content. For example, some
servers buffer a dynamic response to GET until a minimum amount of
data is generated so that they can more efficiently delimit small
responses or make late decisions with regard to content selection. Such a
response to GET might contain Content-Length and Vary fields, for
example, that are not generated within a HEAD response. These minor
inconsistencies are considered preferable to generating and discarding
the content for a HEAD request, since HEAD is usually requested for the
sake of efficiency.
9.3.3. POST
The POST method requests that the target resource process the
representation enclosed in the request according to the resource's own
specific semantics. For example, POST is used for the following functions
(among others):
If one or more resources has been created on the origin server as a result
of successfully processing a POST request, the origin server SHOULD
send a 201 (Created) response containing a Location header field that
provides an identifier for the primary resource created (Section 10.2.2)
and a representation that describes the status of the request while
referring to the new resource(s).
9.3.4. PUT
The PUT method requests that the state of the target resource be
created or replaced with the state defined by the representation
enclosed in the request message content. A successful PUT of a given
representation would suggest that a subsequent GET on that same
target resource will result in an equivalent representation being sent in a
200 (OK) response. However, there is no guarantee that such a state
change will be observable, since the target resource might be acted
upon by other user agents in parallel, or might be subject to dynamic
processing by the origin server, before any subsequent GET is received. A
successful response only implies that the user agent's intent was
achieved at the time of its processing by the origin server.
If the target resource does not have a current representation and the
PUT successfully creates one, then the origin server MUST inform the
user agent by sending a 201 (Created) response. If the target resource
does have a current representation and that representation is
successfully modified in accordance with the state of the enclosed
representation, then the origin server MUST send either a 200 (OK) or a
204 (No Content) response to indicate successful completion of the
request.
HTTP does not define exactly how a PUT method affects the state of an
origin server beyond what can be expressed by the intent of the user
agent request and the semantics of the origin server response. It does
not define what a resource might be, in any sense of that word, beyond
the interface provided via HTTP. It does not define how resource state is
"stored", nor how such storage might change as a result of a change in
resource state, nor how the origin server translates resource state into
representations. Generally speaking, all implementation details behind
the resource interface are intentionally hidden by the server.
This extends to how header and trailer fields are stored; while common
header fields like Content-Type will typically be stored and returned
upon subsequent GET requests, header and trailer field handling is
specific to the resource that received the request. As a result, an origin
server SHOULD ignore unrecognized header and trailer fields received in
a PUT request (i.e., not save them as part of the resource state).
An origin server MUST NOT send a validator field (Section 8.8), such as an
ETag or Last-Modified field, in a successful response to PUT unless the
request's representation data was saved without any transformation
applied to the content (i.e., the resource's new representation data is
identical to the content received in the PUT request) and the validator
field value reflects the new representation. This requirement allows a
user agent to know when the representation it sent (and retains in
memory) is the result of the PUT, and thus it doesn't need to be retrieved
again from the origin server. The new validator(s) received in the
response can be used for future conditional requests in order to prevent
accidental overwrites (Section 13.1).
9.3.5. DELETE
The DELETE method requests that the origin server remove the
association between the target resource and its current functionality. In
effect, this method is similar to the "rm" command in UNIX: it expresses a
deletion operation on the URI mapping of the origin server rather than
an expectation that the previously associated information be deleted.
Relatively few resources allow the DELETE method — its primary use is
for remote authoring environments, where the user has some direction
regarding its effect. For example, a resource that was previously created
using a PUT request, or identified via the Location header field after a
201 (Created) response to a POST request, might allow a corresponding
DELETE request to undo those actions. Similarly, custom user agent
implementations that implement an authoring function, such as revision
control clients using HTTP for remote operations, might use DELETE
based on an assumption that the server's URI space has been crafted to
correspond to a version repository.
• a 202 (Accepted) status code if the action will likely succeed but has
not yet been enacted,
• a 204 (No Content) status code if the action has been enacted and
no further information is to be supplied, or
• a 200 (OK) status code if the action has been enacted and the
response message includes a representation describing the status.
9.3.6. CONNECT
The CONNECT method requests that the recipient establish a tunnel to
the destination origin server identified by the request target and, if
successful, thereafter restrict its behavior to blind forwarding of data, in
both directions, until the tunnel is closed. Tunnels are commonly used to
create an end-to-end virtual connection, through one or more proxies,
which can then be secured using TLS (Transport Layer Security, [TLS13]).
CONNECT uses a special form of request target, unique to this method,
consisting of only the host and port number of the tunnel destination,
separated by a colon. There is no default port; a client MUST send the
port number even if the CONNECT request is based on a URI reference
that contains an authority component with an elided port (Section 4.1).
For example,
Any 2xx (Successful) response indicates that the sender (and all inbound
proxies) will switch to tunnel mode immediately after the response
header section; data received after that header section is from the server
identified by the request target. Any response other than a successful
response indicates that the tunnel has not yet been formed.
9.3.7. OPTIONS
The OPTIONS method requests information about the communication
options available for the target resource, at either the origin server or an
intervening intermediary. This method allows a client to determine the
options and/or requirements associated with a resource, or the
capabilities of a server, without implying a resource action.
9.3.8. TRACE
The TRACE method requests a remote, application-level loop-back of the
request message. The final recipient of the request SHOULD reflect the
message received, excluding some fields described below, back to the
client as the content of a 200 (OK) response. The "message/http" format
(Section 10.1 of [HTTP/1.1]) is one way to do so. The final recipient is
either the origin server or the first server to receive a Max-Forwards
value of zero (0) in the request (Section 7.6.2).
TRACE allows the client to see what is being received at the other end of
the request chain and use that data for testing or diagnostic information.
The value of the Via header field (Section 7.6.3) is of particular interest,
since it acts as a trace of the request chain. Use of the Max-Forwards
header field allows the client to limit the length of the request chain,
which is useful for testing a chain of proxies forwarding messages in an
infinite loop.
10.1.1. Expect
The "Expect" header field in a request indicates a certain set of behaviors
(expectations) that need to be supported by the server in order to
properly handle this request.
Expect = #expectation
expectation = token [ "=" ( token / quoted-string ) parameters ]
Upon receiving an HTTP/1.1 (or later) request that has a method, target
URI, and complete header section that contains a 100-continue
expectation and an indication that request content will follow, an origin
server MUST send either:
The origin server MUST NOT wait for the content before sending the 100
(Continue) response.
Upon receiving an HTTP/1.1 (or later) request that has a method, target
URI, and complete header section that contains a 100-continue
expectation and indicates a request content will follow, a proxy MUST
either:
If the proxy believes (from configuration or past interaction) that the next
inbound server only supports HTTP/1.0, the proxy MAY generate an
immediate 100 (Continue) response to encourage the client to begin
sending the content.
10.1.2. From
The "From" header field contains an Internet email address for a human
user who controls the requesting user agent. The address ought to be
machine-usable, as defined by "mailbox" in Section 3.4 of [RFC5322]:
From = mailbox
From: [email protected]
The From header field is rarely sent by non-robotic user agents. A user
agent SHOULD NOT send a From header field without explicit
configuration by the user, since that might conflict with the user's privacy
interests or their site's security policy.
A robotic user agent SHOULD send a valid From header field so that the
person responsible for running the robot can be contacted if problems
occur on servers, such as if the robot is sending excessive, unwanted, or
invalid requests.
A server SHOULD NOT use the From header field for access control or
authentication, since its value is expected to be visible to anyone
receiving or observing the request and is often recorded within logfiles
and error reports without any expectation of privacy.
10.1.3. Referer
The "Referer" [sic] header field allows the user agent to specify a URI
reference for the resource from which the target URI was obtained (i.e.,
the "referrer", though the field name is misspelled). A user agent MUST
NOT include the fragment and userinfo components of the URI reference
[URI], if any, when generating the Referer field value.
Example:
Referer: http://www.example.org/hypertext/Overview.html
If the target URI was obtained from a source that does not have its own
URI (e.g., input from the user keyboard, or an entry within the user's
bookmarks/favorites), the user agent MUST either exclude the Referer
header field or send it with a value of "about:blank".
The Referer header field value need not convey the full URI of the
referring resource; a user agent MAY truncate parts other than the
referring origin.
The Referer header field has the potential to reveal information about
the request context or browsing history of the user, which is a privacy
concern if the referring resource's identifier reveals personal information
(such as an account name) or a resource that is supposed to be
confidential (such as behind a firewall or internal to a secured service).
Most general-purpose user agents do not send the Referer header field
when the referring resource is a local "file" or "data" URI. A user agent
SHOULD NOT send a Referer header field if the referring resource was
accessed with a secure protocol and the request target has an origin
differing from that of the referring resource, unless the referring resource
explicitly allows Referer to be sent. A user agent MUST NOT send a
Referer header field in an unsecured HTTP request if the referring
resource was accessed with a secure protocol. See Section 17.9 for
additional security considerations.
10.1.4. TE
The "TE" header field describes capabilities of the client with regard to
transfer codings and trailer sections.
The TE field value is a list of members, with each member (aside from
"trailers") consisting of a transfer coding name token with an optional
weight indicating the client's relative preference for that transfer coding
(Section 12.4.2) and optional parameters for that transfer coding.
TE = #t-codings
t-codings = "trailers" / ( transfer-coding [ weight ] )
transfer-coding = token *( OWS ";" OWS transfer-parameter )
transfer-parameter = token BWS "=" BWS ( token / quoted-string )
10.1.5. User-Agent
The "User-Agent" header field contains information about the user agent
originating the request, which is often used by servers to help identify
the scope of reported interoperability problems, to work around or tailor
responses to avoid particular user agent limitations, and for analytics
regarding browser or operating system use. A user agent SHOULD send
a User-Agent header field in each request unless specifically configured
not to do so.
Example:
10.2.1. Allow
The "Allow" header field lists the set of methods advertised as supported
by the target resource. The purpose of this field is strictly to inform the
recipient of valid request methods associated with the resource.
Allow = #method
Example of use:
The actual set of allowed methods is defined by the origin server at the
time of each request. An origin server MUST generate an Allow header
field in a 405 (Method Not Allowed) response and MAY do so in any
other response. An empty Allow field value indicates that the resource
allows no methods, which might occur in a 405 response if the resource
has been temporarily disabled by configuration.
A proxy MUST NOT modify the Allow header field — it does not need to
understand all of the indicated methods in order to handle them
according to the generic message handling rules.
10.2.2. Location
The "Location" header field is used in some responses to refer to a
specific resource in relation to the response. The type of relationship is
defined by the combination of request method and status code
semantics.
Location = URI-reference
The field value consists of a single URI-reference. When it has the form
of a relative reference ([URI], Section 4.2), the final value is computed by
resolving it against the target URI ([URI], Section 5).
For 201 (Created) responses, the Location value refers to the primary
resource created by the request. For 3xx (Redirection) responses, the
Location value refers to the preferred target resource for automatically
redirecting the request.
For example, a GET request generated for the URI reference "http://
www.example.org/~tim" might result in a 303 (See Other) response
containing the header field:
Location: /People.html#tim
Location: http://www.example.net/index.html
10.2.3. Retry-After
Servers send the "Retry-After" header field to indicate how long the user
agent ought to wait before making a follow-up request. When sent with
a 503 (Service Unavailable) response, Retry-After indicates how long the
service is expected to be unavailable to the client. When sent with any
3xx (Redirection) response, Retry-After indicates the minimum time that
the user agent is asked to wait before issuing the redirected request.
delay-seconds = 1*DIGIT
10.2.4. Server
The "Server" header field contains information about the software used
by the origin server to handle the request, which is often used by clients
to help identify the scope of reported interoperability problems, to work
around or tailor requests to avoid particular server limitations, and for
analytics regarding server or operating system use. An origin server MAY
generate a Server header field in its responses.
The Server header field value consists of one or more product identifiers,
each followed by zero or more comments (Section 5.6.5), which together
identify the origin server software and its significant subproducts. By
convention, the product identifiers are listed in decreasing order of their
significance for identifying the origin server software. Each product
identifier consists of a name and optional version, as defined in Section
10.1.5.
Example:
auth-scheme = token
Aside from the general framework, this document does not specify any
authentication schemes. New and existing authentication schemes are
specified independently and ought to be registered within the
"Hypertext Transfer Protocol (HTTP) Authentication Scheme Registry". For
example, the "basic" and "digest" authentication schemes are defined by
[RFC7617] and [RFC7616], respectively.
The token68 syntax allows the 66 unreserved URI characters ([URI]), plus
a few others, so that it can hold a base64, base64url (URL and filename
safe alphabet), base32, or base16 (hex) encoding, with or without
padding, but excluding whitespace ([RFC4648]).
A client that wishes to authenticate itself with a proxy — usually, but not
necessarily, after receiving a 407 (Proxy Authentication Required) — can
do so by including a Proxy-Authorization header field with the request.
11.4. Credentials
Both the Authorization field value and the Proxy-Authorization field
value contain the client's credentials for the realm of the resource being
requested, based upon a challenge received in a response (possibly at
some point in the past). When creating their values, the user agent ought
to do so by selecting the challenge with what it considers to be the most
secure auth-scheme that it understands, obtaining credentials from the
user as appropriate. Transmission of credentials within header field
values implies significant security considerations regarding the
confidentiality of the underlying connection, as described in Section
17.16.1.
A server that receives valid credentials that are not adequate to gain
access ought to respond with the 403 (Forbidden) status code (Section
15.5.4).
Note that various custom mechanisms for user authentication use the
Set-Cookie and Cookie header fields, defined in [COOKIE], for passing
tokens related to authentication.
WWW-Authenticate = #challenge
User agents are advised to take special care in parsing the field value, as
it might contain more than one challenge, and each challenge can
contain a comma-separated list of authentication parameters.
Furthermore, the header field itself can occur multiple times.
For instance:
This header field contains two challenges, one for the "Basic" scheme
with a realm value of "simple" and another for the "Newauth" scheme
with a realm value of "apps". It also contains two additional parameters,
"type" and "title".
Note: The challenge grammar production uses the list syntax as well.
Therefore, a sequence of comma, whitespace, and comma can be
considered either as applying to the preceding challenge, or to be an
empty entry in the list of challenges. In practice, this ambiguity does not
affect the semantics of the header field value and thus is harmless.
11.6.2. Authorization
The "Authorization" header field allows a user agent to authenticate itself
with an origin server — usually, but not necessarily, after receiving a 401
(Unauthorized) response. Its value consists of credentials containing the
authentication information of the user agent for the realm of the
resource being requested.
Authorization = credentials
11.6.3. Authentication-Info
HTTP authentication schemes can use the "Authentication-Info" response
field to communicate information after the client's authentication
credentials have been accepted. This information can include a
finalization message from the server (e.g., it can contain the server
authentication).
The field value is a list of parameters (name/value pairs), using the "auth-
param" syntax defined in Section 11.3. This specification only describes
the generic format; authentication schemes using Authentication-Info
will define the individual parameters. The "Digest" Authentication
Scheme, for instance, defines multiple parameters in Section 3.5 of
[RFC7616].
Authentication-Info = #auth-param
Proxy-Authenticate = #challenge
11.7.2. Proxy-Authorization
The "Proxy-Authorization" header field allows the client to identify itself
(or its user) to a proxy that requires authentication. Its value consists of
credentials containing the authentication information of the client for the
proxy and/or realm of the resource being requested.
Proxy-Authorization = credentials
11.7.3. Proxy-Authentication-Info
The "Proxy-Authentication-Info" response header field is equivalent to
Authentication-Info, except that it applies to proxy authentication
(Section 11.3) and its semantics are defined by the authentication
scheme indicated by the Proxy-Authorization header field (Section
11.7.2) of the corresponding request:
Proxy-Authentication-Info = #auth-param
Note that, in all cases, HTTP is not aware of the resource semantics. The
consistency with which an origin server responds to requests, over time
and over the varying dimensions of content negotiation, and thus the
"sameness" of a resource's observed representations over time, is
determined entirely by whatever entity or algorithm selects or generates
those responses.
If the user agent is not satisfied by the initial response content, it can
perform a GET request on one or more of the alternative resources to
obtain a different representation. Selection of such alternatives might be
performed automatically (by the user agent) or manually (e.g., by the
user selecting from a hypertext menu).
Note: A user agent sending these header fields makes it easier for a
server to identify an individual by virtue of the user agent's request
characteristics (Section 17.13).
A sender of qvalue MUST NOT generate more than three digits after the
decimal point. User configuration of these values ought to be limited in
the same fashion.
media-range = ( "*/*"
/ ( type "/" "*" )
/ ( type "/" subtype )
) parameters
The asterisk "*" character is used to group media types into ranges, with
"*/*" indicating all media types and "type/*" indicating all subtypes of
that type. The media-range can include media type parameters that are
applicable to that range.
The example
1. text/plain;format=flowed
2. text/plain
3. text/*
4. */*
The media type quality factor associated with a given type is determined
by finding the media range with the highest precedence that matches
the type. For example,
Table 5
Note: A user agent might be provided with a default set of quality values
for certain media ranges. However, unless the user agent is a closed
system that cannot interact with other rendering agents, this default set
ought to be configurable by the user.
12.5.2. Accept-Charset
The "Accept-Charset" header field can be sent by a user agent to indicate
its preferences for charsets in textual response content. For example, this
field allows user agents capable of understanding more comprehensive
or special-purpose charsets to signal that capability to an origin server
that is capable of representing information in those charsets.
Charset names are defined in Section 8.3.2. A user agent MAY associate a
quality value with each charset to indicate the user's relative preference
for that charset, as defined in Section 12.4.2. An example is
12.5.3. Accept-Encoding
The "Accept-Encoding" header field can be used to indicate preferences
regarding the use of content codings (Section 8.4.1).
Examples:
12.5.4. Accept-Language
The "Accept-Language" header field can be used by user agents to
indicate the set of natural languages that are preferred in the response.
Language tags are defined in Section 8.5.1.
would mean: "I prefer Danish, but will accept British English and other
types of English".
Note that some recipients treat the order in which language tags are
listed as an indication of descending priority, particularly for tags that are
assigned equal quality values (no value is the same as q=1). However,
this behavior cannot be relied upon. For consistency and to maximize
interoperability, many user agents assign each language tag a unique
quality value while also listing them in order of decreasing quality.
Additional discussion of language priority lists can be found in Section
2.3 of [RFC4647].
12.5.5. Vary
The "Vary" header field in a response describes what parts of a request
message, aside from the method and target URI, might have influenced
the origin server's process for selecting the content of this response.
A Vary field value is either the wildcard member "*" or a list of request
field names, known as the selecting header fields, that might have had a
role in selecting the representation for this response. Potential selecting
header fields are not limited to fields defined by this specification.
A list containing the member "*" signals that other aspects of the request
might have played a role in selecting the response representation,
possibly including aspects outside the message syntax (e.g., the client's
network address). A recipient will not be able to determine whether this
response is appropriate for a later request without forwarding the
request to the origin server. A proxy MUST NOT generate "*" in a Vary
field value.
indicates that the origin server might have used the request's Accept-
Encoding and Accept-Language header fields (or lack thereof) as
determining factors while choosing the content for this response.
1. To inform cache recipients that they MUST NOT use this response to
satisfy a later request unless the later request has the same values
for the listed header fields as the original request (Section 4.1 of
[CACHING]) or reuse of the response has been validated by the
origin server. In other words, Vary expands the cache key required to
match a new request to the stored cache entry.
Conditional GET requests are the most efficient mechanism for HTTP
cache updates [CACHING]. Conditionals can also be applied to state-
changing methods, such as PUT and DELETE, to prevent the "lost update"
problem: one client accidentally overwriting the work of another client
that has been acting in parallel.
13.1. Preconditions
Preconditions are usually defined with respect to a state of the target
resource as a whole (its current value set) or the state as observed in a
previously obtained representation (one value in that set). If a resource
has multiple current representations, each with its own observable state,
a precondition will assume that the mapping of each request to a
selected representation (Section 3.2) is consistent over time. Regardless,
if the mapping is inconsistent or the server is unable to select an
appropriate representation, then no harm will result when the
precondition evaluates to false.
13.1.1. If-Match
The "If-Match" header field makes the request method conditional on
the recipient origin server either having at least one current
representation of the target resource, when the field value is "*", or
having a current representation of the target resource that has an entity
tag matching a member of the list of entity tags provided in the field
value.
Examples:
If-Match: "xyzzy"
If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
If-Match: *
1. If the field value is "*", the condition is true if the origin server has a
current representation for the target resource.
2. If the field value is a list of entity tags, the condition is true if any of
the listed tags match the entity tag of the selected representation.
3. Otherwise, the condition is false.
Note that an If-Match header field with a list value containing "*" and
other values (including other instances of "*") is syntactically invalid
(therefore not allowed to be generated) and furthermore is unlikely to be
interoperable.
13.1.2. If-None-Match
The "If-None-Match" header field makes the request method conditional
on a recipient cache or origin server either not having any current
representation of the target resource, when the field value is "*", or
having a selected representation with an entity tag that does not match
any of those listed in the field value.
Examples:
If-None-Match: "xyzzy"
If-None-Match: W/"xyzzy"
If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
If-None-Match: *
1. If the field value is "*", the condition is false if the origin server has a
current representation for the target resource.
2. If the field value is a list of entity tags, the condition is false if one of
the listed tags matches the entity tag of the selected representation.
3. Otherwise, the condition is true.
Note that an If-None-Match header field with a list value containing "*"
and other values (including other instances of "*") is syntactically invalid
(therefore not allowed to be generated) and furthermore is unlikely to be
interoperable.
13.1.3. If-Modified-Since
The "If-Modified-Since" header field makes a GET or HEAD request
method conditional on the selected representation's modification date
being more recent than the date provided in the field value. Transfer of
the selected representation's data is avoided if that data has not
changed.
If-Modified-Since = HTTP-date
An example of the field is:
When used for cache updates, a cache will typically use the value of the
cached message's Last-Modified header field to generate the field value
of If-Modified-Since. This behavior is most interoperable for cases where
clocks are poorly synchronized or when the server has chosen to only
honor exact timestamp matches (due to a problem with Last-Modified
dates that appear to go "back in time" when the origin server's clock is
corrected or a representation is restored from an archived backup).
However, caches occasionally generate the field value based on other
data, such as the Date header field of the cached message or the clock
time at which the message was received, particularly when the cached
message does not contain a Last-Modified header field.
When used for limiting the scope of retrieval to a recent time window, a
user agent will generate an If-Modified-Since field value based on either
its own clock or a Date header field received from the server in a prior
response. Origin servers that choose an exact timestamp match based on
the selected representation's Last-Modified header field will not be able
to help the user agent limit its data transfers to only those changed
during the specified window.
13.1.4. If-Unmodified-Since
The "If-Unmodified-Since" header field makes the request method
conditional on the selected representation's last modification date being
earlier than or equal to the date provided in the field value. This field
accomplishes the same purpose as If-Match for cases where the user
agent does not have an entity tag for the representation.
If-Unmodified-Since = HTTP-date
13.1.5. If-Range
The "If-Range" header field provides a special conditional request
mechanism that is similar to the If-Match and If-Unmodified-Since
header fields but that instructs the recipient to ignore the Range header
field if the validator doesn't match, resulting in transfer of the new
selected representation instead of a 412 (Precondition Failed) response.
Note that the If-Range comparison is by exact match, including when the
validator is an HTTP-date, and so it differs from the "earlier than or equal
to" comparison used when evaluating an If-Unmodified-Since
conditional.
A server that is not the origin server for the target resource and cannot
act as a cache for requests on the target resource MUST NOT evaluate
the conditional request header fields defined by this specification, and it
MUST forward them if the request is forwarded, since the generating
client intends that they be evaluated by a server that can provide a
current representation. Likewise, a server MUST ignore the conditional
request header fields defined by this specification when received with a
request method that does not involve the selection or modification of a
selected representation, such as CONNECT, OPTIONS, or TRACE.
Note that protocol extensions can modify the conditions under which
preconditions are evaluated or the consequences of their evaluation. For
example, the immutable cache directive (defined by [RFC8246]) instructs
caches to forgo forwarding conditional requests when they hold a fresh
response.
range-unit = token
All range unit names are case-insensitive and ought to be registered
within the "HTTP Range Unit Registry", as defined in Section 16.5.1.
An int-range is invalid if the last-pos value is present and less than the
first-pos.
The first-pos value in a bytes int-range gives the offset of the first byte in
a range. The last-pos value gives the offset of the last byte in the range;
that is, the byte positions specified are inclusive. Byte offsets start at
zero.
If the representation data has a content coding applied, each byte range
is calculated with respect to the encoded sequence of bytes, not the
sequence of underlying bytes that would be obtained after decoding.
bytes=0-499
bytes=500-999
A client can limit the number of bytes requested without knowing the
size of the selected representation. If the last-pos value is absent, or if
the value is greater than or equal to the current length of the
representation data, the byte range is interpreted as the remainder of
the representation (i.e., the server replaces the value of last-pos with a
value that is one less than the current length of the selected
representation).
A client can refer to the last N bytes (N > 0) of the selected
representation using a suffix-range. If the selected representation is
shorter than the specified suffix-length, the entire representation is used.
bytes=-500
Or:
bytes=9500-
bytes=0-0,-1
bytes=500-600,601-999
bytes=500-700,601-999
When a selected representation has zero length, the only satisfiable form
of range-spec in a GET request is a suffix-range with a non-zero suffix-
length.
14.2. Range
The "Range" header field on a GET request modifies the method
semantics to request transfer of only one or more subranges of the
selected representation data (Section 8.1), rather than the entire selected
representation.
Range = ranges-specifier
A server MAY ignore the Range header field. However, origin servers and
intermediate caches ought to support byte ranges when possible, since
they support efficient recovery from partially failed transfers and partial
retrieval of large representations.
An origin server MUST ignore a Range header field that contains a range
unit it does not understand. A proxy MAY discard a Range header field
that contains a range unit it does not understand.
A server that supports range requests MAY ignore a Range header field
when the selected representation has no content (i.e., the selected
representation's data is of zero length).
If all of the preconditions are true, the server supports the Range header
field for the target resource, the received Range field-value contains a
valid ranges-specifier with a range-unit supported for that target
resource, and that ranges-specifier is satisfiable with respect to the
selected representation, the server SHOULD send a 206 (Partial Content)
response with content containing one or more partial representations
that correspond to the satisfiable range-spec(s) requested.
The above does not imply that a server will send all requested ranges. In
some cases, it may only be possible (or efficient) to send a portion of the
requested ranges first, while expecting the client to re-request the
remaining portions later if they are still desired (see Section 15.3.7).
If all of the preconditions are true, the server supports the Range header
field for the target resource, the received Range field-value contains a
valid ranges-specifier, and either the range-unit is not supported for that
target resource or the ranges-specifier is unsatisfiable with respect to the
selected representation, the server SHOULD send a 416 (Range Not
Satisfiable) response.
14.3. Accept-Ranges
The "Accept-Ranges" field in a response indicates whether an upstream
server supports range requests for the target resource.
Accept-Ranges = acceptable-ranges
acceptable-ranges = 1#range-unit
Accept-Ranges: bytes
to indicate that it supports byte range requests for that target resource,
thereby encouraging its use by the client for future partial requests on
the same request path. Range units are defined in Section 14.1.
A server that does not support any kind of range request for the target
resource MAY send
Accept-Ranges: none
to advise the client not to attempt a range request on the same request
path. The range unit "none" is reserved for this purpose.
14.4. Content-Range
The "Content-Range" header field is sent in a single part 206 (Partial
Content) response to indicate the partial range of the selected
representation enclosed as the message content, sent in each part of a
multipart 206 response to indicate the range enclosed within each body
part (Section 14.6), and sent in 416 (Range Not Satisfiable) responses to
provide information about the selected representation.
Content-Range = range-unit SP
( range-resp / unsatisfied-range )
complete-length = 1*DIGIT
If a 206 (Partial Content) response contains a Content-Range header field
with a range unit (Section 14.1) that the recipient does not understand,
the recipient MUST NOT attempt to recombine it with a stored
representation. A proxy that receives such a message SHOULD forward it
downstream.
For byte ranges, a sender SHOULD indicate the complete length of the
representation from which the range has been extracted, unless the
complete length is unknown or difficult to determine. An asterisk
character ("*") in place of the complete-length indicates that the
representation length was unknown when the header field was
generated.
An origin server SHOULD respond with a 400 (Bad Request) status code
if it receives Content-Range on a PUT for a target resource that does not
support partial PUT requests.
Implementation Notes:
--THIS_STRING_SEPARATES
Content-Type: video/example
Content-Range: exampleunit 1.2-4.3/25
The first digit of the status code defines the class of response. The last
two digits do not have any categorization role. There are five values for
the first digit:
Values outside the range 100..599 are invalid. Implementations often use
three-digit integer values outside of that range (i.e., 600..999) for internal
communication of non-HTTP status (e.g., library errors). A client that
receives a response with an invalid status code SHOULD process the
response as if it had a 5xx (Server Error) status code.
A client MUST be able to parse one or more 1xx responses received prior
to a final response, even if the client does not expect one. A user agent
MAY ignore unexpected 1xx responses.
A proxy MUST forward 1xx responses unless the proxy itself requested
the generation of the 1xx response. For example, if a proxy adds an
"Expect: 100-continue" header field when it forwards a request, then it
need not forward the corresponding 100 (Continue) response(s).
When the request contains an Expect header field that includes a 100-
continue expectation, the 100 response indicates that the server wishes
to receive the request content, as described in Section 10.1.1. The client
ought to continue sending the request and discard the 100 response.
If the request did not contain an Expect header field containing the 100-
continue expectation, the client can simply discard this interim response.
It is assumed that the server will only agree to switch protocols when it is
advantageous to do so. For example, switching to a newer version of
HTTP might be advantageous over older versions, and switching to a
real-time, synchronous protocol might be advantageous when delivering
resources that use such features.
15.3.1. 200 OK
The 200 (OK) status code indicates that the request has succeeded. The
content sent in a 200 response depends on the request method. For the
methods defined by this specification, the intended meaning of the
content can be summarized as:
Request
Response content is a representation of:
Method
GET the target resource
the target resource, like GET, but without
HEAD
transferring the representation data
POST the status of, or results obtained from, the action
Table 6
Request
Response content is a representation of:
Method
PUT,
the status of the action
DELETE
OPTIONS communication options for the target resource
the request message as received by the server
TRACE
returning the trace
The 201 response content typically describes and links to the resource(s)
created. Any validator fields (Section 8.8) sent in the response convey the
current validators for a new representation created by the request. Note
that the PUT method (Section 9.3.4) has additional requirements that
might preclude sending such validators.
The 204 response allows a server to indicate that the action has been
successfully applied to the target resource, while implying that the user
agent does not need to traverse away from its current "document view"
(if any). The server assumes that the user agent will provide some
indication of the success to its user, in accord with its own interface, and
apply any new or updated metadata in the response to its active
representation.
For example, a 204 status code is commonly used with document editing
interfaces corresponding to a "save" action, such that the document
being saved remains available to the user for editing. It is also frequently
used with interfaces that expect automated data transfers to be
prevalent, such as within distributed version control systems.
Since the 205 status code implies that no additional content will be
provided, a server MUST NOT generate content in a 205 response.
15.3.7. 206 Partial Content
The 206 (Partial Content) status code indicates that the server is
successfully fulfilling a range request for the target resource by
transferring one or more parts of the selected representation.
A server that supports range requests (Section 14) will usually attempt to
satisfy all of the requested ranges, since sending less data will likely
result in another client request for the remainder. However, a server
might want to send only a subset of the data requested for reasons of its
own, such as temporary unavailability, cache efficiency, load balancing,
etc. Since a 206 response is self-descriptive, the client can still
understand a response that only partially satisfies its range request.
Within the header area of each body part in the multipart content, the
server MUST generate a Content-Range header field corresponding to
the range being enclosed in that body part. If the selected
representation would have had a Content-Type header field in a 200 (OK)
response, the server SHOULD generate that same Content-Type header
field in the header area of each body part. For example:
--THIS_STRING_SEPARATES
Content-Type: application/pdf
Content-Range: bytes 500-999/8000
When multiple ranges are requested, a server MAY coalesce any of the
ranges that overlap, or that are separated by a gap that is smaller than
the overhead of sending multiple parts, regardless of the order in which
the corresponding range-spec appeared in the received Range header
field. Since the typical overhead between each part of a "multipart/
byteranges" is around 80 bytes, depending on the selected
representation's media type and the chosen boundary parameter length,
it can be less efficient to transfer many small disjoint parts than it is to
transfer the entire selected representation.
Note: In HTTP/1.0, the status codes 301 (Moved Permanently) and 302
(Found) were originally defined as method-preserving ([HTTP/1.0],
Section 9.3) to match their implementation at CERN; 303 (See Other) was
defined for a redirection that changed its method to GET. However, early
user agents split on whether to redirect POST requests as POST
(according to then-current specification) or as GET (the safer alternative
when redirected to a different site). Prevailing practice eventually
converged on changing the method to GET. 307 (Temporary Redirect)
and 308 (Permanent Redirect) [RFC7538] were later added to
unambiguously indicate method-preserving redirects, and status codes
301 and 302 have been adjusted to allow a POST request to be
redirected as GET.
If a Location header field (Section 10.2.2) is provided, the user agent MAY
automatically redirect its request to the URI referenced by the Location
field value, even if the specific status code is not understood. Automatic
redirection needs to be done with care for methods not known to be
safe, as defined in Section 9.2.1, since the user might not wish to redirect
an unsafe request.
1. Replace the target URI with the URI referenced by the redirection
response's Location header field value after resolving it relative to
the original request's target URI.
For request methods other than HEAD, the server SHOULD generate
content in the 300 response containing a list of representation metadata
and URI reference(s) from which the user or user agent can choose the
one most preferred. The user agent MAY make a selection from that list
automatically if it understands the provided media type. A specific
format for automatic selection is not defined by this specification
because HTTP tries to remain orthogonal to the definition of its content.
In practice, the representation is provided in some easily parsed format
believed to be acceptable to the user agent, as determined by shared
design or content negotiation, or in some commonly accepted hypertext
format.
Note: The original proposal for the 300 status code defined the URI
header field as providing a list of alternative representations, such that it
would be usable for 200, 300, and 406 responses and be transferred in
responses to the HEAD method. However, lack of deployment and
disagreement over syntax led to both URI and Alternates (a subsequent
proposal) being dropped from this specification. It is possible to
communicate the list as a Link header field value [RFC8288] whose
members have a relationship of "alternate", though deployment is a
chicken-and-egg problem.
Note: For historical reasons, a user agent MAY change the request
method from POST to GET for the subsequent request. If this behavior is
undesired, the 308 (Permanent Redirect) status code can be used instead.
Note: For historical reasons, a user agent MAY change the request
method from POST to GET for the subsequent request. If this behavior is
undesired, the 307 (Temporary Redirect) status code can be used instead.
A 303 response to a GET request indicates that the origin server does not
have a representation of the target resource that can be transferred by
the server over HTTP. However, the Location field value refers to a
resource that is descriptive of the target resource, such that making a
retrieval request on that other resource might result in a representation
that is useful to recipients without implying that it represents the original
target resource. Note that answers to the questions of what can be
represented, what representations are adequate, and what might be a
useful description are outside the scope of HTTP.
Note: This status code is much younger (June 2014) than its sibling
codes and thus might not be recognized everywhere. See Section 4 of
[RFC7538] for deployment considerations.
On the other hand, if the cause was an unsupported media type, the
Accept response header field (Section 12.5.1) can be used to indicate
which media types would have been accepted in the request.
Each range unit defines what is required for its own range sets to be
satisfiable. For example, Section 14.1.2 defines what makes a bytes range
set satisfiable.
For example:
Therefore, the 418 status code is reserved in the IANA HTTP Status Code
Registry. This indicates that the status code cannot be assigned to other
applications currently. If future circumstances require its use (e.g.,
exhaustion of 4NN status codes), it can be re-assigned to another use.
A client that receives a 421 (Misdirected Request) response MAY retry the
request, whether or not the request method is idempotent, over a
different connection, such as a fresh connection specific to the target
resource's origin, or via an alternative service [ALTSVC].
Example:
Note: The existence of the 503 status code does not imply that a server
has to use it when becoming overloaded. Some servers might simply
refuse the connection.
Likewise, new methods cannot use the special host:port and asterisk
forms of request target that are allowed for CONNECT and OPTIONS,
respectively (Section 7.1). A full URI in absolute form is needed for the
target URI, which means either the request target needs to be sent in
absolute form or the target URI will be reconstructed from the request
context in the same way it is for other methods.
Note: Avoid defining a method name that starts with "M-", since that
prefix might be misinterpreted as having the semantics assigned to it by
[RFC2774].
New status codes are required to fall under one of the categories
defined in Section 15. To allow existing parsers to process the response
message, new status codes cannot disallow content, although they can
mandate a zero-length content.
Proposals for new status codes that are not yet widely deployed ought
to avoid allocating a specific number for the code until there is clear
consensus that it will be registered; instead, early drafts can use a
notation such as "4NN", or "3N0" .. "3N9", to indicate the class of the
proposed status code(s) without consuming a number prematurely.
The definition of a new final status code ought to specify whether or not
it is heuristically cacheable. Note that any response with a final status
code can be cached if the response has explicit freshness information. A
status code defined as heuristically cacheable is allowed to be cached
without explicit freshness information. Likewise, the definition of a status
code can place constraints upon cache behavior if the must-understand
cache directive is used. See [CACHING] for more information.
Finally, the definition of a new status code ought to indicate whether the
content has any implied association with an identified resource (Section
6.4.2).
New fields can be defined such that, when they are understood by a
recipient, they override or enhance the interpretation of previously
defined fields, define preconditions on request evaluation, or refine the
meaning of responses.
Any party can request registration of an HTTP field. See Section 16.3.2
for considerations to take into account when creating a new HTTP field.
Field name:
The requested field name. It MUST conform to the field-name syntax
defined in Section 5.1, and it SHOULD be restricted to just letters,
digits, and hyphen ('-') characters, with the first character being a
letter.
Status:
"permanent", "provisional", "deprecated", or "obsoleted".
Specification document(s):
Reference to the document that specifies the field, preferably including
a URI that can be used to retrieve a copy of the document. Optional
but encouraged for provisional registrations. An indication of the
relevant section(s) can also be included, but is not required.
And optionally:
• Under what conditions the field can be used; e.g., only in responses
or requests, in all messages, only on responses to a particular
request method, etc.
• Whether the field semantics are further refined by their context,
such as their use with certain request methods or status codes.
• The scope of applicability for the information conveyed. By default,
fields apply only to the message they are associated with, but some
response fields are designed to apply to all representations of a
resource, the resource itself, or an even broader scope.
Specifications that expand the scope of a response field will need to
carefully consider issues such as content negotiation, the time
period of applicability, and (in some cases) multi-tenant server
deployments.
• Under what conditions intermediaries are allowed to insert, delete,
or modify the field's value.
• If the field is allowable in trailers; by default, it will not be (see
Section 6.5.1).
• Whether it is appropriate or even required to list the field name in
the Connection header field (i.e., if the field is to be hop-by-hop; see
Section 7.6.1).
• Whether the field introduces any additional security considerations,
such as disclosure of privacy-related data.
Field names ought not be prefixed with "X-"; see [BCP178] for further
information.
Other prefixes are sometimes used in HTTP field names; for example,
"Accept-" is used in many content negotiation headers, and "Content-" is
used as explained in Section 6.4. These prefixes are only an aid to
recognizing the purpose of a field and do not trigger automatic
processing.
Authors are encouraged (but not required) to use either the ABNF rules
in this specification or those in [RFC8941] to define the syntax of new
field values.
For example, the Content-Type field value only allows commas inside
quoted strings, which can be reliably parsed even when multiple values
are present. The Location field value provides a counter-example that
should not be emulated: because URIs can include commas, it is not
possible to reliably distinguish between a single value that includes a
comma from two values.
Authors of fields with a singleton value (see Section 5.5) are additionally
advised to document how to treat messages where the multiple
members are present (a sensible default would be to ignore the field, but
this might not always be the right choice).
Note: The fact that the value syntax for the "realm" parameter is
restricted to quoted-string was a bad design choice not to be
repeated for new parameters.
• Name
• Description
• Pointer to specification text
• Name
• Description
• Pointer to specification text
For example, UNIX, Microsoft Windows, and other operating systems use
".." as a path component to indicate a directory level above the current
one, and they use specially named paths or file names to send data to
system devices. Similar naming conventions might exist within other
types of storage systems. Likewise, local storage systems have an
annoying tendency to prefer user-friendliness over security when
handling invalid or unexpected characters, recomposition of
decomposed characters, and case-normalization of case-insensitive
names.
Recipients ought to carefully limit the extent to which they process other
protocol elements, including (but not limited to) request methods,
response status phrases, field names, numeric values, and chunk lengths.
Failure to limit such processing can result in arbitrary code execution due
to buffer or arithmetic overflows, and increased vulnerability to denial-
of-service attacks.
Since the Referer header field tells a target site about the context that
resulted in a request, it has the potential to reveal information about the
user's immediate browsing history and any personal information that
might be found in the referring resource's URI. Limitations on the Referer
header field are described in Section 10.1.3 to address some of its
security considerations.
An entity tag can be abused in ways that create privacy risks. For
example, a site might deliberately construct a semantically invalid entity
tag that is unique to the user or user agent, send it in a cacheable
response with a long freshness time, and then read that entity tag in
later conditional requests as a means of re-identifying that user or user
agent. Such an identifying tag would become a persistent identifier for
as long as the user agent retained the original cache entry. User agents
that cache representations ought to ensure that the cache is cleared or
replaced whenever the user performs privacy-maintaining actions, such
as clearing stored cookies or changing to a private browsing mode.
• Clients that have been idle for an extended period, following which
the server might wish to cause the client to re-prompt the user for
credentials.
• Applications that include a session termination indication (such as a
"logout" or "commit" button on a page) after which the server side
of the application "knows" that there is no further reason for the
client to retain the credentials.
Table 7
The method name "*" is reserved because using "*" as a method name
would conflict with its usage as a wildcard in some fields (e.g., "Access-
Control-Request-Method").
Table 8
Value Description Section
202 Accepted 15.3.3
203 Non-Authoritative Information 15.3.4
204 No Content 15.3.5
205 Reset Content 15.3.6
206 Partial Content 15.3.7
300 Multiple Choices 15.4.1
301 Moved Permanently 15.4.2
302 Found 15.4.3
303 See Other 15.4.4
304 Not Modified 15.4.5
305 Use Proxy 15.4.6
306 (Unused) 15.4.7
307 Temporary Redirect 15.4.8
308 Permanent Redirect 15.4.9
400 Bad Request 15.5.1
401 Unauthorized 15.5.2
402 Payment Required 15.5.3
403 Forbidden 15.5.4
404 Not Found 15.5.5
405 Method Not Allowed 15.5.6
406 Not Acceptable 15.5.7
407 Proxy Authentication Required 15.5.8
408 Request Timeout 15.5.9
409 Conflict 15.5.10
410 Gone 15.5.11
411 Length Required 15.5.12
412 Precondition Failed 15.5.13
413 Content Too Large 15.5.14
414 URI Too Long 15.5.15
415 Unsupported Media Type 15.5.16
416 Range Not Satisfiable 15.5.17
417 Expectation Failed 15.5.18
418 (Unused) 15.5.19
421 Misdirected Request 15.5.20
422 Unprocessable Content 15.5.21
Value Description Section
426 Upgrade Required 15.5.22
500 Internal Server Error 15.6.1
501 Not Implemented 15.6.2
502 Bad Gateway 15.6.3
503 Service Unavailable 15.6.4
504 Gateway Timeout 15.6.5
505 HTTP Version Not Supported 15.6.6
IANA has moved all entries in the "Permanent Message Header Field
Names" and "Provisional Message Header Field Names" registries (see
https://www.iana.org/assignments/message-headers/) with the protocol
'http' to this registry and has applied the following changes:
IANA has annotated the "Permanent Message Header Field Names" and
"Provisional Message Header Field Names" registries with the following
note to indicate that HTTP field name registrations have moved:
Note
HTTP field name registrations have been moved to [https://
www.iana.org/assignments/http-fields] per [RFC9110].
IANA has updated the "Hypertext Transfer Protocol (HTTP) Field Name
Registry" with the field names listed in the following table.
Table 9
Field Name Status Section Comments
Proxy-Authenticate permanent 11.7.1
Proxy-Authentication-Info permanent 11.7.3
Proxy-Authorization permanent 11.7.2
Range permanent 14.2
Referer permanent 10.1.3
Retry-After permanent 10.2.3
Server permanent 10.2.4
TE permanent 10.1.4
Trailer permanent 6.6.2
Upgrade permanent 7.8
User-Agent permanent 10.1.5
Vary permanent 12.5.5
Via permanent 7.6.3
WWW-Authenticate permanent 11.6.1
* permanent 12.5.5 (reserved)
The field name "*" is reserved because using that name as an HTTP
header field might conflict with its special semantics in the Vary header
field (Section 12.5.5).
IANA has updated the "Content-MD5" entry in the new registry to have a
status of 'obsoleted' with references to Section 14.15 of [RFC2616] (for
the definition of the header field) and Appendix B of [RFC7231] (which
removed the field definition from the updated specification).
Table 10
Range Unit
Description Section
Name
bytes a range of octets 14.1.2
reserved as keyword to indicate range
none 14.3
requests are not supported
Table 11
IANA has updated the registry note about "q" parameters with a link to
Section 12.5.1 of this document.
Table 12
19. References
19.1. Normative References
[CACHING] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed.,
“HTTP Caching”, STD 98, RFC 9111, DOI 10.17487/RFC9111, June 2022.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley,
R., and W. Polk, “Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile”, RFC 5280, DOI 10.17487/
RFC5280, May 2008, <https://www.rfc-editor.org/info/rfc5280>.
[RFC5646] Phillips, A., Ed. and M. Davis, Ed., “Tags for Identifying
Languages”, BCP 47, RFC 5646, DOI 10.17487/RFC5646, September
2009, <https://www.rfc-editor.org/info/rfc5646>.
[TCP] Postel, J., “Transmission Control Protocol”, STD 7, RFC 793, DOI
10.17487/RFC0793, September 1981, <https://www.rfc-editor.org/info/
rfc793>.
[TLS13] Rescorla, E., “The Transport Layer Security (TLS) Protocol
Version 1.3”, RFC 8446, DOI 10.17487/RFC8446, August 2018, <https://
www.rfc-editor.org/info/rfc8446>.
Freed, N., Klensin, J., and T. Hansen, “Media Type Specifications and
Registration Procedures”, BCP 13, RFC 6838, DOI 10.17487/RFC6838,
January 2013.
<https://www.rfc-editor.org/info/bcp13>
[BCP178] Saint-Andre, P., Crocker, D., and M. Nottingham,
“Deprecating the "X-" Prefix and Similar Constructs in Application
Protocols”, BCP 178, RFC 6648, DOI 10.17487/RFC6648, June 2012.
<https://www.rfc-editor.org/info/bcp178>
[BCP35] Thaler, D., Ed., Hansen, T., and T. Hardie, “Guidelines and
Registration Procedures for URI Schemes”, BCP 35, RFC 7595, DOI
10.17487/RFC7595, June 2015.
<https://www.rfc-editor.org/info/bcp35>
[BREACH] Gluck, Y., Harris, N., and A. Prado, “BREACH: Reviving the
CRIME Attack”, July 2013, <http://breachattack.com/resources/
BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf>.
[Bujlow] Bujlow, T., Carela-Español, V., Solé-Pareta, J., and P. Barlet-
Ros, “A Survey on Web Tracking: Mechanisms, Implications, and
Defenses”, DOI 10.1109/JPROC.2016.2637878, In Proceedings of the
IEEE 105(8), August 2017.
[Georgiev] Georgiev, M., Iyengar, S., Jana, S., Anubhai, R., Boneh, D.,
and V. Shmatikov, “The Most Dangerous Code in the World: Validating
SSL Certificates in Non-Browser Software”, DOI
10.1145/2382196.2382204, In Proceedings of the 2012 ACM
Conference on Computer and Communications Security (CCS '12), pp.
38-49, October 2012.
[HTTP/1.1] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed.,
“HTTP/1.1”, STD 99, RFC 9112, DOI 10.17487/RFC9112, June 2022.
[HTTP/2] Thomson, M., Ed. and C. Benfield, Ed., “HTTP/2”, RFC 9113,
DOI 10.17487/RFC9113, June 2022, <https://www.rfc-editor.org/info/
rfc9113>.
[RFC2068] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., and T.
Berners-Lee, “Hypertext Transfer Protocol -- HTTP/1.1”, RFC 2068, DOI
10.17487/RFC2068, January 1997, <https://www.rfc-editor.org/info/
rfc2068>.
[RFC2145] Mogul, J., Fielding, R., Gettys, J., and H. Frystyk, “Use and
Interpretation of HTTP Version Numbers”, RFC 2145, DOI 10.17487/
RFC2145, May 1997, <https://www.rfc-editor.org/info/rfc2145>.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L.,
Leach, P., and T. Berners-Lee, “Hypertext Transfer Protocol --
HTTP/1.1”, RFC 2616, DOI 10.17487/RFC2616, June 1999, <https://
www.rfc-editor.org/info/rfc2616>.
[RFC2818] Rescorla, E., “HTTP Over TLS”, RFC 2818, DOI 10.17487/
RFC2818, May 2000, <https://www.rfc-editor.org/info/rfc2818>.
[RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, “DNS Security Introduction and Requirements”, RFC 4033, DOI
10.17487/RFC4033, March 2005, <https://www.rfc-editor.org/info/
rfc4033>.
[RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch,
“Network Time Protocol Version 4: Protocol and Algorithms
Specification”, RFC 5905, DOI 10.17487/RFC5905, June 2010, <https://
www.rfc-editor.org/info/rfc5905>.
[RFC6454] Barth, A., “The Web Origin Concept”, RFC 6454, DOI
10.17487/RFC6454, December 2011, <https://www.rfc-editor.org/info/
rfc6454>.
[RFC7233] Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed.,
“Hypertext Transfer Protocol (HTTP/1.1): Range Requests”, RFC 7233,
DOI 10.17487/RFC7233, June 2014, <https://www.rfc-editor.org/info/
rfc7233>.
[RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed.,
“Hypertext Transfer Protocol (HTTP/1.1): Caching”, RFC 7234, DOI
10.17487/RFC7234, June 2014, <https://www.rfc-editor.org/info/
rfc7234>.
BWS = OWS
Date = HTTP-date
ETag = entity-tag
Expect = [ expectation *( OWS "," OWS expectation ) ]
From = mailbox
Last-Modified = HTTP-date
Location = URI-reference
Max-Forwards = 1*DIGIT
OWS = *( SP / HTAB )
hour = 2DIGIT
http-URI = "http://" authority path-abempty [ "?" query ]
https-URI = "https://" authority path-abempty [ "?" query ]
second = 2DIGIT
segment = <segment, see [URI], Section 3.3>
subtype = token
suffix-length = 1*DIGIT
suffix-range = "-" suffix-length
year = 4DIGIT
Explicit requirements have been added to check the target URI scheme's
semantics and reject requests that don't meet any associated
requirements. (Section 7.4)
"Field value" now refers to the value after multiple field lines are
combined with commas — by far the most common use. To refer to a
single header line's value, use "field line value". (Section 6.3)
The priority of the absolute form of the request URI over the Host header
field by origin servers has been made explicit to align with proxy
handling. (Section 7.2)
The grammar definition for the Via field's "received-by" was expanded in
RFC 7230 due to changes in the URI grammar for host [URI] that are not
desirable for Via. For simplicity, we have removed uri-host from the
received-by production because it can be encompassed by the existing
grammar for pseudonym. In particular, this change removed comma
from the allowed set of characters for a host name in received-by.
(Section 7.6.3)
The following have been clarified: CR and NUL in field values are to be
rejected or mapped to SP, and leading and trailing whitespace needs to
be stripped from field values before they are consumed. (Section 5.5)
An abstract data type for HTTP messages has been introduced to define
the components of a message and their semantics as an abstraction
across multiple HTTP versions, rather than in terms of the specific syntax
form of HTTP/1.1 in [HTTP/1.1], and reflect the contents after the
message is parsed. This makes it easier to distinguish between
requirements on the content (what is conveyed) versus requirements on
the messaging syntax (how it is conveyed) and avoids baking limitations
of early protocol versions into the future of HTTP. (Section 6)
The terms "payload" and "payload body" have been replaced with
"content", to better align with its usage elsewhere (e.g., in field names)
and to avoid confusion with frame payloads in HTTP/2 and HTTP/3.
(Section 6.4)
The term "effective request URI" has been replaced with "target URI".
(Section 7.1)
Restrictions on client retries have been loosened to reflect
implementation behavior. (Section 9.2.2)
The fact that request bodies on GET, HEAD, and DELETE are not
interoperable has been clarified. (Sections 9.3.1, 9.3.2, and 9.3.5)
List-based grammar for Expect has been restored for compatibility with
RFC 2616. (Section 10.1.1)
The semantics of "*" in the Vary header field when other values are
present was clarified. (Section 12.5.5)
Acknowledgements
Aside from the current editors, the following individuals deserve special
recognition for their contributions to early aspects of HTTP and its core
specifications: Marc Andreessen, Tim Berners-Lee, Robert Cailliau, Daniel
W. Connolly, Bob Denny, John Franks, Jim Gettys, Jean-François Groff,
Phillip M. Hallam-Baker, Koen Holtman, Jeffery L. Hostetler, Shel Kaphan,
Dave Kristol, Yves Lafon, Scott D. Lawrence, Paul J. Leach, Håkon W. Lie,
Ari Luotonen, Larry Masinter, Rob McCool, Jeffrey C. Mogul, Lou
Montulli, David Morris, Henrik Frystyk Nielsen, Dave Raggett, Eric
Rescorla, Tony Sanders, Lawrence C. Stewart, Marc VanHeyningen, and
Steve Zilles.
This document builds on the many contributions that went into past
specifications of HTTP, including [HTTP/1.0], [RFC2068], [RFC2145],
[RFC2616], [RFC2617], [RFC2818], [RFC7230], [RFC7231], [RFC7232],
[RFC7233], [RFC7234], and [RFC7235]. The acknowledgements within
those documents still apply.
Index
12345ABCDEFGHIKLMNOPRSTUVWX
•1
◦ 100 Continue (status code) 15.2.1, 18.3
◦ 100-continue (expect value) 10.1.1
◦ 101 Switching Protocols (status code) 15.2.2, 18.3
◦ 1xx Informational (status code class) 15.2
•2
◦ 200 OK (status code) 15.3.1, 18.3
◦ 201 Created (status code) 15.3.2, 18.3
◦ 202 Accepted (status code) 15.3.3, 18.3
◦ 203 Non-Authoritative Information (status code) 7.7, 15.3.4,
18.3
◦ 204 No Content (status code) 15.3.5, 18.3
◦ 205 Reset Content (status code) 15.3.6, 18.3
◦ 206 Partial Content (status code) 6.4.1, 8.3.3, 14.2, 15.3.7, 18.3
◦ 2xx Successful (status code class) 15.3
•3
◦ 300 Multiple Choices (status code) 15.4.1, 15.5.7, 18.3
◦ 301 Moved Permanently (status code) 15.4.2, 18.3
◦ 302 Found (status code) 15.4.3, 18.3
◦ 303 See Other (status code) 15.4.4, 18.3
◦ 304 Not Modified (status code) 8.6, 15.4.5, 18.3
◦ 305 Use Proxy (status code) 15.4.6, 18.3
◦ 306 (Unused) (status code) 15.4.7, 18.3
◦ 307 Temporary Redirect (status code) 15.4.8, 18.3
◦ 308 Permanent Redirect (status code) 15.4.9, 18.3, B.3
◦ 3xx Redirection (status code class) 7.8, 15.4, 16.3.2, B.3
•4
◦ 400 Bad Request (status code) 15.5.1, 18.3
◦ 401 Unauthorized (status code) 15.5.2, 18.3
◦ 402 Payment Required (status code) 15.5.3, 18.3
◦ 403 Forbidden (status code) 11.4, 15.5.4, 18.3
◦ 404 Not Found (status code) 15.5.5, 18.3
◦ 405 Method Not Allowed (status code) 15.5.6, 18.3
◦ 406 Not Acceptable (status code) 15.5.7, 18.3
◦ 407 Proxy Authentication Required (status code) 15.5.8, 18.3
◦ 408 Request Timeout (status code) 15.5.9, 18.3
◦ 409 Conflict (status code) 15.5.10, 18.3
◦ 410 Gone (status code) 15.5.11, 18.3
◦ 411 Length Required (status code) 15.5.12, 18.3
◦ 412 Precondition Failed (status code) 15.5.13, 18.3
◦ 413 Content Too Large (status code) 15.5.14, 17.5, 18.3
◦ 414 URI Too Long (status code) 15.5.15, 17.5, 18.3
◦ 415 Unsupported Media Type (status code) 15.5.16, 18.3
◦ 416 Range Not Satisfiable (status code) 15.5.17, 18.3
◦ 417 Expectation Failed (status code) 15.5.18, 18.3
◦ 418 (Unused) (status code) 15.5.19, 18.3
◦ 421 Misdirected Request (status code) 7.4, 15.5.20, 18.3, B.3
◦ 422 Unprocessable Content (status code) 15.5.21, 18.3, B.3
◦ 426 Upgrade Required (status code) 15.5.22, 18.3
◦ 4xx Client Error (status code class) 15.5
•5
◦ 500 Internal Server Error (status code) 15.6.1, 18.3
◦ 501 Not Implemented (status code) 15.6.2, 18.3
◦ 502 Bad Gateway (status code) 15.6.3, 18.3
◦ 503 Service Unavailable (status code) 15.6.4, 18.3
◦ 504 Gateway Timeout (status code) 15.6.5, 18.3
◦ 505 HTTP Version Not Supported (status code) 15.6.6, 18.3
◦ 5xx Server Error (status code class) 15.6
•A
◦ accelerator 3.7
◦ Accept header field 5.6.6, 8.3.1, 12.3, 12.5.1, 15.5.16, 18.4, 18.8,
B.3
◦ Accept-Charset header field 12.5.2, 18.4, B.3
◦ Accept-Encoding header field 8.4.1, 8.8.3.3, 12.3, 12.5.3,
15.5.16, 18.4, 18.6
◦ Accept-Language header field 8.5.1, 12.5.4, 18.4
◦ Accept-Ranges header field 14.1, 14.3, 18.4, 18.7, B.3
◦ Allow header field 9.1, 10.2.1, 18.4
◦ ALTSVC 4.3.2, 15.5.20, 17.1, 19.2
◦ Authentication-Info header field 11.6.3, 18.4
◦ authoritative response 17.1
◦ Authorization header field 11.6.2, 11.6.3, 12.5.5, 15.5.2, 18.4
•B
◦ BREACH 17.6, 19.2
◦ browser 3.5
◦ Bujlow 17.13, 19.2
•C
◦ cache 3.8
◦ cacheable 3.8
◦ CACHING 1.2, 2.5, 3.8, 4.3.2, 4.3.3, 5.6.7, 7.3.1, 7.6.1, 7.7, 8.8.2.1,
8.8.3.1, 9.2.3, 9.3.1, 9.3.2, 9.3.2, 9.3.3, 9.3.3, 9.3.4, 9.3.5, 11.6.2,
12.5.5, 12.5.5, 13, 13.1.2, 13.1.3, 15.1, 15.3.1, 15.3.4, 15.3.5,
15.3.7, 15.4.1, 15.4.2, 15.4.5, 15.4.5, 15.4.9, 15.5.5, 15.5.6, 15.5.11,
15.5.15, 15.6.2, 16, 16.2.2, 16.4.2, 17, 17.2, 19.1
▪ Section 3.5 11.6.2
▪ Section 4 9.3.3
▪ Section 4.1 12.5.5
▪ Section 4.2 5.6.7
▪ Section 4.2.1 9.3.3
▪ Section 4.2.2 15.3.1, 15.3.4, 15.3.5, 15.3.7, 15.4.1, 15.4.2,
15.4.9, 15.5.5, 15.5.6, 15.5.11, 15.5.15, 15.6.2
▪ Section 4.3.2 13.1.2, 13.1.3
▪ Section 4.3.4 15.4.5
▪ Section 4.3.5 9.3.2
▪ Section 4.4 9.3.4, 9.3.5
▪ Section 5.2 7.6.1, 9.3.1, 9.3.2, 12.5.5
▪ Section 5.2.2.6 7.7
▪ Section 5.2.2.7 16.4.2
▪ Section 5.2.3 16
▪ Section 7 17, 17.2
◦ client 3.3
◦ clock 5.6.7
◦ complete 6.1
◦ compress (Coding Format) 8.4.1.1
◦ compress (content coding) 8.4.1
◦ conditional request 13
◦ CONNECT method 3.3, 6.4.1, 7.1, 8.6, 9.1, 9.3.6, 16, 16.1.2, 18.2
◦ connection 3.3
◦ Connection header field 5.1, 7.6, 7.6.1, 7.8, 10.1.4, 15.4, 16.3.2,
18.4
◦ content 6.4
◦ content coding 8.4.1
◦ content negotiation 1.3
◦ Content-Encoding header field 8.4, 8.4.1, 18.4
◦ Content-Language header field 8.5, 18.4
◦ Content-Length header field 8.6, 15.5.12, 18.4
◦ Content-Location header field 8.7, 9.3.3, 10.2.2, 18.4
◦ Content-MD5 header field 18.4
◦ Content-Range header field 9.3.4, 14.1, 14.4, 14.5, 14.5, 15.5.17,
18.4, B.3, B.5
◦ Content-Type header field 5.5, 8.3, 8.3.1, 18.4
◦ control data 6.2
◦ COOKIE 4.2.2, 5.3, 9.3.8, 11.4, 19.2
•D
◦ Date header field 5.1, 6.4.1, 6.6.1, 8.8.2.1, 18.4
◦ deflate (Coding Format) 8.4.1.2
◦ deflate (content coding) 8.4.1
◦ DELETE method 9.1, 9.2.2, 9.3.5, 18.2, B.3
◦ Delimiters 5.6.2
◦ downstream 3.7
•E
◦ effective request URI 7.1
◦ Err1912 8.3.2, 19.2
◦ Err5433 8.3.2, 19.2
◦ ETag field 8.8, 8.8.3, 18.4
◦ Expect header field 7.8, 10.1.1, 15.2.1, 15.5.18, 18.4, B.3
•F
◦ field 5, 6.3
◦ field line 5.2
◦ field line value 5.2
◦ field name 5.2
◦ field value 5.2
◦ Fields
▪ * 18.4
▪ Accept 5.6.6, 8.3.1, 12.3, 12.5.1, 15.5.16, 18.4, 18.8, B.3
▪ Accept-Charset 12.5.2, 18.4, B.3
▪ Accept-Encoding 8.4.1, 8.8.3.3, 12.3, 12.5.3, 15.5.16, 18.4,
18.6
▪ Accept-Language 8.5.1, 12.5.4, 18.4
▪ Accept-Ranges 14.1, 14.3, 18.4, 18.7, B.3
▪ Allow 9.1, 10.2.1, 18.4
▪ Authentication-Info 11.6.3, 18.4
▪ Authorization 11.6.2, 11.6.3, 12.5.5, 15.5.2, 18.4
▪ Connection 5.1, 7.6, 7.6.1, 7.8, 10.1.4, 15.4, 16.3.2, 18.4
▪ Content-Encoding 8.4, 8.4.1, 18.4
▪ Content-Language 8.5, 18.4
▪ Content-Length 8.6, 15.5.12, 18.4
▪ Content-Location 8.7, 9.3.3, 10.2.2, 18.4
▪ Content-MD5 18.4
▪ Content-Range 9.3.4, 14.1, 14.4, 14.5, 14.5, 15.5.17, 18.4,
B.3, B.5
▪ Content-Type 5.5, 8.3, 8.3.1, 18.4
▪ Date 5.1, 6.4.1, 6.6.1, 8.8.2.1, 18.4
▪ ETag 8.8, 8.8.3, 18.4
▪ Expect 7.8, 10.1.1, 15.2.1, 15.5.18, 18.4, B.3
▪ From 10.1.2, 18.4
▪ Host 4.3.3, 7.1, 7.2, 18.4, B.2
▪ If-Match 13.1.1, 13.2.2, 18.4, B.4
▪ If-Modified-Since 13.1.3, 18.4
▪ If-None-Match 13.1.2, 18.4
▪ If-Range 13.1.1, 13.1.4, 13.1.5, 14.2, 18.4
▪ If-Unmodified-Since 13.1.4, 13.2.2, 18.4, B.4, B.4
▪ Last-Modified 8.8, 8.8.2, 18.4
▪ Location 9.3.3, 10.2.2, 15.4, 17.11, 18.4
▪ Max-Forwards 7.6.2, 9.3.7, 9.3.8, 18.4
▪ Proxy-Authenticate 11.7.1, 15.5.8, 18.4
▪ Proxy-Authentication-Info 11.7.3, 18.4
▪ Proxy-Authorization 11.7.2, 11.7.3, 15.5.8, 18.4
▪ Range 9.3.1, 14.1, 14.2, 15.5.17, 16.1.2, 18.4, B.5
▪ Referer 10.1.3, 17.9, 18.4
▪ Retry-After 10.2.3, 15.6.4, 18.4
▪ Server 10.2.4, 17.12, 18.4
▪ TE 6.5.1, 7.6.1, 10.1.4, 18.4
▪ Trailer 6.5.2, 6.6.2, 18.4
▪ Upgrade 3.3, 7.6.1, 7.6.3, 7.8, 15.2.2, 15.5.22, 18.4
▪ User-Agent 10.1.5, 10.2.4, 17.12, 18.4
▪ Vary 12.1, 12.5.5, 16.3.2, 18.4, 18.4, 18.4, B.3
▪ Via 6.2, 7.6.3, 9.3.8, 17.12, 18.4, B.2
▪ WWW-Authenticate 11.6.1, 11.7.1, 15.5.2, 18.4
◦ Fragment Identifiers 4.2.5
◦ From header field 10.1.2, 18.4
•G
◦ gateway 3.7
◦ Georgiev 17.1, 19.2
◦ GET method 3.2, 3.9, 6, 6.4.1, 6.4.1, 8.7, 9.1, 9.2.1, 9.3.1, 13.1.1,
13.1.4, 14.1.2, 14.1.2, 14.2, 18.2, B.3
◦ Grammar
▪ absolute-path 4.1
▪ absolute-URI 4.1
▪ Accept 12.5.1
▪ Accept-Charset 12.5.2
▪ Accept-Encoding 12.5.3
▪ Accept-Language 12.5.4
▪ Accept-Ranges 14.3
▪ acceptable-ranges 14.3
▪ Allow 10.2.1
▪ ALPHA 2.1
▪ asctime-date 5.6.7
▪ auth-param 11.2
▪ auth-scheme 11.1
▪ Authentication-Info 11.6.3
▪ authority 4.1
▪ Authorization 11.6.2
▪ BWS 5.6.3
▪ challenge 11.3
▪ codings 12.5.3
▪ comment 5.6.5
▪ complete-length 14.4
▪ Connection 7.6.1
▪ connection-option 7.6.1
▪ content-coding 8.4.1
▪ Content-Encoding 8.4
▪ Content-Language 8.5
▪ Content-Length 8.6
▪ Content-Location 8.7
▪ Content-Range 14.4
▪ Content-Type 8.3
▪ CR 2.1
▪ credentials 11.4
▪ CRLF 2.1
▪ ctext 5.6.5
▪ CTL 2.1
▪ Date 6.6.1
▪ date1 5.6.7
▪ day 5.6.7
▪ day-name 5.6.7
▪ day-name-l 5.6.7
▪ delay-seconds 10.2.3
▪ DIGIT 2.1
▪ DQUOTE 2.1
▪ entity-tag 8.8.3
▪ ETag 8.8.3
▪ etagc 8.8.3
▪ Expect 10.1.1
▪ field-content 5.5
▪ field-name 5.1, 6.6.2
▪ field-value 5.5
▪ field-vchar 5.5
▪ first-pos 14.1.1, 14.4
▪ From 10.1.2
▪ GMT 5.6.7
▪ HEXDIG 2.1
▪ Host 7.2
▪ hour 5.6.7
▪ HTAB 2.1
▪ HTTP-date 5.6.7
▪ http-URI 4.2.1
▪ https-URI 4.2.2
▪ If-Match 13.1.1
▪ If-Modified-Since 13.1.3
▪ If-None-Match 13.1.2
▪ If-Range 13.1.5
▪ If-Unmodified-Since 13.1.4
▪ IMF-fixdate 5.6.7
▪ incl-range 14.4
▪ int-range 14.1.1
▪ language-range 12.5.4
▪ language-tag 8.5.1
▪ Last-Modified 8.8.2
▪ last-pos 14.1.1, 14.4
▪ LF 2.1
▪ Location 10.2.2
▪ Max-Forwards 7.6.2
▪ media-range 12.5.1
▪ media-type 8.3.1
▪ method 9.1
▪ minute 5.6.7
▪ month 5.6.7
▪ obs-date 5.6.7
▪ obs-text 5.5
▪ OCTET 2.1
▪ opaque-tag 8.8.3
▪ other-range 14.1.1
▪ OWS 5.6.3
▪ parameter 5.6.6
▪ parameter-name 5.6.6
▪ parameter-value 5.6.6
▪ parameters 5.6.6
▪ partial-URI 4.1
▪ port 4.1
▪ product 10.1.5
▪ product-version 10.1.5
▪ protocol-name 7.6.3
▪ protocol-version 7.6.3
▪ Proxy-Authenticate 11.7.1
▪ Proxy-Authentication-Info 11.7.3
▪ Proxy-Authorization 11.7.2
▪ pseudonym 7.6.3
▪ qdtext 5.6.4
▪ query 4.1
▪ quoted-pair 5.6.4
▪ quoted-string 5.6.4
▪ qvalue 12.4.2
▪ Range 14.2
▪ range-resp 14.4
▪ range-set 14.1.1
▪ range-spec 14.1.1
▪ range-unit 14.1
▪ ranges-specifier 14.1.1
▪ received-by 7.6.3
▪ received-protocol 7.6.3
▪ Referer 10.1.3
▪ Retry-After 10.2.3
▪ rfc850-date 5.6.7
▪ RWS 5.6.3
▪ second 5.6.7
▪ segment 4.1
▪ Server 10.2.4
▪ SP 2.1
▪ subtype 8.3.1
▪ suffix-length 14.1.1
▪ suffix-range 14.1.1
▪ t-codings 10.1.4
▪ tchar 5.6.2
▪ TE 10.1.4
▪ time-of-day 5.6.7
▪ token 5.6.2
▪ token68 11.2
▪ Trailer 6.6.2
▪ transfer-coding 10.1.4
▪ transfer-parameter 10.1.4
▪ type 8.3.1
▪ unsatisfied-range 14.4
▪ Upgrade 7.8
▪ uri-host 4.1
▪ URI-reference 4.1
▪ User-Agent 10.1.5
▪ Vary 12.5.5
▪ VCHAR 2.1
▪ Via 7.6.3
▪ weak 8.8.3
▪ weight 12.4.2
▪ WWW-Authenticate 11.6.1
▪ year 5.6.7
◦ gzip (Coding Format) 8.4.1.3
◦ gzip (content coding) 8.4.1
•H
◦ HEAD method 6, 6.4.1, 8.6, 8.7, 9.1, 9.2.1, 9.3.2, 18.2, B.3
◦ Header Fields
▪ Accept 5.6.6, 8.3.1, 12.3, 12.5.1, 15.5.16, 18.4, 18.8, B.3
▪ Accept-Charset 12.5.2, 18.4, B.3
▪ Accept-Encoding 8.4.1, 8.8.3.3, 12.3, 12.5.3, 15.5.16, 18.4,
18.6
▪ Accept-Language 8.5.1, 12.5.4, 18.4
▪ Accept-Ranges 14.1, 14.3, 18.4, 18.7, B.3
▪ Allow 9.1, 10.2.1, 18.4
▪ Authentication-Info 11.6.3, 18.4
▪ Authorization 11.6.2, 11.6.3, 12.5.5, 15.5.2, 18.4
▪ Connection 5.1, 7.6, 7.6.1, 7.8, 10.1.4, 15.4, 16.3.2, 18.4
▪ Content-Encoding 8.4, 8.4.1, 18.4
▪ Content-Language 8.5, 18.4
▪ Content-Length 8.6, 15.5.12, 18.4
▪ Content-Location 8.7, 9.3.3, 10.2.2, 18.4
▪ Content-MD5 18.4
▪ Content-Range 9.3.4, 14.1, 14.4, 14.5, 14.5, 15.5.17, 18.4,
B.3, B.5
▪ Content-Type 5.5, 8.3, 8.3.1, 18.4
▪ Date 5.1, 6.4.1, 6.6.1, 8.8.2.1, 18.4
▪ ETag 8.8, 8.8.3, 18.4
▪ Expect 7.8, 10.1.1, 15.2.1, 15.5.18, 18.4, B.3
▪ From 10.1.2, 18.4
▪ Host 4.3.3, 7.1, 7.2, 18.4, B.2
▪ If-Match 13.1.1, 13.2.2, 18.4, B.4
▪ If-Modified-Since 13.1.3, 18.4
▪ If-None-Match 13.1.2, 18.4
▪ If-Range 13.1.1, 13.1.4, 13.1.5, 14.2, 18.4
▪ If-Unmodified-Since 13.1.4, 13.2.2, 18.4, B.4, B.4
▪ Last-Modified 8.8, 8.8.2, 18.4
▪ Location 9.3.3, 10.2.2, 15.4, 17.11, 18.4
▪ Max-Forwards 7.6.2, 9.3.7, 9.3.8, 18.4
▪ Proxy-Authenticate 11.7.1, 15.5.8, 18.4
▪ Proxy-Authentication-Info 11.7.3, 18.4
▪ Proxy-Authorization 11.7.2, 11.7.3, 15.5.8, 18.4
▪ Range 9.3.1, 14.1, 14.2, 15.5.17, 16.1.2, 18.4, B.5
▪ Referer 10.1.3, 17.9, 18.4
▪ Retry-After 10.2.3, 15.6.4, 18.4
▪ Server 10.2.4, 17.12, 18.4
▪ TE 6.5.1, 7.6.1, 10.1.4, 18.4
▪ Trailer 6.5.2, 6.6.2, 18.4
▪ Upgrade 3.3, 7.6.1, 7.6.3, 7.8, 15.2.2, 15.5.22, 18.4
▪ User-Agent 10.1.5, 10.2.4, 17.12, 18.4
▪ Vary 12.1, 12.5.5, 16.3.2, 18.4, 18.4, 18.4, B.3
▪ Via 6.2, 7.6.3, 9.3.8, 17.12, 18.4, B.2
▪ WWW-Authenticate 11.6.1, 11.7.1, 15.5.2, 18.4
◦ header section 6.3
◦ Host header field 4.3.3, 7.1, 7.2, 18.4, B.2
◦ HPACK 17.6, 19.2
◦ http URI scheme 4.2.1
◦ HTTP/1.0 1.2, 15.4, 19.2, "Acknowledgements"
▪ Section 9.3 15.4
◦ HTTP/1.1 1.2, 1.4, 2.5, 5.4, 6.2, 6.4, 6.5.1, 7.1, 7.5, 7.6.1, 7.6.1, 7.7,
7.7, 7.7, 8.4, 8.6, 8.8.3.3, 9.3.1, 9.3.2, 9.3.5, 9.3.8, 10.1.1, 10.1.4, 16,
17, 17.10, 19.2, B.3
▪ Section 3.2.1 7.7
▪ Section 3.2.4 7.7
▪ Section 6 6.4
▪ Section 6.1 7.6.1, 8.4, 16
▪ Section 6.2 8.6
▪ Section 7 7.7, 8.8.3.3, 10.1.4
▪ Section 7.1.2 6.5.1
▪ Section 9.5 7.5
▪ Section 9.6 10.1.1
▪ Section 10.1 9.3.8
▪ Section 11 17
▪ Section 11.2 5.4, 9.3.1, 9.3.2, 9.3.5, 17.10
▪ Appendix C.2.2 7.6.1
◦ HTTP/2 1.2, 6.2, 7.2, 7.5, 16, 19.2
◦ HTTP/3 1.2, 6.2, 7.2, 19.2
◦ https URI scheme 4.2.2
•I
◦ idempotent 9.2.2
◦ If-Match header field 13.1.1, 13.2.2, 18.4, B.4
◦ If-Modified-Since header field 13.1.3, 18.4
◦ If-None-Match header field 13.1.2, 18.4
◦ If-Range header field 13.1.1, 13.1.4, 13.1.5, 14.2, 18.4
◦ If-Unmodified-Since header field 13.1.4, 13.2.2, 18.4, B.4, B.4
◦ inbound 3.7
◦ incomplete 6.1
◦ interception proxy 3.7
◦ intermediary 3.7
◦ ISO-8859-1 5.5, 19.2
•K
◦ Kri2001 5.3, 19.2
•L
◦ Last-Modified header field 8.8, 8.8.2, 18.4
◦ list-based field 5.5
◦ Location header field 9.3.3, 10.2.2, 15.4, 17.11, 18.4
•M
◦ Max-Forwards header field 7.6.2, 9.3.7, 9.3.8, 18.4
◦ Media Type
▪ multipart/byteranges 14.6
▪ multipart/x-byteranges 14.6
◦ message 3.4, 6
◦ message abstraction 6
◦ messages 3.4
◦ metadata 8.8
◦ Method
▪ * 18.2
▪ CONNECT 3.3, 6.4.1, 7.1, 8.6, 9.1, 9.3.6, 16, 16.1.2, 18.2
▪ DELETE 9.1, 9.2.2, 9.3.5, 18.2, B.3
▪ GET 3.2, 3.9, 6, 6.4.1, 6.4.1, 8.7, 9.1, 9.2.1, 9.3.1, 13.1.1,
13.1.4, 14.1.2, 14.1.2, 14.2, 18.2, B.3
▪ HEAD 6, 6.4.1, 8.6, 8.7, 9.1, 9.2.1, 9.3.2, 18.2, B.3
▪ OPTIONS 7.1, 7.6.2, 9.1, 9.2.1, 9.3.7, 16.1.2, 18.2, B.3
▪ POST 6.4.1, 8.7, 9.1, 9.3.1, 9.3.3, 18.2
▪ PUT 6.4.1, 8.7, 9.1, 9.2.2, 9.3.4, 14.5, 15.3.1, 15.3.2, 16.3.2,
18.2, B.3
▪ TRACE 7.6.2, 9.1, 9.2.1, 9.3.8, 18.2, B.3
◦ multipart/byteranges Media Type 14.6
◦ multipart/x-byteranges Media Type 14.6
•N
◦ non-transforming proxy 7.7
•O
◦ OPTIONS method 7.1, 7.6.2, 9.1, 9.2.1, 9.3.7, 16.1.2, 18.2, B.3
◦ origin 4.3.1, 11.5
◦ origin server 3.6
◦ outbound 3.7
◦ OWASP 17, 17.16, 19.2
•P
◦ phishing 17.1
◦ POST method 6.4.1, 8.7, 9.1, 9.3.1, 9.3.3, 18.2
◦ Protection Space 11.5
◦ proxy 3.7
◦ Proxy-Authenticate header field 11.7.1, 15.5.8, 18.4
◦ Proxy-Authentication-Info header field 11.7.3, 18.4
◦ Proxy-Authorization header field 11.7.2, 11.7.3, 15.5.8, 18.4
◦ PUT method 6.4.1, 8.7, 9.1, 9.2.2, 9.3.4, 14.5, 15.3.1, 15.3.2,
16.3.2, 18.2, B.3
•R
◦ Range header field 9.3.1, 14.1, 14.2, 15.5.17, 16.1.2, 18.4, B.5
◦ Realm 11.5
◦ recipient 3.4
◦ Referer header field 10.1.3, 17.9, 18.4
◦ representation 3.2
◦ request 3.4
◦ request target 7.1
◦ resource 3.1, 4
◦ response 3.4
◦ REST 3.2, 9.1, 19.2
◦ Retry-After header field 10.2.3, 15.6.4, 18.4
◦ reverse proxy 3.7
◦ RFC1919 3.7, 19.2
◦ RFC1950 8.4.1.2, 18.6, 19.1
◦ RFC1951 8.4.1.2, 18.6, 19.1
◦ RFC1952 8.4.1.3, 18.6, 19.1
◦ RFC2046 8.3, 8.3.1, 8.3.1, 8.3.3, 14.6, 14.6, 19.1
▪ Section 4.1.2 8.3.1
▪ Section 4.5.1 8.3
▪ Section 5.1 14.6
▪ Section 5.1.1 8.3.3
◦ RFC2047 5.5, 19.2
◦ RFC2068 1.2, 7.6.1, 15.4, 19.2, "Acknowledgements"
▪ Section 10.3 15.4
▪ Section 19.7.1 7.6.1
◦ RFC2119 2.2, 19.1
◦ RFC2145 19.2, "Acknowledgements"
◦ RFC2295 12, 19.2
◦ RFC2324 15.5.19, 19.2
◦ RFC2557 8.7, 19.2
▪ Section 4 8.7
◦ RFC2616 1.2, 8.8.3, 12.5.4, 18.4, 19.2, "Acknowledgements"
▪ Section 3.11 8.8.3
▪ Section 14.4 12.5.4
▪ Section 14.15 18.4
◦ RFC2617 19.2, "Acknowledgements"
◦ RFC2774 16.1.2, 19.2
◦ RFC2818 1.4, 19.2, "Acknowledgements"
◦ RFC2978 8.3.2, 8.3.2, 19.2
▪ Section 2 8.3.2
▪ Section 2.3 8.3.2
◦ RFC3040 3.7, 19.2
◦ RFC3864 18.4, 19.2
◦ RFC3875 17.10, 19.2
▪ Section 4.1.18 17.10
◦ RFC4033 17.1, 19.2
◦ RFC4289 §
◦ RFC4559 3.3, 19.2
◦ RFC4647 12.5.4, 12.5.4, 12.5.4, 12.5.4, 19.1, A
▪ Section 2.1 12.5.4, A
▪ Section 2.3 12.5.4
▪ Section 3 12.5.4
▪ Section 3.3.1 12.5.4
◦ RFC4648 11.2, 19.1
◦ RFC5234 2.1, 2.1, 5.5, 5.6.1, 19.1
▪ Appendix B.1 2.1
◦ RFC5280 4.3.5, 19.1
▪ Section 4.2.1.6 4.3.5
◦ RFC5322 5.6.7, 5.6.7, 5.6.7, 6.6.1, 7.6.3, 10.1.2, 10.1.2, 19.1, A
▪ Section 3.3 5.6.7, 5.6.7
▪ Section 3.4 10.1.2, 10.1.2, A
▪ Section 3.6.1 6.6.1
▪ Section 3.6.7 7.6.3
◦ RFC5646 8.5.1, 8.5.1, 8.5.1, 19.1, A
▪ Section 2.1 8.5.1, A
◦ RFC5789 12.3, 14.5, 19.2
▪ Section 3.1 12.3
◦ RFC5905 5.6.7, 19.2
◦ RFC6125 4.3.4, 4.3.4, 19.1
▪ Section 6 4.3.4
▪ Section 6.2.1 4.3.4
◦ RFC6365 2.1, 8.3.2, 19.1
◦ RFC6454 4.3.1, 19.2
◦ RFC6585 17.5, 19.2
◦ RFC6648 §
◦ RFC6838 §
◦ RFC7230 1.2, 1.4, 1.4, 1.4, 19.2, "Acknowledgements"
◦ RFC7231 1.4, 15.4.6, 18.4, 19.2, "Acknowledgements"
▪ Appendix B 15.4.6, 18.4
◦ RFC7232 1.4, 19.2, "Acknowledgements"
◦ RFC7233 1.4, 19.2, "Acknowledgements"
◦ RFC7234 19.2, "Acknowledgements"
◦ RFC7235 1.2, 1.4, 19.2, "Acknowledgements"
◦ RFC7405 2.1, 19.1
◦ RFC7538 1.4, 15.4, 15.4.9, 19.2, B.3
▪ Section 4 15.4.9
◦ RFC7540 19.2, B.3
◦ RFC7578 8.3.3, 19.2
◦ RFC7595 §
◦ RFC7615 1.4, 19.2
◦ RFC7616 11.1, 11.6.3, 19.2
▪ Section 3.5 11.6.3
◦ RFC7617 11.1, 19.2
◦ RFC7694 1.4, 19.2, B.3, B.9
◦ RFC8126 16.1.1, 16.2.1, 16.3.1, 16.4.1, 16.5.1, 16.6.1, 16.7, 19.2
▪ Section 4.4 16.7
▪ Section 4.6 16.3.1
▪ Section 4.8 16.1.1, 16.2.1, 16.4.1, 16.5.1, 16.6.1
◦ RFC8174 2.2, 19.1
◦ RFC8187 5.5, 19.2
◦ RFC8246 13.2.1, 19.2
◦ RFC8288 15.4.1, 19.2
◦ RFC8336 4.3.3, 17.1, 19.2
◦ RFC8615 16.3, 19.2
◦ RFC8941 16.3.2.2, 16.3.2.2, 19.2
•S
◦ safe 9.2.1
◦ satisfiable range 14.1.1
◦ secured 4.2.2
◦ selected representation 3.2, 8.8, 13.1
◦ self-descriptive 6
◦ sender 3.4
◦ server 3.3
◦ Server header field 10.2.4, 17.12, 18.4
◦ singleton field 5.5
◦ Sniffing 8.3, 19.2
◦ spider 3.5
◦ Status Code 15
◦ Status Codes
▪ Final 15
▪ Informational 15
▪ Interim 15
◦ Status Codes Classes
▪ 1xx Informational 15.2
▪ 2xx Successful 15.3
▪ 3xx Redirection 7.8, 15.4, 16.3.2, B.3
▪ 4xx Client Error 15.5
▪ 5xx Server Error 15.6
•T
◦ target resource 7.1
◦ target URI 7.1
◦ TCP 4.2.1, 19.1
◦ TE header field 6.5.1, 7.6.1, 10.1.4, 18.4
◦ TLS13 3.7, 4.2.2, 9.3.6, 19.1
◦ TRACE method 7.6.2, 9.1, 9.2.1, 9.3.8, 18.2, B.3
◦ Trailer Fields 6.5
▪ ETag 8.8, 8.8.3, 18.4
◦ Trailer header field 6.5.2, 6.6.2, 18.4
◦ trailer section 6.5
◦ trailers 6.5
◦ transforming proxy 7.7
◦ transparent proxy 3.7
◦ tunnel 3.7
•U
◦ unsatisfiable range 14.1.1
◦ Upgrade header field 3.3, 7.6.1, 7.6.3, 7.8, 15.2.2, 15.5.22, 18.4
◦ upstream 3.7
◦ URI 4
▪ origin 4.3.1
◦ URI 3.1, 4, 4.1, 4.1, 4.1, 4.1, 4.1, 4.1, 4.1, 4.1, 4.1, 4.2.1, 4.2.1,
4.2.2, 4.2.2, 4.2.3, 4.2.3, 4.2.3, 4.2.3, 4.2.3, 4.2.3, 4.2.4, 4.2.5, 4.2.5,
4.3.5, 7.1, 8.7, 9.3.1, 10.1.3, 10.1.3, 10.2.2, 10.2.2, 11.2, 17, 19.1, A,
A, A, A, A, A, A, A, A, B.2
▪ Section 2.1 4.2.3
▪ Section 2.2 4.2.3
▪ Section 3.2 4.1, A
▪ Section 3.2.1 4.2.4
▪ Section 3.2.2 4.1, 4.2.1, 4.2.2, 4.3.5, A
▪ Section 3.2.3 4.1, 4.2.1, 4.2.2, A
▪ Section 3.3 4.1, 4.1, A, A
▪ Section 3.4 4.1, A
▪ Section 3.5 4.2.5, 7.1
▪ Section 4.1 4.1, A
▪ Section 4.2 4.1, 10.2.2, A
▪ Section 4.3 4.1, 4.2.5, A
▪ Section 5 8.7, 10.1.3, 10.2.2
▪ Section 6 4.2.3
▪ Section 6.2 4.2.3
▪ Section 6.2.3 4.2.3
▪ Section 7 17
◦ URI reference 4.1
◦ URI scheme
▪ http 4.2.1
▪ https 4.2.2
◦ USASCII 5.5, 19.1
◦ user agent 3.5
◦ User-Agent header field 10.1.5, 10.2.4, 17.12, 18.4
•V
◦ validator 8.8
▪ strong 8.8.1
▪ weak 8.8.1
◦ Vary header field 12.1, 12.5.5, 16.3.2, 18.4, 18.4, 18.4, B.3
◦ Via header field 6.2, 7.6.3, 9.3.8, 17.12, 18.4, B.2
•W
◦ WEBDAV 8.8, 13.1, 19.2, B.3
▪ Section 10.4 13.1
▪ Section 11.2 B.3
◦ Welch 8.4.1.1, 18.6, 19.1
◦ WWW-Authenticate header field 11.6.1, 11.7.1, 15.5.2, 18.4
•X
◦ x-compress (content coding) 8.4.1
◦ x-gzip (content coding) 8.4.1
Authors' Addresses
Roy T. Fielding (editor)
Adobe
345 Park Ave
San Jose, CA 95110
United States of America
Email: [email protected]
URI: https://roy.gbiv.com/