Источник / закреплённая редакция §194
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
- жизненный цикл §31
- 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:9f124b4caec8b45509726f50a299daf803c48e655f613e386a055b8fedf09501
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-20
section/15_5_2 · section · на него ссылаются: 11
en · official · sha256:da228584065a9cecb2961943d019472000d2ce8045009b76215c42719c274d22
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-12, assert-13, assert-14, assert-2, assert-3, assert-4
section/15_5_6 · section · на него ссылаются: 4
en · official · sha256:b79c0e90e0e732c0f1aafe9416502f337a20b3be55a11603c8db17f957286ca5
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-1, assert-11
section/2_2 · section · на него ссылаются: 2
en · official · sha256:1eb4bfa6223f2f3fec6dbe7fc692f8f443fd17ccb4250014dc786b380070d91c
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.
section/5_3 · section · на него ссылаются: 11
en · official · sha256:570576c9dc9354a0d1a79baf586a65a7bd6cd7df09d64f8834ceafe2acfc6d41
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-15, assert-16, assert-17, assert-5, assert-6, assert-7
section/7_2 · section · на него ссылаются: 9
en · official · sha256:f78158199ba4fb48218d29719ed2cb566056545746f6279dc9bd36a359bccd39
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-18, assert-19, assert-8, assert-9
Хэш рядом с текстом — sha256 его точных байтов (§194). Он и есть проверка того, что показанный текст совпадает с закреплённым в пакете: расхождение роняет статику оракула кодом LDC-E5201.