Источник / закреплённая редакция
HTTP Semantics
Источник пакета ietf.http_semantics · RFC 9110, STD 97
- work
- urn:ietf:clir:http-semantics#RFC9110
- номер
- RFC 9110, STD 97
- вид
- urn:ietf:clir:http-semantics#standards_track
RFC 9110 (R. Fielding, M. Nottingham, J. Reschke, eds.)
- edition
- urn:ietf:clir:http-semantics#RFC9110_EN
- язык
- en
- официальность
- official
- материализация
- PINNED_OFFICIAL_BYTES
- жизненный цикл
- adopted: 2022-06-01; in_force: [object Object]
Публикации
| URI | Тип | documentHash | Получено |
|---|---|---|---|
| https://www.rfc-editor.org/rfc/rfc9110.txt | text/plain; charset=utf-8 | sha256:21c1cdce6ab0e5509b04d84a28000836c7a087cf786efe6f04877ebfff47232a | 2026-08-30T11:00:00Z |
Фрагменты — 6
section/15_3_5 · section · на него ссылаются: 3
en · official · sha256:9f124b4caec8b45509726f50a299daf803c48e655f613e386a055b8fedf09501EN
15.3.5. 204 No Content
The 204 (No Content) status code indicates that the server has
successfully fulfilled the request and that there is no additional
content to send in the response content. Metadata in the response
header fields refer to the target resource and its selected
representation after the requested action was applied.
For example, if a 204 status code is received in response to a PUT
request and the response contains an ETag field, then the PUT was
successful and the ETag field value contains the entity tag for the
new representation of that target resource.
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.
A 204 response is terminated by the end of the header section; it
cannot contain content or trailers.
A 204 response is heuristically cacheable; i.e., unless otherwise
indicated by the method definition or explicit cache controls (see
Section 4.2.2 of [CACHING]).Ссылаются нормы: ContentIn204IsIllFormed, TrailersIn204AreIllFormed, assert-hc22c830ac2020f90e5412da8dacf93361e12d3da1cd3b30d3c5338a81331b9ab
section/15_5_2 · section · на него ссылаются: 11
en · official · sha256:da228584065a9cecb2961943d019472000d2ce8045009b76215c42719c274d22EN
15.5.2. 401 Unauthorized
The 401 (Unauthorized) status code indicates that the request has not
been applied because it lacks valid authentication credentials for
the target resource. The server generating a 401 response MUST send
a WWW-Authenticate header field (Section 11.6.1) containing at least
one challenge applicable to the target resource.
If the request included authentication credentials, then the 401
response indicates that authorization has been refused for those
credentials. The user agent MAY repeat the request with a new or
replaced Authorization header field (Section 11.6.2). If the 401
response contains the same challenge as the prior response, and the
user agent has already attempted authentication at least once, then
the user agent SHOULD present the enclosed representation to the
user, since it usually contains relevant diagnostic information.Ссылаются нормы: PresentingRepresentationConforms, RepeatingRequestExercisesTheOption, Status401WithChallengeConforms, Status401WithoutChallengeDeviates, WithholdingRepresentationDeviates, assert-h06f2e5f372e480f04e0a045d3ea60ff1f9413b041732e5bb5d3e64c960785699, assert-h29bf10f8b748b71501bc0128e5b58fde277e0bf0dd8eeba5e5f72f527cad3e61, assert-h739898f4d0f05da4a69a48255f3d7e2cc916064d62358ed5dbe914eb4c47e0fc, assert-h77454ce2eb48a9c5001b52362c24f8a4efe6cb4bb38297f06875e91ed616af5a, assert-h97eb85eb9cb4ef9a1d93c9948c248f9cc44c3e43b71dbef965d5da79d7b0d2a2, assert-he33e5234d58b19b2942963fd50002043a773fe4f5b1b31da48ee91af04aec7a0
section/15_5_6 · section · на него ссылаются: 4
en · official · sha256:b79c0e90e0e732c0f1aafe9416502f337a20b3be55a11603c8db17f957286ca5EN
15.5.6. 405 Method Not Allowed
The 405 (Method Not Allowed) status code indicates that the method
received in the request-line is known by the origin server but not
supported by the target resource. The origin server MUST generate an
Allow header field in a 405 response containing a list of the target
resource's currently supported methods.
A 405 response is heuristically cacheable; i.e., unless otherwise
indicated by the method definition or explicit cache controls (see
Section 4.2.2 of [CACHING]).Ссылаются нормы: Status405WithAllowConforms, Status405WithoutAllowDeviates, assert-h26b2b2d1730831a04c98497d534fe586f4a911498a9e358d7d9bb580752be697, assert-h90701c267e2cec5c4396982c5dfff6b199c94e817da3656506e715d905f1600c
section/2_2 · section · на него ссылаются: 2
en · official · sha256:1eb4bfa6223f2f3fec6dbe7fc692f8f443fd17ccb4250014dc786b380070d91cEN
2.2. Requirements Notation
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
This specification targets conformance criteria according to the role
of a participant in HTTP communication. Hence, requirements are
placed on senders, recipients, clients, servers, user agents,
intermediaries, origin servers, proxies, gateways, or caches,
depending on what behavior is being constrained by the requirement.
Additional requirements are placed on implementations, resource
owners, and protocol element registrations when they apply beyond the
scope of a single communication.
The verb "generate" is used instead of "send" where a requirement
applies only to implementations that create the protocol element,
rather than an implementation that forwards a received element
downstream.
An implementation is considered conformant if it complies with all of
the requirements associated with the roles it partakes in HTTP.
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).
Conformance to HTTP includes both conformance to the particular
messaging syntax of the protocol version in use and conformance to
the semantics of protocol elements sent. For example, a client that
claims conformance to HTTP/1.1 but fails to recognize the features
required of HTTP/1.1 recipients will fail to interoperate with
servers that adjust their responses in accordance with those claims.
Features that reflect user choices, such as content negotiation and
user-selected extensions, can impact application behavior beyond the
protocol stream; sending protocol elements that inaccurately reflect
a user's choices will confuse the user and inhibit choice.
When an implementation fails semantic conformance, recipients of that
implementation's messages will eventually develop workarounds to
adjust their behavior accordingly. A recipient MAY employ such
workarounds while remaining conformant to this protocol if the
workarounds are limited to the implementations at fault. For
example, servers often scan portions of the User-Agent field value,
and user agents often scan the Server field value, to adjust their
own behavior with respect to known bugs or poorly chosen defaults.Ссылаются нормы: acts_as, assert-h126c4976dcc4af9ab6edb6474808e9054ab20218066974c4007d96f996ef4c3f
section/5_3 · section · на него ссылаются: 11
en · official · sha256:570576c9dc9354a0d1a79baf586a65a7bd6cd7df09d64f8834ceafe2acfc6d41EN
5.3. Field Order
A recipient MAY combine multiple field lines within a field section
that have the same field name into one field line, without changing
the semantics of the message, by appending each subsequent field line
value to the initial field line value in order, separated by a comma
(",") and optional whitespace (OWS, defined in Section 5.6.3). For
consistency, use comma SP.
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).
| *Note:* In practice, the "Set-Cookie" header field ([COOKIE])
| often appears in a response message across multiple field lines
| and does not use the list syntax, violating the above
| requirements on multiple field lines with the same field name.
| Since it cannot be combined into a single field value,
| recipients ought to handle "Set-Cookie" as a special case while
| processing fields. (See Appendix A.2.3 of [Kri2001] for
| details.)
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 MUST NOT apply a request to the target resource until it
receives the entire request header section, since later header field
lines might include conditionals, authentication credentials, or
deliberately misleading duplicate header fields that could impact
request processing.Ссылаются нормы: ApplyingBeforeHeaderSectionDeviates, DuplicateFieldLinesDeviate, DuplicateLinesOfAListFieldConform, PreservingOrderConforms, ReorderingByProxyDeviates, assert-h4145f2c1a844d7eaba22fdbb5b2d3cf6ec0d94c150dbf6bf423e1308692458a8, assert-h442a957f2f1b0a5f1ae29ff7ae6943cbab47a57cb3fe6c446d669dc6568b0a79, assert-hb03a06bc3da6a780f12673ff40902b331d0c292d01d02478bef6b3f919e6860a, assert-hb795c4ca13206190f61350e492581eaf67f5144e5802df81454da89a4e84109e, assert-he55fc6bdfefd45222c893bde9be152d4ec80f316094661b53016e304d2dab8a6, assert-hf9e59c4fd4f2116d34cdefb7867345810aa4cd7850a03fc72c98c1ade6e11fb1
section/7_2 · section · на него ссылаются: 9
en · official · sha256:f78158199ba4fb48218d29719ed2cb566056545746f6279dc9bd36a359bccd39EN
7.2. Host and :authority
The "Host" header field in a request provides the host and port
information from the target URI, enabling the origin server to
distinguish among resources while servicing requests for multiple
host names.
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.
Host = uri-host [ ":" port ] ; Section 4
The target URI's authority information is critical for handling a
request. A user agent MUST generate a Host header field in a request
unless it sends that information as an ":authority" pseudo-header
field. A user agent that sends Host SHOULD send it as the first
field in the header section of a request.
For example, a GET request to the origin server for
<http://www.example.org/pub/WWW/> would begin with:
GET /pub/WWW/ HTTP/1.1
Host: www.example.org
Since the host and port information acts as an application-level
routing mechanism, it is a frequent target for malware seeking to
poison a shared cache or redirect a request to an unintended server.
An interception proxy is particularly vulnerable if it relies on the
host and port information for redirecting requests to internal
servers, or for use as a cache key in a shared cache, without first
verifying that the intercepted connection is targeting a valid IP
address for that host.Ссылаются нормы: HostNotSentFirstDeviates, HostSentFirstConforms, RequestWithAuthorityPseudoHeaderConforms, RequestWithHostConforms, RequestWithoutHostDeviates, assert-h41d7ea87cb1d046c2c8f1ae324041ca4275ed25245dd5e94cc086c2a4646c6ae, assert-hb3c0d05efbf415112dbef0d74686c4037e8be1675ac21ddd92d6caf9af1ab67c, assert-hea99d0173b0a66c9f65a8ed513c5af814244f815a680161c401834c1bfc4d86c, assert-hfb4b7430940d6d1a03962a78fc07f0b0cd9db54f1e9061a484a17727e900e26e
Хэш рядом с текстом — sha256 его точных байтов. Он и есть проверка того, что показанный текст совпадает с закреплённым в пакете: расхождение роняет статику оракула.