{"url": "https://httpwg.org/", "titulek": "IETF HTTP Working Group", "h1": "", "popis": "We maintain and develop the Hypertext Transfer Protocol - the core protocol of the World Wide Web", "klicova_slova": "", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:title": "IETF HTTP Working Group", "og:description": "We maintain and develop the Hypertext Transfer Protocol - the core protocol of the World Wide Web", "og:url": "https://httpwg.org/", "og:site_name": "IETF HTTP Working Group"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "📄 Specs and Tests"}, {"uroven": 2, "text": "👷‍♀️ Work In Progress"}, {"uroven": 2, "text": "👋 Participate"}], "markdown": "The [IETF](http://www.ietf.org/) **HTTP Working Group** maintains and develops the Hypertext Transfer Protocol - the core protocol of the **World Wide Web**.\n\n## 📄 Specs and Tests\n\nResources to help HTTP implementations, including:\n\n- Read [HTTP-related specifications](/specs/) the specs!\n- See our list of (unofficial) [tests for HTTP implementations](https://github.com/httpwg/wiki/wiki/HTTP-Testing-Resources)\n\n## 👷‍♀️ Work In Progress\n\nSee what's under development and what's coming, including:\n\n- [HTTP extensions under development](https://httpwg.org/http-extensions/)\n - ... also in the [IETF datatracker](https://datatracker.ietf.org/wg/httpbis/documents/)\n- Possible [Future Work](https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption)\n- The [HTTP Directorate](/admin/directorate/)\n\n## 👋 Participate\n\nWant to get involved? Join us!\n\n- Learn [how to contribute](https://httpwg.org/CONTRIBUTING.html) start here\n- See our [charter](http://datatracker.ietf.org/wg/httpbis/charter/)\n- Catch up on our [mailing list](https://lists.w3.org/Archives/Public/ietf-http-wg/)\n- Browse our [meeting materials](https://httpwg.org/wg-materials/)\n- See our [resources for document editors](https://httpwg.org/admin/editors/)", "znaku_textu": 1207, "slov": 113, "odkazu": 20, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:43", "sha256": "eec074a73b3fad3485370773e17dca1c3270f62bdb7923dd3d8be6cb24ebdaf5", "hloubka": 0, "zdroj_objevu": "seed", "ze_seznamu": true, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "http://www.ietf.org/", "https://github.com/httpwg/wiki/wiki/HTTP-Testing-Resources", "https://github.com/httpwg/http-extensions", "https://datatracker.ietf.org/wg/httpbis/documents/", "https://lists.w3.org/Archives/Public/ietf-http-wg/", "https://github.com/httpwg/wg-materials", "https://github.com/httpwg/httpwg.github.io/blob/main/"]} {"url": "https://httpwg.org/specs/", "titulek": "📄 HTTP Documentation", "h1": "📄 HTTP Documentation", "popis": "A convenient listing of relevant RFCs and registries, from the IETF HTTP Working Group", "klicova_slova": "", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "website", "og:title": "📄 HTTP Documentation", "og:description": "A convenient listing of relevant RFCs and registries, from the IETF HTTP Working Group", "og:url": "https://httpwg.org/specs/", "og:site_name": "IETF HTTP Working Group"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 1, "text": "📄 HTTP Documentation"}, {"uroven": 2, "text": "Core Specifications"}, {"uroven": 2, "text": "Extension Registries"}, {"uroven": 3, "text": "Methods"}, {"uroven": 3, "text": "Status Codes"}, {"uroven": 3, "text": "Caching Extensions"}, {"uroven": 3, "text": "Content-Related Extensions"}, {"uroven": 3, "text": "Connection and Intermediary Extensions"}], "markdown": "# 📄 HTTP Documentation\n\nHTTP is defined by these [IETF](https://ietf.org/) **RFCs** and [IANA](https://www.iana.org/) **registries**.\n\n## Core Specifications\n\nThe “core” semantics of the HTTP protocol are defined by:\n\n- RFC 9110: [HTTP Semantics](/specs/rfc9110.html)\n- RFC 9111: [HTTP Caching](/specs/rfc9111.html)\n\nThose semantics are expressed “on the wire” in three ways:\n\n- RFC 9112: [HTTP/1.1](/specs/rfc9112.html)\n- RFC 9113: [HTTP/2](/specs/rfc9113.html)\n- RFC 9114: [HTTP/3](/specs/rfc9114.html)\n\nLater versions of HTTP offer field compression:\n\n- RFC 7541: [HPACK Header Compression for HTTP/2](/specs/rfc7541.html)\n- RFC 9204: [QPACK Field Compression for HTTP/3](/specs/rfc9204.html)\n\nThese RFCs collectively obsolete all preceding RFCs defining HTTP, including **RFC 1945**, **RFC 2068**, **RFC 2616**, **RFC 2617**, **RFC 7230-5**, and **RFC 7540**.\n\nAlso relevant is the Structured Field Values specification, which is used in a growing number of headers and trailers:\n\n- RFC 9651: [Structured Field Values for HTTP](/specs/rfc9651.html) ( [test suite](https://github.com/httpwg/structured-field-tests) )\n\nProtocols built “on top” of HTTP should follow Best Current Practice, as documented here:\n\n- RFC 9205: [Building Protocols with HTTP](/specs/rfc9205.html)\n\n## Extension Registries\n\nThere are a large number of HTTP extensions, including methods, status codes and headers. It’s important to note that they are all “part of” HTTP, as long as they’re listed in the appropriate registries:\n\n- [HTTP Method Registry](http://www.iana.org/assignments/http-methods/) - *[more info](/specs/rfc9110.html#method.registry)*\n- [HTTP Status Code Registry](http://www.iana.org/assignments/http-status-codes/) - *[more info](/specs/rfc9110.html#status.code.registry)*\n- [HTTP Field Name Registry](https://www.iana.org/assignments/http-fields/) - *[more info](/specs/rfc9110.html#fields.registry)*\n- [HTTP/2 Parameters](http://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml) - *Frame types, settings, error codes*\n- [HTTP/3 Parameters](http://www.iana.org/assignments/http3-parameters/http3-parameters.xhtml) - *Frame types, settings, error codes*\n\nIndividual headers have their own registries that regulate permissible values, including:\n\n- [HTTP Authentication Scheme Registry](http://www.iana.org/assignments/http-authschemes/) - *[more info](/specs/rfc9110.html#auth.scheme.registry)*\n- [HTTP Cache Directive Registry](http://www.iana.org/assignments/http-cache-directives/) - *[more info](/specs/rfc9111.html#cache.directive.registry)*\n- [HTTP Parameters](http://www.iana.org/assignments/http-parameters/) - *Content-codings, transfer-codings, Forwarded, Prefer, and Range-related headers*\n\nThis is a **partial** list of HTTP-relevant specifications, here for convenience. For the complete\nlist of HTTP extensions, see the relevant registry.\n\n### Methods\n\n- RFC 5789: [PATCH Method](/specs/rfc5789.html)\n\n### Status Codes\n\n- RFC 6585: [Status Codes 428, 429, 431 and 511](/specs/rfc6585.html) (Precondition Required, Too Many Requests, Request Header Fields Too Large, Network Authentication Required)\n- RFC 7725: [Status Code 451](/specs/rfc7725.html) (Unavailable For Legal Reasons)\n- RFC 8297: [Status Code 103](/specs/rfc8297.html) (Early Hints)\n\n### Caching Extensions\n\n- RFC 5861: [Cache-Control: stale-while-revalidate and stale-if-error](/specs/rfc5861.html)\n- RFC 8246: [Cache-Control: immutable](/specs/rfc8246.html)\n- RFC 9211: [Cache-Status Header Field](/specs/rfc9211.html)\n- RFC 9213: [Targeted Cache Control Fields](/specs/rfc9213.html)\n- RFC 9875: [HTTP Cache Groups](/specs/rfc9875.html)\n\n### Content-Related Extensions\n\n- RFC 6265: [Cookies](/specs/rfc6265.html)\n- RFC 6266: [Content-Disposition](/specs/rfc6266.html)\n- RFC 7694: [Client Initiated Content-Encoding](/specs/rfc7694.html)\n- RFC 8144: [Prefer Header Field](/specs/rfc7240.html)\n- RFC 8288: [Web Linking](/specs/rfc8288.html)\n- RFC 8942: [HTTP Client Hints](/specs/rfc8942.html)\n- RFC 9842: [Compression Dictionary Transport](/specs/rfc9842.html)\n\n### Connection and Intermediary Extensions\n\n- RFC 7639: [ALPN Header Field](/specs/rfc7639.html)\n- RFC 7838: [Alternative Services](/specs/rfc7838.html)\n- RFC 8336: [ORIGIN HTTP/2 Frame](/specs/rfc8336.html)\n- RFC 8441: [Bootstrapping WebSockets with HTTP/2](/specs/rfc8441.html)\n- RFC 9209: [Proxy-Status Field](/specs/rfc9209.html)\n- RFC 9218: [Extensible Prioritization Scheme for HTTP](/specs/rfc9218.html)\n- RFC 9220: [Bootstrapping WebSockets with HTTP/3](/specs/rfc9220.html)\n- RFC 9298: [Proxying UDP in HTTP](https://www.rfc-editor.org/rfc/rfc9298)\n- RFC 9412: [Origin HTTP/3 Frame](/specs/rfc9412.html)\n- RFC 9440: [Client-Cert HTTP Header Field](/specs/rfc9440.html)\n- RFC 10036: [Incremental Forwarding of HTTP Messages](/specs/rfc10036.html)\n\n- RFC 7616: [HTTP Digest Access Authentication](/specs/rfc7616.html)\n- RFC 7617: [HTTP Basic Authentication](/specs/rfc7617.html)\n- RFC 8188: [Encrypted Content-Encoding](/specs/rfc8188.html)\n- RFC 8470: [Using Early Data in HTTP](/specs/rfc8470.html)\n- RFC 9421: [HTTP Message Signatures](/specs/rfc9421.html) ( [online demo](https://httpsig.org) )\n- RFC 9530: [Digest Fields](/specs/rfc9530.html)\n- RFC 9729: [HTTP Concealed Authentication](/specs/rfc9729.html)", "znaku_textu": 5120, "slov": 522, "odkazu": 72, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:44", "sha256": "9a48b61ba3532e6025dbaa1e030197ae69e0f4ef90a4bb5649ad423109f9fea6", "hloubka": 0, "zdroj_objevu": "seed", "ze_seznamu": true, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://ietf.org/", "https://www.iana.org/", "https://github.com/httpwg/structured-field-tests", "http://www.iana.org/assignments/http-methods/", "http://www.iana.org/assignments/http-status-codes/", "https://www.iana.org/assignments/http-fields/", "http://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml", "http://www.iana.org/assignments/http3-parameters/http3-parameters.xhtml", "http://www.iana.org/assignments/http-authschemes/", "http://www.iana.org/assignments/http-cache-directives/", "http://www.iana.org/assignments/http-parameters/", "https://www.rfc-editor.org/rfc/rfc9298", "https://httpsig.org/", "https://github.com/httpwg/httpwg.github.io/blob/main/specs/"]} {"url": "https://httpwg.org/specs/rfc10036.html", "titulek": "RFC 10036 - Incremental Forwarding of HTTP Messages", "h1": "Incremental Forwarding of HTTP Messages", "popis": "This document specifies the \"Incremental\" HTTP header field, which instructs HTTP intermediaries to forward the HTTP message incrementally.", "klicova_slova": "stream", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC10036", "og:description": "Incremental Forwarding of HTTP Messages", "og:url": "https://httpwg.org/specs/rfc10036.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. Conventions and Definitions"}, {"uroven": 2, "text": "4. Security Considerations"}, {"uroven": 3, "text": "4.1. Permanent Rejection"}, {"uroven": 3, "text": "4.2. Temporary Rejection"}, {"uroven": 3, "text": "4.3. Handling of Small Packets"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 2, "text": "6. References"}, {"uroven": 3, "text": "6.1. Normative References"}, {"uroven": 3, "text": "6.2. Informative References"}, {"uroven": 2, "text": "Acknowledgments"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document specifies the \"Incremental\" HTTP header field, which instructs HTTP intermediaries to forward the HTTP message incrementally.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc10036](https://www.rfc-editor.org/info/rfc10036).\n\n## Copyright Notice\n\nCopyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n- 2. Conventions and Definitions\n- 3. The Incremental Header Field\n- 4. Security Considerations\n - 4.1. Permanent Rejection\n - 4.2. Temporary Rejection\n - 4.3. Handling of Small Packets\n- 5. IANA Considerations\n- 6. References\n - 6.1. Normative References\n - 6.2. Informative References\n- Acknowledgments\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nHTTP [HTTP] permits receivers to begin processing portions of HTTP messages as they arrive, rather than requiring them to wait for the entire HTTP message to be received before acting.\n\nSome applications are specifically designed to take advantage of this capability.\n\nFor example, Server-Sent Events [SSE] uses a long-running HTTP response, where the server continually sends notifications as they become available.\n\nIn the case of Chunked Oblivious HTTP Messages [CHUNKED-OHTTP], the client opens an HTTP request and incrementally sends application data, while the server can start responding even before the HTTP request is fully complete. In this way, the HTTP request-response pair could create what is, in effect, a bidirectional communication channel.\n\nApplications that rely on incremental delivery of data are fragile when HTTP intermediaries are involved. This is because HTTP intermediaries are not only permitted but are frequently deployed to buffer complete HTTP messages before forwarding them downstream ([Section 7.6](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.6) of [HTTP]).\n\nIf such a buffering HTTP intermediary exists between the client and the server, these applications may fail to function as intended.\n\nIn the case of Server-Sent Events, an intermediary that tries to buffer the HTTP response completely before forwarding it could be left waiting indefinitely. A client might never receive any portion of the response.\n\nIn the case of requests that involve any bidirectional exchange, an intermediary that tries to buffer entire messages -- either request or response -- prevents any data from being delivered.\n\nTo help avoid such behavior, this document specifies the \"Incremental\" HTTP header field, which requests that HTTP intermediaries begin forwarding the HTTP message downstream before receiving the complete message.\n\nThis indication might not be supported by intermediaries. Intermediaries that are unaware of this field will not change their behavior. Intermediaries that support the field might choose instead to reject a request; see Section 4.\n\n---\n\n## 2. Conventions and Definitions\n\nThe 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.\n\nThis document relies on structured field definitions of Item and Boolean [STRUCTURED-FIELDS].\n\n---\n\n---\n\n## 4. Security Considerations\n\nWhen receiving a request or response that asks for incremental forwarding, intermediaries might reject the HTTP request due to security concerns. The following subsections explore typical scenarios under which the intermediaries might reject requests.\n\nNote that rejecting requests based on the value of the Incremental field only occurs when an intermediary understands the field.\n\n### 4.1. Permanent Rejection\n\nSome intermediaries inspect the content of HTTP messages and forward them only if their content is deemed safe. Any feature that depends on seeing the entirety of the message in this way is incompatible with incremental delivery.\n\nWhen an intermediary is asked to incrementally forward a message and cannot -- whether that message is a request or a response -- due to security concerns about the message content, the intermediary *SHOULD* respond with a 501 (Not Implemented) error with an incremental_refused Proxy-Status response header field (Section 5).\n\n### 4.2. Temporary Rejection\n\nTo conserve resources required to handle HTTP requests or connections, it is common for intermediaries to impose limits on the maximum number of concurrent HTTP requests that they forward, while buffering requests that exceed this limit.\n\nSuch intermediaries could apply a more restrictive concurrency limit to requests marked as incremental to ensure that capacity remains available for non-incremental requests, even when the maximum number of incremental requests is reached. This approach helps balance the processing of different types of requests and maintains service availability across all requests.\n\nWhen rejecting incremental requests due to reaching the concurrency limit, intermediaries *SHOULD* respond with a 429 (Too Many Requests) error ([Section 4](https://www.rfc-editor.org/rfc/rfc6585.html#section-4) of [EXTRA-STATUS]), accompanied by a connection_limit_reached Proxy-Status response header field ([Section 2.3.12](https://www.rfc-editor.org/rfc/rfc9209.html#section-2.3.12) of [PROXY-STATUS]).\n\n### 4.3. Handling of Small Packets\n\nFor performance and efficiency reasons, a small amount of buffering might be used by intermediaries, even for incremental messages. Immediate forwarding might be exploited to cause an intermediary to waste effort on many small packets. Enabling incremental delivery might instead set limits on the number of bytes that are buffered or the length of time that buffers are held before forwarding. Any buffering could adversely affect application latency, even if it improves efficiency. In all cases, intermediaries cannot hold data in buffers indefinitely, so data needs to be forwarded when either the time limit or the byte limit is reached.\n\n---\n\n## 5. IANA Considerations\n\nAn HTTP field named Incremental has been registered in the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" following the procedures in [Section 18.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-18.4) of [HTTP]. The following values are registered:\n\nField Name:\n\nIncremental\n\nStatus:\n\npermanent\n\nStructured Type:\n\nItem\n\nReference:\n\nThis document\n\nComments:\n\nNone\n\nAn HTTP Proxy Error Type has been registered in the \"HTTP Proxy Error Types\" registry as shown below:\n\nName:\n\nincremental_refused\n\nDescription:\n\nThe HTTP message contained the Incremental HTTP header field, but the intermediary refused to forward the message incrementally.\n\nExtra Parameters:\n\nnone\n\nRecommended HTTP Status Code:\n\n501\n\nResponse Only Generated By Intermediaries:\n\ntrue\n\nReference:\n\nThis document\n\n## 6. References\n\n### 6.1. Normative References\n\n[EXTRA-STATUS]\n\nNottingham, M. and R. Fielding, “[Additional HTTP Status Codes](https://www.rfc-editor.org/rfc/rfc6585.html)”, RFC 6585, [DOI 10.17487/RFC6585](https://dx.doi.org/10.17487/RFC6585), April 2012, <[https://www.rfc-editor.org/info/rfc6585](https://www.rfc-editor.org/info/rfc6585)>.\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[PROXY-STATUS]\n\nNottingham, M. and P. Sikora, “[The Proxy-Status HTTP Response Header Field](https://www.rfc-editor.org/rfc/rfc9209.html)”, RFC 9209, [DOI 10.17487/RFC9209](https://dx.doi.org/10.17487/RFC9209), June 2022, <[https://www.rfc-editor.org/info/rfc9209](https://www.rfc-editor.org/info/rfc9209)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc9651.html)”, RFC 9651, [DOI 10.17487/RFC9651](https://dx.doi.org/10.17487/RFC9651), September 2024, <[https://www.rfc-editor.org/info/rfc9651](https://www.rfc-editor.org/info/rfc9651)>.\n\n### 6.2. Informative References\n\n[CHUNKED-OHTTP]\n\nPauly, T. and M. Thomson, “[Chunked Oblivious HTTP Messages](https://datatracker.ietf.org/doc/html/draft-ietf-ohai-chunked-ohttp-08)”, [Work in Progress](https://datatracker.ietf.org/doc/draft-ietf-ohai-chunked-ohttp), draft-ietf-ohai-chunked-ohttp-08, Work in Progress, February 2026, <[https://datatracker.ietf.org/doc/html/draft-ietf-ohai-chunked-ohttp-08](https://datatracker.ietf.org/doc/html/draft-ietf-ohai-chunked-ohttp-08)>.\n\n[RFC8441]\n\nMcManus, P., “[Bootstrapping WebSockets with HTTP/2](https://www.rfc-editor.org/rfc/rfc8441.html)”, RFC 8441, [DOI 10.17487/RFC8441](https://dx.doi.org/10.17487/RFC8441), September 2018, <[https://www.rfc-editor.org/info/rfc8441](https://www.rfc-editor.org/info/rfc8441)>.\n\n[RFC9220]\n\nHamilton, R., “[Bootstrapping WebSockets with HTTP/3](https://www.rfc-editor.org/rfc/rfc9220.html)”, RFC 9220, [DOI 10.17487/RFC9220](https://dx.doi.org/10.17487/RFC9220), June 2022, <[https://www.rfc-editor.org/info/rfc9220](https://www.rfc-editor.org/info/rfc9220)>.\n\n[SSE]\n\nWHATWG, “[HTML - Server-Sent Events](https://html.spec.whatwg.org/multipage/server-sent-events.html)”, WHATWG Living Standard, <[https://html.spec.whatwg.org/multipage/server-sent-events.html](https://html.spec.whatwg.org/multipage/server-sent-events.html)>.\nCommit snapshot: <[https://html.spec.whatwg.org/commit-snapshots/6f84b26bd6eb8bd0e0e8df9819e43e901867166b/](https://html.spec.whatwg.org/commit-snapshots/6f84b26bd6eb8bd0e0e8df9819e43e901867166b/)>\n\n---\n\n## Acknowledgments\n\nThe authors would like to thank many members of the IETF HTTP Working Group for their discussions and feedback on this specification. In particular, the authors would like to thank Mark Thomas, Piotr Sikora, Thibault Meunier, Marius Kleidl, Ben Schwartz, Willy Tarreau, Will Hawkins, Mark Nottingham, and Lucas Pardue for close review and suggested changes.\n\n---\n\n## Authors' Addresses\n\n**Kazuho Oku**\nFastly\nEMail: [kazuhooku@gmail.com](mailto:kazuhooku@gmail.com)\n\n*Additional contact information:*\n**奥 一穂**\nFastly\nEMail: [kazuhooku@gmail.com](mailto:kazuhooku@gmail.com)\n\n**Tommy Pauly**\nApple\nEMail: [tpauly@apple.com](mailto:tpauly@apple.com)\n\n**Martin Thomson**\nMozilla\nEMail: [mt@lowentropy.net](mailto:mt@lowentropy.net)", "znaku_textu": 12085, "slov": 1477, "odkazu": 91, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:21", "sha256": "84fbb5f8312b6d41d8b7efb41c4ffe5e3e750aec22b5ffb6c99639274ecc953a", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc10036", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc9651.html", "https://www.rfc-editor.org/rfc/rfc6585.html", "https://www.rfc-editor.org/rfc/rfc9209.html", "https://dx.doi.org/10.17487/RFC6585", "https://www.rfc-editor.org/info/rfc6585", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://dx.doi.org/10.17487/RFC9209", "https://www.rfc-editor.org/info/rfc9209", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC9651", "https://www.rfc-editor.org/info/rfc9651", "https://datatracker.ietf.org/doc/html/draft-ietf-ohai-chunked-ohttp-08", "https://datatracker.ietf.org/doc/draft-ietf-ohai-chunked-ohttp", "https://www.rfc-editor.org/rfc/rfc8441.html", "https://dx.doi.org/10.17487/RFC8441", "https://www.rfc-editor.org/info/rfc8441", "https://www.rfc-editor.org/rfc/rfc9220.html", "https://dx.doi.org/10.17487/RFC9220", "https://www.rfc-editor.org/info/rfc9220", "https://html.spec.whatwg.org/multipage/server-sent-events.html", "https://html.spec.whatwg.org/commit-snapshots/6f84b26bd6eb8bd0e0e8df9819e43e901867166b/"]} {"url": "https://httpwg.org/specs/rfc5789.html", "titulek": "RFC 5789 - PATCH Method for HTTP", "h1": "PATCH Method for HTTP", "popis": "Several applications extending the Hypertext Transfer Protocol (HTTP) require a feature to do partial resource modification. The existing HTTP PUT method only allows a complete replacement of a document. This proposal adds a new HTTP method, PATCH, to modify an existing HTTP resource.", "klicova_slova": "http, patch", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC5789", "og:description": "PATCH Method for HTTP", "og:url": "https://httpwg.org/specs/rfc5789.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. The PATCH Method"}, {"uroven": 3, "text": "2.1. A Simple PATCH Example"}, {"uroven": 3, "text": "2.2. Error Handling"}, {"uroven": 2, "text": "3. Advertising Support in OPTIONS"}, {"uroven": 3, "text": "3.1. The Accept-Patch Header"}, {"uroven": 3, "text": "3.2. Example OPTIONS Request and Response"}, {"uroven": 2, "text": "4. IANA Considerations"}, {"uroven": 2, "text": "5. Security Considerations"}, {"uroven": 2, "text": "6. References"}, {"uroven": 3, "text": "6.1. Normative References"}, {"uroven": 3, "text": "6.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Acknowledgements"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nSeveral applications extending the Hypertext Transfer Protocol (HTTP) require a feature to do partial resource modification. The existing HTTP PUT method only allows a complete replacement of a document. This proposal adds a new HTTP method, PATCH, to modify an existing HTTP resource.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc5789](http://www.rfc-editor.org/info/rfc5789).\n\n## Copyright Notice\n\nCopyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n- 2. The PATCH Method\n - 2.1. A Simple PATCH Example\n - 2.2. Error Handling\n- 3. Advertising Support in OPTIONS\n - 3.1. The Accept-Patch Header\n - 3.2. Example OPTIONS Request and Response\n- 4. IANA Considerations\n - 4.1. The Accept-Patch Response Header\n- 5. Security Considerations\n- 6. References\n - 6.1. Normative References\n - 6.2. Informative References\n- Appendix A. Acknowledgements\n- Authors' Addresses\n\n## 1. Introduction\n\nThis specification defines the new HTTP/1.1 [RFC2616] method, PATCH, which is used to apply partial modifications to a resource.\n\nA new method is necessary to improve interoperability and prevent errors. The PUT method is already defined to overwrite a resource with a complete new body, and cannot be reused to do partial changes. Otherwise, proxies and caches, and even clients and servers, may get confused as to the result of the operation. POST is already used but without broad interoperability (for one, there is no standard way to discover patch format support). PATCH was mentioned in earlier HTTP specifications, but not completely defined.\n\nIn this document, the key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" are to be interpreted as described in [RFC2119].\n\nFurthermore, this document uses the ABNF syntax defined in Section 2.1 of [RFC2616].\n\n## 2. The PATCH Method\n\nThe PATCH method requests that a set of changes described in the request entity be applied to the resource identified by the Request-URI. The set of changes is represented in a format called a \"patch document\" identified by a media type. If the Request-URI does not point to an existing resource, the server MAY create a new resource, depending on the patch document type (whether it can logically modify a null resource) and permissions, etc.\n\nThe difference between the PUT and PATCH requests is reflected in the way the server processes the enclosed entity to modify the resource identified by the Request-URI. In a PUT request, the enclosed entity is considered to be a modified version of the resource stored on the origin server, and the client is requesting that the stored version be replaced. With PATCH, however, the enclosed entity contains a set of instructions describing how a resource currently residing on the origin server should be modified to produce a new version. The PATCH method affects the resource identified by the Request-URI, and it also MAY have side effects on other resources; i.e., new resources may be created, or existing ones modified, by the application of a PATCH.\n\nPATCH is neither safe nor idempotent as defined by [RFC2616], Section 9.1.\n\nA PATCH request can be issued in such a way as to be idempotent, which also helps prevent bad outcomes from collisions between two PATCH requests on the same resource in a similar time frame. Collisions from multiple PATCH requests may be more dangerous than PUT collisions because some patch formats need to operate from a known base-point or else they will corrupt the resource. Clients using this kind of patch application SHOULD use a conditional request such that the request will fail if the resource has been updated since the client last accessed the resource. For example, the client can use a strong ETag [RFC2616] in an If-Match header on the PATCH request.\n\nThere are also cases where patch formats do not need to operate from a known base-point (e.g., appending text lines to log files, or non-colliding rows to database tables), in which case the same care in client requests is not needed.\n\nThe server MUST apply the entire set of changes atomically and never provide (e.g., in response to a GET during this operation) a partially modified representation. If the entire patch document cannot be successfully applied, then the server MUST NOT apply any of the changes. The determination of what constitutes a successful PATCH can vary depending on the patch document and the type of resource(s) being modified. For example, the common 'diff' utility can generate a patch document that applies to multiple files in a directory hierarchy. The atomicity requirement holds for all directly affected files. See \"Error Handling\", Section 2.2, for details on status codes and possible error conditions.\n\nIf the request passes through a cache and the Request-URI identifies one or more currently cached entities, those entries SHOULD be treated as stale. A response to this method is only cacheable if it contains explicit freshness information (such as an Expires header or \"Cache-Control: max-age\" directive) as well as the Content-Location header matching the Request-URI, indicating that the PATCH response body is a resource representation. A cached PATCH response can only be used to respond to subsequent GET and HEAD requests; it MUST NOT be used to respond to other methods (in particular, PATCH).\n\nNote that entity-headers contained in the request apply only to the contained patch document and MUST NOT be applied to the resource being modified. Thus, a Content-Language header could be present on the request, but it would only mean (for whatever that's worth) that the patch document had a language. Servers SHOULD NOT store such headers except as trace information, and SHOULD NOT use such header values the same way they might be used on PUT requests. Therefore, this document does not specify a way to modify a document's Content-Type or Content-Language value through headers, though a mechanism could well be designed to achieve this goal through a patch document.\n\nThere is no guarantee that a resource can be modified with PATCH. Further, it is expected that different patch document formats will be appropriate for different types of resources and that no single format will be appropriate for all types of resources. Therefore, there is no single default patch document format that implementations are required to support. Servers MUST ensure that a received patch document is appropriate for the type of resource identified by the Request-URI.\n\nClients need to choose when to use PATCH rather than PUT. For example, if the patch document size is larger than the size of the new resource data that would be used in a PUT, then it might make sense to use PUT instead of PATCH. A comparison to POST is even more difficult, because POST is used in widely varying ways and can encompass PUT and PATCH-like operations if the server chooses. If the operation does not modify the resource identified by the Request-URI in a predictable way, POST should be considered instead of PATCH or PUT.\n\n### 2.1. A Simple PATCH Example\n\n```\nPATCH /file.txt HTTP/1.1\nHost: www.example.com\nContent-Type: application/example\nIf-Match: \"e0023aa4e\"\nContent-Length: 100\n\n[description of changes]\n```\n\nThis example illustrates use of a hypothetical patch document on an existing resource.\n\nSuccessful PATCH response to existing text file:\n\n```\nHTTP/1.1 204 No Content\nContent-Location: /file.txt\nETag: \"e0023aa4f\"\n```\n\nThe 204 response code is used because the response does not carry a message body (which a response with the 200 code would have). Note that other success codes could be used as well.\n\nFurthermore, the ETag response header field contains the ETag for the entity created by applying the PATCH, available at http://www.example.com/file.txt, as indicated by the Content-Location response header field.\n\n### 2.2. Error Handling\n\nThere are several known conditions under which a PATCH request can fail.\n\nMalformed patch document:\n\nWhen the server determines that the patch document provided by the client is not properly formatted, it SHOULD return a 400 (Bad Request) response. The definition of badly formatted depends on the patch document chosen.\n\nUnsupported patch document:\n\nCan be specified using a 415 (Unsupported Media Type) response when the client sends a patch document format that the server does not support for the resource identified by the Request-URI. Such a response SHOULD include an Accept-Patch response header as described in Section 3.1 to notify the client what patch document media types are supported.\n\nUnprocessable request:\n\nCan be specified with a 422 (Unprocessable Entity) response ([RFC4918], Section 11.2) when the server understands the patch document and the syntax of the patch document appears to be valid, but the server is incapable of processing the request. This might include attempts to modify a resource in a way that would cause the resource to become invalid; for instance, a modification to a well-formed XML document that would cause it to no longer be well-formed. There may also be more specific errors like \"Conflicting State\" that could be signaled with this status code, but the more specific error would generally be more helpful.\n\nResource not found:\n\nCan be specified with a 404 (Not Found) status code when the client attempted to apply a patch document to a non-existent resource, but the patch document chosen cannot be applied to a non-existent resource.\n\nConflicting state:\n\nCan be specified with a 409 (Conflict) status code when the request cannot be applied given the state of the resource. For example, if the client attempted to apply a structural modification and the structures assumed to exist did not exist (with XML, a patch might specify changing element 'foo' to element 'bar' but element 'foo' might not exist).\n\nConflicting modification:\n\nWhen a client uses either the If-Match or If-Unmodified-Since header to define a precondition, and that precondition failed, then the 412 (Precondition Failed) error is most helpful to the client. However, that response makes no sense if there was no precondition on the request. In cases when the server detects a possible conflicting modification and no precondition was defined in the request, the server can return a 409 (Conflict) response.\n\nConcurrent modification:\n\nSome applications of PATCH might require the server to process requests in the order in which they are received. If a server is operating under those restrictions, and it receives concurrent requests to modify the same resource, but is unable to queue those requests, the server can usefully indicate this error by using a 409 (Conflict) response.\n\nNote that the 409 Conflict response gives reasonably consistent information to clients. Depending on the application and the nature of the patch format, the client might be able to reissue the request as is (e.g., an instruction to append a line to a log file), have to retrieve the resource content to recalculate a patch, or have to fail the operation.\n\nOther HTTP status codes can also be used under the appropriate circumstances.\n\nThe entity body of error responses SHOULD contain enough information to communicate the nature of the error to the client. The content-type of the response entity can vary across implementations.\n\n## 3. Advertising Support in OPTIONS\n\nA server can advertise its support for the PATCH method by adding it to the listing of allowed methods in the \"Allow\" OPTIONS response header defined in HTTP/1.1. The PATCH method MAY appear in the \"Allow\" header even if the Accept-Patch header is absent, in which case the list of allowed patch documents is not advertised.\n\n### 3.1. The Accept-Patch Header\n\nThis specification introduces a new response header Accept-Patch used to specify the patch document formats accepted by the server. Accept-Patch SHOULD appear in the OPTIONS response for any resource that supports the use of the PATCH method. The presence of the Accept-Patch header in response to any method is an implicit indication that PATCH is allowed on the resource identified by the Request-URI. The presence of a specific patch document format in this header indicates that that specific format is allowed on the resource identified by the Request-URI.\n\n```\nAccept-Patch = \"Accept-Patch\" \":\" 1#media-type \n```\n\nThe Accept-Patch header specifies a comma-separated listing of media-types (with optional parameters) as defined by [RFC2616], Section 3.7.\n\nExample:\n\nAccept-Patch: text/example;charset=utf-8\n\n### 3.2. Example OPTIONS Request and Response\n\n[request]\n\n```\nOPTIONS /example/buddies.xml HTTP/1.1\nHost: www.example.com\n```\n\n[response]\n\n```\nHTTP/1.1 200 OK\nAllow: GET, PUT, POST, OPTIONS, HEAD, DELETE, PATCH\nAccept-Patch: application/example, text/example\n```\n\nThe examples show a server that supports PATCH generally using two hypothetical patch document formats.\n\n## 4. IANA Considerations\n\n## 5. Security Considerations\n\nThe security considerations for PATCH are nearly identical to the security considerations for PUT ([RFC2616], Section 9.6). These include authorizing requests (possibly through access control and/or authentication) and ensuring that data is not corrupted through transport errors or through accidental overwrites. Whatever mechanisms are used for PUT can be used for PATCH as well. The following considerations apply especially to PATCH.\n\nA document that is patched might be more likely to be corrupted than a document that is overridden in entirety, but that concern can be addressed through the use of mechanisms such as conditional requests using ETags and the If-Match request header as described in Section 2. If a PATCH request fails, the client can issue a GET request to the resource to see what state it is in. In some cases, the client might be able to check the contents of the resource to see if the PATCH request can be resent, but in other cases, the attempt will just fail and/or a user will have to verify intent. In the case of a failure of the underlying transport channel, where a PATCH response is not received before the channel fails or some other timeout happens, the client might have to issue a GET request to see whether the request was applied. The client might want to ensure that the GET request bypasses caches using mechanisms described in HTTP specifications (see, for example, Section 13.1.6 of [RFC2616]).\n\nSometimes an HTTP intermediary might try to detect viruses being sent via HTTP by checking the body of the PUT/POST request or GET response. The PATCH method complicates such watch-keeping because neither the source document nor the patch document might be a virus, yet the result could be. This security consideration is not materially different from those already introduced by byte-range downloads, downloading patch documents, uploading zipped (compressed) files, and so on.\n\nIndividual patch documents will have their own specific security considerations that will likely vary depending on the types of resources being patched. The considerations for patched binary resources, for instance, will be different than those for patched XML documents. Servers MUST take adequate precautions to ensure that malicious clients cannot consume excessive server resources (e.g., CPU, disk I/O) through the client's use of PATCH.\n\n## 6. References\n\n### 6.1. Normative References\n\n[RFC2119]\n\n[Bradner, S.](mailto:sob@harvard.edu), “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC2616]\n\n[Fielding, R.](mailto:fielding@ics.uci.edu), [Gettys, J.](mailto:jg@w3.org), [Mogul, J.](mailto:mogul@wrl.dec.com), [Frystyk, H.](mailto:frystyk@w3.org), [Masinter, L.](mailto:masinter@parc.xerox.com), [Leach, P.](mailto:paulle@microsoft.com), and [T. Berners-Lee](mailto:timbl@w3.org), “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n[RFC3864]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004.\n\n### 6.2. Informative References\n\n[RFC4918]\n\nDusseault, L., “[HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)](https://www.rfc-editor.org/rfc/rfc4918.html)”, RFC 4918, June 2007.\n\n## Appendix A. Acknowledgements\n\nPATCH is not a new concept, it first appeared in HTTP in drafts of version 1.1 written by Roy Fielding and Henrik Frystyk and also appears in Section 19.6.1.1 of RFC 2068.\n\nThanks to Adam Roach, Chris Sharp, Julian Reschke, Geoff Clemm, Scott Lawrence, Jeffrey Mogul, Roy Fielding, Greg Stein, Jim Luther, Alex Rousskov, Jamie Lokier, Joe Hildebrand, Mark Nottingham, Michael Balloni, Cyrus Daboo, Brian Carpenter, John Klensin, Eliot Lear, SM, and Bernie Hoeneisen for review and advice on this document. In particular, Julian Reschke did repeated reviews, made many useful suggestions, and was critical to the publication of this document.\n\n## Authors' Addresses\n\n**Lisa Dusseault**\nLinden Lab\n945 Battery Street\nSan Francisco, CA 94111\nUSA\nEmail: [lisa.dusseault@gmail.com](mailto:lisa.dusseault@gmail.com)\n\n**James M. Snell**\nEmail: [jasnell@gmail.com](mailto:jasnell@gmail.com)\nURI: [http://www.snellspace.com](http://www.snellspace.com)", "znaku_textu": 18448, "slov": 2831, "odkazu": 68, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:55", "sha256": "82b7967f2166b5cc48b6c341a6fe7a1955166a5f2babecdd0880bd23265b0f20", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc5789", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/rfc/rfc2616.html", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://www.rfc-editor.org/rfc/rfc4918.html", "http://www.snellspace.com/"]} {"url": "https://httpwg.org/specs/rfc5861.html", "titulek": "RFC 5861 - HTTP Cache-Control Extensions for Stale Content", "h1": "HTTP Cache-Control Extensions for Stale Content", "popis": "This document defines two independent HTTP Cache-Control extensions that allow control over the use of stale responses by caches.", "klicova_slova": "", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC5861", "og:description": "HTTP Cache-Control Extensions for Stale Content", "og:url": "https://httpwg.org/specs/rfc5861.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of this Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. Notational Conventions"}, {"uroven": 2, "text": "3. The stale-while-revalidate Cache-Control Extension"}, {"uroven": 3, "text": "3.1. Example"}, {"uroven": 2, "text": "4. The stale-if-error Cache-Control Extension"}, {"uroven": 3, "text": "4.1. Example"}, {"uroven": 2, "text": "5. Security Considerations"}, {"uroven": 2, "text": "6. IANA Considerations"}, {"uroven": 2, "text": "7. Normative References"}, {"uroven": 2, "text": "Appendix A. Acknowledgements"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThis document defines two independent HTTP Cache-Control extensions that allow control over the use of stale responses by caches.\n\n## Status of this Memo\n\nThis document is not an Internet Standards Track specification; it is published for informational purposes.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc5861](http://www.rfc-editor.org/info/rfc5861).\n\n## Copyright Notice\n\nCopyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n- 2. Notational Conventions\n- 3. The stale-while-revalidate Cache-Control Extension\n - 3.1. Example\n- 4. The stale-if-error Cache-Control Extension\n - 4.1. Example\n- 5. Security Considerations\n- 6. IANA Considerations\n- 7. Normative References\n- Appendix A. Acknowledgements\n- Author's Address\n\n## 1. Introduction\n\nHTTP [RFC2616] requires that caches \"respond to a request with the most up-to-date response held... that is appropriate to the request,\" although \"in carefully controlled circumstances\" a stale response is allowed to be returned. This document defines two independent Cache-Control extensions that allow for such control, stale-if-error and stale-while-revalidate.\n\nThe stale-if-error HTTP Cache-Control extension allows a cache to return a stale response when an error -- e.g., a 500 Internal Server Error, a network segment, or DNS failure -- is encountered, rather than returning a \"hard\" error. This improves availability.\n\nThe stale-while-revalidate HTTP Cache-Control extension allows a cache to immediately return a stale response while it revalidates it in the background, thereby hiding latency (both in the network and on the server) from clients.\n\n## 2. Notational Conventions\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in RFC 2119 [RFC2119].\n\nThis specification uses the augmented Backus-Naur Form of RFC2616 [RFC2616], and includes the delta-seconds rule from that specification.\n\n## 3. The stale-while-revalidate Cache-Control Extension\n\nWhen present in an HTTP response, the stale-while-revalidate Cache-Control extension indicates that caches MAY serve the response it appears in after it becomes stale, up to the indicated number of seconds.\n\n```\n stale-while-revalidate = \"stale-while-revalidate\" \"=\" delta-seconds\n```\n\nIf a cached response is served stale due to the presence of this extension, the cache SHOULD attempt to revalidate it while still serving stale responses (i.e., without blocking).\n\nNote that \"stale\" implies that the response will have a non-zero Age header and a warning header, as per HTTP's requirements.\n\nIf delta-seconds passes without the cached entity being revalidated, it SHOULD NOT continue to be served stale, absent other information.\n\n### 3.1. Example\n\nA response containing:\n\n```\n Cache-Control: max-age=600, stale-while-revalidate=30\n```\n\nindicates that it is fresh for 600 seconds, and it may continue to be served stale for up to an additional 30 seconds while an asynchronous validation is attempted. If validation is inconclusive, or if there is not traffic that triggers it, after 30 seconds the stale-while-revalidate function will cease to operate, and the cached response will be \"truly\" stale (i.e., the next request will block and be handled normally).\n\nGenerally, servers will want to set the combination of max-age and stale-while-revalidate to the longest total potential freshness lifetime that they can tolerate. For example, with both set to 600, the server must be able to tolerate the response being served from cache for up to 20 minutes.\n\nSince asynchronous validation will only happen if a request occurs after the response has become stale, but before the end of the stale-while-revalidate window, the size of that window and the likelihood of a request during it determines how likely it is that all requests will be served without delay. if the window is too small, or traffic too sparse, some requests will fall outside of it, and block until the server can validate the cached response.\n\n## 4. The stale-if-error Cache-Control Extension\n\nThe stale-if-error Cache-Control extension indicates that when an error is encountered, a cached stale response MAY be used to satisfy the request, regardless of other freshness information.\n\n```\n stale-if-error = \"stale-if-error\" \"=\" delta-seconds\n```\n\nWhen used as a request Cache-Control extension, its scope of application is the request it appears in; when used as a response Cache-Control extension, its scope is any request applicable to the cached response it occurs in.\n\nIts value indicates the upper limit to staleness; when the cached response is more stale than the indicated amount, the cached response SHOULD NOT be used to satisfy the request, absent other information.\n\nIn this context, an error is any situation which would result in a 500, 502, 503 or 504 HTTP response status code being returned.\n\nNote that this directive does not affect freshness; stale cached responses that are used SHOULD still be visibly stale when sent (i.e., have a non-zero Age header and a warning header, as per HTTP's requirements.).\n\n### 4.1. Example\n\nA response containing:\n\n```\n HTTP/1.1 200 OK\n Cache-Control: max-age=600, stale-if-error=1200\n Content-Type: text/plain\n \n success\n```\n\nindicates that it is fresh for 600 seconds, and that it may be used if an error is encountered after becoming stale for an additional 1200 seconds.\n\nThus, if the cache attempts to validate 900 seconds afterwards and encounters:\n\n```\n HTTP/1.1 500 Internal Server Error\n Content-Type: text/plain\n \n failure\n```\n\nthe successful response can be returned instead:\n\n```\n HTTP/1.1 200 OK\n Cache-Control: max-age=600, stale-if-error=1200\n Age: 900\n Content-Type: text/plain\n \n succcess\n```\n\nAfter the age is greater than 1800 seconds (i.e., it has been stale for 1200 seconds), the cache must write the error message through.\n\n```\n HTTP/1.1 500 Internal Server Error\n Content-Type: text/plain\n \n failure\n```\n\n## 5. Security Considerations\n\nThe stale-while-revalidate extension provides origin servers with a mechanism for dictating that stale content should be served from caches under certain circumstances, with the expectation that the cached response will be revalidated in the background. It is suggested that such validation be predicated upon an incoming request, to avoid the possibility of an amplification attack (as can be seen in some other pre-fetching and automatic refresh mechanisms). Cache implementers should keep this in mind when deciding the circumstances under which they will generate a request that is not directly initiated by a user or client.\n\nThe stale-if-error provides origin servers and clients a mechanism for dictating that stale content should be served from caches under certain circumstances, and does not pose additional security considerations over those of RFC2616, which also allows stale content to be served.\n\n## 6. IANA Considerations\n\nThis document has no actions for IANA.\n\n## 7. Normative References\n\n[RFC2119]\n\n[Bradner, S.](mailto:sob@harvard.edu), “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC2616]\n\n[Fielding, R.](mailto:fielding@ics.uci.edu), [Gettys, J.](mailto:jg@w3.org), [Mogul, J.](mailto:mogul@wrl.dec.com), [Frystyk, H.](mailto:frystyk@w3.org), [Masinter, L.](mailto:masinter@parc.xerox.com), [Leach, P.](mailto:paulle@microsoft.com), and [T. Berners-Lee](mailto:timbl@w3.org), “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n## Appendix A. Acknowledgements\n\nThanks to Ben Drees, John Nienart, Henrik Nordstrom, Evan Torrie, and Chris Westin for their suggestions. The author takes all responsibility for errors and omissions.\n\n## Author's Address\n\n**Mark Nottingham**\nYahoo! Inc.\nEMail: [mnot@yahoo-inc.com](mailto:mnot@yahoo-inc.com)\nURI: [http://www.mnot.net/](http://www.mnot.net/)", "znaku_textu": 9071, "slov": 1340, "odkazu": 54, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:00", "sha256": "010c4ecc61979ee9a45aefd4fef5958bb4cc2740c44ea4b9537a4c72225d55bc", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc5861", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/rfc/rfc2616.html", "http://www.mnot.net/"]} {"url": "https://httpwg.org/specs/rfc6265.html", "titulek": "RFC 6265 - HTTP State Management Mechanism", "h1": "HTTP State Management Mechanism", "popis": "This document defines the HTTP Cookie and Set-Cookie header fields. These header fields can be used by HTTP servers to store state (called cookies) at HTTP user agents, letting the servers maintain a stateful session over the mostly stateless HTTP protocol. Although cookies have many historical infelicities that degrade their security and privacy, the Cookie and Set-Cookie header fields are widely used on the Internet. This document obsoletes RFC 2965.", "klicova_slova": "Cookie, Set-Cookie, Secure, HttpOnly", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC6265", "og:description": "HTTP State Management Mechanism", "og:url": "https://httpwg.org/specs/rfc6265.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. Conventions"}, {"uroven": 3, "text": "2.1. Conformance Criteria"}, {"uroven": 3, "text": "2.2. Syntax Notation"}, {"uroven": 3, "text": "2.3. Terminology"}, {"uroven": 2, "text": "3. Overview"}, {"uroven": 3, "text": "3.1. Examples"}, {"uroven": 2, "text": "4. Server Requirements"}, {"uroven": 2, "text": "5. User Agent Requirements"}, {"uroven": 3, "text": "5.1. Subcomponent Algorithms"}, {"uroven": 3, "text": "5.3. Storage Model"}, {"uroven": 2, "text": "6. Implementation Considerations"}, {"uroven": 3, "text": "6.1. Limits"}, {"uroven": 3, "text": "6.2. Application Programming Interfaces"}, {"uroven": 3, "text": "6.3. IDNA Dependency and Migration"}, {"uroven": 2, "text": "7. Privacy Considerations"}, {"uroven": 3, "text": "7.1. Third-Party Cookies"}, {"uroven": 3, "text": "7.2. User Controls"}, {"uroven": 3, "text": "7.3. Expiration Dates"}, {"uroven": 2, "text": "8. Security Considerations"}, {"uroven": 3, "text": "8.1. Overview"}, {"uroven": 3, "text": "8.2. Ambient Authority"}, {"uroven": 3, "text": "8.3. Clear Text"}, {"uroven": 3, "text": "8.4. Session Identifiers"}, {"uroven": 3, "text": "8.5. Weak Confidentiality"}, {"uroven": 3, "text": "8.6. Weak Integrity"}, {"uroven": 3, "text": "8.7. Reliance on DNS"}, {"uroven": 2, "text": "9. IANA Considerations"}, {"uroven": 3, "text": "9.3. Cookie2"}, {"uroven": 3, "text": "9.4. Set-Cookie2"}, {"uroven": 2, "text": "10. References"}, {"uroven": 3, "text": "10.1. Normative References"}, {"uroven": 3, "text": "10.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Acknowledgements"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThis document defines the HTTP Cookie and Set-Cookie header fields. These header fields can be used by HTTP servers to store state (called cookies) at HTTP user agents, letting the servers maintain a stateful session over the mostly stateless HTTP protocol. Although cookies have many historical infelicities that degrade their security and privacy, the Cookie and Set-Cookie header fields are widely used on the Internet. This document obsoletes RFC 2965.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc6265](http://www.rfc-editor.org/info/rfc6265).\n\n## Copyright Notice\n\nCopyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n- 2. Conventions\n - 2.1. Conformance Criteria\n - 2.2. Syntax Notation\n - 2.3. Terminology\n- 3. Overview\n - 3.1. Examples\n- 4. Server Requirements\n - 4.1. Set-Cookie\n - 4.1.1. Syntax\n - 4.1.2. Semantics (Non-Normative)\n - 4.2. Cookie\n - 4.2.1. Syntax\n - 4.2.2. Semantics\n- 5. User Agent Requirements\n - 5.1. Subcomponent Algorithms\n - 5.1.1. Dates\n - 5.1.2. Canonicalized Host Names\n - 5.1.3. Domain Matching\n - 5.1.4. Paths and Path-Match\n - 5.2. The Set-Cookie Header\n - 5.2.1. The Expires Attribute\n - 5.2.2. The Max-Age Attribute\n - 5.2.3. The Domain Attribute\n - 5.2.4. The Path Attribute\n - 5.2.5. The Secure Attribute\n - 5.2.6. The HttpOnly Attribute\n - 5.3. Storage Model\n - 5.4. The Cookie Header\n- 6. Implementation Considerations\n - 6.1. Limits\n - 6.2. Application Programming Interfaces\n - 6.3. IDNA Dependency and Migration\n- 7. Privacy Considerations\n - 7.1. Third-Party Cookies\n - 7.2. User Controls\n - 7.3. Expiration Dates\n- 8. Security Considerations\n - 8.1. Overview\n - 8.2. Ambient Authority\n - 8.3. Clear Text\n - 8.4. Session Identifiers\n - 8.5. Weak Confidentiality\n - 8.6. Weak Integrity\n - 8.7. Reliance on DNS\n- 9. IANA Considerations\n - 9.1. Cookie\n - 9.2. Set-Cookie\n - 9.3. Cookie2\n - 9.4. Set-Cookie2\n- 10. References\n - 10.1. Normative References\n - 10.2. Informative References\n- Appendix A. Acknowledgements\n- Author's Address\n\n## 1. Introduction\n\nThis document defines the HTTP Cookie and Set-Cookie header fields. Using the Set-Cookie header field, an HTTP server can pass name/value pairs and associated metadata (called cookies) to a user agent. When the user agent makes subsequent requests to the server, the user agent uses the metadata and other information to determine whether to return the name/value pairs in the Cookie header.\n\nAlthough simple on their surface, cookies have a number of complexities. For example, the server indicates a scope for each cookie when sending it to the user agent. The scope indicates the maximum amount of time in which the user agent should return the cookie, the servers to which the user agent should return the cookie, and the URI schemes for which the cookie is applicable.\n\nFor historical reasons, cookies contain a number of security and privacy infelicities. For example, a server can indicate that a given cookie is intended for \"secure\" connections, but the Secure attribute does not provide integrity in the presence of an active network attacker. Similarly, cookies for a given host are shared across all the ports on that host, even though the usual \"same-origin policy\" used by web browsers isolates content retrieved via different ports.\n\nThere are two audiences for this specification: developers of cookie-generating servers and developers of cookie-consuming user agents.\n\nTo maximize interoperability with user agents, servers *SHOULD* limit themselves to the well-behaved profile defined in Section 4 when generating cookies.\n\nUser agents *MUST* implement the more liberal processing rules defined in Section 5, in order to maximize interoperability with existing servers that do not conform to the well-behaved profile defined in Section 4.\n\nThis document specifies the syntax and semantics of these headers as they are actually used on the Internet. In particular, this document does not create new syntax or semantics beyond those in use today. The recommendations for cookie generation provided in Section 4 represent a preferred subset of current server behavior, and even the more liberal cookie processing algorithm provided in Section 5 does not recommend all of the syntactic and semantic variations in use today. Where some existing software differs from the recommended protocol in significant ways, the document contains a note explaining the difference.\n\nPrior to this document, there were at least three descriptions of cookies: the so-called \"Netscape cookie specification\" [Netscape], RFC 2109 [RFC2109], and RFC 2965 [RFC2965]. However, none of these documents describe how the Cookie and Set-Cookie headers are actually used on the Internet (see [Kri2001] for historical context). In relation to previous IETF specifications of HTTP state management mechanisms, this document requests the following actions:\n\n1. Change the status of [RFC2109] to Historic (it has already been obsoleted by [RFC2965] ).\n2. Change the status of [RFC2965] to Historic.\n3. Indicate that [RFC2965] has been obsoleted by this document.\n\nIn particular, in moving RFC 2965 to Historic and obsoleting it, this document deprecates the use of the Cookie2 and Set-Cookie2 header fields.\n\n## 2. Conventions\n\n### 2.1. Conformance Criteria\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nRequirements phrased in the imperative as part of algorithms (such as \"strip any leading space characters\" or \"return false and abort these steps\") are to be interpreted with the meaning of the key word (\"MUST\", \"SHOULD\", \"MAY\", etc.) used in introducing the algorithm.\n\nConformance requirements phrased as algorithms or specific steps can be implemented in any manner, so long as the end result is equivalent. In particular, the algorithms defined in this specification are intended to be easy to understand and are not intended to be performant.\n\n### 2.2. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234].\n\nThe following core rules are included by reference, as defined in [RFC5234], Appendix B.1: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTLs (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), NUL (null octet), OCTET (any 8-bit sequence of data except NUL), SP (space), HTAB (horizontal tab), CHAR (any [USASCII] character), VCHAR (any visible [USASCII] character), and WSP (whitespace).\n\nThe OWS (optional whitespace) rule is used where zero or more linear whitespace characters *MAY* appear:\n\nOWS = *( [ obs-fold ] WSP )\n ; \"optional\" whitespace\nobs-fold = CRLF\n\nOWS *SHOULD* either not be produced or be produced as a single SP character.\n\n### 2.3. Terminology\n\nThe terms user agent, client, server, proxy, and origin server have the same meaning as in the HTTP/1.1 specification ([RFC2616], [Section 1.3](https://www.rfc-editor.org/rfc/rfc2616.html#section-1.3)).\n\nThe request-host is the name of the host, as known by the user agent, to which the user agent is sending an HTTP request or from which it is receiving an HTTP response (i.e., the name of the host to which it sent the corresponding HTTP request).\n\nThe term request-uri is defined in [Section 5.1.2](https://www.rfc-editor.org/rfc/rfc2616.html#section-5.1.2) of [RFC2616].\n\nTwo sequences of octets are said to case-insensitively match each other if and only if they are equivalent under the i;ascii-casemap collation defined in [RFC4790].\n\nThe term string means a sequence of non-NUL octets.\n\n## 3. Overview\n\nThis section outlines a way for an origin server to send state information to a user agent and for the user agent to return the state information to the origin server.\n\nTo store state, the origin server includes a Set-Cookie header in an HTTP response. In subsequent requests, the user agent returns a Cookie request header to the origin server. The Cookie header contains cookies the user agent received in previous Set-Cookie headers. The origin server is free to ignore the Cookie header or use its contents for an application-defined purpose.\n\nOrigin servers *MAY* send a Set-Cookie response header with any response. User agents *MAY* ignore Set-Cookie headers contained in responses with 100-level status codes but *MUST* process Set-Cookie headers contained in other responses (including responses with 400- and 500-level status codes). An origin server can include multiple Set-Cookie header fields in a single response. The presence of a Cookie or a Set-Cookie header field does not preclude HTTP caches from storing and reusing a response.\n\nOrigin servers *SHOULD NOT* fold multiple Set-Cookie header fields into a single header field. The usual mechanism for folding HTTP headers fields (i.e., as defined in [RFC2616]) might change the semantics of the Set-Cookie header field because the %x2C (\",\") character is used by Set-Cookie in a way that conflicts with such folding.\n\n### 3.1. Examples\n\nUsing the Set-Cookie header, a server can send the user agent a short string in an HTTP response that the user agent will return in future HTTP requests that are within the scope of the cookie. For example, the server can send the user agent a \"session identifier\" named SID with the value 31d4d96e407aad42. The user agent then returns the session identifier in subsequent requests.\n\n== Server -> User Agent ==\n\n```\nSet-Cookie: SID=31d4d96e407aad42\n \n```\n\n== User Agent -> Server ==\n\n```\nCookie: SID=31d4d96e407aad42\n \n```\n\nThe server can alter the default scope of the cookie using the Path and Domain attributes. For example, the server can instruct the user agent to return the cookie to every path and every subdomain of example.com.\n\n== Server -> User Agent ==\n\n```\nSet-Cookie: SID=31d4d96e407aad42; Path=/; Domain=example.com\n \n```\n\n== User Agent -> Server ==\n\n```\nCookie: SID=31d4d96e407aad42\n \n```\n\nAs shown in the next example, the server can store multiple cookies at the user agent. For example, the server can store a session identifier as well as the user's preferred language by returning two Set-Cookie header fields. Notice that the server uses the Secure and HttpOnly attributes to provide additional security protections for the more sensitive session identifier (see Section 4.1.2.)\n\n== Server -> User Agent ==\n\n```\nSet-Cookie: SID=31d4d96e407aad42; Path=/; Secure; HttpOnly\nSet-Cookie: lang=en-US; Path=/; Domain=example.com\n \n```\n\n== User Agent -> Server ==\n\n```\nCookie: SID=31d4d96e407aad42; lang=en-US\n \n```\n\nNotice that the Cookie header above contains two cookies, one named SID and one named lang. If the server wishes the user agent to persist the cookie over multiple \"sessions\" (e.g., user agent restarts), the server can specify an expiration date in the Expires attribute. Note that the user agent might delete the cookie before the expiration date if the user agent's cookie store exceeds its quota or if the user manually deletes the server's cookie.\n\n== Server -> User Agent ==\n\n```\nSet-Cookie: lang=en-US; Expires=Wed, 09 Jun 2021 10:18:14 GMT\n \n```\n\n== User Agent -> Server ==\n\n```\nCookie: SID=31d4d96e407aad42; lang=en-US\n \n```\n\nFinally, to remove a cookie, the server returns a Set-Cookie header with an expiration date in the past. The server will be successful in removing the cookie only if the Path and the Domain attribute in the Set-Cookie header match the values used when the cookie was created.\n\n== Server -> User Agent ==\n\n```\nSet-Cookie: lang=; Expires=Sun, 06 Nov 1994 08:49:37 GMT\n \n```\n\n== User Agent -> Server ==\n\n```\nCookie: SID=31d4d96e407aad42\n \n```\n\n## 4. Server Requirements\n\nThis section describes the syntax and semantics of a well-behaved profile of the Cookie and Set-Cookie headers.\n\n## 5. User Agent Requirements\n\nThis section specifies the Cookie and Set-Cookie headers in sufficient detail that a user agent implementing these requirements precisely can interoperate with existing servers (even those that do not conform to the well-behaved profile described in Section 4).\n\nA user agent could enforce more restrictions than those specified herein (e.g., for the sake of improved security); however, experiments have shown that such strictness reduces the likelihood that a user agent will be able to interoperate with existing servers.\n\n### 5.1. Subcomponent Algorithms\n\nThis section defines some algorithms used by user agents to process specific subcomponents of the Cookie and Set-Cookie headers.\n\n### 5.3. Storage Model\n\nThe user agent stores the following fields about each cookie: name, value, expiry-time, domain, path, creation-time, last-access-time, persistent-flag, host-only-flag, secure-only-flag, and http-only-flag.\n\nWhen the user agent \"receives a cookie\" from a request-uri with name cookie-name, value cookie-value, and attributes cookie-attribute-list, the user agent *MUST* process the cookie as follows:\n\n1. A user agent *MAY* ignore a received cookie in its entirety. For example, the user agent might wish to block receiving cookies from \"third-party\" responses or the user agent might not wish to store cookies that exceed some size.\n2. Create a new cookie with name cookie-name, value cookie-value. Set the creation-time and the last-access-time to the current date and time.\n3. If the cookie-attribute-list contains an attribute with an attribute-name of \"Max-Age\": Otherwise, if the cookie-attribute-list contains an attribute with an attribute-name of \"Expires\" (and does not contain an attribute with an attribute-name of \"Max-Age\"): Otherwise:\n - Set the cookie's persistent-flag to true.\n - Set the cookie's expiry-time to attribute-value of the last attribute in the cookie-attribute-list with an attribute-name of \"Max-Age\".\n - Set the cookie's persistent-flag to true.\n - Set the cookie's expiry-time to attribute-value of the last attribute in the cookie-attribute-list with an attribute-name of \"Expires\".\n - Set the cookie's persistent-flag to false.\n - Set the cookie's expiry-time to the latest representable date.\n4. If the cookie-attribute-list contains an attribute with an attribute-name of \"Domain\": Otherwise:\n - Let the domain-attribute be the attribute-value of the last attribute in the cookie-attribute-list with an attribute-name of \"Domain\".\n - Let the domain-attribute be the empty string.\n5. If the user agent is configured to reject \"public suffixes\" and the domain-attribute is a public suffix:\n - If the domain-attribute is identical to the canonicalized request-host: Otherwise:\n - Let the domain-attribute be the empty string.\n - Ignore the cookie entirely and abort these steps.\n - NOTE: A \"public suffix\" is a domain that is controlled by a public registry, such as \"com\", \"co.uk\", and \"pvt.k12.wy.us\". This step is essential for preventing attacker.com from disrupting the integrity of example.com by setting a cookie with a Domain attribute of \"com\". Unfortunately, the set of public suffixes (also known as \"registry controlled domains\") changes over time. If feasible, user agents *SHOULD* use an up-to-date public suffix list, such as the one maintained by the Mozilla project at < [http://publicsuffix.org/](http://publicsuffix.org/) >.\n6. If the domain-attribute is non-empty: Otherwise:\n - If the canonicalized request-host does not domain-match the domain-attribute: Otherwise:\n - Ignore the cookie entirely and abort these steps.\n - Set the cookie's host-only-flag to false.\n - Set the cookie's domain to the domain-attribute.\n - Set the cookie's host-only-flag to true.\n - Set the cookie's domain to the canonicalized request-host.\n7. If the cookie-attribute-list contains an attribute with an attribute-name of \"Path\", set the cookie's path to attribute-value of the last attribute in the cookie-attribute-list with an attribute-name of \"Path\". Otherwise, set the cookie's path to the default-path of the request-uri.\n8. If the cookie-attribute-list contains an attribute with an attribute-name of \"Secure\", set the cookie's secure-only-flag to true. Otherwise, set the cookie's secure-only-flag to false.\n9. If the cookie-attribute-list contains an attribute with an attribute-name of \"HttpOnly\", set the cookie's http-only-flag to true. Otherwise, set the cookie's http-only-flag to false.\n10. If the cookie was received from a \"non-HTTP\" API and the cookie's http-only-flag is set, abort these steps and ignore the cookie entirely.\n11. If the cookie store contains a cookie with the same name, domain, and path as the newly created cookie:\n 1. Let old-cookie be the existing cookie with the same name, domain, and path as the newly created cookie. (Notice that this algorithm maintains the invariant that there is at most one such cookie.)\n 2. If the newly created cookie was received from a \"non-HTTP\" API and the old-cookie's http-only-flag is set, abort these steps and ignore the newly created cookie entirely.\n 3. Update the creation-time of the newly created cookie to match the creation-time of the old-cookie.\n 4. Remove the old-cookie from the cookie store.\n12. Insert the newly created cookie into the cookie store.\n\nA cookie is \"expired\" if the cookie has an expiry date in the past.\n\nThe user agent *MUST* evict all expired cookies from the cookie store if, at any time, an expired cookie exists in the cookie store.\n\nAt any time, the user agent *MAY* \"remove excess cookies\" from the cookie store if the number of cookies sharing a domain field exceeds some implementation-defined upper bound (such as 50 cookies).\n\nAt any time, the user agent *MAY* \"remove excess cookies\" from the cookie store if the cookie store exceeds some predetermined upper bound (such as 3000 cookies).\n\nWhen the user agent removes excess cookies from the cookie store, the user agent *MUST* evict cookies in the following priority order:\n\n1. Expired cookies.\n2. Cookies that share a domain field with more than a predetermined number of other cookies.\n3. All cookies.\n\nIf two cookies have the same removal priority, the user agent *MUST* evict the cookie with the earliest last-access date first.\n\nWhen \"the current session is over\" (as defined by the user agent), the user agent *MUST* remove from the cookie store all cookies with the persistent-flag set to false.\n\n## 6. Implementation Considerations\n\n### 6.1. Limits\n\nPractical user agent implementations have limits on the number and size of cookies that they can store. General-use user agents *SHOULD* provide each of the following minimum capabilities:\n\n- At least 4096 bytes per cookie (as measured by the sum of the length of the cookie's name, value, and attributes).\n- At least 50 cookies per domain.\n- At least 3000 cookies total.\n\nServers *SHOULD* use as few and as small cookies as possible to avoid reaching these implementation limits and to minimize network bandwidth due to the Cookie header being included in every request.\n\nServers *SHOULD* gracefully degrade if the user agent fails to return one or more cookies in the Cookie header because the user agent might evict any cookie at any time on orders from the user.\n\n### 6.2. Application Programming Interfaces\n\nOne reason the Cookie and Set-Cookie headers use such esoteric syntax is that many platforms (both in servers and user agents) provide a string-based application programming interface (API) to cookies, requiring application-layer programmers to generate and parse the syntax used by the Cookie and Set-Cookie headers, which many programmers have done incorrectly, resulting in interoperability problems.\n\nInstead of providing string-based APIs to cookies, platforms would be well-served by providing more semantic APIs. It is beyond the scope of this document to recommend specific API designs, but there are clear benefits to accepting an abstract \"Date\" object instead of a serialized date string.\n\n### 6.3. IDNA Dependency and Migration\n\nIDNA2008 [RFC5890] supersedes IDNA2003 [RFC3490]. However, there are differences between the two specifications, and thus there can be differences in processing (e.g., converting) domain name labels that have been registered under one from those registered under the other. There will be a transition period of some time during which IDNA2003-based domain name labels will exist in the wild. User agents *SHOULD* implement IDNA2008 [RFC5890] and *MAY* implement [UTS46] or [RFC5895] in order to facilitate their IDNA transition. If a user agent does not implement IDNA2008, the user agent *MUST* implement IDNA2003 [RFC3490].\n\n## 7. Privacy Considerations\n\nCookies are often criticized for letting servers track users. For example, a number of \"web analytics\" companies use cookies to recognize when a user returns to a web site or visits another web site. Although cookies are not the only mechanism servers can use to track users across HTTP requests, cookies facilitate tracking because they are persistent across user agent sessions and can be shared between hosts.\n\n### 7.1. Third-Party Cookies\n\nParticularly worrisome are so-called \"third-party\" cookies. In rendering an HTML document, a user agent often requests resources from other servers (such as advertising networks). These third-party servers can use cookies to track the user even if the user never visits the server directly. For example, if a user visits a site that contains content from a third party and then later visits another site that contains content from the same third party, the third party can track the user between the two sites.\n\nSome user agents restrict how third-party cookies behave. For example, some of these user agents refuse to send the Cookie header in third-party requests. Others refuse to process the Set-Cookie header in responses to third-party requests. User agents vary widely in their third-party cookie policies. This document grants user agents wide latitude to experiment with third-party cookie policies that balance the privacy and compatibility needs of their users. However, this document does not endorse any particular third-party cookie policy.\n\nThird-party cookie blocking policies are often ineffective at achieving their privacy goals if servers attempt to work around their restrictions to track users. In particular, two collaborating servers can often track users without using cookies at all by injecting identifying information into dynamic URLs.\n\n### 7.2. User Controls\n\nUser agents *SHOULD* provide users with a mechanism for managing the cookies stored in the cookie store. For example, a user agent might let users delete all cookies received during a specified time period or all the cookies related to a particular domain. In addition, many user agents include a user interface element that lets users examine the cookies stored in their cookie store.\n\nUser agents *SHOULD* provide users with a mechanism for disabling cookies. When cookies are disabled, the user agent *MUST NOT* include a Cookie header in outbound HTTP requests and the user agent *MUST* NOT process Set-Cookie headers in inbound HTTP responses.\n\nSome user agents provide users the option of preventing persistent storage of cookies across sessions. When configured thusly, user agents *MUST* treat all received cookies as if the persistent-flag were set to false. Some popular user agents expose this functionality via \"private browsing\" mode [Aggarwal2010].\n\nSome user agents provide users with the ability to approve individual writes to the cookie store. In many common usage scenarios, these controls generate a large number of prompts. However, some privacy-conscious users find these controls useful nonetheless.\n\n### 7.3. Expiration Dates\n\nAlthough servers can set the expiration date for cookies to the distant future, most user agents do not actually retain cookies for multiple decades. Rather than choosing gratuitously long expiration periods, servers *SHOULD* promote user privacy by selecting reasonable cookie expiration periods based on the purpose of the cookie. For example, a typical session identifier might reasonably be set to expire in two weeks.\n\n## 8. Security Considerations\n\n### 8.1. Overview\n\nCookies have a number of security pitfalls. This section overviews a few of the more salient issues.\n\nIn particular, cookies encourage developers to rely on ambient authority for authentication, often becoming vulnerable to attacks such as cross-site request forgery [CSRF]. Also, when storing session identifiers in cookies, developers often create session fixation vulnerabilities.\n\nTransport-layer encryption, such as that employed in HTTPS, is insufficient to prevent a network attacker from obtaining or altering a victim's cookies because the cookie protocol itself has various vulnerabilities (see \"Weak Confidentiality\" and \"Weak Integrity\", below). In addition, by default, cookies do not provide confidentiality or integrity from network attackers, even when used in conjunction with HTTPS.\n\n### 8.2. Ambient Authority\n\nA server that uses cookies to authenticate users can suffer security vulnerabilities because some user agents let remote parties issue HTTP requests from the user agent (e.g., via HTTP redirects or HTML forms). When issuing those requests, user agents attach cookies even if the remote party does not know the contents of the cookies, potentially letting the remote party exercise authority at an unwary server.\n\nAlthough this security concern goes by a number of names (e.g., cross-site request forgery, confused deputy), the issue stems from cookies being a form of ambient authority. Cookies encourage server operators to separate designation (in the form of URLs) from authorization (in the form of cookies). Consequently, the user agent might supply the authorization for a resource designated by the attacker, possibly causing the server or its clients to undertake actions designated by the attacker as though they were authorized by the user.\n\nInstead of using cookies for authorization, server operators might wish to consider entangling designation and authorization by treating URLs as capabilities. Instead of storing secrets in cookies, this approach stores secrets in URLs, requiring the remote entity to supply the secret itself. Although this approach is not a panacea, judicious application of these principles can lead to more robust security.\n\n### 8.3. Clear Text\n\nUnless sent over a secure channel (such as TLS), the information in the Cookie and Set-Cookie headers is transmitted in the clear.\n\n1. All sensitive information conveyed in these headers is exposed to an eavesdropper.\n2. A malicious intermediary could alter the headers as they travel in either direction, with unpredictable results.\n3. A malicious client could alter the Cookie header before transmission, with unpredictable results.\n\nServers *SHOULD* encrypt and sign the contents of cookies (using whatever format the server desires) when transmitting them to the user agent (even when sending the cookies over a secure channel). However, encrypting and signing cookie contents does not prevent an attacker from transplanting a cookie from one user agent to another or from replaying the cookie at a later time.\n\nIn addition to encrypting and signing the contents of every cookie, servers that require a higher level of security *SHOULD* use the Cookie and Set-Cookie headers only over a secure channel. When using cookies over a secure channel, servers *SHOULD* set the Secure attribute (see Section 4.1.2.5) for every cookie. If a server does not set the Secure attribute, the protection provided by the secure channel will be largely moot.\n\nFor example, consider a webmail server that stores a session identifier in a cookie and is typically accessed over HTTPS. If the server does not set the Secure attribute on its cookies, an active network attacker can intercept any outbound HTTP request from the user agent and redirect that request to the webmail server over HTTP. Even if the webmail server is not listening for HTTP connections, the user agent will still include cookies in the request. The active network attacker can intercept these cookies, replay them against the server, and learn the contents of the user's email. If, instead, the server had set the Secure attribute on its cookies, the user agent would not have included the cookies in the clear-text request.\n\n### 8.4. Session Identifiers\n\nInstead of storing session information directly in a cookie (where it might be exposed to or replayed by an attacker), servers commonly store a nonce (or \"session identifier\") in a cookie. When the server receives an HTTP request with a nonce, the server can look up state information associated with the cookie using the nonce as a key.\n\nUsing session identifier cookies limits the damage an attacker can cause if the attacker learns the contents of a cookie because the nonce is useful only for interacting with the server (unlike non-nonce cookie content, which might itself be sensitive). Furthermore, using a single nonce prevents an attacker from \"splicing\" together cookie content from two interactions with the server, which could cause the server to behave unexpectedly.\n\nUsing session identifiers is not without risk. For example, the server *SHOULD* take care to avoid \"session fixation\" vulnerabilities. A session fixation attack proceeds in three steps. First, the attacker transplants a session identifier from his or her user agent to the victim's user agent. Second, the victim uses that session identifier to interact with the server, possibly imbuing the session identifier with the user's credentials or confidential information. Third, the attacker uses the session identifier to interact with server directly, possibly obtaining the user's authority or confidential information.\n\n### 8.5. Weak Confidentiality\n\nCookies do not provide isolation by port. If a cookie is readable by a service running on one port, the cookie is also readable by a service running on another port of the same server. If a cookie is writable by a service on one port, the cookie is also writable by a service running on another port of the same server. For this reason, servers *SHOULD NOT* both run mutually distrusting services on different ports of the same host and use cookies to store security-sensitive information.\n\nCookies do not provide isolation by scheme. Although most commonly used with the http and https schemes, the cookies for a given host might also be available to other schemes, such as ftp and gopher. Although this lack of isolation by scheme is most apparent in non-HTTP APIs that permit access to cookies (e.g., HTML's document.cookie API), the lack of isolation by scheme is actually present in requirements for processing cookies themselves (e.g., consider retrieving a URI with the gopher scheme via HTTP).\n\nCookies do not always provide isolation by path. Although the network-level protocol does not send cookies stored for one path to another, some user agents expose cookies via non-HTTP APIs, such as HTML's document.cookie API. Because some of these user agents (e.g., web browsers) do not isolate resources received from different paths, a resource retrieved from one path might be able to access cookies stored for another path.\n\n### 8.6. Weak Integrity\n\nCookies do not provide integrity guarantees for sibling domains (and their subdomains). For example, consider foo.example.com and bar.example.com. The foo.example.com server can set a cookie with a Domain attribute of \"example.com\" (possibly overwriting an existing \"example.com\" cookie set by bar.example.com), and the user agent will include that cookie in HTTP requests to bar.example.com. In the worst case, bar.example.com will be unable to distinguish this cookie from a cookie it set itself. The foo.example.com server might be able to leverage this ability to mount an attack against bar.example.com.\n\nEven though the Set-Cookie header supports the Path attribute, the Path attribute does not provide any integrity protection because the user agent will accept an arbitrary Path attribute in a Set-Cookie header. For example, an HTTP response to a request for http://example.com/foo/bar can set a cookie with a Path attribute of \"/qux\". Consequently, servers *SHOULD NOT* both run mutually distrusting services on different paths of the same host and use cookies to store security-sensitive information.\n\nAn active network attacker can also inject cookies into the Cookie header sent to https://example.com/ by impersonating a response from http://example.com/ and injecting a Set-Cookie header. The HTTPS server at example.com will be unable to distinguish these cookies from cookies that it set itself in an HTTPS response. An active network attacker might be able to leverage this ability to mount an attack against example.com even if example.com uses HTTPS exclusively.\n\nServers can partially mitigate these attacks by encrypting and signing the contents of their cookies. However, using cryptography does not mitigate the issue completely because an attacker can replay a cookie he or she received from the authentic example.com server in the user's session, with unpredictable results.\n\nFinally, an attacker might be able to force the user agent to delete cookies by storing a large number of cookies. Once the user agent reaches its storage limit, the user agent will be forced to evict some cookies. Servers *SHOULD NOT* rely upon user agents retaining cookies.\n\n### 8.7. Reliance on DNS\n\nCookies rely upon the Domain Name System (DNS) for security. If the DNS is partially or fully compromised, the cookie protocol might fail to provide the security properties required by applications.\n\n## 9. IANA Considerations\n\nThe permanent message header field registry (see [RFC3864]) has been updated with the following registrations.\n\n### 9.3. Cookie2\n\nHeader field name: Cookie2\n\nApplicable protocol: http\n\nStatus: obsoleted\n\nAuthor/Change controller: IETF\n\nSpecification document: [RFC2965]\n\n### 9.4. Set-Cookie2\n\nHeader field name: Set-Cookie2\n\nApplicable protocol: http\n\nStatus: obsoleted\n\nAuthor/Change controller: IETF\n\nSpecification document: [RFC2965]\n\n## 10. References\n\n### 10.1. Normative References\n\n[RFC1034]\n\nMockapetris, P., “[Domain names - concepts and facilities](https://www.rfc-editor.org/rfc/rfc1034.html)”, [STD 13](https://www.rfc-editor.org/info/std13), RFC 1034, November 1987.\n\n[RFC1123]\n\n[Braden, R.](mailto:Braden@ISI.EDU), “[Requirements for Internet Hosts - Application and Support](https://www.rfc-editor.org/rfc/rfc1123.html)”, [STD 3](https://www.rfc-editor.org/info/std3), RFC 1123, October 1989.\n\n[RFC2119]\n\n[Bradner, S.](mailto:sob@harvard.edu), “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC2616]\n\n[Fielding, R.](mailto:fielding@ics.uci.edu), [Gettys, J.](mailto:jg@w3.org), [Mogul, J.](mailto:mogul@wrl.dec.com), [Frystyk, H.](mailto:frystyk@w3.org), [Masinter, L.](mailto:masinter@parc.xerox.com), [Leach, P.](mailto:paulle@microsoft.com), and [T. Berners-Lee](mailto:timbl@w3.org), “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n[RFC3490]\n\nFaltstrom, P., Hoffman, P., and A. Costello, “[Internationalizing Domain Names in Applications (IDNA)](https://www.rfc-editor.org/rfc/rfc3490.html)”, RFC 3490, March 2003.\nSee Section 6.3 for an explanation why the normative reference to an obsoleted specification is needed.\n\n[RFC4790]\n\nNewman, C., Duerst, M., and A. Gulbrandsen, “[Internet Application Protocol Collation Registry](https://www.rfc-editor.org/rfc/rfc4790.html)”, RFC 4790, March 2007.\n\n[RFC5234]\n\n[Crocker, D., Ed.](mailto:dcrocker@bbiw.net) and [P. Overell](mailto:paul.overell@thus.net), “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, January 2008.\n\n[RFC5890]\n\nKlensin, J., “[Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework](https://www.rfc-editor.org/rfc/rfc5890.html)”, RFC 5890, August 2010.\n\n[USASCII]\n\nAmerican National Standards Institute, “Coded Character Set -- 7-bit American Standard Code for Information Interchange”, ANSI X3.4, 1986.\n\n### 10.2. Informative References\n\n[RFC2109]\n\n[Kristol, D.](mailto:dmk@bell-labs.com) and [L. Montulli](mailto:montulli@netscape.com), “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc2109.html)”, RFC 2109, February 1997.\n\n[RFC2965]\n\n[Kristol, D.](mailto:dmk@bell-labs.com) and [L. Montulli](mailto:lou@montulli.org), “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc2965.html)”, RFC 2965, October 2000.\n\n[RFC2818]\n\nRescorla, E., “[HTTP Over TLS](https://www.rfc-editor.org/rfc/rfc2818.html)”, RFC 2818, May 2000.\n\n[Netscape]\n\nNetscape Communications Corp., “[Persistent Client State -- HTTP Cookies](http://web.archive.org/web/20020803110822/http://wp.netscape.com/newsref/std/cookie_spec.html)”, 1999, <[http://web.archive.org/web/20020803110822/http://wp.netscape.com/newsref/std/cookie_spec.html](http://web.archive.org/web/20020803110822/http://wp.netscape.com/newsref/std/cookie_spec.html)>.\n\n[Kri2001]\n\nKristol, D., “[HTTP Cookies: Standards, Privacy, and Politics](http://arxiv.org/abs/cs.SE/0105018)”, ACM Transactions on Internet Technology Vol. 1, #2, November 2001, <[http://arxiv.org/abs/cs.SE/0105018](http://arxiv.org/abs/cs.SE/0105018)>.\n\n[RFC3629]\n\nYergeau, F., “[UTF-8, a transformation format of ISO 10646](https://www.rfc-editor.org/rfc/rfc3629.html)”, [STD 63](https://www.rfc-editor.org/info/std63), RFC 3629, November 2003.\n\n[RFC4648]\n\nJosefsson, S., “[The Base16, Base32, and Base64 Data Encodings](https://www.rfc-editor.org/rfc/rfc4648.html)”, RFC 4648, October 2006.\n\n[RFC3864]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004.\n\n[RFC5895]\n\nResnick, P. and P. Hoffman, “[Mapping Characters for Internationalized Domain Names in Applications (IDNA) 2008](https://www.rfc-editor.org/rfc/rfc5895.html)”, RFC 5895, September 2010.\n\n[UTS46]\n\nDavis, M. and M. Suignard, “[Unicode IDNA Compatibility Processing](http://unicode.org/reports/tr46/)”, Unicode Technical Standards # 46, 2010, <[http://unicode.org/reports/tr46/](http://unicode.org/reports/tr46/)>.\n\n[CSRF]\n\nBarth, A., Jackson, C., and J. Mitchell, “[Robust Defenses for Cross-Site Request Forgery](http://portal.acm.org/citation.cfm?id=1455770.1455782)”, 2008, <[http://portal.acm.org/citation.cfm?id=1455770.1455782](http://portal.acm.org/citation.cfm?id=1455770.1455782)>.\n\n[Aggarwal2010]\n\nAggarwal, G., Burzstein, E., Jackson, C., and D. Boneh, “[An Analysis of Private Browsing Modes in Modern Browsers](http://www.usenix.org/events/sec10/tech/full_papers/Aggarwal.pdf)”, 2010, <[http://www.usenix.org/events/sec10/tech/full_papers/Aggarwal.pdf](http://www.usenix.org/events/sec10/tech/full_papers/Aggarwal.pdf)>.\n\n## Appendix A. Acknowledgements\n\nThis document borrows heavily from RFC 2109 [RFC2109]. We are indebted to David M. Kristol and Lou Montulli for their efforts to specify cookies. David M. Kristol, in particular, provided invaluable advice on navigating the IETF process. We would also like to thank Thomas Broyer, Tyler Close, Alissa Cooper, Bil Corry, corvid, Lisa Dusseault, Roy T. Fielding, Blake Frantz, Anne van Kesteren, Eran Hammer-Lahav, Jeff Hodges, Bjoern Hoehrmann, Achim Hoffmann, Georg Koppen, Dean McNamee, Alexey Melnikov, Mark Miller, Mark Pauley, Yngve N. Pettersen, Julian Reschke, Peter Saint-Andre, Mark Seaborn, Maciej Stachowiak, Daniel Stenberg, Tatsuhiro Tsujikawa, David Wagner, Dan Winship, and Dan Witte for their valuable feedback on this document.\n\n## Author's Address\n\n**Adam Barth**\n\n University of California, Berkeley\n \nEmail: [abarth@eecs.berkeley.edu](mailto:abarth@eecs.berkeley.edu)\nURI: [http://www.adambarth.com/](http://www.adambarth.com/)", "znaku_textu": 41414, "slov": 6110, "odkazu": 211, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:05", "sha256": "f7107ab8c09615509f57dfe1d68ee0f047082f6f35e6556ad8a422724af62405", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc6265", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2616.html", "https://www.rfc-editor.org/rfc/rfc1034.html", "https://www.rfc-editor.org/rfc/rfc1123.html", "https://www.rfc-editor.org/rfc/rfc5890.html", "https://www.rfc-editor.org/rfc/rfc3490.html", "http://publicsuffix.org/", "https://www.rfc-editor.org/info/std13", "https://www.rfc-editor.org/info/std3", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/rfc/rfc4790.html", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://www.rfc-editor.org/rfc/rfc2109.html", "https://www.rfc-editor.org/rfc/rfc2965.html", "https://www.rfc-editor.org/rfc/rfc2818.html", "http://wp.netscape.com/newsref/std/cookie_spec.html", "http://arxiv.org/abs/cs.SE/0105018", "https://www.rfc-editor.org/rfc/rfc3629.html", "https://www.rfc-editor.org/info/std63", "https://www.rfc-editor.org/rfc/rfc4648.html", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://www.rfc-editor.org/rfc/rfc5895.html", "http://unicode.org/reports/tr46/", "http://portal.acm.org/citation.cfm?id=1455770.1455782", "http://www.usenix.org/events/sec10/tech/full_papers/Aggarwal.pdf", "http://www.adambarth.com/"]} {"url": "https://httpwg.org/specs/rfc6266.html", "titulek": "RFC 6266 - Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)", "h1": "Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)", "popis": "RFC 2616 defines the Content-Disposition response header field, but points out that it is not part of the HTTP/1.1 Standard. This specification takes over the definition and registration of Content-Disposition, as used in HTTP, and clarifies internationalization aspects.", "klicova_slova": "HTTP, Hypertext Transfer Protocol, Content-Disposition, filename, attachment, inline", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC6266", "og:description": "Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)", "og:url": "https://httpwg.org/specs/rfc6266.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. Notational Conventions"}, {"uroven": 2, "text": "3. Conformance and Error Handling"}, {"uroven": 2, "text": "4. Header Field Definition"}, {"uroven": 3, "text": "4.1. Grammar"}, {"uroven": 3, "text": "4.2. Disposition Type"}, {"uroven": 3, "text": "4.3. Disposition Parameter: 'Filename'"}, {"uroven": 3, "text": "4.4. Disposition Parameter: Extensions"}, {"uroven": 3, "text": "4.5. Extensibility"}, {"uroven": 2, "text": "5. Examples"}, {"uroven": 2, "text": "6. Internationalization Considerations"}, {"uroven": 2, "text": "7. Security Considerations"}, {"uroven": 2, "text": "8. IANA Considerations"}, {"uroven": 3, "text": "8.1. Registry for Disposition Values and Parameters"}, {"uroven": 3, "text": "8.2. Header Field Registration"}, {"uroven": 2, "text": "9. Acknowledgements"}, {"uroven": 2, "text": "10. References"}, {"uroven": 3, "text": "10.1. Normative References"}, {"uroven": 3, "text": "10.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Changes from the RFC 2616 Definition"}, {"uroven": 2, "text": "Appendix B. Differences Compared to RFC 2183"}, {"uroven": 2, "text": "Appendix C. Alternative Approaches to Internationalization"}, {"uroven": 3, "text": "C.1. RFC 2047 Encoding"}, {"uroven": 3, "text": "C.2. Percent Encoding"}, {"uroven": 3, "text": "C.3. Encoding Sniffing"}, {"uroven": 2, "text": "Appendix D. Advice on Generating Content-Disposition Header Fields"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nRFC 2616 defines the Content-Disposition response header field, but points out that it is not part of the HTTP/1.1 Standard. This specification takes over the definition and registration of Content-Disposition, as used in HTTP, and clarifies internationalization aspects.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc6266](http://www.rfc-editor.org/info/rfc6266).\n\n## Copyright Notice\n\nCopyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n- 2. Notational Conventions\n- 3. Conformance and Error Handling\n- 4. Header Field Definition\n - 4.1. Grammar\n - 4.2. Disposition Type\n - 4.3. Disposition Parameter: 'Filename'\n - 4.4. Disposition Parameter: Extensions\n - 4.5. Extensibility\n- 5. Examples\n- 6. Internationalization Considerations\n- 7. Security Considerations\n- 8. IANA Considerations\n - 8.1. Registry for Disposition Values and Parameters\n - 8.2. Header Field Registration\n- 9. Acknowledgements\n- 10. References\n - 10.1. Normative References\n - 10.2. Informative References\n- Appendix A. Changes from the RFC 2616 Definition\n- Appendix B. Differences Compared to RFC 2183\n- Appendix C. Alternative Approaches to Internationalization\n - C.1. RFC 2047 Encoding\n - C.2. Percent Encoding\n - C.3. Encoding Sniffing\n- Appendix D. Advice on Generating Content-Disposition Header Fields\n- Author's Address\n\n## 1. Introduction\n\nRFC 2616 defines the Content-Disposition response header field ([Section 19.5.1](https://www.rfc-editor.org/rfc/rfc2616.html#section-19.5.1) of [RFC2616]) but points out that it is not part of the HTTP/1.1 Standard ([Section 15.5](https://www.rfc-editor.org/rfc/rfc2616.html#section-15.5)):\n\n> Content-Disposition is not part of the HTTP standard, but since it is widely implemented, we are documenting its use and risks for implementers.\n\nThis specification takes over the definition and registration of Content-Disposition, as used in HTTP. Based on interoperability testing with existing user agents (UAs), it fully defines a profile of the features defined in the Multipurpose Internet Mail Extensions (MIME) variant ([RFC2183]) of the header field, and also clarifies internationalization aspects.\n\n## 2. Notational Conventions\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nThis specification uses the augmented BNF (ABNF) notation defined in [Section 2.1](https://www.rfc-editor.org/rfc/rfc2616.html#section-2.1) of [RFC2616], including its rules for implied linear whitespace (LWS).\n\n## 3. Conformance and Error Handling\n\nThis specification defines conformance criteria for both senders (usually, HTTP origin servers) and recipients (usually, HTTP user agents) of the Content-Disposition header field. An implementation is considered conformant if it complies with all of the requirements associated with its role.\n\nThis specification also defines certain forms of the header field value to be invalid, using both ABNF and prose requirements (Section 4), but it does not define special handling of these invalid field values.\n\nSenders *MUST NOT* generate Content-Disposition header fields that are invalid.\n\nRecipients *MAY* take steps to recover a usable field value from an invalid header field, but *SHOULD NOT* reject the message outright, unless this is explicitly desirable behavior (e.g., the implementation is a validator). As such, the default handling of invalid fields is to ignore them.\n\n## 4. Header Field Definition\n\nThe Content-Disposition response header field is used to convey additional information about how to process the response payload, and also can be used to attach additional metadata, such as the filename to use when saving the response payload locally.\n\n### 4.1. Grammar\n\n```\n content-disposition = \"Content-Disposition\" \":\"\n disposition-type *( \";\" disposition-parm )\n\n disposition-type = \"inline\" | \"attachment\" | disp-ext-type\n ; case-insensitive\n disp-ext-type = token\n\n disposition-parm = filename-parm | disp-ext-parm\n\n filename-parm = \"filename\" \"=\" value\n | \"filename*\" \"=\" ext-value\n \n disp-ext-parm = token \"=\" value\n | ext-token \"=\" ext-value\n ext-token = \n```\n\nDefined in [RFC2616]:\n\n```\n token = \n quoted-string = \n value = \n ; token | quoted-string\n \n```\n\nDefined in [RFC5987]:\n\n```\n ext-value = \n```\n\nContent-Disposition header field values with multiple instances of the same parameter name are invalid.\n\nNote that due to the rules for implied linear whitespace ([Section 2.1](https://www.rfc-editor.org/rfc/rfc2616.html#section-2.1) of [RFC2616]), *OPTIONAL* whitespace can appear between words (token or quoted-string) and separator characters.\n\nFurthermore, note that the format used for ext-value allows specifying a natural language (e.g., \"en\"); this is of limited use for filenames and is likely to be ignored by recipients.\n\n### 4.2. Disposition Type\n\nIf the disposition type matches \"attachment\" (case-insensitively), this indicates that the recipient should prompt the user to save the response locally, rather than process it normally (as per its media type).\n\nOn the other hand, if it matches \"inline\" (case-insensitively), this implies default processing. Therefore, the disposition type \"inline\" is only useful when it is augmented with additional parameters, such as the filename (see below).\n\nUnknown or unhandled disposition types *SHOULD* be handled by recipients the same way as \"attachment\" (see also [RFC2183], [Section 2.8](https://www.rfc-editor.org/rfc/rfc2183.html#section-2.8)).\n\n### 4.3. Disposition Parameter: 'Filename'\n\nThe parameters \"filename\" and \"filename*\", to be matched case-insensitively, provide information on how to construct a filename for storing the message payload.\n\nDepending on the disposition type, this information might be used right away (in the \"save as...\" interaction caused for the \"attachment\" disposition type), or later on (for instance, when the user decides to save the contents of the current page being displayed).\n\nThe parameters \"filename\" and \"filename*\" differ only in that \"filename*\" uses the encoding defined in [RFC5987], allowing the use of characters not present in the ISO-8859-1 character set ([ISO-8859-1]).\n\nMany user agent implementations predating this specification do not understand the \"filename*\" parameter. Therefore, when both \"filename\" and \"filename*\" are present in a single header field value, recipients *SHOULD* pick \"filename*\" and ignore \"filename\". This way, senders can avoid special-casing specific user agents by sending both the more expressive \"filename*\" parameter, and the \"filename\" parameter as fallback for legacy recipients (see Section 5 for an example).\n\nIt is essential that recipients treat the specified filename as advisory only, and thus be very careful in extracting the desired information. In particular:\n\n- Recipients *MUST NOT* be able to write into any location other than one to which they are specifically entitled. To illustrate the problem, consider the consequences of being able to overwrite well-known system locations (such as \"/etc/passwd\"). One strategy to achieve this is to never trust folder name information in the filename parameter, for instance by stripping all but the last path segment and only considering the actual filename (where 'path segments' are the components of the field value delimited by the path separator characters \"\\\" and \"/\").\n- Many platforms do not use Internet Media Types ([RFC2046]) to hold type information in the file system, but rely on filename extensions instead. Trusting the server-provided file extension could introduce a privilege escalation when the saved file is later opened (consider \".exe\"). Thus, recipients that make use of file extensions to determine the media type *MUST* ensure that a file extension is used that is safe, optimally matching the media type of the received payload.\n- Recipients *SHOULD* strip or replace character sequences that are known to cause confusion both in user interfaces and in filenames, such as control characters and leading and trailing whitespace.\n- Other aspects recipients need to be aware of are names that have a special meaning in the file system or in shell commands, such as \".\" and \"..\", \"~\", \"|\", and also device names. Recipients *SHOULD* ignore or substitute names like these.\n\n### 4.4. Disposition Parameter: Extensions\n\nTo enable future extensions, recipients *SHOULD* ignore unrecognized parameters (see also [RFC2183], [Section 2.8](https://www.rfc-editor.org/rfc/rfc2183.html#section-2.8)).\n\n### 4.5. Extensibility\n\nNote that [Section 9](https://www.rfc-editor.org/rfc/rfc2183.html#section-9) of [RFC2183] defines IANA registries both for disposition types and disposition parameters. This registry is shared by different protocols using Content-Disposition, such as MIME and HTTP. Therefore, not all registered values may make sense in the context of HTTP.\n\n## 5. Examples\n\nDirect the UA to show \"save as\" dialog, with a filename of \"example.html\":\n\n```\nContent-Disposition: Attachment; filename=example.html\n```\n\nDirect the UA to behave as if the Content-Disposition header field wasn't present, but to remember the filename \"an example.html\" for a subsequent save operation:\n\n```\nContent-Disposition: INLINE; FILENAME= \"an example.html\"\n```\n\nNote: This uses the quoted-string form so that the space character can be included.\n\nDirect the UA to show \"save as\" dialog, with a filename containing the Unicode character U+20AC (EURO SIGN):\n\n```\nContent-Disposition: attachment; \n filename*= UTF-8''%e2%82%ac%20rates\n```\n\nHere, the encoding defined in [RFC5987] is also used to encode the non-ISO-8859-1 character.\n\nThis example is the same as the one above, but adding the \"filename\" parameter for compatibility with user agents not implementing RFC 5987:\n\n```\nContent-Disposition: attachment;\n filename=\"EURO rates\";\n filename*=utf-8''%e2%82%ac%20rates\n```\n\nNote: Those user agents that do not support the RFC 5987 encoding ignore \"filename*\" when it occurs after \"filename\".\n\n## 6. Internationalization Considerations\n\nThe \"filename*\" parameter (Section 4.3), using the encoding defined in [RFC5987], allows the server to transmit characters outside the ISO-8859-1 character set, and also to optionally specify the language in use.\n\nFuture parameters might also require internationalization, in which case the same encoding can be used.\n\n## 7. Security Considerations\n\nUsing server-supplied information for constructing local filenames introduces many risks. These are summarized in Section 4.3.\n\nFurthermore, implementers ought to be aware of the security considerations applying to HTTP (see [Section 15](https://www.rfc-editor.org/rfc/rfc2616.html#section-15) of [RFC2616]), and also the parameter encoding defined in [RFC5987] (see [Section 5](https://www.rfc-editor.org/rfc/rfc5987.html#section-5)).\n\n## 8. IANA Considerations\n\n### 8.1. Registry for Disposition Values and Parameters\n\nThis specification does not introduce any changes to the registration procedures for disposition values and parameters that are defined in [Section 9](https://www.rfc-editor.org/rfc/rfc2183.html#section-9) of [RFC2183].\n\n### 8.2. Header Field Registration\n\nThis document updates the definition of the Content-Disposition HTTP header field in the permanent HTTP header field registry (see [RFC3864]).\n\nHeader field name:\n\nContent-Disposition\n\nApplicable protocol:\n\nhttp\n\nStatus:\n\nstandard\n\nAuthor/Change controller:\n\nIETF\n\nSpecification document:\n\nthis specification (Section 4)\n\nRelated information:\n\nnone\n\n## 9. Acknowledgements\n\nThanks to Adam Barth, Rolf Eike Beer, Stewart Bryant, Bjoern Hoehrmann, Alfred Hoenes, Roar Lauritzsen, Alexey Melnikov, Henrik Nordstrom, and Mark Nottingham for their valuable feedback.\n\n## 10. References\n\n### 10.1. Normative References\n\n[ISO-8859-1]\n\nInternational Organization for Standardization, “Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1”, ISO/IEC 8859-1:1998, 1998.\n\n[RFC2119]\n\n[Bradner, S.](mailto:sob@harvard.edu), “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC2616]\n\n[Fielding, R.](mailto:fielding@ics.uci.edu), [Gettys, J.](mailto:jg@w3.org), [Mogul, J.](mailto:mogul@wrl.dec.com), [Frystyk, H.](mailto:frystyk@w3.org), [Masinter, L.](mailto:masinter@parc.xerox.com), [Leach, P.](mailto:paulle@microsoft.com), and [T. Berners-Lee](mailto:timbl@w3.org), “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n[RFC5987]\n\n[Reschke, J.](mailto:julian.reschke@greenbytes.de), “[Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters](https://www.rfc-editor.org/rfc/rfc5987.html)”, RFC 5987, August 2010.\n\n### 10.2. Informative References\n\n[RFC2046]\n\n[Freed, N.](mailto:ned@innosoft.com) and [N. Borenstein](mailto:nsb@nsb.fv.com), “[Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types](https://www.rfc-editor.org/rfc/rfc2046.html)”, RFC 2046, November 1996.\n\n[RFC2047]\n\n[Moore, K.](mailto:moore@cs.utk.edu), “[MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text](https://www.rfc-editor.org/rfc/rfc2047.html)”, RFC 2047, November 1996.\n\n[RFC2183]\n\n[Troost, R.](mailto:rens@century.com), [Dorner, S.](mailto:sdorner@qualcomm.com), and [K. Moore, Ed.](mailto:moore@cs.utk.edu), “[Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field](https://www.rfc-editor.org/rfc/rfc2183.html)”, RFC 2183, August 1997.\n\n[RFC2231]\n\n[Freed, N.](mailto:ned.freed@innosoft.com) and [K. Moore](mailto:moore@cs.utk.edu), “[MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations](https://www.rfc-editor.org/rfc/rfc2231.html)”, RFC 2231, November 1997.\n\n[RFC2388]\n\n[Masinter, L.](mailto:masinter@parc.xerox.com), “[Returning Values from Forms: multipart/form-data](https://www.rfc-editor.org/rfc/rfc2388.html)”, RFC 2388, August 1998.\n\n[RFC3864]\n\n[Klyne, G.](mailto:GK-IETF@ninebynine.org), [Nottingham, M.](mailto:mnot@pobox.com), and [J. Mogul](mailto:JeffMogul@acm.org), “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004.\n\n[RFC3986]\n\n[Berners-Lee, T.](mailto:timbl@w3.org), [Fielding, R.](mailto:fielding@gbiv.com), and [L. Masinter](mailto:LMM@acm.org), “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, January 2005.\n\n[US-ASCII]\n\nAmerican National Standards Institute, “Coded Character Set -- 7-bit American Standard Code for Information Interchange”, ANSI X3.4, 1986.\n\n## Appendix A. Changes from the RFC 2616 Definition\n\nCompared to [Section 19.5.1](https://www.rfc-editor.org/rfc/rfc2616.html#section-19.5.1) of [RFC2616], the following normative changes reflecting actual implementations have been made:\n\n- According to RFC 2616, the disposition type \"attachment\" only applies to content of type \"application/octet-stream\". This restriction has been removed, because recipients in practice do not check the content type, and it also discourages properly declaring the media type.\n- RFC 2616 only allows \"quoted-string\" for the filename parameter. This would be an exceptional parameter syntax, and also doesn't reflect actual use.\n- The definition for the disposition type \"inline\" ( [RFC2183] , [Section 2.1](https://www.rfc-editor.org/rfc/rfc2183.html#section-2.1) ) has been re-added with a suggestion for its processing.\n- This specification requires support for the extended parameter encoding defined in [RFC5987] .\n\n## Appendix B. Differences Compared to RFC 2183\n\n[Section 2](https://www.rfc-editor.org/rfc/rfc2183.html#section-2) of [RFC2183] defines several additional disposition parameters: \"creation-date\", \"modification-date\", \"quoted-date-time\", and \"size\". The majority of user agents do not implement these; thus, they have been omitted from this specification.\n\n## Appendix C. Alternative Approaches to Internationalization\n\nBy default, HTTP header field parameters cannot carry characters outside the ISO-8859-1 ([ISO-8859-1]) character encoding (see [RFC2616], [Section 2.2](https://www.rfc-editor.org/rfc/rfc2616.html#section-2.2)). For the \"filename\" parameter, this of course is an unacceptable restriction.\n\nUnfortunately, user agent implementers have not managed to come up with an interoperable approach, although the IETF Standards Track specifies exactly one solution ([RFC2231], clarified and profiled for HTTP in [RFC5987]).\n\nFor completeness, the sections below describe the various approaches that have been tried, and explain how they are inferior to the RFC 5987 encoding used in this specification.\n\n### C.1. RFC 2047 Encoding\n\nRFC 2047 defines an encoding mechanism for header fields, but this encoding is not supposed to be used for header field parameters — see [Section 5](https://www.rfc-editor.org/rfc/rfc2047.html#section-5) of [RFC2047]:\n\n> An 'encoded-word' MUST NOT appear within a 'quoted-string'.\n> \n> ...\n> \n> An 'encoded-word' MUST NOT be used in parameter of a MIME Content-Type or Content-Disposition field, or in any structured field body except within a 'comment' or 'phrase'.\n\nIn practice, some user agents implement the encoding, some do not (exposing the encoded string to the user), and some get confused by it.\n\n### C.2. Percent Encoding\n\nSome user agents accept percent-encoded ([RFC3986], [Section 2.1](https://www.rfc-editor.org/rfc/rfc3986.html#section-2.1)) sequences of characters. The character encoding being used for decoding depends on various factors, including the encoding of the referring page, the user agent's locale, its configuration, and also the actual value of the parameter.\n\nIn practice, this is hard to use because those user agents that do not support it will display the escaped character sequence to the user. For those user agents that do implement this, it is difficult to predict what character encoding they actually expect.\n\n### C.3. Encoding Sniffing\n\nSome user agents inspect the value (which defaults to ISO-8859-1 for the quoted-string form) and switch to UTF-8 when it seems to be more likely to be the correct interpretation.\n\nAs with the approaches above, this is not interoperable and, furthermore, risks misinterpreting the actual value.\n\n## Appendix D. Advice on Generating Content-Disposition Header Fields\n\nTo successfully interoperate with existing and future user agents, senders of the Content-Disposition header field are advised to:\n\n- Include a \"filename\" parameter when US-ASCII ( [US-ASCII] ) is sufficiently expressive.\n- Use the 'token' form of the filename parameter only when it does not contain disallowed characters (e.g., spaces); in such cases, the quoted-string form should be used.\n- Avoid including the percent character followed by two hexadecimal characters (e.g., %A9) in the filename parameter, since some existing implementations consider it to be an escape character, while others will pass it through unchanged.\n- Avoid including the \"\\\" character in the quoted-string form of the filename parameter, as escaping is not implemented by some user agents, and \"\\\" can be considered an illegal path character.\n- Avoid using non-ASCII characters in the filename parameter. Although most existing implementations will decode them as ISO-8859-1, some will apply heuristics to detect UTF-8, and thus might fail on certain names.\n- Include a \"filename*\" parameter where the desired filename cannot be expressed faithfully using the \"filename\" form. Note that legacy user agents will not process this, and will fall back to using the \"filename\" parameter's content.\n- When a \"filename*\" parameter is sent, to also generate a \"filename\" parameter as a fallback for user agents that do not support the \"filename*\" form, if possible. This can be done by substituting characters with US-ASCII sequences (e.g., Unicode character point U+00E4 (LATIN SMALL LETTER A WITH DIARESIS) by \"ae\"). Note that this may not be possible in some locales.\n- When a \"filename\" parameter is included as a fallback (as per above), \"filename\" should occur first, due to parsing problems in some existing implementations.\n- Use UTF-8 as the encoding of the \"filename*\" parameter, when present, because at least one existing implementation only implements that encoding.\n\nNote that this advice is based upon UA behavior at the time of writing, and might be superseded. At the time of publication of this document, <[http://purl.org/NET/http/content-disposition-tests](http://purl.org/NET/http/content-disposition-tests)> provides an overview of current levels of support in various implementations.\n\n## Author's Address\n\n**Julian F. Reschke**\ngreenbytes GmbH\nHafenweg 16\nMuenster, NW 48155\nGermany\nEmail: [julian.reschke@greenbytes.de](mailto:julian.reschke@greenbytes.de)\nURI: [http://greenbytes.de/tech/webdav/](http://greenbytes.de/tech/webdav/)", "znaku_textu": 22283, "slov": 3024, "odkazu": 132, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:06", "sha256": "49d9c91ca20fc9499c164d7cb5c75da366a091d434122ff439d1b997f2b48a37", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc6266", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2616.html", "https://www.rfc-editor.org/rfc/rfc5987.html", "https://www.rfc-editor.org/rfc/rfc2183.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/rfc/rfc2046.html", "https://www.rfc-editor.org/rfc/rfc2047.html", "https://www.rfc-editor.org/rfc/rfc2231.html", "https://www.rfc-editor.org/rfc/rfc2388.html", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/info/std66", "http://purl.org/NET/http/content-disposition-tests", "http://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc6585.html", "titulek": "RFC 6585 - Additional HTTP Status Codes", "h1": "Additional HTTP Status Codes", "popis": "This document specifies additional HyperText Transfer Protocol (HTTP) status codes for a variety of common situations.", "klicova_slova": "", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC6585", "og:description": "Additional HTTP Status Codes", "og:url": "https://httpwg.org/specs/rfc6585.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. Requirements"}, {"uroven": 2, "text": "3. 428 Precondition Required"}, {"uroven": 2, "text": "4. 429 Too Many Requests"}, {"uroven": 2, "text": "5. 431 Request Header Fields Too Large"}, {"uroven": 2, "text": "6. 511 Network Authentication Required"}, {"uroven": 3, "text": "6.1. The 511 Status Code and Captive Portals"}, {"uroven": 2, "text": "7. Security Considerations"}, {"uroven": 3, "text": "7.1. 428 Precondition Required"}, {"uroven": 3, "text": "7.2. 429 Too Many Requests"}, {"uroven": 3, "text": "7.4. 511 Network Authentication Required"}, {"uroven": 2, "text": "8. IANA Considerations"}, {"uroven": 2, "text": "9. References"}, {"uroven": 3, "text": "9.1. Normative References"}, {"uroven": 3, "text": "9.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Acknowledgements"}, {"uroven": 2, "text": "Appendix B. Issues Raised by Captive Portals"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document specifies additional HyperText Transfer Protocol (HTTP) status codes for a variety of common situations.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc6585](http://www.rfc-editor.org/info/rfc6585).\n\n## Copyright Notice\n\nCopyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n- 2. Requirements\n- 3. 428 Precondition Required\n- 4. 429 Too Many Requests\n- 5. 431 Request Header Fields Too Large\n- 6. 511 Network Authentication Required\n- 7. Security Considerations\n- 8. IANA Considerations\n- 9. References\n- Appendix A. Acknowledgements\n- Appendix B. Issues Raised by Captive Portals\n- Authors' Addresses\n\n## 1. Introduction\n\nThis document specifies additional HTTP [RFC2616] status codes for a variety of common situations, to improve interoperability and avoid confusion when other, less precise status codes are used.\n\nNote that these status codes are optional; servers cannot be required to support them. However, because clients will treat unknown status codes as a generic error of the same class (e.g., 499 is treated as 400 if it is not recognized), they can be safely deployed by existing servers (see [RFC2616] Section 6.1.1 for more information).\n\n## 2. Requirements\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\n## 3. 428 Precondition Required\n\nThe 428 status code indicates that the origin server requires the request to be conditional.\n\nIts typical use is to avoid the \"lost update\" problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict. By requiring requests to be conditional, the server can assure that clients are working with the correct copies.\n\nResponses using this status code SHOULD explain how to resubmit the request successfully. For example:\n\n```\nHTTP/1.1 428 Precondition Required\nContent-Type: text/html\n\n\n \n Precondition Required\n \n \n

Precondition Required

\n

This request is required to be conditional; \n try using \"If-Match\".

\n \n\n```\n\nResponses with the 428 status code MUST NOT be stored by a cache.\n\n## 4. 429 Too Many Requests\n\nThe 429 status code indicates that the user has sent too many requests in a given amount of time (\"rate limiting\").\n\nThe response representations SHOULD include details explaining the condition, and MAY include a Retry-After header indicating how long to wait before making a new request.\n\nFor example:\n\n```\nHTTP/1.1 429 Too Many Requests\nContent-Type: text/html\nRetry-After: 3600\n\n\n \n Too Many Requests\n \n \n

Too Many Requests

\n

I only allow 50 requests per hour to this Web site per\n logged in user. Try again soon.

\n \n\n```\n\nNote that this specification does not define how the origin server identifies the user, nor how it counts requests. For example, an origin server that is limiting request rates can do so based upon counts of requests on a per-resource basis, across the entire server, or even among a set of servers. Likewise, it might identify the user by its authentication credentials, or a stateful cookie.\n\nResponses with the 429 status code MUST NOT be stored by a cache.\n\n## 5. 431 Request Header Fields Too Large\n\nThe 431 status code indicates that the server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.\n\nIt can be used both when the set of request header fields in total is too large, and when a single header field is at fault. In the latter case, the response representation SHOULD specify which header field was too large.\n\nFor example:\n\n```\nHTTP/1.1 431 Request Header Fields Too Large\nContent-Type: text/html\n\n\n \n Request Header Fields Too Large\n \n \n

Request Header Fields Too Large

\n

The \"Example\" header was too large.

\n \n\n```\n\nResponses with the 431 status code MUST NOT be stored by a cache.\n\n## 6. 511 Network Authentication Required\n\nThe 511 status code indicates that the client needs to authenticate to gain network access.\n\nThe response representation SHOULD contain a link to a resource that allows the user to submit credentials (e.g., with an HTML form).\n\nNote that the 511 response SHOULD NOT contain a challenge or the login interface itself, because browsers would show the login interface as being associated with the originally requested URL, which may cause confusion.\n\nThe 511 status SHOULD NOT be generated by origin servers; it is intended for use by intercepting proxies that are interposed as a means of controlling access to the network.\n\nResponses with the 511 status code MUST NOT be stored by a cache.\n\n### 6.1. The 511 Status Code and Captive Portals\n\nThe 511 status code is designed to mitigate problems caused by \"captive portals\" to software (especially non-browser agents) that is expecting a response from the server that a request was made to, not the intervening network infrastructure. It is not intended to encourage deployment of captive portals -- only to limit the damage caused by them.\n\nA network operator wishing to require some authentication, acceptance of terms, or other user interaction before granting access usually does so by identifying clients who have not done so (\"unknown clients\") using their Media Access Control (MAC) addresses.\n\nUnknown clients then have all traffic blocked, except for that on TCP port 80, which is sent to an HTTP server (the \"login server\") dedicated to \"logging in\" unknown clients, and of course traffic to the login server itself.\n\nFor example, a user agent might connect to a network and make the following HTTP request on TCP port 80:\n\n```\nGET /index.htm HTTP/1.1\nHost: www.example.com\n```\n\nUpon receiving such a request, the login server would generate a 511 response:\n\n```\nHTTP/1.1 511 Network Authentication Required\nContent-Type: text/html\n\n\n \n Network Authentication Required\n \n \n \n

You need to \n authenticate with the local network in order to gain \n access.

\n \n\n```\n\nHere, the 511 status code assures that non-browser clients will not interpret the response as being from the origin server, and the META HTML element redirects the user agent to the login server.\n\n## 7. Security Considerations\n\n### 7.1. 428 Precondition Required\n\nThe 428 status code is optional; clients cannot rely upon its use to prevent \"lost update\" conflicts.\n\n### 7.2. 429 Too Many Requests\n\nWhen a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources.\n\nTherefore, servers are not required to use the 429 status code; when limiting resource usage, it may be more appropriate to just drop connections, or take other steps.\n\n### 7.4. 511 Network Authentication Required\n\nIn common use, a response carrying the 511 status code will not come from the origin server indicated in the request's URL. This presents many security issues; e.g., an attacking intermediary may be inserting cookies into the original domain's name space, may be observing cookies or HTTP authentication credentials sent from the user agent, and so on.\n\nHowever, these risks are not unique to the 511 status code; in other words, a captive portal that is not using this status code introduces the same issues.\n\nAlso, note that captive portals using this status code on a Secure Socket Layer (SSL) or Transport Layer Security (TLS) connection (commonly, port 443) will generate a certificate error on the client.\n\n## 8. IANA Considerations\n\nThe HTTP Status Codes registry has been updated with the following entries:\n\n- Value: 428\n- Description: Precondition Required\n- Reference: [RFC6585]\n\n- Value: 429\n- Description: Too Many Requests\n- Reference: [RFC6585]\n\n- Value: 431\n- Description: Request Header Fields Too Large\n- Reference: [RFC6585]\n\n- Value: 511\n- Description: Network Authentication Required\n- Reference: [RFC6585]\n\n## 9. References\n\n### 9.1. Normative References\n\n[RFC2119]\n\n[Bradner, S.](mailto:sob@harvard.edu), “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC2616]\n\n[Fielding, R.](mailto:fielding@ics.uci.edu), [Gettys, J.](mailto:jg@w3.org), [Mogul, J.](mailto:mogul@wrl.dec.com), [Frystyk, H.](mailto:frystyk@w3.org), [Masinter, L.](mailto:masinter@parc.xerox.com), [Leach, P.](mailto:paulle@microsoft.com), and [T. Berners-Lee](mailto:timbl@w3.org), “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n### 9.2. Informative References\n\n[CORS]\n\nvan Kesteren, A., Ed., “[Cross-Origin Resource Sharing](http://www.w3.org/TR/cors/)”, W3C Working Draft WD-cors-20100727, July 2010, <[http://www.w3.org/TR/cors/](http://www.w3.org/TR/cors/)>.\n\n[Favicon]\n\nWikipedia, “[Favicon](http://en.wikipedia.org/w/index.php?title=Favicon&oldid=484627550)”, March 2012, <[http://en.wikipedia.org/w/index.php?title=Favicon&oldid=484627550](http://en.wikipedia.org/w/index.php?title=Favicon&oldid=484627550)>.\n\n[OAuth2.0]\n\nHammer-Lahav, E., Ed., Recordon, D., and D. Hardt, “The OAuth 2.0 Authorization Protocol”, Work in Progress, March 2012.\n\n[P3P]\n\nMarchiori, M., Ed., “[The Platform for Privacy Preferences 1.0 (P3P1.0) Specification](http://www.w3.org/TR/P3P/)”, W3C Recommendation REC-P3P-20020416, April 2002, <[http://www.w3.org/TR/P3P/](http://www.w3.org/TR/P3P/)>.\n\n[RFC4791]\n\n[Daboo, C.](mailto:cyrus@daboo.name), [Desruisseaux, B.](mailto:bernard.desruisseaux@oracle.com), and [L. Dusseault](mailto:ldusseault@commerce.net), “[Calendaring Extensions to WebDAV (CalDAV)](https://www.rfc-editor.org/rfc/rfc4791.html)”, RFC 4791, March 2007.\n\n[RFC4918]\n\nDusseault, L., Ed., “[HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)](https://www.rfc-editor.org/rfc/rfc4918.html)”, RFC 4918, June 2007.\n\n[WIDGETS]\n\nCaceres, M., Ed., “[Widget Packaging and XML Configuration](http://www.w3.org/TR/widgets/)”, W3C Recommendation REC-widgets-20110927, September 2011, <[http://www.w3.org/TR/widgets/](http://www.w3.org/TR/widgets/)>.\n\n[WebFinger]\n\nWebFinger Project, “[WebFingerProtocol (Draft)](http://code.google.com/p/webfinger/wiki/WebFingerProtocol)”, January 2010, <[http://code.google.com/p/webfinger/wiki/WebFingerProtocol](http://code.google.com/p/webfinger/wiki/WebFingerProtocol)>.\n\n## Appendix A. Acknowledgements\n\nThanks to Jan Algermissen and Julian Reschke for their suggestions and feedback.\n\n## Appendix B. Issues Raised by Captive Portals\n\nSince clients cannot differentiate between a portal's response and that of the HTTP server that they intended to communicate with, a number of issues arise. The 511 status code is intended to help mitigate some of them.\n\nOne example is the \"favicon.ico\" [Favicon] commonly used by browsers to identify the site being accessed. If the favicon for a given site is fetched from a captive portal instead of the intended site (e.g., because the user is unauthenticated), it will often \"stick\" in the browser's cache (most implementations cache favicons aggressively) beyond the portal session, so that it seems as if the portal's favicon has \"taken over\" the legitimate site.\n\nAnother browser-based issue comes about when the Platform for Privacy Preferences [P3P] is supported. Depending on how it is implemented, it's possible a browser might interpret a portal's response for the p3p.xml file as the server's, resulting in the privacy policy (or lack thereof) advertised by the portal being interpreted as applying to the intended site. Other Web-based protocols such as WebFinger [WebFinger], Cross-Origin Resource Sharing [CORS], and Open Authorization [OAuth2.0] may also be vulnerable to such issues.\n\nAlthough HTTP is most widely used with Web browsers, a growing number of non-browsing applications use it as a substrate protocol. For example, Web Distributed Authoring and Versioning (WebDAV) [RFC4918] and Calendaring Extensions to WebDAV (CalDAV) [RFC4791] both use HTTP as the basis (for remote authoring and calendaring, respectively). Using these applications from behind a captive portal can result in spurious errors being presented to the user, and might result in content corruption, in extreme cases.\n\nSimilarly, other non-browser applications using HTTP can be affected as well, e.g., widgets [WIDGETS], software updates, and other specialized software such as Twitter clients and the iTunes Music Store.\n\nIt should be noted that it's sometimes believed that using HTTP redirection to direct traffic to the portal addresses these issues. However, since many of these uses \"follow\" redirects, this is not a good solution.\n\n## Authors' Addresses\n\n**Mark Nottingham**\nRackspace\nEmail: [mnot@mnot.net](mailto:mnot@mnot.net)\nURI: [http://www.mnot.net/](http://www.mnot.net/)\n\n**Roy T. Fielding**\nAdobe Systems Incorporated\n345 Park Ave.\nSan Jose, CA 95110\nUSA\nEmail: [fielding@gbiv.com](mailto:fielding@gbiv.com)\nURI: [http://roy.gbiv.com/](http://roy.gbiv.com/)", "znaku_textu": 14468, "slov": 2009, "odkazu": 88, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:56", "sha256": "7f0a4b42d8fe4a6fef4e72025fa7a079909417f734d5b750c0717682fbea0d1a", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc6585", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/rfc/rfc2616.html", "http://www.w3.org/TR/cors/", "http://en.wikipedia.org/w/index.php?oldid=484627550&title=Favicon", "http://www.w3.org/TR/P3P/", "https://www.rfc-editor.org/rfc/rfc4791.html", "https://www.rfc-editor.org/rfc/rfc4918.html", "http://www.w3.org/TR/widgets/", "http://code.google.com/p/webfinger/wiki/WebFingerProtocol", "http://www.mnot.net/", "http://roy.gbiv.com/"]} {"url": "https://httpwg.org/specs/rfc7230.html", "titulek": "RFC 7230 - Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", "h1": "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", "popis": "The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document provides an overview of HTTP architecture and its associated terminology, defines the \"http\" and \"https\" Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations.", "klicova_slova": "Hypertext Transfer Protocol, HTTP, HTTP message format", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7230", "og:description": "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", "og:url": "https://httpwg.org/specs/rfc7230.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Requirements Notation"}, {"uroven": 3, "text": "1.2. Syntax Notation"}, {"uroven": 2, "text": "2. Architecture"}, {"uroven": 3, "text": "2.1. Client/Server Messaging"}, {"uroven": 3, "text": "2.2. Implementation Diversity"}, {"uroven": 3, "text": "2.3. Intermediaries"}, {"uroven": 3, "text": "2.4. Caches"}, {"uroven": 3, "text": "2.5. Conformance and Error Handling"}, {"uroven": 3, "text": "2.6. Protocol Versioning"}, {"uroven": 3, "text": "2.7. Uniform Resource Identifiers"}, {"uroven": 4, "text": "2.7.1. http URI Scheme"}, {"uroven": 4, "text": "2.7.2. https URI Scheme"}, {"uroven": 4, "text": "2.7.3. http and https URI Normalization and Comparison"}, {"uroven": 2, "text": "3. Message Format"}, {"uroven": 3, "text": "3.1. Start Line"}, {"uroven": 4, "text": "3.1.1. Request Line"}, {"uroven": 4, "text": "3.1.2. Status Line"}, {"uroven": 3, "text": "3.2. Header Fields"}, {"uroven": 4, "text": "3.2.1. Field Extensibility"}, {"uroven": 4, "text": "3.2.2. Field Order"}, {"uroven": 4, "text": "3.2.3. Whitespace"}, {"uroven": 4, "text": "3.2.4. Field Parsing"}, {"uroven": 4, "text": "3.2.5. Field Limits"}, {"uroven": 4, "text": "3.2.6. Field Value Components"}, {"uroven": 3, "text": "3.3. Message Body"}, {"uroven": 4, "text": "3.3.1. Transfer-Encoding"}, {"uroven": 4, "text": "3.3.2. Content-Length"}, {"uroven": 4, "text": "3.3.3. Message Body Length"}, {"uroven": 3, "text": "3.4. Handling Incomplete Messages"}, {"uroven": 3, "text": "3.5. Message Parsing Robustness"}, {"uroven": 2, "text": "4. Transfer Codings"}, {"uroven": 3, "text": "4.1. Chunked Transfer Coding"}, {"uroven": 4, "text": "4.1.1. Chunk Extensions"}, {"uroven": 4, "text": "4.1.2. Chunked Trailer Part"}, {"uroven": 4, "text": "4.1.3. Decoding Chunked"}, {"uroven": 3, "text": "4.2. Compression Codings"}, {"uroven": 4, "text": "4.2.1. Compress Coding"}, {"uroven": 4, "text": "4.2.2. Deflate Coding"}, {"uroven": 4, "text": "4.2.3. Gzip Coding"}, {"uroven": 3, "text": "4.3. TE"}, {"uroven": 3, "text": "4.4. Trailer"}, {"uroven": 2, "text": "5. Message Routing"}, {"uroven": 3, "text": "5.1. Identifying a Target Resource"}, {"uroven": 3, "text": "5.2. Connecting Inbound"}, {"uroven": 3, "text": "5.3. Request Target"}, {"uroven": 4, "text": "5.3.1. origin-form"}, {"uroven": 4, "text": "5.3.2. absolute-form"}, {"uroven": 4, "text": "5.3.3. authority-form"}, {"uroven": 4, "text": "5.3.4. asterisk-form"}, {"uroven": 3, "text": "5.4. Host"}, {"uroven": 3, "text": "5.5. Effective Request URI"}, {"uroven": 3, "text": "5.6. Associating a Response to a Request"}, {"uroven": 3, "text": "5.7. Message Forwarding"}, {"uroven": 4, "text": "5.7.1. Via"}, {"uroven": 4, "text": "5.7.2. Transformations"}, {"uroven": 2, "text": "6. Connection Management"}, {"uroven": 3, "text": "6.1. Connection"}, {"uroven": 3, "text": "6.2. Establishment"}, {"uroven": 3, "text": "6.3. Persistence"}, {"uroven": 4, "text": "6.3.1. Retrying Requests"}, {"uroven": 4, "text": "6.3.2. Pipelining"}, {"uroven": 3, "text": "6.4. Concurrency"}, {"uroven": 3, "text": "6.5. Failures and Timeouts"}, {"uroven": 3, "text": "6.6. Tear-down"}, {"uroven": 3, "text": "6.7. Upgrade"}, {"uroven": 2, "text": "7. ABNF List Extension: #rule"}, {"uroven": 2, "text": "8. IANA Considerations"}, {"uroven": 3, "text": "8.1. Header Field Registration"}, {"uroven": 3, "text": "8.2. URI Scheme Registration"}, {"uroven": 3, "text": "8.3. Internet Media Type Registration"}, {"uroven": 4, "text": "8.3.1. Internet Media Type message/http"}, {"uroven": 4, "text": "8.3.2. Internet Media Type application/http"}, {"uroven": 3, "text": "8.4. Transfer Coding Registry"}, {"uroven": 4, "text": "8.4.1. Procedure"}, {"uroven": 4, "text": "8.4.2. Registration"}, {"uroven": 3, "text": "8.5. Content Coding Registration"}, {"uroven": 3, "text": "8.6. Upgrade Token Registry"}, {"uroven": 4, "text": "8.6.1. Procedure"}, {"uroven": 4, "text": "8.6.2. Upgrade Token Registration"}, {"uroven": 2, "text": "9. Security Considerations"}, {"uroven": 3, "text": "9.1. Establishing Authority"}, {"uroven": 3, "text": "9.2. Risks of Intermediaries"}, {"uroven": 3, "text": "9.3. Attacks via Protocol Element Length"}, {"uroven": 3, "text": "9.4. Response Splitting"}, {"uroven": 3, "text": "9.5. Request Smuggling"}, {"uroven": 3, "text": "9.6. Message Integrity"}, {"uroven": 3, "text": "9.7. Message Confidentiality"}, {"uroven": 3, "text": "9.8. Privacy of Server Log Information"}, {"uroven": 2, "text": "10. Acknowledgments"}, {"uroven": 2, "text": "11. References"}, {"uroven": 3, "text": "11.1. Normative References"}, {"uroven": 3, "text": "11.2. Informative References"}, {"uroven": 2, "text": "Appendix A. HTTP Version History"}, {"uroven": 3, "text": "A.1. Changes from HTTP/1.0"}, {"uroven": 4, "text": "A.1.1. Multihomed Web Servers"}, {"uroven": 4, "text": "A.1.2. Keep-Alive Connections"}, {"uroven": 4, "text": "A.1.3. Introduction of Transfer-Encoding"}, {"uroven": 3, "text": "A.2. Changes from RFC 2616"}, {"uroven": 2, "text": "Appendix B. Collected ABNF"}, {"uroven": 2, "text": "Index"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document provides an overview of HTTP architecture and its associated terminology, defines the \"http\" and \"https\" Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7230](http://www.rfc-editor.org/info/rfc7230).\n\n## Copyright Notice\n\nCopyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Requirements Notation\n - 1.2. Syntax Notation\n- 2. Architecture\n - 2.1. Client/Server Messaging\n - 2.2. Implementation Diversity\n - 2.3. Intermediaries\n - 2.4. Caches\n - 2.5. Conformance and Error Handling\n - 2.6. Protocol Versioning\n - 2.7. Uniform Resource Identifiers\n - 2.7.1. http URI Scheme\n - 2.7.2. https URI Scheme\n - 2.7.3. http and https URI Normalization and Comparison\n- 3. Message Format\n - 3.1. Start Line\n - 3.1.1. Request Line\n - 3.1.2. Status Line\n - 3.2. Header Fields\n - 3.2.1. Field Extensibility\n - 3.2.2. Field Order\n - 3.2.3. Whitespace\n - 3.2.4. Field Parsing\n - 3.2.5. Field Limits\n - 3.2.6. Field Value Components\n - 3.3. Message Body\n - 3.3.1. Transfer-Encoding\n - 3.3.2. Content-Length\n - 3.3.3. Message Body Length\n - 3.4. Handling Incomplete Messages\n - 3.5. Message Parsing Robustness\n- 4. Transfer Codings\n - 4.1. Chunked Transfer Coding\n - 4.1.1. Chunk Extensions\n - 4.1.2. Chunked Trailer Part\n - 4.1.3. Decoding Chunked\n - 4.2. Compression Codings\n - 4.2.1. Compress Coding\n - 4.2.2. Deflate Coding\n - 4.2.3. Gzip Coding\n - 4.3. TE\n - 4.4. Trailer\n- 5. Message Routing\n - 5.1. Identifying a Target Resource\n - 5.2. Connecting Inbound\n - 5.3. Request Target\n - 5.3.1. origin-form\n - 5.3.2. absolute-form\n - 5.3.3. authority-form\n - 5.3.4. asterisk-form\n - 5.4. Host\n - 5.5. Effective Request URI\n - 5.6. Associating a Response to a Request\n - 5.7. Message Forwarding\n - 5.7.1. Via\n - 5.7.2. Transformations\n- 6. Connection Management\n - 6.1. Connection\n - 6.2. Establishment\n - 6.3. Persistence\n - 6.3.1. Retrying Requests\n - 6.3.2. Pipelining\n - 6.4. Concurrency\n - 6.5. Failures and Timeouts\n - 6.6. Tear-down\n - 6.7. Upgrade\n- 7. ABNF List Extension: #rule\n- 8. IANA Considerations\n - 8.1. Header Field Registration\n - 8.2. URI Scheme Registration\n - 8.3. Internet Media Type Registration\n - 8.3.1. Internet Media Type message/http\n - 8.3.2. Internet Media Type application/http\n - 8.4. Transfer Coding Registry\n - 8.4.1. Procedure\n - 8.4.2. Registration\n - 8.5. Content Coding Registration\n - 8.6. Upgrade Token Registry\n - 8.6.1. Procedure\n - 8.6.2. Upgrade Token Registration\n- 9. Security Considerations\n - 9.1. Establishing Authority\n - 9.2. Risks of Intermediaries\n - 9.3. Attacks via Protocol Element Length\n - 9.4. Response Splitting\n - 9.5. Request Smuggling\n - 9.6. Message Integrity\n - 9.7. Message Confidentiality\n - 9.8. Privacy of Server Log Information\n- 10. Acknowledgments\n- 11. References\n - 11.1. Normative References\n - 11.2. Informative References\n- Appendix A. HTTP Version History\n - A.1. Changes from HTTP/1.0\n - A.1.1. Multihomed Web Servers\n - A.1.2. Keep-Alive Connections\n - A.1.3. Introduction of Transfer-Encoding\n - A.2. Changes from RFC 2616\n- Appendix B. Collected ABNF\n- Index\n- Authors' Addresses\n\n## 1. Introduction\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level request/response protocol that uses extensible semantics and self-descriptive message payloads for flexible interaction with network-based hypertext information systems. This document is the first in a series of documents that collectively form the HTTP/1.1 specification:\n\n1. \"Message Syntax and Routing\" (this document)\n2. \"Semantics and Content\" [RFC7231]\n3. \"Conditional Requests\" [RFC7232]\n4. \"Range Requests\" [RFC7233]\n5. \"Caching\" [RFC7234]\n6. \"Authentication\" [RFC7235]\n\nThis HTTP/1.1 specification obsoletes RFC 2616 and RFC 2145 (on HTTP versioning). This specification also updates the use of CONNECT to establish a tunnel, previously defined in RFC 2817, and defines the \"https\" URI scheme that was described informally in RFC 2818.\n\nHTTP is a generic interface protocol for information systems. It is designed to hide the details of how a service is implemented by presenting a uniform interface to clients that is independent of the types of resources provided. Likewise, servers do not need to be aware of each client's purpose: an HTTP request can be considered in isolation rather than being associated with a specific type of client or a predetermined sequence of application steps. The result is a protocol that can be used effectively in many different contexts and for which implementations can evolve independently over time.\n\nHTTP is also designed for use as an intermediation protocol for translating communication to and from non-HTTP information systems. HTTP proxies and gateways can provide access to alternative information services by translating their diverse protocols into a hypertext format that can be viewed and manipulated by clients in the same way as HTTP services.\n\nOne consequence of this flexibility is that the protocol cannot be defined in terms of what occurs behind the interface. Instead, we are limited to defining the syntax of communication, the intent of received communication, and the expected behavior of recipients. If the communication is considered in isolation, then successful actions ought to be reflected in corresponding changes to the observable interface provided by servers. However, since multiple clients might act in parallel and perhaps at cross-purposes, we cannot require that such changes be observable beyond the scope of a single response.\n\nThis document describes the architectural elements that are used or referred to in HTTP, defines the \"http\" and \"https\" URI schemes, describes overall network operation and connection management, and defines HTTP message framing and forwarding requirements. Our goal is to define all of the mechanisms necessary for HTTP message handling that are independent of message semantics, thereby defining the complete set of requirements for message parsers and message-forwarding intermediaries.\n\n### 1.1. Requirements Notation\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nConformance criteria and considerations regarding error handling are defined in Section 2.5.\n\n### 1.2. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234] with a list extension, defined in Section 7, that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). Appendix B shows the collected grammar with all list operators expanded to standard ABNF notation.\n\nThe following core rules are included by reference, as defined in [RFC5234], [Appendix B.1](https://www.rfc-editor.org/rfc/rfc5234.html#appendix-B.1): ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible [USASCII] character).\n\nAs a convention, ABNF rule names prefixed with \"obs-\" denote \"obsolete\" grammar rules that appear for historical reasons.\n\n## 2. Architecture\n\nHTTP was created for the World Wide Web (WWW) architecture and has evolved over time to support the scalability needs of a worldwide hypertext system. Much of that architecture is reflected in the terminology and syntax productions used to define HTTP.\n\n### 2.1. Client/Server Messaging\n\nHTTP is a stateless request/response protocol that operates by exchanging messages (Section 3) across a reliable transport- or session-layer \"connection\" (Section 6). An HTTP \"client\" is a program that establishes a connection to a server for the purpose of sending one or more HTTP requests. An HTTP \"server\" is a program that accepts connections in order to service HTTP requests by sending HTTP responses.\n\nThe 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. The term \"user agent\" refers to any of the various client programs that initiate a request, including (but not limited to) browsers, spiders (web-based robots), command-line tools, custom applications, and mobile apps. The term \"origin server\" refers to the program that can originate authoritative responses for a given target resource. The terms \"sender\" and \"recipient\" refer to any implementation that sends or receives a given message, respectively.\n\nHTTP relies upon the Uniform Resource Identifier (URI) standard [RFC3986] to indicate the target resource (Section 5.1) and relationships between resources. Messages are passed in a format similar to that used by Internet mail [RFC5322] and the Multipurpose Internet Mail Extensions (MIME) [RFC2045] (see [Appendix A](rfc7231.html#differences.between.http.and.mime) of [RFC7231] for the differences between HTTP and MIME messages).\n\nMost 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).\n\n```\n request >\n UA ======================================= O\n < response\n```\n\nA client sends an HTTP request to a server in the form of a request message, beginning with a request-line that includes a method, URI, and protocol version (Section 3.1.1), followed by header fields containing request modifiers, client information, and representation metadata (Section 3.2), an empty line to indicate the end of the header section, and finally a message body containing the payload body (if any, Section 3.3).\n\nA server responds to a client's request by sending one or more HTTP response messages, each beginning with a status line that includes the protocol version, a success or error code, and textual reason phrase (Section 3.1.2), possibly followed by header fields containing server information, resource metadata, and representation metadata (Section 3.2), an empty line to indicate the end of the header section, and finally a message body containing the payload body (if any, Section 3.3).\n\nA connection might be used for multiple request/response exchanges, as defined in Section 6.3.\n\nThe following example illustrates a typical message exchange for a GET request ([Section 4.3.1](rfc7231.html#GET) of [RFC7231]) on the URI \"http://www.example.com/hello.txt\":\n\nClient request:\n\n```\nGET /hello.txt HTTP/1.1\nUser-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3\nHost: www.example.com\nAccept-Language: en, mi\n```\n\nServer response:\n\n```\nHTTP/1.1 200 OK\nDate: Mon, 27 Jul 2009 12:28:53 GMT\nServer: Apache\nLast-Modified: Wed, 22 Jul 2009 19:15:56 GMT\nETag: \"34aa387-d-1568eb00\"\nAccept-Ranges: bytes\nContent-Length: 51\nVary: Accept-Encoding\nContent-Type: text/plain\n\nHello World! My payload includes a trailing CRLF.\n```\n\n### 2.2. Implementation Diversity\n\nWhen considering the design of HTTP, it is easy to fall into a trap of thinking that all user agents are general-purpose browsers and all origin servers are large public websites. That is not the case in practice. Common HTTP user agents include household appliances, stereos, scales, firmware update scripts, command-line programs, mobile apps, and communication devices in a multitude of shapes and sizes. Likewise, common HTTP origin servers include home automation units, configurable networking components, office machines, autonomous robots, news feeds, traffic cameras, ad selectors, and video-delivery platforms.\n\nThe term \"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.\n\nThe implementation diversity of HTTP means that not all user agents can 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.\n\n### 2.3. Intermediaries\n\nHTTP 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.\n\n```\n > > > >\n UA =========== A =========== B =========== C =========== O\n < < < <\n```\n\nThe 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.\n\nThe terms \"upstream\" and \"downstream\" are used to describe directional requirements in relation to the message flow: all messages flow from upstream to downstream. The terms \"inbound\" and \"outbound\" are used to describe directional requirements in relation to the request route: \"inbound\" means toward the origin server and \"outbound\" means toward the user agent.\n\nA \"proxy\" is a message-forwarding agent that is selected by the client, usually via local configuration rules, to receive requests for some type(s) of absolute URI and attempt to satisfy those requests via translation through the HTTP interface. Some translations are minimal, such as for proxy requests for \"http\" URIs, whereas other requests might require translation to and from entirely different application-level protocols. Proxies are often used to group an organization's HTTP requests through a common intermediary for the sake of security, annotation services, or shared caching. Some proxies are designed to apply transformations to selected messages or payloads while they are being forwarded, as described in Section 5.7.2.\n\nA \"gateway\" (a.k.a. \"reverse proxy\") is an intermediary that acts as an origin server for the outbound connection but translates received requests and forwards them inbound to another server or servers. Gateways are often used to encapsulate legacy or untrusted information services, to improve server performance through \"accelerator\" caching, and to enable partitioning or load balancing of HTTP services across multiple machines.\n\nAll HTTP requirements applicable to an origin server also apply to the outbound communication of a gateway. A gateway communicates with inbound servers using any protocol that it desires, including private extensions to HTTP that are outside the scope of this specification. However, an HTTP-to-HTTP gateway that wishes to interoperate with third-party HTTP servers ought to conform to user agent requirements on the gateway's inbound connection.\n\nA \"tunnel\" acts as a blind relay between two connections without changing the messages. Once active, a tunnel is not considered a party to the HTTP communication, though the tunnel might have been initiated by an HTTP request. A tunnel ceases to exist when both ends of the relayed connection are closed. Tunnels are used to extend a virtual connection through an intermediary, such as when Transport Layer Security (TLS, [RFC5246]) is used to establish confidential communication through a shared firewall proxy.\n\nThe above categories for intermediary only consider those acting as participants in the HTTP communication. There are also intermediaries that can act on lower layers of the network protocol stack, filtering or redirecting HTTP traffic without the knowledge or permission of message senders. Network intermediaries are indistinguishable (at a protocol level) from a man-in-the-middle attack, often introducing security flaws or interoperability problems due to mistakenly violating HTTP semantics.\n\nFor example, an \"interception proxy\" [RFC3040] (also commonly known as a \"transparent proxy\" [RFC1919] or \"captive portal\") differs from an HTTP proxy because it is not selected by the client. Instead, an interception proxy filters or redirects outgoing TCP port 80 packets (and occasionally other common port traffic). Interception proxies are commonly found on public network access points, as a means of enforcing account subscription prior to allowing use of non-local Internet services, and within corporate firewalls to enforce network usage policies.\n\nHTTP is defined as a stateless protocol, meaning that each request message can be understood in isolation. Many implementations depend on HTTP's stateless design in order to reuse proxied connections or dynamically load balance requests across multiple servers. Hence, 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.\n\n### 2.4. Caches\n\nA \"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 by a server while it is acting as a tunnel.\n\nThe effect of a cache is that the request/response chain is shortened if one of the participants along the chain has a cached response applicable to that request. The following illustrates the resulting chain if B has a cached copy of an earlier response from O (via C) for a request that has not been cached by UA or A.\n\n```\n > >\n UA =========== A =========== B - - - - - - C - - - - - - O\n < <\n```\n\nA response is \"cacheable\" if a cache is allowed to store a copy of the response message for use in answering subsequent requests. Even when a response is cacheable, there might be additional constraints placed by the client or by the origin server on when that cached response can be used for a particular request. HTTP requirements for cache behavior and cacheable responses are defined in [Section 2](rfc7234.html#caching.overview) of [RFC7234].\n\nThere is a wide variety of architectures and configurations of caches deployed across the World Wide Web and inside large organizations. These include national hierarchies of proxy caches to save transoceanic bandwidth, collaborative systems that broadcast or multicast cache entries, archives of pre-fetched cache entries for use in off-line or high-latency environments, and so on.\n\n### 2.5. Conformance and Error Handling\n\nThis specification targets conformance criteria according to the role of a participant in HTTP communication. Hence, HTTP 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 (social) requirements are placed on implementations, resource owners, and protocol element registrations when they apply beyond the scope of a single communication.\n\nThe verb \"generate\" is used instead of \"send\" where a requirement differentiates between creating a protocol element and merely forwarding a received element downstream.\n\nAn implementation is considered conformant if it complies with all of the requirements associated with the roles it partakes in HTTP.\n\nConformance includes both the syntax and semantics of protocol elements. A sender *MUST NOT* generate protocol elements that convey a meaning that is known by that sender to be false. 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).\n\nWhen a received protocol element is parsed, the recipient *MUST* be able to parse any value of reasonable length that is applicable to the recipient's role and that matches the grammar defined by the corresponding ABNF rules. Note, however, that some received protocol elements might not be parsed. For example, an intermediary forwarding a message might parse a header-field into generic field-name and field-value components, but then forward the header field without further parsing inside the field-value.\n\nHTTP 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 two decades of HTTP use and is expected to continue changing in the future.\n\nAt a minimum, a recipient *MUST* be able to parse and process protocol element lengths that are at least as long as the values that it generates for those same protocol elements in other messages. For example, an origin server that publishes very long URI references to its own resources needs to be able to parse and process those same references when received as a request target.\n\nA recipient *MUST* interpret a received protocol element according to the semantics defined for it by this specification, including extensions to this specification, unless the recipient has determined (through experience or configuration) that the sender incorrectly implements what is implied by those semantics. For example, an origin server might disregard the contents of a received [Accept-Encoding](rfc7231.html#header.accept-encoding) header field if inspection of the [User-Agent](rfc7231.html#header.user-agent) header field indicates a specific implementation version that is known to fail on receipt of certain content codings.\n\nUnless noted otherwise, a recipient *MAY* attempt to recover a usable protocol element from an invalid construct. HTTP does not define specific error handling mechanisms except when they have a direct impact on security, since different applications of the protocol require different error handling strategies. For example, a Web browser might wish to transparently recover from a response where the [Location](rfc7231.html#header.location) header field doesn't parse according to the ABNF, whereas a systems control client might consider any form of error recovery to be dangerous.\n\n### 2.6. Protocol Versioning\n\nHTTP uses a \".\" numbering scheme to indicate versions of the protocol. This specification defines version \"1.1\". The protocol version as a whole indicates the sender's conformance with the set of requirements laid out in that version's corresponding specification of HTTP.\n\nThe version of an HTTP message is indicated by an HTTP-version field in the first line of the message. HTTP-version is case-sensitive.\n\n```\n HTTP-version = HTTP-name \"/\" DIGIT \".\" DIGIT HTTP-name = %x48.54.54.50 ; \"HTTP\", case-sensitive \n```\n\nThe HTTP version number consists of two decimal digits separated by a \".\" (period or decimal point). The first digit (\"major version\") indicates the HTTP messaging syntax, whereas the second digit (\"minor version\") indicates the highest minor version within that major version to which the sender is conformant and able to understand for future communication. The minor version advertises the sender's communication capabilities even when the sender is only using a backwards-compatible subset of the protocol, thereby letting the recipient know that more advanced features can be used in response (by servers) or in future requests (by clients).\n\nWhen an HTTP/1.1 message is sent to an HTTP/1.0 recipient [RFC1945] or a recipient whose version is unknown, the HTTP/1.1 message is constructed such that it can be interpreted as a valid HTTP/1.0 message if all of the newer features are ignored. This specification places recipient-version requirements on some new features so that a conformant sender will only use compatible features until it has determined, through configuration or the receipt of a message, that the recipient supports HTTP/1.1.\n\nThe interpretation of a header field does not change between minor versions of the same major HTTP version, though the default behavior of a recipient in the absence of such a field can change. Unless specified otherwise, header fields defined in HTTP/1.1 are defined for all versions of HTTP/1.x. In particular, the Host and Connection header fields ought to be implemented by all HTTP/1.x implementations whether or not they advertise conformance with HTTP/1.1.\n\nNew header fields can be introduced without changing the protocol version if their defined semantics allow them to be safely ignored by recipients that do not recognize them. Header field extensibility is discussed in Section 3.2.1.\n\nIntermediaries that process HTTP messages (i.e., all intermediaries other than those acting as tunnels) *MUST* send their own HTTP-version in forwarded messages. In other words, they are not allowed to blindly forward the first line of an HTTP message without ensuring that the protocol version in that message matches a version to which that intermediary is conformant for both the receiving and sending of messages. Forwarding an HTTP message without rewriting the HTTP-version might result in communication errors when downstream recipients use the message sender's version to determine what features are safe to use for later communication with that sender.\n\nA client *SHOULD* send a request version equal to the highest version to which the client is conformant and whose major version is no higher than the highest version supported by the server, if this is known. A client *MUST NOT* send a version to which it is not conformant.\n\nA 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](rfc7231.html#header.server)) that the server improperly handles higher request versions.\n\nA server *SHOULD* send a response version equal to the highest version to which the server is conformant that has a major version less than or equal to the one received in the request. A server *MUST NOT* send a version to which it is not conformant. A server can send a [505 (HTTP Version Not Supported)](rfc7231.html#status.505) response if it wishes, for any reason, to refuse service of the client's major protocol version.\n\nA server *MAY* send an HTTP/1.0 response to a request if it is known or suspected that the client incorrectly implements the HTTP specification and is incapable of correctly processing later version responses, such as when a client fails to parse the version number correctly or when an intermediary is known to blindly forward the HTTP-version even when it doesn't conform to the given minor version of the protocol. Such protocol downgrades *SHOULD NOT* be performed unless triggered by specific client attributes, such as when one or more of the request header fields (e.g., [User-Agent](rfc7231.html#header.user-agent)) uniquely match the values sent by a client known to be in error.\n\nThe intention of HTTP's versioning design is that the major number will only be incremented if an incompatible message syntax is introduced, and that the minor number will only be incremented when changes made to the protocol have the effect of adding to the message semantics or implying additional capabilities of the sender. However, the minor version was not incremented for the changes introduced between [RFC2068] and [RFC2616], and this revision has specifically avoided any such changes to the protocol.\n\nWhen an HTTP message is received with a major version number that the recipient implements, but a higher minor version number than what the recipient implements, the recipient *SHOULD* process the message as if it were in the highest minor version within that major version to which the recipient is conformant. A recipient can assume that a message with a higher minor version, when sent to a recipient that has not yet indicated support for that higher version, is sufficiently backwards-compatible to be safely processed by any implementation of the same major version.\n\n### 2.7. Uniform Resource Identifiers\n\nUniform Resource Identifiers (URIs) [RFC3986] are used throughout HTTP as the means for identifying resources ([Section 2](rfc7231.html#resources) of [RFC7231]). URI references are used to target requests, indicate redirects, and define relationships.\n\nThe definitions of \"URI-reference\", \"absolute-URI\", \"relative-part\", \"scheme\", \"authority\", \"port\", \"host\", \"path-abempty\", \"segment\", \"query\", and \"fragment\" are adopted from the URI generic syntax. An \"absolute-path\" rule is defined for protocol elements that can contain a non-empty path component. (This rule differs slightly from the path-abempty rule of RFC 3986, which allows for an empty path to be used in references, and path-absolute rule, which does not allow paths that begin with \"//\".) A \"partial-URI\" rule is defined for protocol elements that can contain a relative URI but not a fragment component.\n\n```\n URI-reference = \n absolute-URI = \n relative-part = \n scheme = \n authority = \n uri-host = \n port = \n path-abempty = \n segment = \n query = \n fragment = \n \n absolute-path = 1*( \"/\" segment )\n partial-URI = relative-part [ \"?\" query ]\n```\n\nEach 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, or some combination of the above. Unless otherwise indicated, URI references are parsed relative to the effective request URI (Section 5.5).\n\n#### 2.7.1. http URI Scheme\n\nThe \"http\" URI scheme is hereby defined for the purpose of minting identifiers according to their association with the hierarchical namespace governed by a potential HTTP origin server listening for TCP ([RFC0793]) connections on a given port.\n\n```\n http-URI = \"http:\" \"//\" authority path-abempty [ \"?\" query ]\n [ \"#\" fragment ]\n```\n\nThe origin server for an \"http\" URI is identified by the authority component, which includes a host identifier and optional TCP port ([RFC3986], [Section 3.2.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2)). The hierarchical path component and optional query component serve as an identifier for a potential target resource within that origin server's name space. The optional fragment component allows for indirect identification of a secondary resource, independent of the URI scheme, as defined in [Section 3.5](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.5) of [RFC3986].\n\nA sender *MUST NOT* generate an \"http\" URI with an empty host identifier. A recipient that processes such a URI reference *MUST* reject it as invalid.\n\nIf the host identifier is provided as an IP address, the origin server is the listener (if any) on the indicated TCP port at that IP address. If host is a registered name, the registered name is an indirect identifier for use with a name resolution service, such as DNS, to find an address for that origin server. If the port subcomponent is empty or not given, TCP port 80 (the reserved port for WWW services) is the default.\n\nNote that the presence of a URI with a given authority component does not imply that there is always an HTTP server listening for connections on that host and port. Anyone can mint a URI. What the authority component determines is who has the right to respond authoritatively to requests that target the identified resource. The delegated nature of registered names and IP addresses creates a federated namespace, based on control over the indicated host and port, whether or not an HTTP server is present. See Section 9.1 for security considerations related to establishing authority.\n\nWhen an \"http\" URI is used within a context that calls for access to the indicated resource, a client *MAY* attempt access by resolving the host to an IP address, establishing a TCP connection to that address on the indicated port, and sending an HTTP request message (Section 3) containing the URI's identifying data (Section 5) to the server. If the server responds to that request with a non-interim HTTP response message, as described in [Section 6](rfc7231.html#status.codes) of [RFC7231], then that response is considered an authoritative answer to the client's request.\n\nAlthough HTTP is independent of the transport protocol, the \"http\" scheme is specific to TCP-based services because the name delegation process depends on TCP for establishing authority. An HTTP service based on some other underlying connection protocol would presumably be identified using a different URI scheme, just as the \"https\" scheme (below) is used for resources that require an end-to-end secured connection. Other protocols might also be used to provide access to \"http\" identified resources — it is only the authoritative interface that is specific to TCP.\n\nThe URI generic syntax for authority also includes a deprecated userinfo subcomponent ([RFC3986], [Section 3.2.1](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.1)) for including user authentication information in the URI. Some implementations make use of the userinfo component for internal configuration of authentication information, such as within command invocation options, configuration files, or bookmark lists, even though such usage might expose a user identifier or password. A sender *MUST NOT* generate the userinfo subcomponent (and its \"@\" delimiter) when an \"http\" URI reference is generated within a message as a request target or header field value. Before making use of an \"http\" 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.\n\n#### 2.7.2. https URI Scheme\n\nThe \"https\" URI scheme is hereby defined for the purpose of minting identifiers according to their association with the hierarchical namespace governed by a potential HTTP origin server listening to a given TCP port for TLS-secured connections ([RFC5246]).\n\nAll of the requirements listed above for the \"http\" scheme are also requirements for the \"https\" scheme, except that TCP port 443 is the default if the port subcomponent is empty or not given, and the user agent *MUST* ensure that its connection to the origin server is secured through the use of strong encryption, end-to-end, prior to sending the first HTTP request.\n\n```\n https-URI = \"https:\" \"//\" authority path-abempty [ \"?\" query ]\n [ \"#\" fragment ]\n```\n\nNote that the \"https\" URI scheme depends on both TLS and TCP for establishing authority. Resources made available via the \"https\" scheme have no shared identity with the \"http\" scheme even if their resource identifiers indicate the same authority (the same host listening to the same TCP port). They are distinct namespaces and are considered to be distinct origin servers. However, an extension to HTTP that is defined to apply to entire host domains, such as the Cookie protocol [RFC6265], can allow information set by one service to impact communication with other services within a matching group of host domains.\n\nThe process for authoritative access to an \"https\" identified resource is defined in [RFC2818].\n\n#### 2.7.3. http and https URI Normalization and Comparison\n\nSince the \"http\" and \"https\" schemes conform to the URI generic syntax, such URIs are normalized and compared according to the algorithm defined in [Section 6](https://www.rfc-editor.org/rfc/rfc3986.html#section-6) of [RFC3986], using the defaults described above for each scheme.\n\nIf the port is equal to the default port for a scheme, the normal form is to omit the port subcomponent. When not being used in absolute form as the request 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](https://www.rfc-editor.org/rfc/rfc3986.html#section-2.1) and [2.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-2.2) of [RFC3986]).\n\nFor example, the following three URIs are equivalent:\n\n```\n http://example.com:80/~smith/home.html\n http://EXAMPLE.com/%7Esmith/home.html\n http://EXAMPLE.com:/%7esmith/home.html\n```\n\n## 3. Message Format\n\nAll HTTP/1.1 messages consist of a start-line followed by a sequence of octets in a format similar to the Internet Message Format [RFC5322]: zero or more header fields (collectively referred to as the \"headers\" or the \"header section\"), an empty line indicating the end of the header section, and an optional message body.\n\n```\n HTTP-message = start-line\n *( header-field CRLF )\n CRLF\n [ message-body ]\n```\n\nThe normal procedure for parsing an HTTP message is to read the start-line into a structure, read each header field into a hash table by field name until the empty line, and then use the parsed data to determine if a message body is expected. If a message body has been indicated, then it is read as a stream until an amount of octets equal to the message body length is read or the connection is closed.\n\nA recipient *MUST* parse an HTTP message as a sequence of octets in an encoding that is a superset of US-ASCII [USASCII]. Parsing an HTTP message as a stream of Unicode characters, without regard for the specific encoding, creates security vulnerabilities due to the varying ways that string processing libraries handle invalid multibyte character sequences that contain the octet LF (%x0A). String-based parsers can only be safely used within protocol elements after the element has been extracted from the message, such as within a header field-value after message parsing has delineated the individual fields.\n\nAn HTTP message can be parsed as a stream for incremental processing or forwarding downstream. However, recipients cannot rely on incremental delivery of partial messages, since some implementations will buffer or delay message forwarding for the sake of network efficiency, security checks, or payload transformations.\n\nA sender *MUST NOT* send whitespace between the start-line and the first header field. A recipient that receives whitespace between the start-line and the first header field *MUST* either reject the message as invalid or consume each whitespace-preceded line without further processing of it (i.e., ignore the entire line, along with any subsequent lines preceded by whitespace, until a properly formed header field is received or the header section is terminated).\n\nThe presence of such whitespace in a request might be an attempt to trick a server into ignoring that field or processing the line after it as a new request, either of which might result in a security vulnerability if other implementations within the request chain interpret the same message differently. Likewise, the presence of such whitespace in a response might be ignored by some clients or cause others to cease parsing.\n\n### 3.1. Start Line\n\nAn HTTP message can be either a request from client to server or a response from server to client. Syntactically, the two types of message differ only in the start-line, which is either a request-line (for requests) or a status-line (for responses), and in the algorithm for determining the length of the message body (Section 3.3).\n\nIn theory, a client could receive requests and a server could receive responses, distinguishing them by their different start-line formats, but, in practice, servers are implemented to only expect a request (a response is interpreted as an unknown or invalid request method) and clients are implemented to only expect a response.\n\n```\n start-line = request-line / status-line \n```\n\n#### 3.1.1. Request Line\n\nA request-line begins with a method token, followed by a single space (SP), the request-target, another single space (SP), the protocol version, and ends with CRLF.\n\n```\n request-line = method SP request-target SP HTTP-version CRLF \n```\n\nThe method token indicates the request method to be performed on the target resource. The request method is case-sensitive.\n\n```\n method = token \n```\n\nThe request methods defined by this specification can be found in [Section 4](rfc7231.html#methods) of [RFC7231], along with information regarding the HTTP method registry and considerations for defining new methods.\n\nThe request-target identifies the target resource upon which to apply the request, as defined in Section 5.3.\n\nRecipients typically parse the request-line into its component parts by splitting on whitespace (see Section 3.5), since no whitespace is allowed in the three components. Unfortunately, some user agents fail to properly encode or exclude whitespace found in hypertext references, resulting in those disallowed characters being sent in a request-target.\n\nRecipients of an invalid request-line *SHOULD* respond with either a [400 (Bad Request)](rfc7231.html#status.400) error or a [301 (Moved Permanently)](rfc7231.html#status.301) redirect with the request-target properly encoded. A recipient *SHOULD NOT* attempt to autocorrect and then process the request without a redirect, since the invalid request-line might be deliberately crafted to bypass security filters along the request chain.\n\nHTTP does not place a predefined limit on the length of a request-line, as described in Section 2.5. A server that receives a method longer than any that it implements *SHOULD* respond with a [501 (Not Implemented)](rfc7231.html#status.501) status code. A server that receives a request-target longer than any URI it wishes to parse *MUST* respond with a [414 (URI Too Long)](rfc7231.html#status.414) status code (see [Section 6.5.12](rfc7231.html#status.414) of [RFC7231]).\n\nVarious ad hoc limitations on request-line length are found in practice. It is *RECOMMENDED* that all HTTP senders and recipients support, at a minimum, request-line lengths of 8000 octets.\n\n#### 3.1.2. Status Line\n\nThe first line of a response message is the status-line, consisting of the protocol version, a space (SP), the status code, another space, a possibly empty textual phrase describing the status code, and ending with CRLF.\n\n```\n status-line = HTTP-version SP status-code SP reason-phrase CRLF \n```\n\nThe status-code element is a 3-digit integer code describing the result of the server's attempt to understand and satisfy the client's corresponding request. The rest of the response message is to be interpreted in light of the semantics defined for that status code. See [Section 6](rfc7231.html#status.codes) of [RFC7231] for information about the semantics of status codes, including the classes of status code (indicated by the first digit), the status codes defined by this specification, considerations for the definition of new status codes, and the IANA registry.\n\n```\n status-code = 3DIGIT \n```\n\nThe reason-phrase element exists for the sole purpose of providing a textual description associated with the numeric status code, mostly out of deference to earlier Internet application protocols that were more frequently used with interactive text clients. A client *SHOULD* ignore the reason-phrase content.\n\n```\n reason-phrase = *( HTAB / SP / VCHAR / obs-text )\n```\n\n### 3.2. Header Fields\n\nEach header field consists of a case-insensitive field name followed by a colon (\":\"), optional leading whitespace, the field value, and optional trailing whitespace.\n\n```\n header-field = field-name \":\" OWS field-value OWS field-name = token field-value = *( field-content / obs-fold )\n field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n field-vchar = VCHAR / obs-text obs-fold = CRLF 1*( SP / HTAB )\n ; obsolete line folding\n ; see Section 3.2.4 \n```\n\nThe field-name token labels the corresponding field-value as having the semantics defined by that header field. For example, the [Date](rfc7231.html#header.date) header field is defined in [Section 7.1.1.2](rfc7231.html#header.date) of [RFC7231] as containing the origination timestamp for the message in which it appears.\n\n#### 3.2.1. Field Extensibility\n\nHeader fields are fully extensible: there is no limit on the introduction of new field names, each presumably defining new semantics, nor on the number of header fields used in a given message. Existing fields are defined in each part of this specification and in many other specifications outside this document set.\n\nNew header fields can be defined such that, when they are understood by a recipient, they might override or enhance the interpretation of previously defined header fields, define preconditions on request evaluation, or refine the meaning of responses.\n\nA proxy *MUST* forward unrecognized header fields unless the field-name is listed in the Connection header field (Section 6.1) or the proxy is specifically configured to block, or otherwise transform, such fields. Other recipients *SHOULD* ignore unrecognized header fields. These requirements allow HTTP's functionality to be enhanced without requiring prior update of deployed intermediaries.\n\nAll defined header fields ought to be registered with IANA in the \"Message Headers\" registry, as described in [Section 8.3](rfc7231.html#header.field.registry) of [RFC7231].\n\n#### 3.2.2. Field Order\n\nThe order in which header fields with differing field names are received is not significant. However, it is good practice to send header fields that contain control data first, such as Host on requests and [Date](rfc7231.html#header.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 the entire request header section is received, since later header fields might include conditionals, authentication credentials, or deliberately misleading duplicate header fields that would impact request processing.\n\nA sender *MUST NOT* generate multiple header fields with the same field name in a message unless either the entire field value for that header field is defined as a comma-separated list [i.e., #(values)] or the header field is a well-known exception (as noted below).\n\nA recipient *MAY* combine multiple header fields with the same field name into one \"field-name: field-value\" pair, without changing the semantics of the message, by appending each subsequent field value to the combined field value in order, separated by a comma. The order in which header fields with the same field name are received is therefore significant to the interpretation of the combined field value; a proxy *MUST NOT* change the order of these field values when forwarding a message.\n\n#### 3.2.3. Whitespace\n\nThis specification uses three rules to denote the use of linear whitespace: OWS (optional whitespace), RWS (required whitespace), and BWS (\"bad\" whitespace).\n\nThe 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 white out invalid or unwanted protocol elements during in-place message filtering.\n\nThe 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.\n\nThe 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.\n\n```\n OWS = *( SP / HTAB )\n ; optional whitespace\n RWS = 1*( SP / HTAB )\n ; required whitespace\n BWS = OWS\n ; \"bad\" whitespace\n```\n\n#### 3.2.4. Field Parsing\n\nMessages are parsed using a generic algorithm, independent of the individual header field names. The contents within a given field value are not parsed until a later stage of message interpretation (usually after the message's entire header section has been processed). Consequently, this specification does not use ABNF rules to define each \"Field-Name: Field Value\" pair, as was done in previous editions. Instead, this specification uses ABNF rules that are named according to each registered field name, wherein the rule defines the valid grammar for that field's corresponding field values (i.e., after the field-value has been extracted from the header section by a generic field parser).\n\nNo whitespace is allowed between the header field-name and colon. In the past, differences in the handling of such whitespace have led to security vulnerabilities in request routing and response handling. A server *MUST* reject any received request message that contains whitespace between a header field-name and colon with a response code of [400 (Bad Request)](rfc7231.html#status.400). A proxy *MUST* remove any such whitespace from a response message before forwarding the message downstream.\n\nA field value might be preceded and/or followed by optional whitespace (OWS); a single SP preceding the field-value is preferred for consistent readability by humans. The field value does not include any leading or trailing whitespace: OWS occurring before the first non-whitespace octet of the field value or after the last non-whitespace octet of the field value ought to be excluded by parsers when extracting the field value from a header field.\n\nHistorically, HTTP header field values could be extended over multiple lines by preceding each extra line with at least one space or horizontal tab (obs-fold). This specification deprecates such line folding except within the message/http media type (Section 8.3.1). A sender *MUST NOT* generate a message that includes line folding (i.e., that has any field-value that contains a match to the obs-fold rule) unless the message is intended for packaging within the message/http media type.\n\nA server that receives an obs-fold in a request message that is not within a message/http container *MUST* either reject the message by sending a [400 (Bad Request)](rfc7231.html#status.400), preferably with a representation explaining that obsolete line folding is unacceptable, or replace each received obs-fold with one or more SP octets prior to interpreting the field value or forwarding the message downstream.\n\nA proxy or gateway that receives an obs-fold in a response message that is not within a message/http container *MUST* either discard the message and replace it with a [502 (Bad Gateway)](rfc7231.html#status.502) response, preferably with a representation explaining that unacceptable line folding was received, or replace each received obs-fold with one or more SP octets prior to interpreting the field value or forwarding the message downstream.\n\nA user agent that receives an obs-fold in a response message that is not within a message/http container *MUST* replace each received obs-fold with one or more SP octets prior to interpreting the field value.\n\nHistorically, HTTP has allowed field content with text in the ISO-8859-1 charset [ISO-8859-1], supporting other charsets only through use of [RFC2047] encoding. In practice, most HTTP header field values use only a subset of the US-ASCII charset [USASCII]. Newly defined header fields *SHOULD* limit their field values to US-ASCII octets. A recipient *SHOULD* treat other octets in field content (obs-text) as opaque data.\n\n#### 3.2.5. Field Limits\n\nHTTP does not place a predefined limit on the length of each header field or on the length of the header section as a whole, as described in Section 2.5. Various ad hoc limitations on individual header field length are found in practice, often depending on the specific field semantics.\n\nA server that receives a request header field, or set of fields, larger than it wishes to process *MUST* respond with an appropriate [4xx (Client Error)](rfc7231.html#status.4xx) status code. Ignoring such header fields would increase the server's vulnerability to request smuggling attacks (Section 9.5).\n\nA client *MAY* discard or truncate received header fields 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.\n\n#### 3.2.6. Field Value Components\n\nMost HTTP header field values are defined using common syntax components (token, quoted-string, and comment) 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 \"(),/:;<=>?@[\\]{}\").\n\n```\n token = 1*tchar tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\" \n / DIGIT / ALPHA\n ; any VCHAR, except delimiters\n```\n\nA string of text is parsed as a single value if it is quoted using double-quote marks.\n\n```\n quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE qdtext = HTAB / SP /%x21 / %x23-5B / %x5D-7E / obs-text obs-text = %x80-FF\n```\n\nComments can be included in some HTTP header fields by surrounding the comment text with parentheses. Comments are only allowed in fields containing \"comment\" as part of their field value definition.\n\n```\n comment = \"(\" *( ctext / quoted-pair / comment ) \")\"\n ctext = HTAB / SP / %x21-27 / %x2A-5B / %x5D-7E / obs-text \n```\n\nThe backslash octet (\"\\\") can be used as a single-octet quoting mechanism within quoted-string and comment constructs. Recipients that process the value of a quoted-string *MUST* handle a quoted-pair as if it were replaced by the octet following the backslash.\n\n```\n quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text ) \n```\n\nA sender *SHOULD NOT* generate a quoted-pair in a quoted-string except where necessary to quote DQUOTE and backslash octets occurring within that string. A sender *SHOULD NOT* generate a quoted-pair in a comment except where necessary to quote parentheses [\"(\" and \")\"] and backslash octets occurring within that comment.\n\n### 3.3. Message Body\n\nThe message body (if any) of an HTTP message is used to carry the payload body of that request or response. The message body is identical to the payload body unless a transfer coding has been applied, as described in Section 3.3.1.\n\n```\n message-body = *OCTET\n```\n\nThe rules for when a message body is allowed in a message differ for requests and responses.\n\nThe presence of a message body in a request is signaled by a Content-Length or Transfer-Encoding header field. Request message framing is independent of method semantics, even if the method does not define any use for a message body.\n\nThe presence of a message body in a response depends on both the request method to which it is responding and the response status code (Section 3.1.2). Responses to the HEAD request method ([Section 4.3.2](rfc7231.html#HEAD) of [RFC7231]) never include a message body because the associated response header fields (e.g., Transfer-Encoding, Content-Length, etc.), if present, indicate only what their values would have been if the request method had been GET ([Section 4.3.1](rfc7231.html#GET) of [RFC7231]). [2xx (Successful)](rfc7231.html#status.2xx) responses to a CONNECT request method ([Section 4.3.6](rfc7231.html#CONNECT) of [RFC7231]) switch to tunnel mode instead of having a message body. All [1xx (Informational)](rfc7231.html#status.1xx), [204 (No Content)](rfc7231.html#status.204), and [304 (Not Modified)](rfc7232.html#status.304) responses do not include a message body. All other responses do include a message body, although the body might be of zero length.\n\n#### 3.3.1. Transfer-Encoding\n\nThe Transfer-Encoding header field lists the transfer coding names corresponding to the sequence of transfer codings that have been (or will be) applied to the payload body in order to form the message body. Transfer codings are defined in Section 4.\n\n```\n Transfer-Encoding = 1#transfer-coding \n```\n\nTransfer-Encoding is analogous to the Content-Transfer-Encoding field of MIME, which was designed to enable safe transport of binary data over a 7-bit transport service ([RFC2045], [Section 6](https://www.rfc-editor.org/rfc/rfc2045.html#section-6)). However, safe transport has a different focus for an 8bit-clean transfer protocol. In HTTP's case, Transfer-Encoding is primarily intended to accurately delimit a dynamically generated payload and to distinguish payload encodings that are only applied for transport efficiency or security from those that are characteristics of the selected resource.\n\nA recipient *MUST* be able to parse the chunked transfer coding (Section 4.1) because it plays a crucial role in framing messages when the payload body size is not known in advance. A sender *MUST NOT* apply chunked more than once to a message body (i.e., chunking an already chunked message is not allowed). If any transfer coding other than chunked is applied to a request payload body, the sender *MUST* apply chunked as the final transfer coding to ensure that the message is properly framed. If any transfer coding other than chunked is applied to a response payload body, the sender *MUST* either apply chunked as the final transfer coding or terminate the message by closing the connection.\n\nFor example,\n\n```\n Transfer-Encoding: gzip, chunked\n```\n\nindicates that the payload body has been compressed using the gzip coding and then chunked using the chunked coding while forming the message body.\n\nUnlike [Content-Encoding](rfc7231.html#header.content-encoding) ([Section 3.1.2.1](rfc7231.html#content.codings) of [RFC7231]), Transfer-Encoding is a property of the message, not of the representation, and any recipient along the request/response chain *MAY* decode the received transfer coding(s) or apply additional transfer coding(s) to the message body, assuming that corresponding changes are made to the Transfer-Encoding field-value. Additional information about the encoding parameters can be provided by other header fields not defined by this specification.\n\nTransfer-Encoding *MAY* be sent in a response to a HEAD request or in a [304 (Not Modified)](rfc7232.html#status.304) response ([Section 4.1](rfc7232.html#status.304) of [RFC7232]) to a GET request, neither of which includes a message body, to indicate that the origin server would have applied a transfer coding to the message body if the request had been an unconditional GET. This indication is not required, however, because any recipient on the response chain (including the origin server) can remove transfer codings when they are not needed.\n\nA server *MUST NOT* send a Transfer-Encoding header field in any response with a status code of [1xx (Informational)](rfc7231.html#status.1xx) or [204 (No Content)](rfc7231.html#status.204). A server *MUST NOT* send a Transfer-Encoding header field in any [2xx (Successful)](rfc7231.html#status.2xx) response to a CONNECT request ([Section 4.3.6](rfc7231.html#CONNECT) of [RFC7231]).\n\nTransfer-Encoding was added in HTTP/1.1. It is generally assumed that implementations advertising only HTTP/1.0 support will not understand how to process a transfer-encoded payload. A client *MUST NOT* send a request containing Transfer-Encoding unless it knows the server will handle HTTP/1.1 (or later) requests; such knowledge might be in the form of specific user configuration or by remembering the version of a prior received response. A server *MUST NOT* send a response containing Transfer-Encoding unless the corresponding request indicates HTTP/1.1 (or later).\n\nA server that receives a request message with a transfer coding it does not understand *SHOULD* respond with [501 (Not Implemented)](rfc7231.html#status.501).\n\n#### 3.3.2. Content-Length\n\nWhen a message does not have a Transfer-Encoding header field, a Content-Length header field can provide the anticipated size, as a decimal number of octets, for a potential payload body. For messages that do include a payload body, the Content-Length field-value provides the framing information necessary for determining where the body (and message) ends. For messages that do not include a payload body, the Content-Length indicates the size of the selected representation ([Section 3](rfc7231.html#representations) of [RFC7231]).\n\n```\n Content-Length = 1*DIGIT \n```\n\nAn example is\n\n```\n Content-Length: 3495\n```\n\nA sender *MUST NOT* send a Content-Length header field in any message that contains a Transfer-Encoding header field.\n\nA user agent *SHOULD* send a Content-Length in a request message when no Transfer-Encoding is sent and the request method defines a meaning for an enclosed payload body. For example, a Content-Length header field is normally sent in a POST request even when the value is 0 (indicating an empty payload body). A user agent *SHOULD NOT* send a Content-Length header field when the request message does not contain a payload body and the method semantics do not anticipate such a body.\n\nA server *MAY* send a Content-Length header field in a response to a HEAD request ([Section 4.3.2](rfc7231.html#HEAD) of [RFC7231]); a server *MUST NOT* send Content-Length in such a response unless its field-value equals the decimal number of octets that would have been sent in the payload body of a response if the same request had used the GET method.\n\nA server *MAY* send a Content-Length header field in a [304 (Not Modified)](rfc7232.html#status.304) response to a conditional GET request ([Section 4.1](rfc7232.html#status.304) of [RFC7232]); a server *MUST NOT* send Content-Length in such a response unless its field-value equals the decimal number of octets that would have been sent in the payload body of a [200 (OK)](rfc7231.html#status.200) response to the same request.\n\nA server *MUST NOT* send a Content-Length header field in any response with a status code of [1xx (Informational)](rfc7231.html#status.1xx) or [204 (No Content)](rfc7231.html#status.204). A server *MUST NOT* send a Content-Length header field in any [2xx (Successful)](rfc7231.html#status.2xx) response to a CONNECT request ([Section 4.3.6](rfc7231.html#CONNECT) of [RFC7231]).\n\nAside from the cases defined above, in the absence of Transfer-Encoding, an origin server *SHOULD* send a Content-Length header field when the payload body size is known prior to sending the complete header section. This will allow downstream recipients to measure transfer progress, know when a received message is complete, and potentially reuse the connection for additional requests.\n\nAny Content-Length field value greater than or equal to zero is valid. Since there is no predefined limit to the length of a payload, a recipient *MUST* anticipate potentially large decimal numerals and prevent parsing errors due to integer conversion overflows (Section 9.3).\n\nIf a message is received that has multiple Content-Length header fields with field-values consisting of the same decimal value, or a single Content-Length header field with a field value containing a list of identical decimal values (e.g., \"Content-Length: 42, 42\"), indicating that duplicate Content-Length header fields have been generated or combined by an upstream message processor, then the recipient *MUST* either reject the message as invalid or replace the duplicated field-values with a single valid Content-Length field containing that decimal value prior to determining the message body length or forwarding the message.\n\n#### 3.3.3. Message Body Length\n\nThe length of a message body is determined by one of the following (in order of precedence):\n\n1. Any response to a HEAD request and any response with a [1xx (Informational)](rfc7231.html#status.1xx), [204 (No Content)](rfc7231.html#status.204), or [304 (Not Modified)](rfc7232.html#status.304) status code is always terminated by the first empty line after the header fields, regardless of the header fields present in the message, and thus cannot contain a message body.\n2. Any [2xx (Successful)](rfc7231.html#status.2xx) response to a CONNECT request implies that the connection will become a tunnel immediately after the empty line that concludes the header fields. A client *MUST* ignore any Content-Length or Transfer-Encoding header fields received in such a message.\n3. If a Transfer-Encoding header field is present and the chunked transfer coding (Section 4.1) is the final encoding, the message body length is determined by reading and decoding the chunked data until the transfer coding indicates the data is complete. If a Transfer-Encoding header field is present in a response and the chunked transfer coding is not the final encoding, the message body length is determined by reading the connection until it is closed by the server. If a Transfer-Encoding header field is present in a request and the chunked transfer coding is not the final encoding, the message body length cannot be determined reliably; the server *MUST* respond with the [400 (Bad Request)](rfc7231.html#status.400) status code and then close the connection. If a message is received with both a Transfer-Encoding and a Content-Length header field, the Transfer-Encoding overrides the Content-Length. Such a message might indicate an attempt to perform request smuggling (Section 9.5) or response splitting (Section 9.4) and ought to be handled as an error. A sender *MUST* remove the received Content-Length field prior to forwarding such a message downstream.\n4. If a message is received without Transfer-Encoding and with either multiple Content-Length header fields having differing field-values or a single Content-Length header field having an invalid value, then the message framing is invalid and the recipient *MUST* treat it as an unrecoverable error. If this is a request message, the server *MUST* respond with a [400 (Bad Request)](rfc7231.html#status.400) status code and then close the connection. If this is a response message received by a proxy, the proxy *MUST* close the connection to the server, discard the received response, and send a [502 (Bad Gateway)](rfc7231.html#status.502) response to the client. If this is a response message received by a user agent, the user agent *MUST* close the connection to the server and discard the received response.\n5. If a valid Content-Length header field is present without Transfer-Encoding, its decimal value defines the expected message body length in octets. If the sender closes the connection or the recipient times out before the indicated number of octets are received, the recipient *MUST* consider the message to be incomplete and close the connection.\n6. If this is a request message and none of the above are true, then the message body length is zero (no message body is present).\n7. Otherwise, this is a response message without a declared message body length, so the message body length is determined by the number of octets received prior to the server closing the connection.\n\nSince there is no way to distinguish a successfully completed, close-delimited message from a partially received message interrupted by network failure, a server *SHOULD* generate encoding or length-delimited messages whenever possible. The close-delimiting feature exists primarily for backwards compatibility with HTTP/1.0.\n\nA server *MAY* reject a request that contains a message body but not a Content-Length by responding with [411 (Length Required)](rfc7231.html#status.411).\n\nUnless a transfer coding other than chunked has been applied, a client that sends a request containing a message body *SHOULD* use a valid Content-Length header field if the message body length is known in advance, rather than the chunked transfer coding, since some existing services respond to chunked with a [411 (Length Required)](rfc7231.html#status.411) status code even though they understand the chunked transfer coding. This is typically because such services are implemented via a gateway that requires a content-length in advance of being called and the server is unable or unwilling to buffer the entire request before processing.\n\nA user agent that sends a request containing a message body *MUST* send a valid Content-Length header field if it does not know the server will handle HTTP/1.1 (or later) requests; such knowledge can be in the form of specific user configuration or by remembering the version of a prior received response.\n\nIf the final response to the last request on a connection has been completely received and there remains additional data to read, a user agent *MAY* discard the remaining data or attempt to determine if that data belongs as part of the prior response body, which might be the case if the prior message's Content-Length value is incorrect. A client *MUST NOT* process, cache, or forward such extra data as a separate response, since such behavior would be vulnerable to cache poisoning.\n\n### 3.4. Handling Incomplete Messages\n\nA server that receives an incomplete request message, usually due to a canceled request or a triggered timeout exception, *MAY* send an error response prior to closing the connection.\n\nA client that receives an incomplete response message, which can occur when a connection is closed prematurely or when decoding a supposedly chunked transfer coding fails, *MUST* record the message as incomplete. Cache requirements for incomplete responses are defined in [Section 3](rfc7234.html#response.cacheability) of [RFC7234].\n\nIf a response terminates in the middle of the header section (before the empty line is received) and the status code might rely on header fields to convey the full meaning of the response, then the client cannot assume that meaning has been conveyed; the client might need to repeat the request in order to determine what action to take next.\n\nA message body that uses the chunked transfer coding is incomplete if the zero-sized chunk that terminates the encoding has not been received. A message that uses a valid Content-Length is incomplete if the size of the message body received (in octets) is less than the value given by Content-Length. A response that has neither chunked transfer coding nor Content-Length is terminated by closure of the connection and, thus, is considered complete regardless of the number of message body octets received, provided that the header section was received intact.\n\n### 3.5. Message Parsing Robustness\n\nOlder HTTP/1.0 user agent implementations might send an extra CRLF after a POST request as a workaround for some early server applications that failed to read message body content that was not terminated by a line-ending. An HTTP/1.1 user agent *MUST NOT* preface or follow a request with an extra CRLF. If terminating the request message body with a line-ending is desired, then the user agent *MUST* count the terminating CRLF octets as part of the message body length.\n\nIn the interest of robustness, a server that is expecting to receive and parse a request-line *SHOULD* ignore at least one empty line (CRLF) received prior to the request-line.\n\nAlthough the line terminator for the start-line and header fields is the sequence CRLF, a recipient *MAY* recognize a single LF as a line terminator and ignore any preceding CR.\n\nAlthough the request-line and status-line grammar rules require that each of the component elements be separated by a single SP octet, recipients *MAY* instead parse on whitespace-delimited word boundaries and, aside from the CRLF terminator, treat any form of whitespace as the SP separator while ignoring preceding or trailing whitespace; such whitespace includes one or more of the following octets: SP, HTAB, VT (%x0B), FF (%x0C), or bare CR. However, lenient parsing can result in security vulnerabilities if there are multiple recipients of the message and each has its own unique interpretation of robustness (see Section 9.5).\n\nWhen a server listening only for HTTP request messages, or processing what appears from the start-line to be an HTTP request message, receives a sequence of octets that does not match the HTTP-message grammar aside from the robustness exceptions listed above, the server *SHOULD* respond with a [400 (Bad Request)](rfc7231.html#status.400) response.\n\n## 4. Transfer Codings\n\nTransfer coding names are used to indicate an encoding transformation that has been, can be, or might need to be applied to a payload body in order to ensure \"safe transport\" through the network. This differs from a content coding in that the transfer coding is a property of the message rather than a property of the representation that is being transferred.\n\n```\n transfer-coding = \"chunked\" ; Section 4.1\n / \"compress\" ; Section 4.2.1\n / \"deflate\" ; Section 4.2.2\n / \"gzip\" ; Section 4.2.3\n / transfer-extension transfer-extension = token *( OWS \";\" OWS transfer-parameter )\n```\n\nParameters are in the form of a name or name=value pair.\n\n```\n transfer-parameter = token BWS \"=\" BWS ( token / quoted-string )\n```\n\nAll transfer-coding names are case-insensitive and ought to be registered within the HTTP Transfer Coding registry, as defined in Section 8.4. They are used in the TE (Section 4.3) and Transfer-Encoding (Section 3.3.1) header fields.\n\n### 4.1. Chunked Transfer Coding\n\nThe chunked transfer coding wraps the payload body in order to transfer it as a series of chunks, each with its own size indicator, followed by an *OPTIONAL* trailer containing header fields. Chunked enables content streams of unknown size to be transferred as a sequence of length-delimited buffers, which enables the sender to retain connection persistence and the recipient to know when it has received the entire message.\n\n```\n chunked-body = *chunk last-chunk trailer-part CRLF chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF chunk-size = 1*HEXDIG last-chunk = 1*(\"0\") [ chunk-ext ] CRLF chunk-data = 1*OCTET ; a sequence of chunk-size octets\n```\n\nThe chunk-size field is a string of hex digits indicating the size of the chunk-data in octets. The chunked transfer coding is complete when a chunk with a chunk-size of zero is received, possibly followed by a trailer, and finally terminated by an empty line.\n\nA recipient *MUST* be able to parse and decode the chunked transfer coding.\n\n#### 4.1.1. Chunk Extensions\n\nThe chunked encoding allows each chunk to include zero or more chunk extensions, immediately following the chunk-size, for the sake of supplying per-chunk metadata (such as a signature or hash), mid-message control information, or randomization of message body size.\n\n```\n chunk-ext = *( \";\" chunk-ext-name [ \"=\" chunk-ext-val ] )\n\n chunk-ext-name = token chunk-ext-val = token / quoted-string \n```\n\nThe chunked encoding is specific to each connection and is likely to be removed or recoded by each recipient (including intermediaries) before any higher-level application would have a chance to inspect the extensions. Hence, use of chunk extensions is generally limited to specialized HTTP services such as \"long polling\" (where client and server can have shared expectations regarding the use of chunk extensions) or for padding within an end-to-end secured connection.\n\nA recipient *MUST* ignore unrecognized chunk extensions. A server ought to limit the total length of chunk extensions received in a request to an amount reasonable for the services provided, in the same way that it applies length limitations and timeouts for other parts of a message, and generate an appropriate [4xx (Client Error)](rfc7231.html#status.4xx) response if that amount is exceeded.\n\n#### 4.1.2. Chunked Trailer Part\n\nA trailer allows the sender to include additional fields at the end of a chunked message in order to supply metadata that might be dynamically generated while the message body is sent, such as a message integrity check, digital signature, or post-processing status. The trailer fields are identical to header fields, except they are sent in a chunked trailer instead of the message's header section.\n\n```\n trailer-part = *( header-field CRLF )\n```\n\nA sender *MUST NOT* generate a trailer that contains a field necessary for message framing (e.g., Transfer-Encoding and Content-Length), routing (e.g., Host), request modifiers (e.g., controls and conditionals in [Section 5](rfc7231.html#request.header.fields) of [RFC7231]), authentication (e.g., see [RFC7235] and [RFC6265]), response control data (e.g., see [Section 7.1](rfc7231.html#response.control.data) of [RFC7231]), or determining how to process the payload (e.g., [Content-Encoding](rfc7231.html#header.content-encoding), [Content-Type](rfc7231.html#header.content-type), [Content-Range](rfc7233.html#header.content-range), and Trailer).\n\nWhen a chunked message containing a non-empty trailer is received, the recipient *MAY* process the fields (aside from those forbidden above) as if they were appended to the message's header section. A recipient *MUST* ignore (or consider as an error) any fields that are forbidden to be sent in a trailer, since processing them as if they were present in the header section might bypass external security filters.\n\nUnless the request includes a TE header field indicating \"trailers\" is acceptable, as described in Section 4.3, a server *SHOULD NOT* generate trailer fields that it believes are necessary for the user agent to receive. Without a TE containing \"trailers\", the server ought to assume that the trailer fields might be silently discarded along the path to the user agent. This requirement allows intermediaries to forward a de-chunked message to an HTTP/1.0 recipient without buffering the entire response.\n\n#### 4.1.3. Decoding Chunked\n\nA process for decoding the chunked transfer coding can be represented in pseudo-code as:\n\n```\n length := 0\n read chunk-size, chunk-ext (if any), and CRLF\n while (chunk-size > 0) {\n read chunk-data and CRLF\n append chunk-data to decoded-body\n length := length + chunk-size\n read chunk-size, chunk-ext (if any), and CRLF\n }\n read trailer field\n while (trailer field is not empty) {\n if (trailer field is allowed to be sent in a trailer) {\n append trailer field to existing header fields\n }\n read trailer-field\n }\n Content-Length := length\n Remove \"chunked\" from Transfer-Encoding\n Remove Trailer from existing header fields\n```\n\n### 4.2. Compression Codings\n\nThe codings defined below can be used to compress the payload of a message.\n\n#### 4.2.1. Compress Coding\n\nThe \"compress\" coding is an adaptive Lempel-Ziv-Welch (LZW) coding [Welch] that is commonly produced by the UNIX file compression program \"compress\". A recipient *SHOULD* consider \"x-compress\" to be equivalent to \"compress\".\n\n#### 4.2.2. Deflate Coding\n\nThe \"deflate\" coding is a \"zlib\" data format [RFC1950] containing a \"deflate\" compressed data stream [RFC1951] that uses a combination of the Lempel-Ziv (LZ77) compression algorithm and Huffman coding.\n\n#### 4.2.3. Gzip Coding\n\nThe \"gzip\" coding is an LZ77 coding with a 32-bit Cyclic Redundancy Check (CRC) that is commonly produced by the gzip file compression program [RFC1952]. A recipient *SHOULD* consider \"x-gzip\" to be equivalent to \"gzip\".\n\n### 4.3. TE\n\nThe \"TE\" header field in a request indicates what transfer codings, besides chunked, the client is willing to accept in response, and whether or not the client is willing to accept trailer fields in a chunked transfer coding.\n\nThe TE field-value consists of a comma-separated list of transfer coding names, each allowing for optional parameters (as described in Section 4), and/or the keyword \"trailers\". A client *MUST NOT* send the chunked transfer coding name in TE; chunked is always acceptable for HTTP/1.1 recipients.\n\n```\n TE = #t-codings t-codings = \"trailers\" / ( transfer-coding [ t-ranking ] )\n t-ranking = OWS \";\" OWS \"q=\" rank rank = ( \"0\" [ \".\" 0*3DIGIT ] )\n / ( \"1\" [ \".\" 0*3(\"0\") ] )\n```\n\nThree examples of TE use are below.\n\n```\n TE: deflate\n TE:\n TE: trailers, deflate;q=0.5\n```\n\nThe presence of the keyword \"trailers\" indicates that the client is willing to accept trailer fields in a chunked transfer coding, as defined in Section 4.1.2, on behalf of itself and any downstream clients. For requests from an intermediary, this implies that either: (a) all downstream clients are willing to accept trailer fields in the forwarded response; or, (b) the intermediary will attempt to buffer the response on behalf of downstream recipients. Note that HTTP/1.1 does not define any means to limit the size of a chunked response such that an intermediary can be assured of buffering the entire response.\n\nWhen multiple transfer codings are acceptable, the client *MAY* rank the codings by preference using a case-insensitive \"q\" parameter (similar to the qvalues used in content negotiation fields, [Section 5.3.1](rfc7231.html#quality.values) of [RFC7231]). The rank value is a real number in the range 0 through 1, where 0.001 is the least preferred and 1 is the most preferred; a value of 0 means \"not acceptable\".\n\nIf the TE field-value is empty or if no TE field is present, the only acceptable transfer coding is chunked. A message with no transfer coding is always acceptable.\n\nSince the TE header field only applies to the immediate connection, a sender of TE *MUST* also send a \"TE\" connection option within the Connection header field (Section 6.1) in order to prevent the TE field from being forwarded by intermediaries that do not support its semantics.\n\n### 4.4. Trailer\n\nWhen a message includes a message body encoded with the chunked transfer coding and the sender desires to send metadata in the form of trailer fields at the end of the message, the sender *SHOULD* generate a Trailer header field before the message body to indicate which fields will be present in the trailers. This allows the recipient to prepare for receipt of that metadata before it starts processing the body, which is useful if the message is being streamed and the recipient wishes to confirm an integrity check on the fly.\n\n```\n Trailer = 1#field-name \n```\n\n## 5. Message Routing\n\nHTTP request message routing is determined by each client based on the target resource, the client's proxy configuration, and establishment or reuse of an inbound connection. The corresponding response routing follows the same connection chain back to the client.\n\n### 5.1. Identifying a Target Resource\n\nHTTP is used in a wide variety of applications, ranging from general-purpose computers to home appliances. In some cases, communication options are hard-coded in a client's configuration. However, most HTTP clients rely on the same resource identification mechanism and configuration techniques as general-purpose Web browsers.\n\nHTTP communication is initiated by a user agent for some purpose. The purpose is a combination of request semantics, which are defined in [RFC7231], and a target resource upon which to apply those semantics. A URI reference (Section 2.7) is typically used as an identifier for the \"target resource\", which a user agent would resolve to its absolute form in order to obtain the \"target URI\". The target URI excludes the reference's fragment component, if any, since fragment identifiers are reserved for client-side processing ([RFC3986], [Section 3.5](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.5)).\n\n### 5.2. Connecting Inbound\n\nOnce the target URI is determined, a client needs to decide whether a network request is necessary to accomplish the desired semantics and, if so, where that request is to be directed.\n\nIf the client has a cache [RFC7234] and the request can be satisfied by it, then the request is usually directed there first.\n\nIf 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. If a proxy is applicable, the client connects inbound by establishing (or reusing) a connection to that proxy.\n\nIf no proxy is applicable, a typical client will invoke a handler routine, usually specific to the target URI's scheme, to connect directly to an authority for the target resource. How that is accomplished is dependent on the target URI scheme and defined by its associated specification, similar to how this specification defines origin server access for resolution of the \"http\" (Section 2.7.1) and \"https\" (Section 2.7.2) schemes.\n\nHTTP requirements regarding connection management are defined in Section 6.\n\n### 5.3. Request Target\n\nOnce an inbound connection is obtained, the client sends an HTTP request message (Section 3) with a request-target derived from the target URI. There are four distinct formats for the request-target, depending on both the method being requested and whether the request is to a proxy.\n\n```\n request-target = origin-form\n / absolute-form\n / authority-form\n / asterisk-form \n```\n\n#### 5.3.1. origin-form\n\nThe most common form of request-target is the origin-form.\n\n```\n origin-form = absolute-path [ \"?\" query ]\n```\n\nWhen making a request directly to an origin server, other than a CONNECT or server-wide OPTIONS request (as detailed below), a client *MUST* send only the absolute path and query components of the target URI as the request-target. If the target URI's path component is empty, the client *MUST* send \"/\" as the path within the origin-form of request-target. A Host header field is also sent, as defined in Section 5.4.\n\nFor example, a client wishing to retrieve a representation of the resource identified as\n\n```\nhttp://www.example.org/where?q=now\n```\n\ndirectly from the origin server would open (or reuse) a TCP connection to port 80 of the host \"www.example.org\" and send the lines:\n\n```\nGET /where?q=now HTTP/1.1\nHost: www.example.org\n```\n\nfollowed by the remainder of the request message.\n\n#### 5.3.2. absolute-form\n\nWhen making a request to a proxy, other than a CONNECT or server-wide OPTIONS request (as detailed below), a client *MUST* send the target URI in absolute-form as the request-target.\n\n```\n absolute-form = absolute-URI \n```\n\nThe proxy is requested to either service that request from a valid cache, if possible, or make the same request on the client's behalf to either the next inbound proxy server or directly to the origin server indicated by the request-target. Requirements on such \"forwarding\" of messages are defined in Section 5.7.\n\nAn example absolute-form of request-line would be:\n\n```\nGET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1\n```\n\nTo allow for transition to the absolute-form for all requests in some future version of HTTP, a server *MUST* accept the absolute-form in requests, even though HTTP/1.1 clients will only send them in requests to proxies.\n\n#### 5.3.3. authority-form\n\nThe authority-form of request-target is only used for CONNECT requests ([Section 4.3.6](rfc7231.html#CONNECT) of [RFC7231]).\n\n```\n authority-form = authority \n```\n\nWhen making a CONNECT request to establish a tunnel through one or more proxies, a client *MUST* send only the target URI's authority component (excluding any userinfo and its \"@\" delimiter) as the request-target. For example,\n\n```\nCONNECT www.example.com:80 HTTP/1.1\n```\n\n#### 5.3.4. asterisk-form\n\nThe asterisk-form of request-target is only used for a server-wide OPTIONS request ([Section 4.3.7](rfc7231.html#OPTIONS) of [RFC7231]).\n\n```\n asterisk-form = \"*\"\n```\n\nWhen a client wishes to request OPTIONS for the server as a whole, as opposed to a specific named resource of that server, the client *MUST* send only \"*\" (%x2A) as the request-target. For example,\n\n```\nOPTIONS * HTTP/1.1\n```\n\nIf a proxy receives an OPTIONS request with an absolute-form of request-target in which the URI has an empty path and no query component, then the last proxy on the request chain *MUST* send a request-target of \"*\" when it forwards the request to the indicated origin server.\n\nFor example, the request\n\n```\nOPTIONS http://www.example.org:8001 HTTP/1.1\n```\n\nwould be forwarded by the final proxy as\n\n```\nOPTIONS * HTTP/1.1\nHost: www.example.org:8001\n```\n\nafter connecting to port 8001 of host \"www.example.org\".\n\n### 5.4. Host\n\nThe \"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 on a single IP address.\n\n```\n Host = uri-host [ \":\" port ] ; Section 2.7.1 \n```\n\nA client *MUST* send a Host header field in all HTTP/1.1 request messages. If the target URI includes an authority component, then a client *MUST* send a field-value for Host that is identical to that authority component, excluding any userinfo subcomponent and its \"@\" delimiter (Section 2.7.1). If the authority component is missing or undefined for the target URI, then a client *MUST* send a Host header field with an empty field-value.\n\nSince the Host field-value is critical information for handling a request, a user agent *SHOULD* generate Host as the first header field following the request-line.\n\nFor example, a GET request to the origin server for would begin with:\n\n```\nGET /pub/WWW/ HTTP/1.1\nHost: www.example.org\n```\n\nA client *MUST* send a Host header field in an HTTP/1.1 request even if the request-target is in the absolute-form, since this allows the Host information to be forwarded through ancient HTTP/1.0 proxies that might not have implemented Host.\n\nWhen a proxy receives a request with an absolute-form of request-target, the proxy *MUST* ignore the received Host header field (if any) and instead replace it with the host information of the request-target. A proxy that forwards such a request *MUST* generate a new Host field-value based on the received request-target rather than forward the received Host field-value.\n\nSince the Host header field 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 field-value 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.\n\nA server *MUST* respond with a [400 (Bad Request)](rfc7231.html#status.400) status code to any HTTP/1.1 request message that lacks a Host header field and to any request message that contains more than one Host header field or a Host header field with an invalid field-value.\n\n### 5.5. Effective Request URI\n\nSince the request-target often contains only part of the user agent's target URI, a server reconstructs the intended target as an \"effective request URI\" to properly service the request. This reconstruction involves both the server's local configuration and information communicated in the request-target, Host header field, and connection context.\n\nFor a user agent, the effective request URI is the target URI.\n\nIf the request-target is in absolute-form, the effective request URI is the same as the request-target. Otherwise, the effective request URI is constructed as follows:\n\n- If the server's configuration (or outbound gateway) provides a fixed URI scheme , that scheme is used for the effective request URI. Otherwise, if the request is received over a TLS-secured TCP connection, the effective request URI's scheme is \"https\"; if not, the scheme is \"http\".\n- If the server's configuration (or outbound gateway) provides a fixed URI authority component, that authority is used for the effective request URI. If not, then if the request-target is in authority-form , the effective request URI's authority component is the same as the request-target. If not, then if a Host header field is supplied with a non-empty field-value, the authority component is the same as the Host field-value. Otherwise, the authority component is assigned the default name configured for the server and, if the connection's incoming TCP port number differs from the default port for the effective request URI's scheme, then a colon (\":\") and the incoming port number (in decimal form) are appended to the authority component.\n- If the request-target is in authority-form or asterisk-form , the effective request URI's combined path and query component is empty. Otherwise, the combined path and query component is the same as the request-target.\n- The components of the effective request URI, once determined as above, can be combined into absolute-URI form by concatenating the scheme, \"://\", authority, and combined path and query component.\n\nExample 1: the following message received over an insecure TCP connection\n\n```\nGET /pub/WWW/TheProject.html HTTP/1.1\nHost: www.example.org:8080\n```\n\nhas an effective request URI of\n\n```\nhttp://www.example.org:8080/pub/WWW/TheProject.html\n```\n\nExample 2: the following message received over a TLS-secured TCP connection\n\n```\nOPTIONS * HTTP/1.1\nHost: www.example.org\n```\n\nhas an effective request URI of\n\n```\nhttps://www.example.org\n```\n\nRecipients of an HTTP/1.0 request that lacks a Host header field might need to use heuristics (e.g., examination of the URI path for something unique to a particular host) in order to guess the effective request URI's authority component.\n\nOnce the effective request URI has been constructed, an origin server needs to decide whether or not to provide service for that URI via the connection in which the request was received. For example, the request might have been misdirected, deliberately or accidentally, such that the information within a received request-target or Host header field differs from the host or port upon which the connection has been made. If the connection is from a trusted gateway, that inconsistency might be expected; otherwise, it might indicate an attempt to bypass security filters, trick the server into delivering non-public content, or poison a cache. See Section 9 for security considerations regarding message routing.\n\n### 5.6. Associating a Response to a Request\n\nHTTP does not include a request identifier for associating a given request message with its corresponding one or more response messages. Hence, it relies on the order of response arrival to correspond exactly to the order in which requests are made on the same connection. More than one response message per request only occurs when one or more informational responses ([1xx](rfc7231.html#status.1xx), see [Section 6.2](rfc7231.html#status.1xx) of [RFC7231]) precede a final response to the same request.\n\nA client that has more than one outstanding request on a connection *MUST* maintain a list of outstanding requests in the order sent and *MUST* associate each received response message on that connection to the highest ordered request that has not yet received a final (non-[1xx](rfc7231.html#status.1xx)) response.\n\n### 5.7. Message Forwarding\n\nAs described in Section 2.3, intermediaries can serve a variety of roles in the processing of HTTP requests and responses. Some intermediaries are used to improve performance or availability. Others are used for access control or to filter content. Since an HTTP stream has characteristics similar to a pipe-and-filter architecture, there are no inherent limits to the extent an intermediary can enhance (or interfere) with either direction of the stream.\n\nAn intermediary not acting as a tunnel *MUST* implement the Connection header field, as specified in Section 6.1, and exclude fields from being forwarded that are only intended for the incoming connection.\n\nAn intermediary *MUST NOT* forward a message to itself unless it is protected from an infinite request loop. In general, an intermediary ought to recognize its own server names, including any aliases, local variations, or literal IP addresses, and respond to such requests directly.\n\n#### 5.7.1. Via\n\nThe \"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](https://www.rfc-editor.org/rfc/rfc5322.html#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.\n\n```\n Via = 1#( received-protocol RWS received-by [ RWS comment ] )\n\n received-protocol = [ protocol-name \"/\" ] protocol-version\n ; see Section 6.7 received-by = ( uri-host [ \":\" port ] ) / pseudonym pseudonym = token \n```\n\nMultiple Via field values represent each 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.\n\nA proxy *MUST* send an appropriate Via header field, as described below, in each message that it forwards. An HTTP-to-HTTP gateway *MUST* send an appropriate Via header field in each inbound request message and *MAY* send a Via header field in forwarded response messages.\n\nFor each intermediary, the received-protocol indicates the protocol and protocol version used by the upstream sender of the message. Hence, the Via field value records the advertised protocol capabilities of the request/response chain such that they remain visible to downstream recipients; this can be useful for determining what backwards-incompatible features might be safe to use in response, or within a later request, as described in Section 2.6. For brevity, the protocol-name is omitted when the received protocol is HTTP.\n\nThe received-by portion of the field value 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 TCP port, if any, for the received-protocol.\n\nA sender *MAY* generate comments in the Via header field to identify the software of each recipient, analogous to the [User-Agent](rfc7231.html#header.user-agent) and [Server](rfc7231.html#header.server) header fields. However, all comments in the Via field are optional, and a recipient *MAY* remove them prior to forwarding the message.\n\nFor example, a request message could be sent from an HTTP/1.0 user agent to an internal proxy code-named \"fred\", which uses HTTP/1.1 to forward the request to a public proxy at p.example.net, which completes the request by forwarding it to the origin server at www.example.com. The request received by www.example.com would then have the following Via header field:\n\n```\n Via: 1.0 fred, 1.1 p.example.net\n```\n\nAn intermediary used as a portal through a network firewall *SHOULD NOT* forward the names and ports of hosts within the firewall region unless it is explicitly enabled to do so. If not enabled, such an intermediary *SHOULD* replace each received-by host of any host behind the firewall by an appropriate pseudonym for that host.\n\nAn intermediary *MAY* combine an ordered subsequence of Via header field entries into a single such entry if the entries have identical received-protocol values. For example,\n\n```\n Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy\n```\n\ncould be collapsed to\n\n```\n Via: 1.0 ricky, 1.1 mertz, 1.0 lucy\n```\n\nA sender *SHOULD NOT* combine multiple entries unless they are all under the same organizational control and the hosts have already been replaced by pseudonyms. A sender *MUST NOT* combine entries that have different received-protocol values.\n\n#### 5.7.2. Transformations\n\nSome intermediaries include features for transforming messages and their payloads. A proxy might, for example, convert between image formats in order to save cache space or to reduce the amount of traffic on a slow link. However, operational problems might occur when these transformations are applied to payloads intended for critical applications, such as medical imaging or scientific data analysis, particularly when integrity checks or digital signatures are used to ensure that the payload received is identical to the original.\n\nAn HTTP-to-HTTP proxy is called a \"transforming proxy\" if it is designed or configured to modify messages in a semantically meaningful way (i.e., modifications, beyond those required by normal HTTP processing, that change the message in a way that would be significant to the original sender or potentially significant to downstream recipients). For example, a transforming proxy might be acting as a shared annotation server (modifying responses to include references to a local annotation database), a malware filter, a format transcoder, or a privacy filter. Such transformations are presumed to be desired by whichever client (or client organization) selected the proxy.\n\nIf a proxy receives a request-target 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 request-target contains a fully qualified domain name.\n\nA proxy *MUST NOT* modify the \"absolute-path\" and \"query\" parts of the received request-target when forwarding it to the next inbound server, except as noted above to replace an empty path with \"/\" or \"*\".\n\nA proxy *MAY* modify the message body through application or removal of a transfer coding (Section 4).\n\nA proxy *MUST NOT* transform the payload ([Section 3.3](rfc7231.html#payload) of [RFC7231]) of a message that contains a no-transform cache-control directive ([Section 5.2](rfc7234.html#header.cache-control) of [RFC7234]).\n\nA proxy *MAY* transform the payload of a message that does not contain a no-transform cache-control directive. A proxy that transforms a payload *MUST* add a [Warning](rfc7234.html#header.warning) header field with the warn-code of 214 (\"Transformation Applied\") if one is not already in the message (see [Section 5.5](rfc7234.html#header.warning) of [RFC7234]). A proxy that transforms the payload of a [200 (OK)](rfc7231.html#status.200) response can further inform downstream recipients that a transformation has been applied by changing the response status code to [203 (Non-Authoritative Information)](rfc7231.html#status.203) ([Section 6.3.4](rfc7231.html#status.203) of [RFC7231]).\n\nA proxy *SHOULD NOT* modify header fields that provide information about the endpoints of the communication chain, the resource state, or the selected representation (other than the payload) unless the field's definition specifically allows such modification or the modification is deemed necessary for privacy or security.\n\n## 6. Connection Management\n\nHTTP messaging is independent of the underlying transport- or session-layer connection protocol(s). HTTP only presumes a reliable transport with in-order delivery of requests and the corresponding in-order delivery of responses. The mapping of HTTP request and response structures onto the data units of an underlying transport protocol is outside the scope of this specification.\n\nAs described in Section 5.2, the specific connection protocols to be used for an HTTP interaction are determined by client configuration and the target URI. For example, the \"http\" URI scheme (Section 2.7.1) indicates a default connection of TCP over IP, with a default TCP port of 80, but the client might be configured to use a proxy via some other connection, port, or protocol.\n\nHTTP implementations are expected to engage in connection management, which includes maintaining the state of current connections, establishing a new connection or reusing an existing connection, processing messages received on a connection, detecting connection failures, and closing each connection. Most clients maintain multiple connections in parallel, including more than one connection per server endpoint. Most servers are designed to maintain thousands of concurrent connections, while controlling request queues to enable fair use and detect denial-of-service attacks.\n\n### 6.1. Connection\n\nThe \"Connection\" header field allows the sender to indicate desired control options for the current connection. In order to avoid confusing downstream recipients, a proxy or gateway *MUST* remove or replace any received connection options before forwarding the message.\n\nWhen a header field aside from Connection is used to supply control information for or about the current connection, the sender *MUST* list the corresponding field-name within the Connection header field. A proxy or gateway *MUST* parse a received Connection header field before a message is forwarded and, for each connection-option in this field, remove any header field(s) from the message with the same name as the connection-option, and then remove the Connection header field itself (or replace it with the intermediary's own connection options for the forwarded message).\n\nHence, the Connection header field provides a declarative way of distinguishing header fields that are only intended for the immediate recipient (\"hop-by-hop\") from those fields that are intended for all recipients on the chain (\"end-to-end\"), enabling the message to be self-descriptive and allowing future connection-specific extensions to be deployed without fear that they will be blindly forwarded by older intermediaries.\n\nThe Connection header field's value has the following grammar:\n\n```\n Connection = 1#connection-option connection-option = token \n```\n\nConnection options are case-insensitive.\n\nA sender *MUST NOT* send a connection option corresponding to a header field that is intended for all recipients of the payload. For example, [Cache-Control](rfc7234.html#header.cache-control) is never appropriate as a connection option ([Section 5.2](rfc7234.html#header.cache-control) of [RFC7234]).\n\nThe connection options do not always correspond to a header field present in the message, since a connection-specific header field might not be needed if there are no parameters associated with a connection option. In contrast, a connection-specific header field that is received without a corresponding connection option usually indicates that the field has been improperly forwarded by an intermediary and ought to be ignored by the recipient.\n\nWhen defining new connection options, specification authors ought to survey existing header field names and ensure that the new connection option does not share the same name as an already deployed header field. Defining a new connection option essentially reserves that potential field-name for carrying additional information related to the connection option, since it would be unwise for senders to use that field-name for anything else.\n\nThe \"close\" connection option is defined for a sender to signal that this connection will be closed after completion of the response. For example,\n\n```\n Connection: close\n```\n\nin either the request or the response header fields indicates that the sender is going to close the connection after the current request/response is complete (Section 6.6).\n\nA client that does not support persistent connections *MUST* send the \"close\" connection option in every request message.\n\nA server that does not support persistent connections *MUST* send the \"close\" connection option in every response message that does not have a [1xx (Informational)](rfc7231.html#status.1xx) status code.\n\n### 6.2. Establishment\n\nIt is beyond the scope of this specification to describe how connections are established via various transport- or session-layer protocols. Each connection applies to only one transport link.\n\n### 6.3. Persistence\n\nHTTP/1.1 defaults to the use of \"persistent connections\", allowing multiple requests and responses to be carried over a single connection. The \"close\" connection option is used to signal that a connection will not persist after the current request/response. HTTP implementations *SHOULD* support persistent connections.\n\nA recipient determines whether a connection is persistent or not based on the most recently received message's protocol version and Connection header field (if any):\n\n- If the \" close \" connection option is present, the connection will not persist after the current response; else,\n- If the received protocol is HTTP/1.1 (or later), the connection will persist after the current response; else,\n- If the received protocol is HTTP/1.0, the \"keep-alive\" connection option is present, the recipient is not a proxy, and the recipient wishes to honor the HTTP/1.0 \"keep-alive\" mechanism, the connection will persist after the current response; otherwise,\n- The connection will close after the current response.\n\nA client *MAY* send additional requests on a persistent connection until it sends or receives a \"close\" connection option or receives an HTTP/1.0 response without a \"keep-alive\" connection option.\n\nIn order to remain persistent, all messages on a connection need to have a self-defined message length (i.e., one not defined by closure of the connection), as described in Section 3.3. A server *MUST* read the entire request message body or close the connection after sending its response, since otherwise the remaining data on a persistent connection would be misinterpreted as the next request. Likewise, a client *MUST* read the entire response message body if it intends to reuse the same connection for a subsequent request.\n\nA proxy server *MUST NOT* maintain a persistent connection with an HTTP/1.0 client (see [Section 19.7.1](https://www.rfc-editor.org/rfc/rfc2068.html#section-19.7.1) of [RFC2068] for information and discussion of the problems with the Keep-Alive header field implemented by many HTTP/1.0 clients).\n\nSee Appendix A.1.2 for more information on backwards compatibility with HTTP/1.0 clients.\n\n#### 6.3.1. Retrying Requests\n\nConnections can be closed at any time, with or without intention. Implementations ought to anticipate the need to recover from asynchronous close events.\n\nWhen an inbound connection is closed prematurely, a client *MAY* open a new connection and automatically retransmit an aborted sequence of requests if all of those requests have idempotent methods ([Section 4.2.2](rfc7231.html#idempotent.methods) of [RFC7231]). A proxy *MUST NOT* automatically retry non-idempotent requests.\n\nA user agent *MUST NOT* automatically retry a request with a non-idempotent method unless it has some means to know that the request semantics are actually idempotent, regardless of the method, or some means to detect that the original request was never applied. For example, a user agent that knows (through design or configuration) that a POST request to a given resource is safe can repeat that request automatically. Likewise, a user agent designed specifically to operate on a version control repository might be able to recover from partial failure conditions by checking the target resource revision(s) after a failed connection, reverting or fixing any changes that were partially applied, and then automatically retrying the requests that failed.\n\nA client *SHOULD NOT* automatically retry a failed automatic retry.\n\n#### 6.3.2. Pipelining\n\nA client that supports persistent connections *MAY* \"pipeline\" its requests (i.e., send multiple requests without waiting for each response). A server *MAY* process a sequence of pipelined requests in parallel if they all have safe methods ([Section 4.2.1](rfc7231.html#safe.methods) of [RFC7231]), but it *MUST* send the corresponding responses in the same order that the requests were received.\n\nA client that pipelines requests *SHOULD* retry unanswered requests if the connection closes before it receives all of the corresponding responses. When retrying pipelined requests after a failed connection (a connection not explicitly closed by the server in its last complete response), a client *MUST NOT* pipeline immediately after connection establishment, since the first remaining request in the prior pipeline might have caused an error response that can be lost again if multiple requests are sent on a prematurely closed connection (see the TCP reset problem described in Section 6.6).\n\nIdempotent methods ([Section 4.2.2](rfc7231.html#idempotent.methods) of [RFC7231]) are significant to pipelining because they can be automatically retried after a connection failure. A user agent *SHOULD NOT* pipeline requests after a non-idempotent method, until the final response status code for that method has been received, unless the user agent has a means to detect and recover from partial failure conditions involving the pipelined sequence.\n\nAn intermediary that receives pipelined requests *MAY* pipeline those requests when forwarding them inbound, since it can rely on the outbound user agent(s) to determine what requests can be safely pipelined. If the inbound connection fails before receiving a response, the pipelining intermediary *MAY* attempt to retry a sequence of requests that have yet to receive a response if the requests all have idempotent methods; otherwise, the pipelining intermediary *SHOULD* forward any received responses and then close the corresponding outbound connection(s) so that the outbound user agent(s) can recover accordingly.\n\n### 6.4. Concurrency\n\nA client ought to limit the number of simultaneous open connections that it maintains to a given server.\n\nPrevious revisions of HTTP gave a specific number of connections as a ceiling, but this was found to be impractical for many applications. As a result, this specification does not mandate a particular maximum number of connections but, instead, encourages clients to be conservative when opening multiple connections.\n\nMultiple connections are typically used to avoid the \"head-of-line blocking\" problem, wherein a request that takes significant server-side processing and/or has a large payload blocks subsequent requests on the same connection. However, each connection consumes server resources. Furthermore, using multiple connections can cause undesirable side effects in congested networks.\n\nNote that a server might reject traffic that it deems abusive or characteristic of a denial-of-service attack, such as an excessive number of open connections from a single client.\n\n### 6.5. Failures and Timeouts\n\nServers will usually have some timeout value beyond which they will no longer maintain an inactive connection. Proxy servers might make this a higher value since it is likely that the client will be making more connections through the same proxy server. The use of persistent connections places no requirements on the length (or existence) of this timeout for either the client or the server.\n\nA client or server that wishes to time out *SHOULD* issue a graceful close on the connection. Implementations *SHOULD* constantly monitor open connections for a received closure signal and respond to it as appropriate, since prompt closure of both sides of a connection enables allocated system resources to be reclaimed.\n\nA client, server, or proxy *MAY* close the transport connection at any time. For example, a client might have started to send a new request at the same time that the server has decided to close the \"idle\" connection. From the server's point of view, the connection is being closed while it was idle, but from the client's point of view, a request is in progress.\n\nA server *SHOULD* sustain persistent connections, when possible, and allow the underlying transport's flow-control mechanisms to resolve temporary overloads, rather than terminate connections with the expectation that clients will retry. The latter technique can exacerbate network congestion.\n\nA client sending a message body *SHOULD* monitor the network connection for an error response while it is transmitting the request. If the client sees a response that indicates the server does not wish to receive the message body and is closing the connection, the client *SHOULD* immediately cease transmitting the body and close its side of the connection.\n\n### 6.6. Tear-down\n\nThe Connection header field (Section 6.1) provides a \"close\" connection option that a sender *SHOULD* send when it wishes to close the connection after the current request/response pair.\n\nA client that sends a \"close\" connection option *MUST NOT* send further requests on that connection (after the one containing \"close\") and *MUST* close the connection after reading the final response message corresponding to this request.\n\nA server that receives a \"close\" connection option *MUST* initiate a close of the connection (see below) after it sends the final response to the request that contained \"close\". The server *SHOULD* send a \"close\" connection option in its final response on that connection. The server *MUST NOT* process any further requests received on that connection.\n\nA server that sends a \"close\" connection option *MUST* initiate a close of the connection (see below) after it sends the response containing \"close\". The server *MUST NOT* process any further requests received on that connection.\n\nA client that receives a \"close\" connection option *MUST* cease sending requests on that connection and close the connection after reading the response message containing the \"close\"; if additional pipelined requests had been sent on the connection, the client *SHOULD NOT* assume that they will be processed by the server.\n\nIf a server performs an immediate close of a TCP connection, there is a significant risk that the client will not be able to read the last HTTP response. If the server receives additional data from the client on a fully closed connection, such as another request that was sent by the client before receiving the server's response, the server's TCP stack will send a reset packet to the client; unfortunately, the reset packet might erase the client's unacknowledged input buffers before they can be read and interpreted by the client's HTTP parser.\n\nTo avoid the TCP reset problem, servers typically close a connection in stages. First, the server performs a half-close by closing only the write side of the read/write connection. The server then continues to read from the connection until it receives a corresponding close by the client, or until the server is reasonably certain that its own TCP stack has received the client's acknowledgement of the packet(s) containing the server's last response. Finally, the server fully closes the connection.\n\nIt is unknown whether the reset problem is exclusive to TCP or might also be found in other transport connection protocols.\n\n### 6.7. Upgrade\n\nThe \"Upgrade\" header field is intended to provide a simple mechanism for transitioning from HTTP/1.1 to some other protocol on the same connection. A client *MAY* send a list of protocols in the Upgrade header field of a request to invite the server to switch to one or more of those 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.\n\n```\n Upgrade = 1#protocol protocol = protocol-name [\"/\" protocol-version]\n protocol-name = token protocol-version = token \n```\n\nA server that sends a [101 (Switching Protocols)](rfc7231.html#status.101) response *MUST* send an Upgrade header field to indicate the new protocol(s) to which the connection is being switched; if multiple protocol layers are being switched, the sender *MUST* list the protocols in layer-ascending order. A server *MUST NOT* switch to a protocol that was not indicated by the client in the corresponding request's Upgrade header field. A server *MAY* choose to ignore the order of preference indicated by the client and select the new protocol(s) based on other factors, such as the nature of the request or the current load on the server.\n\nA server that sends a [426 (Upgrade Required)](rfc7231.html#status.426) response *MUST* send an Upgrade header field to indicate the acceptable protocols, in order of descending preference.\n\nA server *MAY* send an Upgrade header field in any other response to advertise that it implements support for upgrading to the listed protocols, in order of descending preference, when appropriate for a future request.\n\nThe following is a hypothetical example sent by a client:\n\n```\nGET /hello.txt HTTP/1.1\nHost: www.example.com\nConnection: upgrade\nUpgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11\n```\n\nThe capabilities and nature of the application-level communication after the protocol change is entirely dependent upon the new protocol(s) chosen. However, immediately after sending the [101 (Switching Protocols)](rfc7231.html#status.101) response, the server is expected to continue responding to the original request as if it had received its equivalent within the new protocol (i.e., the server still has an outstanding request to satisfy after the protocol has been changed, and is expected to do so without requiring the request to be repeated).\n\nFor 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)](rfc7231.html#status.101) 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.\n\nThe following is an example response to the above hypothetical request:\n\n```\nHTTP/1.1 101 Switching Protocols\nConnection: upgrade\nUpgrade: HTTP/2.0\n\n[... data stream switches to HTTP/2.0 with an appropriate response\n(as defined by new protocol) to the \"GET /hello.txt\" request ...]\n```\n\nWhen Upgrade is sent, the sender *MUST* also send a Connection header field (Section 6.1) that contains an \"upgrade\" connection option, in order to prevent Upgrade from being accidentally forwarded by intermediaries that might not implement the listed protocols. A server *MUST* ignore an Upgrade header field that is received in an HTTP/1.0 request.\n\nA client cannot begin using an upgraded protocol on the connection until it has completely sent the request message (i.e., the client can't change the protocol it is sending in the middle of a message). If a server receives both an Upgrade and an [Expect](rfc7231.html#header.expect) header field with the \"100-continue\" expectation ([Section 5.1.1](rfc7231.html#header.expect) of [RFC7231]), the server *MUST* send a [100 (Continue)](rfc7231.html#status.100) response before sending a [101 (Switching Protocols)](rfc7231.html#status.101) response.\n\nThe Upgrade header field only applies to switching protocols on top of the existing connection; it cannot be used to switch the underlying connection (transport) protocol, nor to switch the existing communication to a different connection. For those purposes, it is more appropriate to use a [3xx (Redirection)](rfc7231.html#status.3xx) response ([Section 6.4](rfc7231.html#status.3xx) of [RFC7231]).\n\nThis 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.6 and future updates to this specification. Additional tokens ought to be registered with IANA using the registration procedure defined in Section 8.6.\n\n## 7. ABNF List Extension: #rule\n\nA #rule extension to the ABNF rules of [RFC5234] is used to improve readability in the definitions of some header field values.\n\nA construct \"#\" is defined, similar to \"*\", for defining comma-delimited lists of elements. The full form is \"#element\" indicating at least and at most elements, each separated by a single comma (\",\") and optional whitespace (OWS).\n\nIn any production that uses the list construct, a sender *MUST NOT* generate empty list elements. In other words, a sender *MUST* generate lists that satisfy the following syntax:\n\n```\n 1#element => element *( OWS \",\" OWS element )\n```\n\nand:\n\n```\n #element => [ 1#element ]\n```\n\nand for n >= 1 and m > 1:\n\n```\n #element => element *( OWS \",\" OWS element )\n```\n\nFor compatibility with legacy list rules, a recipient *MUST* parse and ignore a reasonable number of empty list elements: enough to handle common mistakes by senders that merge values, but not so much that they could be used as a denial-of-service mechanism. In other words, a recipient *MUST* accept lists that satisfy the following syntax:\n\n```\n #element => [ ( \",\" / element ) *( OWS \",\" [ OWS element ] ) ]\n \n 1#element => *( \",\" OWS ) element *( OWS \",\" [ OWS element ] )\n```\n\nEmpty elements do not contribute to the count of elements present. For example, given these ABNF productions:\n\n```\n example-list = 1#example-list-elmt\n example-list-elmt = token ; see Section 3.2.6 \n```\n\nThen the following are valid values for example-list (not including the double quotes, which are present for delimitation only):\n\n```\n \"foo,bar\"\n \"foo ,bar,\"\n \"foo , ,bar,charlie \"\n```\n\nIn contrast, the following values would be invalid, since at least one non-empty element is required by the example-list production:\n\n```\n \"\"\n \",\"\n \", ,\"\n```\n\nAppendix B shows the collected ABNF for recipients after the list constructs have been expanded.\n\n## 8. IANA Considerations\n\n### 8.1. Header Field Registration\n\nHTTP header fields are registered within the \"Message Headers\" registry maintained at <[http://www.iana.org/assignments/message-headers/](http://www.iana.org/assignments/message-headers/)>.\n\nThis document defines the following HTTP header fields, so the \"Permanent Message Header Field Names\" registry has been updated accordingly (see [BCP90]).\n\n| Header Field Name | Protocol | Status | Reference |\n| --- | --- | --- | --- |\n| Connection | http | standard | Section 6.1 |\n| Content-Length | http | standard | Section 3.3.2 |\n| Host | http | standard | Section 5.4 |\n| TE | http | standard | Section 4.3 |\n| Trailer | http | standard | Section 4.4 |\n| Transfer-Encoding | http | standard | Section 3.3.1 |\n| Upgrade | http | standard | Section 6.7 |\n| Via | http | standard | Section 5.7.1 |\n\nFurthermore, the header field-name \"Close\" has been registered as \"reserved\", since using that name as an HTTP header field might conflict with the \"close\" connection option of the Connection header field (Section 6.1).\n\n| Header Field Name | Protocol | Status | Reference |\n| --- | --- | --- | --- |\n| Close | http | reserved | Section 8.1 |\n\nThe change controller is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n### 8.2. URI Scheme Registration\n\nIANA maintains the registry of URI Schemes [BCP115] at <[http://www.iana.org/assignments/uri-schemes/](http://www.iana.org/assignments/uri-schemes/)>.\n\nThis document defines the following URI schemes, so the \"Permanent URI Schemes\" registry has been updated accordingly.\n\n| URI Scheme | Description | Reference |\n| --- | --- | --- |\n| http | Hypertext Transfer Protocol | Section 2.7.1 |\n| https | Hypertext Transfer Protocol Secure | Section 2.7.2 |\n\n### 8.3. Internet Media Type Registration\n\nIANA maintains the registry of Internet media types [BCP13] at <[http://www.iana.org/assignments/media-types](http://www.iana.org/assignments/media-types)>.\n\nThis document serves as the specification for the Internet media types \"message/http\" and \"application/http\". The following has been registered with IANA.\n\n#### 8.3.1. Internet Media Type message/http\n\nThe message/http type can be used to enclose a single HTTP request or response message, provided that it obeys the MIME restrictions for all \"message\" types regarding line length and encodings.\n\nType name:\n\nmessage\n\nSubtype name:\n\nhttp\n\nRequired parameters:\n\nN/A\n\nOptional parameters:\n\nversion, msgtype version:\n\nThe HTTP-version number of the enclosed message (e.g., \"1.1\"). If not present, the version can be determined from the first line of the body.\n\nmsgtype:\n\nThe message type — \"request\" or \"response\". If not present, the type can be determined from the first line of the body.\n\nEncoding considerations:\n\nonly \"7bit\", \"8bit\", or \"binary\" are permitted\n\nSecurity considerations:\n\nsee Section 9\n\nInteroperability considerations:\n\nN/A\n\nPublished specification:\n\nThis specification (see Section 8.3.1).\n\nApplications that use this media type:\n\nN/A\n\nFragment identifier considerations:\n\nN/A\n\nAdditional information:\n\nMagic number(s):\n\nN/A\n\nDeprecated alias names for this type:\n\nN/A\n\nFile extension(s):\n\nN/A\n\nMacintosh file type code(s):\n\nN/A\n\nPerson and email address to contact for further information:\n\nSee Authors' Addresses section.\n\nIntended usage:\n\nCOMMON\n\nRestrictions on usage:\n\nN/A\n\nAuthor:\n\nSee Authors' Addresses section.\n\nChange controller:\n\nIESG\n\n#### 8.3.2. Internet Media Type application/http\n\nThe application/http type can be used to enclose a pipeline of one or more HTTP request or response messages (not intermixed).\n\nType name:\n\napplication\n\nSubtype name:\n\nhttp\n\nRequired parameters:\n\nN/A\n\nOptional parameters:\n\nversion, msgtype version:\n\nThe HTTP-version number of the enclosed messages (e.g., \"1.1\"). If not present, the version can be determined from the first line of the body.\n\nmsgtype:\n\nThe message type — \"request\" or \"response\". If not present, the type can be determined from the first line of the body.\n\nEncoding considerations:\n\nHTTP messages enclosed by this type are in \"binary\" format; use of an appropriate Content-Transfer-Encoding is required when transmitted via email.\n\nSecurity considerations:\n\nsee Section 9\n\nInteroperability considerations:\n\nN/A\n\nPublished specification:\n\nThis specification (see Section 8.3.2).\n\nApplications that use this media type:\n\nN/A\n\nFragment identifier considerations:\n\nN/A\n\nAdditional information:\n\nDeprecated alias names for this type:\n\nN/A\n\nMagic number(s):\n\nN/A\n\nFile extension(s):\n\nN/A\n\nMacintosh file type code(s):\n\nN/A\n\nPerson and email address to contact for further information:\n\nSee Authors' Addresses section.\n\nIntended usage:\n\nCOMMON\n\nRestrictions on usage:\n\nN/A\n\nAuthor:\n\nSee Authors' Addresses section.\n\nChange controller:\n\nIESG\n\n### 8.4. Transfer Coding Registry\n\nThe \"HTTP Transfer Coding Registry\" defines the namespace for transfer coding names. It is maintained at <[http://www.iana.org/assignments/http-parameters](http://www.iana.org/assignments/http-parameters)>.\n\n#### 8.4.1. Procedure\n\nRegistrations *MUST* include the following fields:\n\n- Name\n- Description\n- Pointer to specification text\n\nNames of transfer codings *MUST NOT* overlap with names of content codings ([Section 3.1.2.1](rfc7231.html#content.codings) of [RFC7231]) unless the encoding transformation is identical, as is the case for the compression codings defined in Section 4.2.\n\nValues to be added to this namespace require IETF Review (see [Section 4.1](https://www.rfc-editor.org/rfc/rfc5226.html#section-4.1) of [RFC5226]), and *MUST* conform to the purpose of transfer coding defined in this specification.\n\nUse of program names for the identification of encoding formats is not desirable and is discouraged for future encodings.\n\n#### 8.4.2. Registration\n\nThe \"HTTP Transfer Coding Registry\" has been updated with the registrations below:\n\n| Name | Description | Reference |\n| --- | --- | --- |\n| chunked | Transfer in a series of chunks | Section 4.1 |\n| compress | UNIX \"compress\" data format [Welch] | Section 4.2.1 |\n| deflate | \"deflate\" compressed data ([RFC1951]) inside the \"zlib\" data format ([RFC1950]) | Section 4.2.2 |\n| gzip | GZIP file format [RFC1952] | Section 4.2.3 |\n| x-compress | Deprecated (alias for compress) | Section 4.2.1 |\n| x-gzip | Deprecated (alias for gzip) | Section 4.2.3 |\n\n### 8.5. Content Coding Registration\n\nIANA maintains the \"HTTP Content Coding Registry\" at <[http://www.iana.org/assignments/http-parameters](http://www.iana.org/assignments/http-parameters)>.\n\nThe \"HTTP Content Coding Registry\" has been updated with the registrations below:\n\n| Name | Description | Reference |\n| --- | --- | --- |\n| compress | UNIX \"compress\" data format [Welch] | Section 4.2.1 |\n| deflate | \"deflate\" compressed data ([RFC1951]) inside the \"zlib\" data format ([RFC1950]) | Section 4.2.2 |\n| gzip | GZIP file format [RFC1952] | Section 4.2.3 |\n| x-compress | Deprecated (alias for compress) | Section 4.2.1 |\n| x-gzip | Deprecated (alias for gzip) | Section 4.2.3 |\n\n### 8.6. Upgrade Token Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Upgrade Token Registry\" defines the namespace for protocol-name tokens used to identify protocols in the Upgrade header field. The registry is maintained at <[http://www.iana.org/assignments/http-upgrade-tokens](http://www.iana.org/assignments/http-upgrade-tokens)>.\n\n#### 8.6.1. Procedure\n\nEach registered protocol name is associated with contact information and an optional set of specifications that details how the connection will be processed after it has been upgraded.\n\nRegistrations happen on a \"First Come First Served\" basis (see [Section 4.1](https://www.rfc-editor.org/rfc/rfc5226.html#section-4.1) of [RFC5226]) and are subject to the following rules:\n\n1. A protocol-name token, once registered, stays registered forever.\n2. The registration *MUST* name a responsible party for the registration.\n3. The registration *MUST* name a point of contact.\n4. The registration *MAY* name a set of specifications associated with that token. Such specifications need not be publicly available.\n5. The registration *SHOULD* name a set of expected \"protocol-version\" tokens associated with that token at the time of registration.\n6. The responsible party *MAY* change the registration at any time. The IANA will keep a record of all such changes, and make them available upon request.\n7. The IESG *MAY* reassign responsibility for a protocol token. This will normally only be used in the case when a responsible party cannot be contacted.\n\nThis registration procedure for HTTP Upgrade Tokens replaces that previously defined in [Section 7.2](https://www.rfc-editor.org/rfc/rfc2817.html#section-7.2) of [RFC2817].\n\n#### 8.6.2. Upgrade Token Registration\n\nThe \"HTTP\" entry in the upgrade token registry has been updated with the registration below:\n\n| Value | Description | Expected Version Tokens | Reference |\n| --- | --- | --- | --- |\n| HTTP | Hypertext Transfer Protocol | any DIGIT.DIGIT (e.g, \"2.0\") | Section 2.6 |\n\nThe responsible party is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n## 9. Security Considerations\n\nThis section is meant to inform developers, information providers, and users of known security considerations relevant to HTTP message syntax, parsing, and routing. Security considerations about HTTP semantics and payloads are addressed in [RFC7231].\n\n### 9.1. Establishing Authority\n\nHTTP relies on the notion of an authoritative response: a response that has been determined by (or at the direction of) the authority identified within the target URI to be the most appropriate response for that request given the state of the target resource at the time of response message origination. Providing a response from a non-authoritative source, such as a shared cache, is often useful to improve performance and availability, but only to the extent that the source can be trusted or the distrusted response can be safely used.\n\nUnfortunately, establishing authority can be difficult. For example, phishing is an attack on the user's perception of authority, where that perception can be misled by presenting similar branding in hypertext, possibly aided by userinfo obfuscating the authority component (see Section 2.7.1). User agents can reduce the impact of phishing attacks by enabling users to easily inspect a target URI prior to making an action, by prominently distinguishing (or rejecting) userinfo when present, and by not sending stored credentials and cookies when the referring document is from an unknown or untrusted source.\n\nWhen a registered name is used in the authority component, the \"http\" URI scheme (Section 2.7.1) relies on the user's local name resolution service to determine where it can find authoritative responses. This means that any attack on a user's network host table, cached names, or name resolution libraries becomes an avenue for attack on establishing authority. Likewise, the user's choice of server for Domain Name Service (DNS), and the hierarchy of servers from which it obtains resolution results, could impact the authenticity of address mappings; DNS Security Extensions (DNSSEC, [RFC4033]) are one way to improve authenticity.\n\nFurthermore, after an IP address is obtained, establishing authority for an \"http\" URI is vulnerable to attacks on Internet Protocol routing.\n\nThe \"https\" scheme (Section 2.7.2) is intended to prevent (or at least reveal) many of these potential attacks on establishing authority, provided that the negotiated TLS connection is secured and the client properly verifies that the communicating server's identity matches the target URI's authority component (see [RFC2818]). Correctly implementing such verification can be difficult (see [Georgiev]).\n\n### 9.2. Risks of Intermediaries\n\nBy their very nature, HTTP intermediaries are men-in-the-middle and, thus, represent an opportunity for man-in-the-middle attacks. Compromise of the systems on which the intermediaries run can result in serious security and privacy problems. Intermediaries might have access to security-related information, personal information about individual users and organizations, and proprietary information belonging to users and content providers. A compromised intermediary, or an intermediary implemented or configured without regard to security and privacy considerations, might be used in the commission of a wide range of potential attacks.\n\nIntermediaries that contain a shared cache are especially vulnerable to cache poisoning attacks, as described in [Section 8](rfc7234.html#security.considerations) of [RFC7234].\n\nImplementers need to consider the privacy and security implications of their design and coding decisions, and of the configuration options they provide to operators (especially the default configuration).\n\nUsers need to be aware that intermediaries are no more trustworthy than the people who run them; HTTP itself cannot solve this problem.\n\n### 9.3. Attacks via Protocol Element Length\n\nBecause HTTP uses mostly textual, character-delimited fields, parsers are often vulnerable to attacks based on sending very long (or very slow) streams of data, particularly where an implementation is expecting a protocol element with no predefined length.\n\nTo promote interoperability, specific recommendations are made for minimum size limits on request-line (Section 3.1.1) and header fields (Section 3.2). These are minimum recommendations, chosen to be supportable even by implementations with limited resources; it is expected that most implementations will choose substantially higher limits.\n\nA server can reject a message that has a request-target that is too long ([Section 6.5.12](rfc7231.html#status.414) of [RFC7231]) or a request payload that is too large ([Section 6.5.11](rfc7231.html#status.413) of [RFC7231]). Additional status codes related to capacity limits have been defined by extensions to HTTP [RFC6585].\n\nRecipients ought to carefully limit the extent to which they process other protocol elements, including (but not limited to) request methods, response status phrases, header field-names, numeric values, and body chunks. Failure to limit such processing can result in buffer overflows, arithmetic overflows, or increased vulnerability to denial-of-service attacks.\n\n### 9.4. Response Splitting\n\nResponse splitting (a.k.a, CRLF injection) is a common technique, used in various attacks on Web usage, that exploits the line-based nature of HTTP message framing and the ordered association of requests to responses on persistent connections [Klein]. This technique can be particularly damaging when the requests pass through a shared cache.\n\nResponse splitting exploits a vulnerability in servers (usually within an application server) where an attacker can send encoded data within some parameter of the request that is later decoded and echoed within any of the response header fields of the response. If the decoded data is crafted to look like the response has ended and a subsequent response has begun, the response has been split and the content within the apparent second response is controlled by the attacker. The attacker can then make any other request on the same persistent connection and trick the recipients (including intermediaries) into believing that the second half of the split is an authoritative answer to the second request.\n\nFor example, a parameter within the request-target might be read by an application server and reused within a redirect, resulting in the same parameter being echoed in the [Location](rfc7231.html#header.location) header field of the response. If the parameter is decoded by the application and not properly encoded when placed in the response field, the attacker can send encoded CRLF octets and other content that will make the application's single response look like two or more responses.\n\nA common defense against response splitting is to filter requests for data that looks like encoded CR and LF (e.g., \"%0D\" and \"%0A\"). However, that assumes the application server is only performing URI decoding, rather than more obscure data transformations like charset transcoding, XML entity translation, base64 decoding, sprintf reformatting, etc. A more effective mitigation is to prevent anything other than the server's core protocol libraries from sending a CR or LF within the header section, which means restricting the output of header fields to APIs that filter for bad octets and not allowing application servers to write directly to the protocol stream.\n\n### 9.5. Request Smuggling\n\nRequest smuggling ([Linhart]) is a technique that exploits differences in protocol parsing among various recipients to hide additional requests (which might otherwise be blocked or disabled by policy) within an apparently harmless request. Like response splitting, request smuggling can lead to a variety of attacks on HTTP usage.\n\nThis specification has introduced new requirements on request parsing, particularly with regard to message framing in Section 3.3.3, to reduce the effectiveness of request smuggling.\n\n### 9.6. Message Integrity\n\nHTTP does not define a specific mechanism for ensuring message integrity, instead relying on the error-detection ability of underlying transport protocols and the use of length or chunk-delimited framing to detect completeness. Additional integrity mechanisms, such as hash functions or digital signatures applied to the content, can be selectively added to messages via extensible metadata header fields. Historically, the lack of a single integrity mechanism has been justified by the informal nature of most HTTP communication. However, the prevalence of HTTP as an information access mechanism has resulted in its increasing use within environments where verification of message integrity is crucial.\n\nUser agents are encouraged to implement configurable means for detecting and reporting failures of message integrity such that those means can be enabled within environments for which integrity is necessary. For example, a browser being used to view medical history or drug interaction information needs to indicate to the user when such information is detected by the protocol to be incomplete, expired, or corrupted during transfer. Such mechanisms might be selectively enabled via user agent extensions or the presence of message integrity metadata in a response. At a minimum, user agents ought to provide some indication that allows a user to distinguish between a complete and incomplete response message (Section 3.4) when such verification is desired.\n\n### 9.7. Message Confidentiality\n\nHTTP relies on underlying transport protocols to provide message confidentiality when that is desired. HTTP has been specifically designed to be independent of the transport protocol, such that it can be used over many different forms of encrypted connection, with the selection of such transports being identified by the choice of URI scheme or within user agent configuration.\n\nThe \"https\" scheme can be used to identify resources that require a confidential connection, as described in Section 2.7.2.\n\n### 9.8. Privacy of Server Log Information\n\nA server is in the position to save personal data about a user's requests over time, which might identify their reading patterns or subjects of interest. In particular, log information gathered at an intermediary often contains a history of user agent interaction, across a multitude of sites, that can be traced to individual users.\n\nHTTP log information is confidential in nature; its handling is often constrained by laws and regulations. Log information needs to be securely stored and appropriate guidelines followed for its analysis. Anonymization of personal information within individual entries helps, but it is generally not sufficient to prevent real log traces from being re-identified based on correlation with other access characteristics. As such, access traces that are keyed to a specific client are unsafe to publish even if the key is pseudonymous.\n\nTo minimize the risk of theft or accidental publication, log information ought to be purged of personally identifiable information, including user identifiers, IP addresses, and user-provided query parameters, as soon as that information is no longer necessary to support operational needs for security, auditing, or fraud control.\n\n## 10. Acknowledgments\n\nThis edition of HTTP/1.1 builds on the many contributions that went into RFC 1945, RFC 2068, RFC 2145, and RFC 2616, including substantial contributions made by the previous authors, editors, and Working Group Chairs: Tim Berners-Lee, Ari Luotonen, Roy T. Fielding, Henrik Frystyk Nielsen, Jim Gettys, Jeffrey C. Mogul, Larry Masinter, and Paul J. Leach. Mark Nottingham oversaw this effort as Working Group Chair.\n\nSince 1999, the following contributors have helped improve the HTTP specification by reporting bugs, asking smart questions, drafting or reviewing text, and evaluating open issues:\n\nAdam Barth, Adam Roach, Addison Phillips, Adrian Chadd, Adrian Cole, Adrien W. de Croy, Alan Ford, Alan Ruttenberg, Albert Lunde, Alek Storm, Alex Rousskov, Alexandre Morgaut, Alexey Melnikov, Alisha Smith, Amichai Rothman, Amit Klein, Amos Jeffries, Andreas Maier, Andreas Petersson, Andrei Popov, Anil Sharma, Anne van Kesteren, Anthony Bryan, Asbjorn Ulsberg, Ashok Kumar, Balachander Krishnamurthy, Barry Leiba, Ben Laurie, Benjamin Carlyle, Benjamin Niven-Jenkins, Benoit Claise, Bil Corry, Bill Burke, Bjoern Hoehrmann, Bob Scheifler, Boris Zbarsky, Brett Slatkin, Brian Kell, Brian McBarron, Brian Pane, Brian Raymor, Brian Smith, Bruce Perens, Bryce Nesbitt, Cameron Heavon-Jones, Carl Kugler, Carsten Bormann, Charles Fry, Chris Burdess, Chris Newman, Christian Huitema, Cyrus Daboo, Dale Robert Anderson, Dan Wing, Dan Winship, Daniel Stenberg, Darrel Miller, Dave Cridland, Dave Crocker, Dave Kristol, Dave Thaler, David Booth, David Singer, David W. Morris, Diwakar Shetty, Dmitry Kurochkin, Drummond Reed, Duane Wessels, Edward Lee, Eitan Adler, Eliot Lear, Emile Stephan, Eran Hammer-Lahav, Eric D. Williams, Eric J. Bowman, Eric Lawrence, Eric Rescorla, Erik Aronesty, EungJun Yi, Evan Prodromou, Felix Geisendoerfer, Florian Weimer, Frank Ellermann, Fred Akalin, Fred Bohle, Frederic Kayser, Gabor Molnar, Gabriel Montenegro, Geoffrey Sneddon, Gervase Markham, Gili Tzabari, Grahame Grieve, Greg Slepak, Greg Wilkins, Grzegorz Calkowski, Harald Tveit Alvestrand, Harry Halpin, Helge Hess, Henrik Nordstrom, Henry S. Thompson, Henry Story, Herbert van de Sompel, Herve Ruellan, Howard Melman, Hugo Haas, Ian Fette, Ian Hickson, Ido Safruti, Ilari Liusvaara, Ilya Grigorik, Ingo Struck, J. Ross Nicoll, James Cloos, James H. Manger, James Lacey, James M. Snell, Jamie Lokier, Jan Algermissen, Jari Arkko, Jeff Hodges (who came up with the term 'effective Request-URI'), Jeff Pinner, Jeff Walden, Jim Luther, Jitu Padhye, Joe D. Williams, Joe Gregorio, Joe Orton, Joel Jaeggli, John C. Klensin, John C. Mallery, John Cowan, John Kemp, John Panzer, John Schneider, John Stracke, John Sullivan, Jonas Sicking, Jonathan A. Rees, Jonathan Billington, Jonathan Moore, Jonathan Silvera, Jordi Ros, Joris Dobbelsteen, Josh Cohen, Julien Pierre, Jungshik Shin, Justin Chapweske, Justin Erenkrantz, Justin James, Kalvinder Singh, Karl Dubost, Kathleen Moriarty, Keith Hoffman, Keith Moore, Ken Murchison, Koen Holtman, Konstantin Voronkov, Kris Zyp, Leif Hedstrom, Lionel Morand, Lisa Dusseault, Maciej Stachowiak, Manu Sporny, Marc Schneider, Marc Slemko, Mark Baker, Mark Pauley, Mark Watson, Markus Isomaki, Markus Lanthaler, Martin J. Duerst, Martin Musatov, Martin Nilsson, Martin Thomson, Matt Lynch, Matthew Cox, Matthew Kerwin, Max Clark, Menachem Dodge, Meral Shirazipour, Michael Burrows, Michael Hausenblas, Michael Scharf, Michael Sweet, Michael Tuexen, Michael Welzl, Mike Amundsen, Mike Belshe, Mike Bishop, Mike Kelly, Mike Schinkel, Miles Sabin, Murray S. Kucherawy, Mykyta Yevstifeyev, Nathan Rixham, Nicholas Shanks, Nico Williams, Nicolas Alvarez, Nicolas Mailhot, Noah Slater, Osama Mazahir, Pablo Castro, Pat Hayes, Patrick R. McManus, Paul E. Jones, Paul Hoffman, Paul Marquess, Pete Resnick, Peter Lepeska, Peter Occil, Peter Saint-Andre, Peter Watkins, Phil Archer, Phil Hunt, Philippe Mougin, Phillip Hallam-Baker, Piotr Dobrogost, Poul-Henning Kamp, Preethi Natarajan, Rajeev Bector, Ray Polk, Reto Bachmann-Gmuer, Richard Barnes, Richard Cyganiak, Rob Trace, Robby Simpson, Robert Brewer, Robert Collins, Robert Mattson, Robert O'Callahan, Robert Olofsson, Robert Sayre, Robert Siemer, Robert de Wilde, Roberto Javier Godoy, Roberto Peon, Roland Zink, Ronny Widjaja, Ryan Hamilton, S. Mike Dierken, Salvatore Loreto, Sam Johnston, Sam Pullara, Sam Ruby, Saurabh Kulkarni, Scott Lawrence (who maintained the original issues list), Sean B. Palmer, Sean Turner, Sebastien Barnoud, Shane McCarron, Shigeki Ohtsu, Simon Yarde, Stefan Eissing, Stefan Tilkov, Stefanos Harhalakis, Stephane Bortzmeyer, Stephen Farrell, Stephen Kent, Stephen Ludin, Stuart Williams, Subbu Allamaraju, Subramanian Moonesamy, Susan Hares, Sylvain Hellegouarch, Tapan Divekar, Tatsuhiro Tsujikawa, Tatsuya Hayashi, Ted Hardie, Ted Lemon, Thomas Broyer, Thomas Fossati, Thomas Maslen, Thomas Nadeau, Thomas Nordin, Thomas Roessler, Tim Bray, Tim Morgan, Tim Olsen, Tom Zhou, Travis Snoozy, Tyler Close, Vincent Murphy, Wenbo Zhu, Werner Baumann, Wilbur Streett, Wilfredo Sanchez Vega, William A. Rowe Jr., William Chan, Willy Tarreau, Xiaoshu Wang, Yaron Goland, Yngve Nysaeter Pettersen, Yoav Nir, Yogesh Bang, Yuchung Cheng, Yutaka Oiwa, Yves Lafon (long-time member of the editor team), Zed A. Shaw, and Zhong Yu.\n\nSee [Section 16](https://www.rfc-editor.org/rfc/rfc2616.html#section-16) of [RFC2616] for additional acknowledgements from prior revisions.\n\n## 11. References\n\n### 11.1. Normative References\n\n[RFC0793]\n\nPostel, J., “[Transmission Control Protocol](https://www.rfc-editor.org/rfc/rfc793.html)”, [STD 7](https://www.rfc-editor.org/info/std7), RFC 793, September 1981.\n\n[RFC1950]\n\nDeutsch, L. and J-L. Gailly, “[ZLIB Compressed Data Format Specification version 3.3](https://www.rfc-editor.org/rfc/rfc1950.html)”, RFC 1950, May 1996.\n\n[RFC1951]\n\nDeutsch, P., “[DEFLATE Compressed Data Format Specification version 1.3](https://www.rfc-editor.org/rfc/rfc1951.html)”, RFC 1951, May 1996.\n\n[RFC1952]\n\nDeutsch, P., Gailly, J-L., Adler, M., Deutsch, L., and G. Randers-Pehrson, “[GZIP file format specification version 4.3](https://www.rfc-editor.org/rfc/rfc1952.html)”, RFC 1952, May 1996.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC3986]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, January 2005.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, January 2008.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, June 2014.\n\n[RFC7232]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests](https://www.rfc-editor.org/rfc/rfc7232.html)”, RFC 7232, June 2014.\n\n[RFC7233]\n\nFielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Range Requests](https://www.rfc-editor.org/rfc/rfc7233.html)”, RFC 7233, June 2014.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, June 2014.\n\n[RFC7235]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Authentication](https://www.rfc-editor.org/rfc/rfc7235.html)”, RFC 7235, June 2014.\n\n[USASCII]\n\nAmerican National Standards Institute, “Coded Character Set -- 7-bit American Standard Code for Information Interchange”, ANSI X3.4, 1986.\n\n[Welch]\n\nWelch, T., “A Technique for High-Performance Data Compression”, IEEE Computer 17(6), June 1984.\n\n### 11.2. Informative References\n\n[BCP115]\n\nHansen, T., Hardie, T., and L. Masinter, “[Guidelines and Registration Procedures for New URI Schemes](https://www.rfc-editor.org/rfc/rfc4395.html)”, [BCP 115](https://www.rfc-editor.org/info/bcp115), RFC 4395, February 2006.\n\n[BCP13]\n\nFreed, N., Klensin, J., and T. Hansen, “[Media Type Specifications and Registration Procedures](https://www.rfc-editor.org/rfc/rfc6838.html)”, [BCP 13](https://www.rfc-editor.org/info/bcp13), RFC 6838, January 2013.\n\n[BCP90]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004.\n\n[Georgiev]\n\nGeorgiev, 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](http://doi.acm.org/10.1145/2382196.2382204)”, In Proceedings of the 2012 ACM Conference on Computer and Communications Security (CCS '12), pp. 38-49, October 2012, <[http://doi.acm.org/10.1145/2382196.2382204](http://doi.acm.org/10.1145/2382196.2382204)>.\n\n[ISO-8859-1]\n\nInternational Organization for Standardization, “Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1”, ISO/IEC 8859-1:1998, 1998.\n\n[Klein]\n\nKlein, A., “[Divide and Conquer - HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics](http://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf)”, March 2004, <[http://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf](http://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf)>.\n\n[Kri2001]\n\nKristol, D., “[HTTP Cookies: Standards, Privacy, and Politics](http://arxiv.org/abs/cs.SE/0105018)”, ACM Transactions on Internet Technology 1(2), November 2001, <[http://arxiv.org/abs/cs.SE/0105018](http://arxiv.org/abs/cs.SE/0105018)>.\n\n[Linhart]\n\nLinhart, C., Klein, A., Heled, R., and S. Orrin, “[HTTP Request Smuggling](http://www.watchfire.com/news/whitepapers.aspx)”, June 2005, <[http://www.watchfire.com/news/whitepapers.aspx](http://www.watchfire.com/news/whitepapers.aspx)>.\n\n[RFC1919]\n\nChatel, M., “[Classical versus Transparent IP Proxies](https://www.rfc-editor.org/rfc/rfc1919.html)”, RFC 1919, March 1996.\n\n[RFC1945]\n\nBerners-Lee, T., Fielding, R., and H. Nielsen, “[Hypertext Transfer Protocol -- HTTP/1.0](https://www.rfc-editor.org/rfc/rfc1945.html)”, RFC 1945, May 1996.\n\n[RFC2045]\n\nFreed, N. and N. Borenstein, “[Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies](https://www.rfc-editor.org/rfc/rfc2045.html)”, RFC 2045, November 1996.\n\n[RFC2047]\n\nMoore, K., “[MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text](https://www.rfc-editor.org/rfc/rfc2047.html)”, RFC 2047, November 1996.\n\n[RFC2068]\n\nFielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2068.html)”, RFC 2068, January 1997.\n\n[RFC2145]\n\nMogul, J., Fielding, R., Gettys, J., and H. Nielsen, “[Use and Interpretation of HTTP Version Numbers](https://www.rfc-editor.org/rfc/rfc2145.html)”, RFC 2145, May 1997.\n\n[RFC2616]\n\nFielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n[RFC2817]\n\nKhare, R. and S. Lawrence, “[Upgrading to TLS Within HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2817.html)”, RFC 2817, May 2000.\n\n[RFC2818]\n\nRescorla, E., “[HTTP Over TLS](https://www.rfc-editor.org/rfc/rfc2818.html)”, RFC 2818, May 2000.\n\n[RFC3040]\n\nCooper, I., Melve, I., and G. Tomlinson, “[Internet Web Replication and Caching Taxonomy](https://www.rfc-editor.org/rfc/rfc3040.html)”, RFC 3040, January 2001.\n\n[RFC4033]\n\nArends, R., Austein, R., Larson, M., Massey, D., and S. Rose, “[DNS Security Introduction and Requirements](https://www.rfc-editor.org/rfc/rfc4033.html)”, RFC 4033, March 2005.\n\n[RFC4559]\n\nJaganathan, K., Zhu, L., and J. Brezak, “[SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows](https://www.rfc-editor.org/rfc/rfc4559.html)”, RFC 4559, June 2006.\n\n[RFC5226]\n\nNarten, T. and H. Alvestrand, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc5226.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 5226, May 2008.\n\n[RFC5246]\n\nDierks, T. and E. Rescorla, “[The Transport Layer Security (TLS) Protocol Version 1.2](https://www.rfc-editor.org/rfc/rfc5246.html)”, RFC 5246, August 2008.\n\n[RFC5322]\n\nResnick, P., “[Internet Message Format](https://www.rfc-editor.org/rfc/rfc5322.html)”, RFC 5322, October 2008.\n\n[RFC6265]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, April 2011.\n\n[RFC6585]\n\nNottingham, M. and R. Fielding, “[Additional HTTP Status Codes](https://www.rfc-editor.org/rfc/rfc6585.html)”, RFC 6585, April 2012.\n\n## Appendix A. HTTP Version History\n\nHTTP has been in use since 1990. The first version, later referred to as HTTP/0.9, was a simple protocol for hypertext data transfer across the Internet, using only a single request method (GET) and no metadata. HTTP/1.0, as defined by [RFC1945], added a range of request methods and MIME-like messaging, allowing for metadata to be transferred and modifiers placed on the request/response semantics. However, HTTP/1.0 did not sufficiently take into consideration the effects of hierarchical proxies, caching, the need for persistent connections, or name-based virtual hosts. The proliferation of incompletely implemented applications calling themselves \"HTTP/1.0\" further necessitated a protocol version change in order for two communicating applications to determine each other's true capabilities.\n\nHTTP/1.1 remains compatible with HTTP/1.0 by including more stringent requirements that enable reliable implementations, adding only those features that can either be safely ignored by an HTTP/1.0 recipient or only be sent when communicating with a party advertising conformance with HTTP/1.1.\n\nHTTP/1.1 has been designed to make supporting previous versions easy. A general-purpose HTTP/1.1 server ought to be able to understand any valid request in the format of HTTP/1.0, responding appropriately with an HTTP/1.1 message that only uses features understood (or safely ignored) by HTTP/1.0 clients. Likewise, an HTTP/1.1 client can be expected to understand any valid HTTP/1.0 response.\n\nSince HTTP/0.9 did not support header fields in a request, there is no mechanism for it to support name-based virtual hosts (selection of resource by inspection of the Host header field). Any server that implements name-based virtual hosts ought to disable support for HTTP/0.9. Most requests that appear to be HTTP/0.9 are, in fact, badly constructed HTTP/1.x requests caused by a client failing to properly encode the request-target.\n\n### A.1. Changes from HTTP/1.0\n\nThis section summarizes major differences between versions HTTP/1.0 and HTTP/1.1.\n\n#### A.1.1. Multihomed Web Servers\n\nThe requirements that clients and servers support the Host header field (Section 5.4), report an error if it is missing from an HTTP/1.1 request, and accept absolute URIs (Section 5.3) are among the most important changes defined by HTTP/1.1.\n\nOlder HTTP/1.0 clients assumed a one-to-one relationship of IP addresses and servers; there was no other established mechanism for distinguishing the intended server of a request than the IP address to which that request was directed. The Host header field was introduced during the development of HTTP/1.1 and, though it was quickly implemented by most HTTP/1.0 browsers, additional requirements were placed on all HTTP/1.1 requests in order to ensure complete adoption. At the time of this writing, most HTTP-based services are dependent upon the Host header field for targeting requests.\n\n#### A.1.2. Keep-Alive Connections\n\nIn HTTP/1.0, each connection is established by the client prior to the request and closed by the server after sending the response. However, some implementations implement the explicitly negotiated (\"Keep-Alive\") version of persistent connections described in [Section 19.7.1](https://www.rfc-editor.org/rfc/rfc2068.html#section-19.7.1) of [RFC2068].\n\nSome clients and servers might wish to be compatible with these previous approaches to persistent connections, by explicitly negotiating for them with a \"Connection: keep-alive\" request header field. However, some experimental implementations of HTTP/1.0 persistent connections are faulty; for example, if an HTTP/1.0 proxy server doesn't understand Connection, it will erroneously forward that header field to the next inbound server, which would result in a hung connection.\n\nOne attempted solution was the introduction of a Proxy-Connection header field, targeted specifically at proxies. In practice, this was also unworkable, because proxies are often deployed in multiple layers, bringing about the same problem discussed above.\n\nAs a result, clients are encouraged not to send the Proxy-Connection header field in any requests.\n\nClients are also encouraged to consider the use of Connection: keep-alive in requests carefully; while they can enable persistent connections with HTTP/1.0 servers, clients using them will need to monitor the connection for \"hung\" requests (which indicate that the client ought stop sending the header field), and this mechanism ought not be used by clients at all when a proxy is being used.\n\n#### A.1.3. Introduction of Transfer-Encoding\n\nHTTP/1.1 introduces the Transfer-Encoding header field (Section 3.3.1). Transfer codings need to be decoded prior to forwarding an HTTP message over a MIME-compliant protocol.\n\n### A.2. Changes from RFC 2616\n\nHTTP's approach to error handling has been explained. (Section 2.5)\n\nThe HTTP-version ABNF production has been clarified to be case-sensitive. Additionally, version numbers have been restricted to single digits, due to the fact that implementations are known to handle multi-digit version numbers incorrectly. (Section 2.6)\n\nUserinfo (i.e., username and password) are now disallowed in HTTP and HTTPS URIs, because of security issues related to their transmission on the wire. (Section 2.7.1)\n\nThe HTTPS URI scheme is now defined by this specification; previously, it was done in [Section 2.4](https://www.rfc-editor.org/rfc/rfc2818.html#section-2.4) of [RFC2818]. Furthermore, it implies end-to-end security. (Section 2.7.2)\n\nHTTP messages can be (and often are) buffered by implementations; despite it sometimes being available as a stream, HTTP is fundamentally a message-oriented protocol. Minimum supported sizes for various protocol elements have been suggested, to improve interoperability. (Section 3)\n\nInvalid whitespace around field-names is now required to be rejected, because accepting it represents a security vulnerability. The ABNF productions defining header fields now only list the field value. (Section 3.2)\n\nRules about implicit linear whitespace between certain grammar productions have been removed; now whitespace is only allowed where specifically defined in the ABNF. (Section 3.2.3)\n\nHeader fields that span multiple lines (\"line folding\") are deprecated. (Section 3.2.4)\n\nThe NUL octet is no longer allowed in comment and quoted-string text, and handling of backslash-escaping in them has been clarified. The quoted-pair rule no longer allows escaping control characters other than HTAB. Non-US-ASCII content in header fields and the reason phrase has been obsoleted and made opaque (the TEXT rule was removed). (Section 3.2.6)\n\nBogus Content-Length header fields are now required to be handled as errors by recipients. (Section 3.3.2)\n\nThe algorithm for determining the message body length has been clarified to indicate all of the special cases (e.g., driven by methods or status codes) that affect it, and that new protocol elements cannot define such special cases. CONNECT is a new, special case in determining message body length. \"multipart/byteranges\" is no longer a way of determining message body length detection. (Section 3.3.3)\n\nThe \"identity\" transfer coding token has been removed. (Sections 3.3 and 4)\n\nChunk length does not include the count of the octets in the chunk header and trailer. Line folding in chunk extensions is disallowed. (Section 4.1)\n\nThe meaning of the \"deflate\" content coding has been clarified. (Section 4.2.2)\n\nThe segment + query components of RFC 3986 have been used to define the request-target, instead of abs_path from RFC 1808. The asterisk-form of the request-target is only allowed with the OPTIONS method. (Section 5.3)\n\nThe term \"Effective Request URI\" has been introduced. (Section 5.5)\n\nGateways do not need to generate Via header fields anymore. (Section 5.7.1)\n\nExactly when \"close\" connection options have to be sent has been clarified. Also, \"hop-by-hop\" header fields are required to appear in the Connection header field; just because they're defined as hop-by-hop in this specification doesn't exempt them. (Section 6.1)\n\nThe limit of two connections per server has been removed. An idempotent sequence of requests is no longer required to be retried. The requirement to retry requests under certain circumstances when the server prematurely closes the connection has been removed. Also, some extraneous requirements about when servers are allowed to close connections prematurely have been removed. (Section 6.3)\n\nThe semantics of the Upgrade header field is now defined in responses other than 101 (this was incorporated from [RFC2817]). Furthermore, the ordering in the field value is now significant. (Section 6.7)\n\nEmpty list elements in list productions (e.g., a list header field containing \", ,\") have been deprecated. (Section 7)\n\nRegistration of Transfer Codings now requires IETF Review (Section 8.4)\n\nThis specification now defines the Upgrade Token Registry, previously defined in [Section 7.2](https://www.rfc-editor.org/rfc/rfc2817.html#section-7.2) of [RFC2817]. (Section 8.6)\n\nThe expectation to support HTTP/0.9 requests has been removed. (Appendix A)\n\nIssues with the Keep-Alive and Proxy-Connection header fields in requests are pointed out, with use of the latter being discouraged altogether. (Appendix A.1.2)\n\n## Appendix B. Collected ABNF\n\n```\nBWS = OWS\n\nConnection = *( \",\" OWS ) connection-option *( OWS \",\" [ OWS\n connection-option ] )\nContent-Length = 1*DIGIT\n\nHTTP-message = start-line *( header-field CRLF ) CRLF [ message-body\n ]\nHTTP-name = %x48.54.54.50 ; HTTP\nHTTP-version = HTTP-name \"/\" DIGIT \".\" DIGIT\nHost = uri-host [ \":\" port ]\n\nOWS = *( SP / HTAB )\n\nRWS = 1*( SP / HTAB )\n\nTE = [ ( \",\" / t-codings ) *( OWS \",\" [ OWS t-codings ] ) ]\nTrailer = *( \",\" OWS ) field-name *( OWS \",\" [ OWS field-name ] )\nTransfer-Encoding = *( \",\" OWS ) transfer-coding *( OWS \",\" [ OWS\n transfer-coding ] )\n\nURI-reference = \nUpgrade = *( \",\" OWS ) protocol *( OWS \",\" [ OWS protocol ] )\n\nVia = *( \",\" OWS ) ( received-protocol RWS received-by [ RWS comment\n ] ) *( OWS \",\" [ OWS ( received-protocol RWS received-by [ RWS\n comment ] ) ] )\n\nabsolute-URI = \nabsolute-form = absolute-URI\nabsolute-path = 1*( \"/\" segment )\nasterisk-form = \"*\"\nauthority = \nauthority-form = authority\n\nchunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF\nchunk-data = 1*OCTET\nchunk-ext = *( \";\" chunk-ext-name [ \"=\" chunk-ext-val ] )\nchunk-ext-name = token\nchunk-ext-val = token / quoted-string\nchunk-size = 1*HEXDIG\nchunked-body = *chunk last-chunk trailer-part CRLF\ncomment = \"(\" *( ctext / quoted-pair / comment ) \")\"\nconnection-option = token\nctext = HTAB / SP / %x21-27 ; '!'-'''\n / %x2A-5B ; '*'-'['\n / %x5D-7E ; ']'-'~'\n / obs-text\n\nfield-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\nfield-name = token\nfield-value = *( field-content / obs-fold )\nfield-vchar = VCHAR / obs-text\nfragment = \n\nheader-field = field-name \":\" OWS field-value OWS\nhttp-URI = \"http://\" authority path-abempty [ \"?\" query ] [ \"#\"\n fragment ]\nhttps-URI = \"https://\" authority path-abempty [ \"?\" query ] [ \"#\"\n fragment ]\n\nlast-chunk = 1*\"0\" [ chunk-ext ] CRLF\n\nmessage-body = *OCTET\nmethod = token\n\nobs-fold = CRLF 1*( SP / HTAB )\nobs-text = %x80-FF\norigin-form = absolute-path [ \"?\" query ]\n\npartial-URI = relative-part [ \"?\" query ]\npath-abempty = \nport = \nprotocol = protocol-name [ \"/\" protocol-version ]\nprotocol-name = token\nprotocol-version = token\npseudonym = token\n\nqdtext = HTAB / SP / \"!\" / %x23-5B ; '#'-'['\n / %x5D-7E ; ']'-'~'\n / obs-text\nquery = \nquoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\nquoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE\n\nrank = ( \"0\" [ \".\" *3DIGIT ] ) / ( \"1\" [ \".\" *3\"0\" ] )\nreason-phrase = *( HTAB / SP / VCHAR / obs-text )\nreceived-by = ( uri-host [ \":\" port ] ) / pseudonym\nreceived-protocol = [ protocol-name \"/\" ] protocol-version\nrelative-part = \nrequest-line = method SP request-target SP HTTP-version CRLF\nrequest-target = origin-form / absolute-form / authority-form /\n asterisk-form\n\nscheme = \nsegment = \nstart-line = request-line / status-line\nstatus-code = 3DIGIT\nstatus-line = HTTP-version SP status-code SP reason-phrase CRLF\n\nt-codings = \"trailers\" / ( transfer-coding [ t-ranking ] )\nt-ranking = OWS \";\" OWS \"q=\" rank\ntchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\" / \"+\" / \"-\" / \".\" /\n \"^\" / \"_\" / \"`\" / \"|\" / \"~\" / DIGIT / ALPHA\ntoken = 1*tchar\ntrailer-part = *( header-field CRLF )\ntransfer-coding = \"chunked\" / \"compress\" / \"deflate\" / \"gzip\" /\n transfer-extension\ntransfer-extension = token *( OWS \";\" OWS transfer-parameter )\ntransfer-parameter = token BWS \"=\" BWS ( token / quoted-string )\n\nuri-host = \n```\n\n## Index\n\nA B C D E G H I K L M N O P R S T U V W\n\n- **A**\n - absolute-form (of request-target) 5.3.2\n - accelerator **2.3**\n - application/http Media Type **8.3.2**\n - asterisk-form (of request-target) 5.3.4\n - authoritative response **9.1**\n - authority-form (of request-target) 5.3.3\n- **B**\n - *BCP115* 8.2 , **11.2**\n - *BCP13* 8.3 , **11.2**\n - *BCP90* 8.1 , **11.2**\n - browser **2.1**\n- **C**\n - cache **2.4**\n - cacheable **2.4**\n - captive portal **2.3**\n - chunked (Coding Format) 3.3.1 , 3.3.3 , **4.1**\n - client **2.1**\n - close 3.2.1 , 4.3 , 5.7 , **6.1** , 6.1 , 6.3.2 , 6.6 , 6.6 , 6.7 , 8.1 , 8.1 , A.2\n - compress (Coding Format) 4.2.1\n - connection **2.1**\n - Connection header field 3.2.1 , 4.3 , 5.7 , **6.1** , 6.1 , 6.3.2 , 6.6 , 6.6 , 6.7 , 8.1 , 8.1 , A.2\n - Content-Length header field **3.3.2** , 8.1 , A.2\n- **D**\n - deflate (Coding Format) 4.2.2\n - Delimiters 3.2.6\n - downstream **2.3**\n- **E**\n - effective request URI **5.5**\n- **G**\n - gateway **2.3**\n - *Georgiev* 9.1 , **11.2**\n - Grammar\n - absolute-form 5.3 , **5.3.2**\n - absolute-path **2.7**\n - absolute-URI **2.7**\n - ALPHA **1.2**\n - asterisk-form 5.3 , **5.3.4**\n - authority **2.7**\n - authority-form 5.3 , **5.3.3**\n - BWS **3.2.3**\n - chunk **4.1**\n - chunk-data **4.1**\n - chunk-ext 4.1 , **4.1.1**\n - chunk-ext-name **4.1.1**\n - chunk-ext-val **4.1.1**\n - chunk-size **4.1**\n - chunked-body **4.1** , **4.1.1**\n - comment **3.2.6**\n - Connection **6.1**\n - connection-option **6.1**\n - Content-Length **3.3.2**\n - CR **1.2**\n - CRLF **1.2**\n - ctext **3.2.6**\n - CTL **1.2**\n - DIGIT **1.2**\n - DQUOTE **1.2**\n - field-content **3.2**\n - field-name **3.2** , 4.4\n - field-value **3.2**\n - field-vchar **3.2**\n - fragment **2.7**\n - header-field **3.2** , 4.1.2\n - HEXDIG **1.2**\n - Host **5.4**\n - HTAB **1.2**\n - HTTP-message **3**\n - HTTP-name **2.6**\n - http-URI **2.7.1**\n - HTTP-version **2.6**\n - https-URI **2.7.2**\n - last-chunk **4.1**\n - LF **1.2**\n - message-body **3.3**\n - method **3.1.1**\n - obs-fold **3.2**\n - obs-text **3.2.6**\n - OCTET **1.2**\n - origin-form 5.3 , **5.3.1**\n - OWS **3.2.3**\n - partial-URI **2.7**\n - port **2.7**\n - protocol-name **5.7.1**\n - protocol-version **5.7.1**\n - pseudonym **5.7.1**\n - qdtext **3.2.6**\n - query **2.7**\n - quoted-pair **3.2.6**\n - quoted-string **3.2.6**\n - rank **4.3**\n - reason-phrase **3.1.2**\n - received-by **5.7.1**\n - received-protocol **5.7.1**\n - request-line **3.1.1**\n - request-target **5.3**\n - RWS **3.2.3**\n - scheme **2.7**\n - segment **2.7**\n - SP **1.2**\n - start-line **3.1**\n - status-code **3.1.2**\n - status-line **3.1.2**\n - t-codings **4.3**\n - t-ranking **4.3**\n - tchar **3.2.6**\n - TE **4.3**\n - token **3.2.6**\n - Trailer **4.4**\n - trailer-part 4.1 , **4.1.2**\n - transfer-coding **4**\n - Transfer-Encoding **3.3.1**\n - transfer-extension **4**\n - transfer-parameter **4**\n - Upgrade **6.7**\n - uri-host **2.7**\n - URI-reference **2.7**\n - VCHAR **1.2**\n - Via **5.7.1**\n - gzip (Coding Format) 4.2.3\n- **H**\n - header field 3\n - header section 3\n - headers 3\n - Host header field 5.3.1 , **5.4** , 8.1 , A.1.1\n - http URI scheme **2.7.1**\n - https URI scheme 2.7.2\n- **I**\n - inbound **2.3**\n - interception proxy **2.3**\n - intermediary **2.3**\n - *ISO-8859-1* 3.2.4 , **11.2**\n- **K**\n - *Klein* 9.4 , **11.2**\n - *Kri2001* 3.2.2 , **11.2**\n- **L**\n - *Linhart* 9.5 , **11.2**\n- **M**\n - Media Type\n - application/http **8.3.2**\n - message/http **8.3.1**\n - message **2.1**\n - message/http Media Type **8.3.1**\n - method **3.1.1**\n- **N**\n - non-transforming proxy **5.7.2**\n- **O**\n - origin server **2.1**\n - origin-form (of request-target) 5.3.1\n - outbound **2.3**\n- **P**\n - phishing **9.1**\n - proxy **2.3**\n- **R**\n - recipient **2.1**\n - request **2.1**\n - request-target 3.1.1\n - resource **2.7**\n - response **2.1**\n - reverse proxy **2.3**\n - *RFC0793* 2.7.1 , **11.1**\n - *RFC1919* 2.3 , **11.2**\n - *RFC1945* 2.6 , 10 , **11.2** , A\n - *RFC1950* 4.2.2 , 8.4.2 , 8.5 , **11.1**\n - *RFC1951* 4.2.2 , 8.4.2 , 8.5 , **11.1**\n - *RFC1952* 4.2.3 , 8.4.2 , 8.5 , **11.1**\n - *RFC2045* 2.1 , 3.3.1 , **11.2**\n - *Section 6* 3.3.1\n - *RFC2047* 3.2.4 , **11.2**\n - *RFC2068* 2.6 , 6.3 , 10 , **11.2** , A.1.2\n - *Section 19.7.1* 6.3 , A.1.2\n - *RFC2119* 1.1 , **11.1**\n - *RFC2145* 1 , 10 , **11.2**\n - *RFC2616* 1 , 2.6 , 10 , 10 , **11.2**\n - *Section 16* 10\n - *RFC2817* 1 , 8.6.1 , **11.2** , A.2 , A.2\n - *Section 7.2* 8.6.1 , A.2\n - *RFC2818* 1 , 2.7.2 , 9.1 , **11.2** , A.2\n - *Section 2.4* A.2\n - *RFC3040* 2.3 , **11.2**\n - *RFC3986* 2.1 , 2.7 , 2.7 , 2.7 , 2.7 , 2.7 , 2.7 , 2.7 , 2.7 , 2.7 , 2.7 , 2.7 , 2.7 , 2.7.1 , 2.7.1 , 2.7.1 , 2.7.3 , 2.7.3 , 2.7.3 , 2.7.3 , 5.1 , **11.1**\n - *Section 2.1* 2.7.3\n - *Section 2.2* 2.7.3\n - *Section 3.1* 2.7\n - *Section 3.2* 2.7\n - *Section 3.2.1* 2.7.1\n - *Section 3.2.2* 2.7 , 2.7.1\n - *Section 3.2.3* 2.7\n - *Section 3.3* 2.7 , 2.7\n - *Section 3.4* 2.7\n - *Section 3.5* 2.7 , 2.7.1 , 5.1\n - *Section 4.1* 2.7\n - *Section 4.2* 2.7\n - *Section 4.3* 2.7\n - *Section 6* 2.7.3\n - *RFC4033* 9.1 , **11.2**\n - *RFC4559* 2.3 , **11.2**\n - *RFC5226* 8.4.1 , 8.6.1 , **11.2**\n - *Section 4.1* 8.4.1 , 8.6.1\n - *RFC5234* 1.2 , 1.2 , 7 , **11.1**\n - *Appendix B.1* 1.2\n - *RFC5246* 2.3 , 2.7.2 , **11.2**\n - *RFC5322* 2.1 , 3 , 5.7.1 , **11.2**\n - *Section 3.6.7* 5.7.1\n - *RFC6265* 2.7.2 , 3.2.2 , 4.1.2 , **11.2**\n - *RFC6585* 9.3 , **11.2**\n - *RFC7231* 1 , 2.1 , 2.1 , 2.7 , 2.7.1 , 3.1.1 , 3.1.1 , 3.1.2 , 3.2 , 3.2.1 , 3.3 , 3.3 , 3.3 , 3.3.1 , 3.3.1 , 3.3.2 , 3.3.2 , 3.3.2 , 4.1.2 , 4.1.2 , 4.3 , 5.1 , 5.3.3 , 5.3.4 , 5.6 , 5.7.2 , 5.7.2 , 6.3.1 , 6.3.2 , 6.3.2 , 6.7 , 6.7 , 8.4.1 , 9 , 9.3 , 9.3 , **11.1**\n - *Section 2* 2.7\n - *Section 3* 3.3.2\n - *Section 3.1.2.1* 3.3.1 , 8.4.1\n - *Section 3.3* 5.7.2\n - *Section 4* 3.1.1\n - *Section 4.2.1* 6.3.2\n - *Section 4.2.2* 6.3.1 , 6.3.2\n - *Section 4.3.1* 2.1 , 3.3\n - *Section 4.3.2* 3.3 , 3.3.2\n - *Section 4.3.6* 3.3 , 3.3.1 , 3.3.2 , 5.3.3\n - *Section 4.3.7* 5.3.4\n - *Section 5* 4.1.2\n - *Section 5.1.1* 6.7\n - *Section 5.3.1* 4.3\n - *Section 6* 2.7.1 , 3.1.2\n - *Section 6.2* 5.6\n - *Section 6.3.4* 5.7.2\n - *Section 6.4* 6.7\n - *Section 6.5.11* 9.3\n - *Section 6.5.12* 3.1.1 , 9.3\n - *Section 7.1* 4.1.2\n - *Section 7.1.1.2* 3.2\n - *Section 8.3* 3.2.1\n - *Appendix A* 2.1\n - *RFC7232* 1 , 3.3.1 , 3.3.2 , **11.1**\n - *Section 4.1* 3.3.1 , 3.3.2\n - *RFC7233* 1 , **11.1**\n - *RFC7234* 1 , 2.4 , 3.4 , 5.2 , 5.7.2 , 5.7.2 , 6.1 , 9.2 , **11.1**\n - *Section 2* 2.4\n - *Section 3* 3.4\n - *Section 5.2* 5.7.2 , 6.1\n - *Section 5.5* 5.7.2\n - *Section 8* 9.2\n - *RFC7235* 1 , 4.1.2 , **11.1**\n- **S**\n - sender **2.1**\n - server **2.1**\n - spider **2.1**\n- **T**\n - target resource **5.1**\n - target URI **5.1**\n - TE header field 4 , 4.1.2 , **4.3** , 8.1\n - Trailer header field **4.4** , 8.1\n - Transfer-Encoding header field 3.3 , **3.3.1** , 4 , 8.1 , A.1.3\n - transforming proxy **5.7.2**\n - transparent proxy **2.3**\n - tunnel **2.3**\n- **U**\n - Upgrade header field 5.7.1 , **6.7** , 8.1 , A.2\n - upstream **2.3**\n - URI scheme\n - http **2.7.1**\n - https 2.7.2\n - *USASCII* 1.2 , 3 , 3.2.4 , **11.1**\n - user agent **2.1**\n- **V**\n - Via header field **5.7.1** , 8.1 , A.2\n- **W**\n - *Welch* 4.2.1 , 8.4.2 , 8.5 , **11.1**\n\n## Authors' Addresses\n\n**Roy T. Fielding** (editor)\nAdobe Systems Incorporated\n345 Park Ave\nSan Jose, CA 95110\nUSA\nEmail: fielding@gbiv.com\nURI: [http://roy.gbiv.com/](http://roy.gbiv.com/)\n\n**Julian F. Reschke** (editor)\ngreenbytes GmbH\nHafenweg 16\nMuenster, NW 48155\nGermany\nEmail: julian.reschke@greenbytes.de\nURI: [http://greenbytes.de/tech/webdav/](http://greenbytes.de/tech/webdav/)", "znaku_textu": 180782, "slov": 27869, "odkazu": 684, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:29", "sha256": "dd757755c40db0be293a9b3d3f04c708041b8a582d3809d080e09fa133dd08d0", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7230", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/rfc/rfc2045.html", "https://www.rfc-editor.org/rfc/rfc5322.html", "https://www.rfc-editor.org/rfc/rfc2068.html", "http://www.iana.org/assignments/message-headers/", "http://www.iana.org/assignments/uri-schemes/", "http://www.iana.org/assignments/media-types", "http://www.iana.org/assignments/http-parameters", "https://www.rfc-editor.org/rfc/rfc5226.html", "http://www.iana.org/assignments/http-upgrade-tokens", "https://www.rfc-editor.org/rfc/rfc2817.html", "https://www.rfc-editor.org/rfc/rfc2616.html", "https://www.rfc-editor.org/rfc/rfc793.html", "https://www.rfc-editor.org/info/std7", "https://www.rfc-editor.org/rfc/rfc1950.html", "https://www.rfc-editor.org/rfc/rfc1951.html", "https://www.rfc-editor.org/rfc/rfc1952.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/info/std66", "https://www.rfc-editor.org/info/std68", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc7232.html", "https://www.rfc-editor.org/rfc/rfc7233.html", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://www.rfc-editor.org/rfc/rfc7235.html", "https://www.rfc-editor.org/rfc/rfc4395.html", "https://www.rfc-editor.org/info/bcp115", "https://www.rfc-editor.org/rfc/rfc6838.html", "https://www.rfc-editor.org/info/bcp13", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "http://doi.acm.org/10.1145/2382196.2382204", "http://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf", "http://arxiv.org/abs/cs.SE/0105018", "http://www.watchfire.com/news/whitepapers.aspx", "https://www.rfc-editor.org/rfc/rfc1919.html", "https://www.rfc-editor.org/rfc/rfc1945.html", "https://www.rfc-editor.org/rfc/rfc2047.html", "https://www.rfc-editor.org/rfc/rfc2145.html", "https://www.rfc-editor.org/rfc/rfc2818.html", "https://www.rfc-editor.org/rfc/rfc3040.html", "https://www.rfc-editor.org/rfc/rfc4033.html", "https://www.rfc-editor.org/rfc/rfc4559.html", "https://www.rfc-editor.org/info/bcp26", "https://www.rfc-editor.org/rfc/rfc5246.html", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://www.rfc-editor.org/rfc/rfc6585.html", "http://roy.gbiv.com/", "http://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc7231.html", "titulek": "RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", "h1": "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", "popis": "The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation.", "klicova_slova": "Hypertext Transfer Protocol, HTTP, HTTP semantics, HTTP payload, HTTP content, HTTP method, HTTP status code", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7231", "og:description": "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", "og:url": "https://httpwg.org/specs/rfc7231.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Conformance and Error Handling"}, {"uroven": 3, "text": "1.2. Syntax Notation"}, {"uroven": 2, "text": "2. Resources"}, {"uroven": 2, "text": "3. Representations"}, {"uroven": 3, "text": "3.1. Representation Metadata"}, {"uroven": 4, "text": "3.1.1. Processing Representation Data"}, {"uroven": 5, "text": "3.1.1.1. Media Type"}, {"uroven": 5, "text": "3.1.1.2. Charset"}, {"uroven": 5, "text": "3.1.1.3. Canonicalization and Text Defaults"}, {"uroven": 5, "text": "3.1.1.4. Multipart Types"}, {"uroven": 5, "text": "3.1.1.5. Content-Type"}, {"uroven": 4, "text": "3.1.2. Encoding for Compression or Integrity"}, {"uroven": 5, "text": "3.1.2.1. Content Codings"}, {"uroven": 5, "text": "3.1.2.2. Content-Encoding"}, {"uroven": 4, "text": "3.1.3. Audience Language"}, {"uroven": 5, "text": "3.1.3.1. Language Tags"}, {"uroven": 5, "text": "3.1.3.2. Content-Language"}, {"uroven": 4, "text": "3.1.4. Identification"}, {"uroven": 5, "text": "3.1.4.1. Identifying a Representation"}, {"uroven": 5, "text": "3.1.4.2. Content-Location"}, {"uroven": 3, "text": "3.2. Representation Data"}, {"uroven": 3, "text": "3.3. Payload Semantics"}, {"uroven": 3, "text": "3.4. Content Negotiation"}, {"uroven": 4, "text": "3.4.1. Proactive Negotiation"}, {"uroven": 4, "text": "3.4.2. Reactive Negotiation"}, {"uroven": 2, "text": "4. Request Methods"}, {"uroven": 3, "text": "4.1. Overview"}, {"uroven": 3, "text": "4.2. Common Method Properties"}, {"uroven": 4, "text": "4.2.1. Safe Methods"}, {"uroven": 4, "text": "4.2.2. Idempotent Methods"}, {"uroven": 4, "text": "4.2.3. Cacheable Methods"}, {"uroven": 3, "text": "4.3. Method Definitions"}, {"uroven": 4, "text": "4.3.1. GET"}, {"uroven": 4, "text": "4.3.2. HEAD"}, {"uroven": 4, "text": "4.3.3. POST"}, {"uroven": 4, "text": "4.3.4. PUT"}, {"uroven": 4, "text": "4.3.5. DELETE"}, {"uroven": 4, "text": "4.3.6. CONNECT"}, {"uroven": 4, "text": "4.3.7. OPTIONS"}, {"uroven": 4, "text": "4.3.8. TRACE"}, {"uroven": 2, "text": "5. Request Header Fields"}, {"uroven": 3, "text": "5.1. Controls"}, {"uroven": 4, "text": "5.1.1. Expect"}, {"uroven": 4, "text": "5.1.2. Max-Forwards"}, {"uroven": 3, "text": "5.2. Conditionals"}, {"uroven": 3, "text": "5.3. Content Negotiation"}, {"uroven": 4, "text": "5.3.1. Quality Values"}, {"uroven": 4, "text": "5.3.2. Accept"}, {"uroven": 4, "text": "5.3.3. Accept-Charset"}, {"uroven": 4, "text": "5.3.4. Accept-Encoding"}, {"uroven": 4, "text": "5.3.5. Accept-Language"}, {"uroven": 3, "text": "5.4. Authentication Credentials"}, {"uroven": 3, "text": "5.5. Request Context"}, {"uroven": 4, "text": "5.5.1. From"}, {"uroven": 4, "text": "5.5.2. Referer"}, {"uroven": 4, "text": "5.5.3. User-Agent"}, {"uroven": 2, "text": "6. Response Status Codes"}, {"uroven": 3, "text": "6.1. Overview of Status Codes"}, {"uroven": 3, "text": "6.2. Informational 1xx"}, {"uroven": 4, "text": "6.2.1. 100 Continue"}, {"uroven": 4, "text": "6.2.2. 101 Switching Protocols"}, {"uroven": 3, "text": "6.3. Successful 2xx"}, {"uroven": 4, "text": "6.3.1. 200 OK"}, {"uroven": 4, "text": "6.3.2. 201 Created"}, {"uroven": 4, "text": "6.3.3. 202 Accepted"}, {"uroven": 4, "text": "6.3.4. 203 Non-Authoritative Information"}, {"uroven": 4, "text": "6.3.5. 204 No Content"}, {"uroven": 4, "text": "6.3.6. 205 Reset Content"}, {"uroven": 3, "text": "6.4. Redirection 3xx"}, {"uroven": 4, "text": "6.4.1. 300 Multiple Choices"}, {"uroven": 4, "text": "6.4.2. 301 Moved Permanently"}, {"uroven": 4, "text": "6.4.3. 302 Found"}, {"uroven": 4, "text": "6.4.4. 303 See Other"}, {"uroven": 4, "text": "6.4.5. 305 Use Proxy"}, {"uroven": 4, "text": "6.4.6. 306 (Unused)"}, {"uroven": 4, "text": "6.4.7. 307 Temporary Redirect"}, {"uroven": 3, "text": "6.5. Client Error 4xx"}, {"uroven": 4, "text": "6.5.1. 400 Bad Request"}, {"uroven": 4, "text": "6.5.2. 402 Payment Required"}, {"uroven": 4, "text": "6.5.3. 403 Forbidden"}, {"uroven": 4, "text": "6.5.4. 404 Not Found"}, {"uroven": 4, "text": "6.5.5. 405 Method Not Allowed"}, {"uroven": 4, "text": "6.5.6. 406 Not Acceptable"}, {"uroven": 4, "text": "6.5.7. 408 Request Timeout"}, {"uroven": 4, "text": "6.5.8. 409 Conflict"}, {"uroven": 4, "text": "6.5.9. 410 Gone"}, {"uroven": 4, "text": "6.5.10. 411 Length Required"}, {"uroven": 4, "text": "6.5.11. 413 Payload Too Large"}, {"uroven": 4, "text": "6.5.12. 414 URI Too Long"}, {"uroven": 4, "text": "6.5.13. 415 Unsupported Media Type"}, {"uroven": 4, "text": "6.5.14. 417 Expectation Failed"}, {"uroven": 4, "text": "6.5.15. 426 Upgrade Required"}, {"uroven": 3, "text": "6.6. Server Error 5xx"}, {"uroven": 4, "text": "6.6.1. 500 Internal Server Error"}, {"uroven": 4, "text": "6.6.2. 501 Not Implemented"}, {"uroven": 4, "text": "6.6.3. 502 Bad Gateway"}, {"uroven": 4, "text": "6.6.4. 503 Service Unavailable"}, {"uroven": 4, "text": "6.6.5. 504 Gateway Timeout"}, {"uroven": 4, "text": "6.6.6. 505 HTTP Version Not Supported"}, {"uroven": 2, "text": "7. Response Header Fields"}, {"uroven": 3, "text": "7.1. Control Data"}, {"uroven": 4, "text": "7.1.1. Origination Date"}, {"uroven": 5, "text": "7.1.1.1. Date/Time Formats"}, {"uroven": 5, "text": "7.1.1.2. Date"}, {"uroven": 4, "text": "7.1.2. Location"}, {"uroven": 4, "text": "7.1.3. Retry-After"}, {"uroven": 4, "text": "7.1.4. Vary"}, {"uroven": 3, "text": "7.2. Validator Header Fields"}, {"uroven": 3, "text": "7.3. Authentication Challenges"}, {"uroven": 3, "text": "7.4. Response Context"}, {"uroven": 4, "text": "7.4.1. Allow"}, {"uroven": 4, "text": "7.4.2. Server"}, {"uroven": 2, "text": "8. IANA Considerations"}, {"uroven": 3, "text": "8.1. Method Registry"}, {"uroven": 4, "text": "8.1.1. Procedure"}, {"uroven": 4, "text": "8.1.2. Considerations for New Methods"}, {"uroven": 4, "text": "8.1.3. Registrations"}, {"uroven": 3, "text": "8.2. Status Code Registry"}, {"uroven": 4, "text": "8.2.1. Procedure"}, {"uroven": 4, "text": "8.2.2. Considerations for New Status Codes"}, {"uroven": 4, "text": "8.2.3. Registrations"}, {"uroven": 3, "text": "8.3. Header Field Registry"}, {"uroven": 4, "text": "8.3.1. Considerations for New Header Fields"}, {"uroven": 4, "text": "8.3.2. Registrations"}, {"uroven": 3, "text": "8.4. Content Coding Registry"}, {"uroven": 4, "text": "8.4.1. Procedure"}, {"uroven": 4, "text": "8.4.2. Registrations"}, {"uroven": 2, "text": "9. Security Considerations"}, {"uroven": 3, "text": "9.1. Attacks Based on File and Path Names"}, {"uroven": 3, "text": "9.2. Attacks Based on Command, Code, or Query Injection"}, {"uroven": 3, "text": "9.3. Disclosure of Personal Information"}, {"uroven": 3, "text": "9.4. Disclosure of Sensitive Information in URIs"}, {"uroven": 3, "text": "9.5. Disclosure of Fragment after Redirects"}, {"uroven": 3, "text": "9.6. Disclosure of Product Information"}, {"uroven": 3, "text": "9.7. Browser Fingerprinting"}, {"uroven": 2, "text": "10. Acknowledgments"}, {"uroven": 2, "text": "11. References"}, {"uroven": 3, "text": "11.1. Normative References"}, {"uroven": 3, "text": "11.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Differences between HTTP and MIME"}, {"uroven": 3, "text": "A.1. MIME-Version"}, {"uroven": 3, "text": "A.2. Conversion to Canonical Form"}, {"uroven": 3, "text": "A.3. Conversion of Date Formats"}, {"uroven": 3, "text": "A.4. Conversion of Content-Encoding"}, {"uroven": 3, "text": "A.5. Conversion of Content-Transfer-Encoding"}, {"uroven": 3, "text": "A.6. MHTML and Line Length Limitations"}, {"uroven": 2, "text": "Appendix B. Changes from RFC 2616"}, {"uroven": 2, "text": "Appendix C. Imported ABNF"}, {"uroven": 2, "text": "Appendix D. Collected ABNF"}, {"uroven": 2, "text": "Index"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7231](http://www.rfc-editor.org/info/rfc7231).\n\n## Copyright Notice\n\nCopyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Conformance and Error Handling\n - 1.2. Syntax Notation\n- 2. Resources\n- 3. Representations\n - 3.1. Representation Metadata\n - 3.1.1. Processing Representation Data\n - 3.1.2. Encoding for Compression or Integrity\n - 3.1.3. Audience Language\n - 3.1.4. Identification\n - 3.2. Representation Data\n - 3.3. Payload Semantics\n - 3.4. Content Negotiation\n - 3.4.1. Proactive Negotiation\n - 3.4.2. Reactive Negotiation\n- 4. Request Methods\n - 4.1. Overview\n - 4.2. Common Method Properties\n - 4.2.1. Safe Methods\n - 4.2.2. Idempotent Methods\n - 4.2.3. Cacheable Methods\n - 4.3. Method Definitions\n - 4.3.1. GET\n - 4.3.2. HEAD\n - 4.3.3. POST\n - 4.3.4. PUT\n - 4.3.5. DELETE\n - 4.3.6. CONNECT\n - 4.3.7. OPTIONS\n - 4.3.8. TRACE\n- 5. Request Header Fields\n - 5.1. Controls\n - 5.1.1. Expect\n - 5.1.2. Max-Forwards\n - 5.2. Conditionals\n - 5.3. Content Negotiation\n - 5.3.1. Quality Values\n - 5.3.2. Accept\n - 5.3.3. Accept-Charset\n - 5.3.4. Accept-Encoding\n - 5.3.5. Accept-Language\n - 5.4. Authentication Credentials\n - 5.5. Request Context\n - 5.5.1. From\n - 5.5.2. Referer\n - 5.5.3. User-Agent\n- 6. Response Status Codes\n - 6.1. Overview of Status Codes\n - 6.2. Informational 1xx\n - 6.2.1. 100 Continue\n - 6.2.2. 101 Switching Protocols\n - 6.3. Successful 2xx\n - 6.3.1. 200 OK\n - 6.3.2. 201 Created\n - 6.3.3. 202 Accepted\n - 6.3.4. 203 Non-Authoritative Information\n - 6.3.5. 204 No Content\n - 6.3.6. 205 Reset Content\n - 6.4. Redirection 3xx\n - 6.4.1. 300 Multiple Choices\n - 6.4.2. 301 Moved Permanently\n - 6.4.3. 302 Found\n - 6.4.4. 303 See Other\n - 6.4.5. 305 Use Proxy\n - 6.4.6. 306 (Unused)\n - 6.4.7. 307 Temporary Redirect\n - 6.5. Client Error 4xx\n - 6.5.1. 400 Bad Request\n - 6.5.2. 402 Payment Required\n - 6.5.3. 403 Forbidden\n - 6.5.4. 404 Not Found\n - 6.5.5. 405 Method Not Allowed\n - 6.5.6. 406 Not Acceptable\n - 6.5.7. 408 Request Timeout\n - 6.5.8. 409 Conflict\n - 6.5.9. 410 Gone\n - 6.5.10. 411 Length Required\n - 6.5.11. 413 Payload Too Large\n - 6.5.12. 414 URI Too Long\n - 6.5.13. 415 Unsupported Media Type\n - 6.5.14. 417 Expectation Failed\n - 6.5.15. 426 Upgrade Required\n - 6.6. Server Error 5xx\n - 6.6.1. 500 Internal Server Error\n - 6.6.2. 501 Not Implemented\n - 6.6.3. 502 Bad Gateway\n - 6.6.4. 503 Service Unavailable\n - 6.6.5. 504 Gateway Timeout\n - 6.6.6. 505 HTTP Version Not Supported\n- 7. Response Header Fields\n - 7.1. Control Data\n - 7.1.1. Origination Date\n - 7.1.2. Location\n - 7.1.3. Retry-After\n - 7.1.4. Vary\n - 7.2. Validator Header Fields\n - 7.3. Authentication Challenges\n - 7.4. Response Context\n - 7.4.1. Allow\n - 7.4.2. Server\n- 8. IANA Considerations\n - 8.1. Method Registry\n - 8.1.1. Procedure\n - 8.1.2. Considerations for New Methods\n - 8.1.3. Registrations\n - 8.2. Status Code Registry\n - 8.2.1. Procedure\n - 8.2.2. Considerations for New Status Codes\n - 8.2.3. Registrations\n - 8.3. Header Field Registry\n - 8.3.1. Considerations for New Header Fields\n - 8.3.2. Registrations\n - 8.4. Content Coding Registry\n - 8.4.1. Procedure\n - 8.4.2. Registrations\n- 9. Security Considerations\n - 9.1. Attacks Based on File and Path Names\n - 9.2. Attacks Based on Command, Code, or Query Injection\n - 9.3. Disclosure of Personal Information\n - 9.4. Disclosure of Sensitive Information in URIs\n - 9.5. Disclosure of Fragment after Redirects\n - 9.6. Disclosure of Product Information\n - 9.7. Browser Fingerprinting\n- 10. Acknowledgments\n- 11. References\n - 11.1. Normative References\n - 11.2. Informative References\n- Appendix A. Differences between HTTP and MIME\n - A.1. MIME-Version\n - A.2. Conversion to Canonical Form\n - A.3. Conversion of Date Formats\n - A.4. Conversion of Content-Encoding\n - A.5. Conversion of Content-Transfer-Encoding\n - A.6. MHTML and Line Length Limitations\n- Appendix B. Changes from RFC 2616\n- Appendix C. Imported ABNF\n- Appendix D. Collected ABNF\n- Index\n- Authors' Addresses\n\n## 1. Introduction\n\nEach Hypertext Transfer Protocol (HTTP) message is either a request or a response. A server listens on a connection for a request, parses each message received, interprets the message semantics in relation to the identified request target, and responds to that request with one or more response messages. A client constructs request messages to communicate specific intentions, examines received responses to see if the intentions were carried out, and determines how to interpret the results. This document defines HTTP/1.1 request and response semantics in terms of the architecture defined in [RFC7230].\n\nHTTP provides a uniform interface for interacting with a resource (Section 2), regardless of its type, nature, or implementation, via the manipulation and transfer of representations (Section 3).\n\nHTTP semantics include the intentions defined by each request method (Section 4), extensions to those semantics that might be described in request header fields (Section 5), the meaning of status codes to indicate a machine-readable response (Section 6), and the meaning of other control data and resource metadata that might be given in response header fields (Section 7).\n\nThis document also defines representation metadata that describe how a payload is intended to be interpreted by a recipient, the request header fields that might influence content selection, and the various selection algorithms that are collectively referred to as \"content negotiation\" (Section 3.4).\n\n### 1.1. Conformance and Error Handling\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nConformance criteria and considerations regarding error handling are defined in [Section 2.5](rfc7230.html#conformance) of [RFC7230].\n\n### 1.2. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234] with a list extension, defined in [Section 7](rfc7230.html#abnf.extension) of [RFC7230], that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). Appendix C describes rules imported from other documents. Appendix D shows the collected grammar with all list operators expanded to standard ABNF notation.\n\nThis specification uses the terms \"character\", \"character encoding scheme\", \"charset\", and \"protocol element\" as they are defined in [RFC6365].\n\n## 2. Resources\n\nThe 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. Each resource is identified by a Uniform Resource Identifier (URI), as described in [Section 2.7](rfc7230.html#uri) of [RFC7230].\n\nWhen a client constructs an HTTP/1.1 request message, it sends the [target URI](rfc7230.html#target-resource) in one of various forms, as defined in ([Section 5.3](rfc7230.html#request-target) of [RFC7230]). When a request is received, the server reconstructs an [effective request URI](rfc7230.html#effective.request.uri) for the target resource ([Section 5.5](rfc7230.html#effective.request.uri) of [RFC7230]).\n\nOne design goal of HTTP is to separate resource identification from request semantics, which is made possible by vesting the request semantics in the request method (Section 4) and a few request-modifying header fields (Section 5). If there is a conflict between the method semantics and any semantic implied by the URI itself, as described in Section 4.2.1, the method semantics take precedence.\n\n## 3. Representations\n\nConsidering that a resource could be anything, and that the uniform interface provided by HTTP is similar to a window through which one can observe and act upon such a thing only through the communication of messages to some independent actor on the other side, an abstraction is needed to represent (\"take the place of\") the current or desired state of that thing in our communications. That abstraction is called a representation [REST].\n\nFor the purposes of HTTP, 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, and that consists of a set of representation metadata and a potentially unbounded stream of representation data.\n\nAn origin server might be provided with, or be capable of generating, multiple representations that are each intended to reflect the current state of a target resource. In such cases, some algorithm is used by the origin server to select one of those representations as most applicable to a given request, usually based on content negotiation. This \"selected representation\" is used to provide the data and metadata for evaluating conditional requests [RFC7232] and constructing the payload for 200 (OK) and [304 (Not Modified)](rfc7232.html#status.304) responses to GET (Section 4.3.1).\n\n### 3.1. Representation Metadata\n\nRepresentation header fields provide metadata about the representation. When a message includes a payload body, the representation header fields describe how to interpret the representation data enclosed in the payload body. In a response to a HEAD request, the representation header fields describe the representation data that would have been enclosed in the payload body if the same request had been a GET.\n\nThe following header fields convey representation metadata:\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| Content-Type | Section 3.1.1.5 |\n| Content-Encoding | Section 3.1.2.2 |\n| Content-Language | Section 3.1.3.2 |\n| Content-Location | Section 3.1.4.2 |\n\n#### 3.1.1. Processing Representation Data\n\n##### 3.1.1.1. Media Type\n\nHTTP uses Internet media types [RFC2046] in the Content-Type (Section 3.1.1.5) and Accept (Section 5.3.2) header fields in order to provide open and extensible data typing and type negotiation. Media types define both a data format and various processing models: how to process that data in accordance with each context in which it is received.\n\n```\n media-type = type \"/\" subtype *( OWS \";\" OWS parameter )\n type = token subtype = token \n```\n\nThe type/subtype *MAY* be followed by parameters in the form of name=value pairs.\n\n```\n parameter = token \"=\" ( token / quoted-string )\n```\n\nThe type, subtype, and parameter name tokens are case-insensitive. Parameter values might or might not be case-sensitive, depending on the semantics of the parameter name. The presence or absence of a parameter might be significant to the processing of a media-type, depending on its definition within the media type registry.\n\nA parameter value that matches the token production can be transmitted either as a token or within a quoted-string. The quoted and unquoted values are equivalent. For example, the following examples are all equivalent, but the first is preferred for consistency:\n\n```\n text/html;charset=utf-8\n text/html;charset=UTF-8\n Text/HTML;Charset=\"utf-8\"\n text/html; charset=\"utf-8\"\n```\n\nInternet media types ought to be registered with IANA according to the procedures defined in [BCP13].\n\n##### 3.1.1.2. Charset\n\nHTTP uses charset names to indicate or negotiate the character encoding scheme of a textual representation [RFC6365]. A charset is identified by a case-insensitive token.\n\n```\n charset = token \n```\n\nCharset names ought to be registered in the IANA \"Character Sets\" registry (<[http://www.iana.org/assignments/character-sets](http://www.iana.org/assignments/character-sets)>) according to the procedures defined in [RFC2978].\n\n##### 3.1.1.3. Canonicalization and Text Defaults\n\nInternet media types are registered with a canonical form in order to be interoperable among systems with varying native encoding formats. Representations selected or transferred via HTTP ought to be in canonical form, for many of the same reasons described by the Multipurpose Internet Mail Extensions (MIME) [RFC2045]. However, the performance characteristics of email deployments (i.e., store and forward messages to peers) are significantly different from those common to HTTP and the Web (server-based information services). Furthermore, MIME's constraints for the sake of compatibility with older mail transfer protocols do not apply to HTTP (see Appendix A).\n\nMIME's canonical form requires that media subtypes of the \"text\" type use CRLF as the text line break. HTTP allows the transfer of text media with plain CR or LF alone representing a line break, when such line breaks are consistent for an entire representation. An HTTP sender *MAY* generate, and a recipient *MUST* be able to parse, line breaks in text media that consist of CRLF, bare CR, or bare LF. In addition, text media in HTTP is not limited to charsets that use octets 13 and 10 for CR and LF, respectively. This flexibility regarding line breaks applies only to text within a representation that has been assigned a \"text\" media type; it does not apply to \"multipart\" types or HTTP elements outside the payload body (e.g., header fields).\n\nIf a representation is encoded with a content-coding, the underlying data ought to be in a form defined above prior to being encoded.\n\n##### 3.1.1.4. Multipart Types\n\nMIME provides for a number of \"multipart\" types — encapsulations of one or more representations within a single message body. All multipart types share a common syntax, as defined in [Section 5.1.1](https://www.rfc-editor.org/rfc/rfc2046.html#section-5.1.1) of [RFC2046], and include a boundary parameter as part of the media type value. The message body is itself a protocol element; a sender *MUST* generate only CRLF to represent line breaks between body parts.\n\nHTTP message framing does not use the multipart boundary as an indicator of message body length, though it might be used by implementations that generate or process the payload. For example, the \"multipart/form-data\" type is often used for carrying form data in a request, as described in [RFC2388], and the \"multipart/byteranges\" type is defined by this specification for use in some [206 (Partial Content)](rfc7233.html#status.206) responses [RFC7233].\n\n##### 3.1.1.5. Content-Type\n\nThe \"Content-Type\" header field indicates the media type of the associated representation: either the representation enclosed in the message payload 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.\n\n```\n Content-Type = media-type \n```\n\nMedia types are defined in Section 3.1.1.1. An example of the field is\n\n```\n Content-Type: text/html; charset=ISO-8859-4\n```\n\nA sender that generates a message containing a payload body *SHOULD* generate a Content-Type header field in that message unless the intended media type of the enclosed representation is unknown to the sender. If a Content-Type header field is not present, the recipient *MAY* either assume a media type of \"application/octet-stream\" ([RFC2046], [Section 4.5.1](https://www.rfc-editor.org/rfc/rfc2046.html#section-4.5.1)) or examine the data to determine its type.\n\nIn practice, resource owners do not always properly configure their origin server to provide the correct Content-Type for a given representation, with the result that some clients will examine a payload's content and override the specified type. Clients that do so risk drawing incorrect conclusions, which might expose additional security risks (e.g., \"privilege escalation\"). Furthermore, it is impossible to determine the sender's intent by examining the data format: many data formats match multiple media types that differ only in processing semantics. Implementers are encouraged to provide a means of disabling such \"content sniffing\" when it is used.\n\n#### 3.1.2. Encoding for Compression or Integrity\n\n##### 3.1.2.1. Content Codings\n\nContent coding values indicate an encoding transformation that has been or can be applied to a representation. Content codings are primarily used to allow a representation to be compressed or otherwise usefully transformed without losing the identity of its underlying media type and without loss of information. Frequently, the representation is stored in coded form, transmitted directly, and only decoded by the final recipient.\n\n```\n content-coding = token \n```\n\nAll content-coding values are case-insensitive and ought to be registered within the \"HTTP Content Coding Registry\", as defined in Section 8.4. They are used in the Accept-Encoding (Section 5.3.4) and Content-Encoding (Section 3.1.2.2) header fields.\n\nThe following content-coding values are defined by this specification:\n\n- compress (and x-compress): See [Section 4.2.1](rfc7230.html#compress.coding) of [RFC7230] .\n- deflate: See [Section 4.2.2](rfc7230.html#deflate.coding) of [RFC7230] .\n- gzip (and x-gzip): See [Section 4.2.3](rfc7230.html#gzip.coding) of [RFC7230] .\n\n##### 3.1.2.2. Content-Encoding\n\nThe \"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.\n\n```\n Content-Encoding = 1#content-coding \n```\n\nAn example of its use is\n\n```\n Content-Encoding: gzip\n```\n\nIf one or more encodings have been applied to a representation, the sender that applied the encodings *MUST* generate a Content-Encoding header field that lists the content codings in the order in which they were applied. Additional information about the encoding parameters can be provided by other header fields not defined by this specification.\n\nUnlike Transfer-Encoding ([Section 3.3.1](rfc7230.html#header.transfer-encoding) of [RFC7230]), the codings listed in Content-Encoding are a characteristic of the representation; the representation is defined in terms of the coded form, and all other metadata about the representation is about the coded form unless otherwise noted in the metadata definition. Typically, the representation is only decoded just prior to rendering or analogous usage.\n\nIf the media type includes an inherent encoding, such as a data format that is always compressed, then that encoding would not be restated in Content-Encoding even if it happens to be the same algorithm as one of the content codings. Such a content coding would only be listed if, for some bizarre reason, it is applied a second time to form the representation. Likewise, an origin server might choose to publish the same data as multiple representations that differ only in whether the coding is defined as part of Content-Type or Content-Encoding, since some user agents will behave differently in their handling of each response (e.g., open a \"Save as ...\" dialog instead of automatic decompression and rendering of content).\n\nAn origin server *MAY* respond with a status code of 415 (Unsupported Media Type) if a representation in the request message has a content coding that is not acceptable.\n\n#### 3.1.3. Audience Language\n\n##### 3.1.3.1. Language Tags\n\nA language tag, as defined in [RFC5646], identifies a natural language spoken, written, or otherwise conveyed by human beings for communication of information to other human beings. Computer languages are explicitly excluded.\n\nHTTP uses language tags within the Accept-Language and Content-Language header fields. Accept-Language uses the broader language-range production defined in Section 5.3.5, whereas Content-Language uses the language-tag production defined below.\n\n```\n language-tag = \n```\n\nA language tag is a sequence of one or more case-insensitive subtags, each separated by a hyphen character (\"-\", %x2D). In most cases, a language tag consists of a primary language subtag that identifies a broad family of related languages (e.g., \"en\" = English), which is optionally followed by a series of subtags that refine or narrow that language's range (e.g., \"en-CA\" = the variety of English as communicated in Canada). Whitespace is not allowed within a language tag. Example tags include:\n\n```\n fr, en-US, es-419, az-Arab, x-pig-latin, man-Nkoo-GN\n```\n\nSee [RFC5646] for further information.\n\n##### 3.1.3.2. Content-Language\n\nThe \"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.\n\n```\n Content-Language = 1#language-tag \n```\n\nLanguage tags are defined in Section 3.1.3.1. The primary purpose of Content-Language is to allow a user to identify and differentiate representations according to the users' own preferred language. Thus, if the content is intended only for a Danish-literate audience, the appropriate field is\n\n```\n Content-Language: da\n```\n\nIf no Content-Language is specified, the default is that the content is intended for all language audiences. This might mean that the sender does not consider it to be specific to any natural language, or that the sender does not know for which language it is intended.\n\nMultiple languages *MAY* be listed for content that is intended for multiple audiences. For example, a rendition of the \"Treaty of Waitangi\", presented simultaneously in the original Maori and English versions, would call for\n\n```\n Content-Language: mi, en\n```\n\nHowever, just because multiple languages are present within a representation does not mean that it is intended for multiple linguistic audiences. An example would be a beginner's language primer, such as \"A First Lesson in Latin\", which is clearly intended to be used by an English-literate audience. In this case, the Content-Language would properly only include \"en\".\n\nContent-Language *MAY* be applied to any media type — it is not limited to textual documents.\n\n#### 3.1.4. Identification\n\n##### 3.1.4.1. Identifying a Representation\n\nWhen a complete or partial representation is transferred in a message payload, it is often desirable for the sender to supply, or the recipient to determine, an identifier for a resource corresponding to that representation.\n\nFor a request message:\n\n- If the request has a Content-Location header field, then the sender asserts that the payload is a representation of the resource identified by the Content-Location field-value. However, such an assertion cannot be trusted unless it can be verified by other means (not defined by this specification). The information might still be useful for revision history links.\n- Otherwise, the payload is unidentified.\n\nFor a response message, the following rules are applied in order until a match is found:\n\n1. If the request method is GET or HEAD and the response status code is 200 (OK) , 204 (No Content) , [206 (Partial Content)](rfc7233.html#status.206) , or [304 (Not Modified)](rfc7232.html#status.304) , the payload is a representation of the resource identified by the effective request URI ( [Section 5.5](rfc7230.html#effective.request.uri) of [RFC7230] ).\n2. If the request method is GET or HEAD and the response status code is 203 (Non-Authoritative Information) , the payload is a potentially modified or enhanced representation of the target resource as provided by an intermediary.\n3. If the response has a Content-Location header field and its field-value is a reference to the same URI as the effective request URI, the payload is a representation of the resource identified by the effective request URI.\n4. If the response has a Content-Location header field and its field-value is a reference to a URI different from the effective request URI, then the sender asserts that the payload is a representation of the resource identified by the Content-Location field-value. However, such an assertion cannot be trusted unless it can be verified by other means (not defined by this specification).\n5. Otherwise, the payload is unidentified.\n\n##### 3.1.4.2. Content-Location\n\nThe \"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 payload. 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 payload in this message.\n\n```\n Content-Location = absolute-URI / partial-URI \n```\n\nThe Content-Location value is not a replacement for the effective Request URI ([Section 5.5](rfc7230.html#effective.request.uri) of [RFC7230]). It is representation metadata. It has the same syntax and semantics as the header field of the same name defined for MIME body parts in [Section 4](https://www.rfc-editor.org/rfc/rfc2557.html#section-4) of [RFC2557]. However, its appearance in an HTTP message has some special implications for HTTP recipients.\n\nIf Content-Location is included in a 2xx (Successful) response message and its value refers (after conversion to absolute form) to a URI that is the same as the effective request URI, then the recipient *MAY* consider the payload to be a current representation of that resource at the time indicated by the message origination date. For a GET (Section 4.3.1) or HEAD (Section 4.3.2) request, this is the same as the default semantics when no Content-Location is provided by the server. For a state-changing request like PUT (Section 4.3.4) or POST (Section 4.3.3), it implies that the server's response contains the new representation of that resource, thereby distinguishing it from representations that might only report about the action (e.g., \"It worked!\"). This allows authoring applications to update their local copies without the need for a subsequent GET request.\n\nIf Content-Location is included in a 2xx (Successful) response message and its field-value refers to a URI that differs from the effective request URI, then the origin server claims that the URI is an identifier for a different resource corresponding to the enclosed representation. Such a claim can only be trusted if both identifiers share the same resource owner, which cannot be programmatically determined via HTTP.\n\n- For a response to a GET or HEAD request, this is an indication that the effective request URI refers to a resource that is subject to content negotiation and the Content-Location field-value is a more specific identifier for the selected representation .\n- For a 201 (Created) response to a state-changing method, a Content-Location field-value that is identical to the Location field-value indicates that this payload is a current representation of the newly created resource.\n- Otherwise, such a Content-Location indicates that this payload is a representation reporting on the requested action's status and that the same report is available (for future access with GET) at the given URI. For example, a purchase transaction made via a POST request might include a receipt document as the payload of the 200 (OK) response; the Content-Location field-value provides an identifier for retrieving a copy of that same receipt in the future.\n\nA user agent that sends Content-Location in a request message is stating that its value refers to where the user agent originally obtained the content of the enclosed representation (prior to any modifications made by that user agent). In other words, the user agent is providing a back link to the source of the original representation.\n\nAn origin server that receives a Content-Location field in a request message *MUST* treat the information as transitory request context rather than as metadata to be saved verbatim as part of the representation. An origin server *MAY* use that context to guide in processing the request or to save it for other uses, such as within source links or versioning metadata. However, an origin server *MUST NOT* use such context information to alter the request semantics.\n\nFor example, if a client makes a PUT request on a negotiated resource and the origin server accepts that PUT (without redirection), then the new state of that resource is expected to be consistent with the one representation supplied in that PUT; the Content-Location cannot be used as a form of reverse content selection identifier to update only one of the negotiated representations. If the user agent had wanted the latter semantics, it would have applied the PUT directly to the Content-Location URI.\n\n### 3.2. Representation Data\n\nThe representation data associated with an HTTP message is either provided as the payload body of the message or referred to by the message semantics and the effective request URI. The representation data is in a format and encoding defined by the representation metadata header fields.\n\nThe 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:\n\n```\n representation-data := Content-Encoding( Content-Type( bits ) )\n```\n\n### 3.3. Payload Semantics\n\nSome HTTP messages transfer a complete or partial representation as the message \"payload\". In some cases, a payload might contain only the associated representation's header fields (e.g., responses to HEAD) or only some part(s) of the representation data (e.g., the [206 (Partial Content)](rfc7233.html#status.206) status code).\n\nThe purpose of a payload in a request is defined by the method semantics. For example, a representation in the payload of a PUT request (Section 4.3.4) represents the desired state of the target resource if the request is successfully applied, whereas a representation in the payload of a POST request (Section 4.3.3) represents information to be processed by the target resource.\n\nIn a response, the payload's purpose is defined by both the request method and the response status code. For example, the payload of a 200 (OK) response to GET (Section 4.3.1) represents the current state of the target resource, as observed at the time of the message origination date (Section 7.1.1.2), whereas the payload of the same status code in a response to POST might represent either the processing result or the new state of the target resource after applying the processing. Response messages with an error status code usually contain a payload that represents the error condition, such that it describes the error state and what next steps are suggested for resolving it.\n\nHeader fields that specifically describe the payload, rather than the associated representation, are referred to as \"payload header fields\". Payload header fields are defined in other parts of this specification, due to their impact on message parsing.\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| Content-Length | [Section 3.3.2](rfc7230.html#header.content-length) of [RFC7230] |\n| Content-Range | [Section 4.2](rfc7233.html#header.content-range) of [RFC7233] |\n| Trailer | [Section 4.4](rfc7230.html#header.trailer) of [RFC7230] |\n| Transfer-Encoding | [Section 3.3.1](rfc7230.html#header.transfer-encoding) of [RFC7230] |\n\n### 3.4. Content Negotiation\n\nWhen responses convey payload information, whether indicating a success or an error, the origin server often has different ways of representing that information; for example, in different formats, languages, or encodings. Likewise, different users or user agents might have differing capabilities, characteristics, or preferences that could influence which representation, among those available, would be best to deliver. For this reason, HTTP provides mechanisms for content negotiation.\n\nThis specification defines two patterns of content negotiation that can be made visible within the protocol: \"proactive\", where the server selects the representation based upon the user agent's stated preferences, and \"reactive\" negotiation, where the server provides a list of representations for the user agent to choose from. Other patterns of content negotiation include \"conditional content\", where the representation consists of multiple parts that are selectively rendered based on user agent parameters, \"active content\", where the representation contains a script that makes additional (more specific) requests based on the user agent characteristics, and \"Transparent Content Negotiation\" ([RFC2295]), where content selection is performed by an intermediary. These patterns are not mutually exclusive, and each has trade-offs in applicability and practicality.\n\nNote 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. HTTP pays no attention to the man behind the curtain.\n\n#### 3.4.1. Proactive Negotiation\n\nWhen content negotiation preferences are sent by the user agent in a request to encourage an algorithm located at the server to select the preferred representation, it is called proactive negotiation (a.k.a., server-driven negotiation). Selection is based on the available representations for a response (the dimensions over which it might vary, such as language, content-coding, etc.) compared to various information supplied in the request, including both the explicit negotiation fields of Section 5.3 and implicit characteristics, such as the client's network address or parts of the User-Agent field.\n\nProactive negotiation is advantageous when the algorithm for selecting from among the available representations is difficult to describe to a user agent, or when the server desires to send its \"best guess\" to the user agent along with the first response (hoping to avoid the round trip delay of a subsequent request if the \"best guess\" is good enough for the user). In order to improve the server's guess, a user agent *MAY* send request header fields that describe its preferences.\n\nProactive negotiation has serious disadvantages:\n\n- It is impossible for the server to accurately determine what might be \"best\" for any given user, since that would require complete knowledge of both the capabilities of the user agent and the intended use for the response (e.g., does the user want to view it on screen or print it on paper?);\n- Having the user agent describe its capabilities in every request can be both very inefficient (given that only a small percentage of responses have multiple representations) and a potential risk to the user's privacy;\n- It complicates the implementation of an origin server and the algorithms for generating responses to a request; and,\n- It limits the reusability of responses for shared caching.\n\nA user agent cannot rely on proactive negotiation preferences being consistently honored, since the origin server might not implement proactive negotiation for the requested resource or might decide that sending a response that doesn't conform to the user agent's preferences is better than sending a 406 (Not Acceptable) response.\n\nA Vary header field (Section 7.1.4) is often sent in a response subject to proactive negotiation to indicate what parts of the request information were used in the selection algorithm.\n\n#### 3.4.2. Reactive Negotiation\n\nWith reactive negotiation (a.k.a., agent-driven negotiation), selection of the best response representation (regardless of the status code) is performed by the user agent after receiving an initial response from the origin server that contains a list of resources for alternative representations. If the user agent is not satisfied by the initial response representation, it can perform a GET request on one or more of the alternative resources, selected based on metadata included in the list, to obtain a different form of representation for that response. Selection of alternatives might be performed automatically by the user agent or manually by the user selecting from a generated (possibly hypertext) menu.\n\nNote that the above refers to representations of the response, in general, not representations of the resource. The alternative representations are only considered representations of the target resource if the response in which those alternatives are provided has the semantics of being a representation of the target resource (e.g., a 200 (OK) response to a GET request) or has the semantics of providing links to alternative representations for the target resource (e.g., a 300 (Multiple Choices) response to a GET request).\n\nA server might choose not to send an initial representation, other than the list of alternatives, and thereby indicate that reactive negotiation by the user agent is preferred. For example, the alternatives listed in responses with the 300 (Multiple Choices) and 406 (Not Acceptable) status codes include information about the available representations so that the user or user agent can react by making a selection.\n\nReactive negotiation is advantageous when the response would vary over commonly used dimensions (such as type, language, or encoding), when the origin server is unable to determine a user agent's capabilities from examining the request, and generally when public caches are used to distribute server load and reduce network usage.\n\nReactive negotiation suffers from the disadvantages of transmitting a list of alternatives to the user agent, which degrades user-perceived latency if transmitted in the header section, and needing a second request to obtain an alternate representation. Furthermore, this specification does not define a mechanism for supporting automatic selection, though it does not prevent such a mechanism from being developed as an extension.\n\n## 4. Request Methods\n\n### 4.1. Overview\n\nThe 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.\n\nThe request method's semantics might be further specialized by the semantics of some header fields when present in a request (Section 5) if those additional semantics do not conflict with the method. For example, a client can send conditional request header fields (Section 5.2) to make the requested action conditional on the current state of the target resource ([RFC7232]).\n\n```\n method = token \n```\n\nHTTP was originally designed to be usable as an interface to distributed object systems. The request method was envisioned as applying semantics to a target resource in much the same way as invoking a defined method on an identified object would apply semantics. The method token is case-sensitive because it might be used as a gateway to object-based systems with case-sensitive method names.\n\nUnlike distributed objects, the standardized request methods in HTTP are not resource-specific, since uniform interfaces provide for better visibility and reuse in network-based systems [REST]. Once defined, a standardized method ought to have the same semantics when applied to any resource, though each resource determines for itself whether those semantics are implemented or allowed.\n\nThis specification defines a number of standardized methods that are commonly used in HTTP, as outlined by the following table. By convention, standardized methods are defined in all-uppercase US-ASCII letters.\n\n| Method | Description | Sec. |\n| --- | --- | --- |\n| GET | Transfer a current representation of the target resource. | 4.3.1 |\n| HEAD | Same as GET, but only transfer the status line and header section. | 4.3.2 |\n| POST | Perform resource-specific processing on the request payload. | 4.3.3 |\n| PUT | Replace all current representations of the target resource with the request payload. | 4.3.4 |\n| DELETE | Remove all current representations of the target resource. | 4.3.5 |\n| CONNECT | Establish a tunnel to the server identified by the target resource. | 4.3.6 |\n| OPTIONS | Describe the communication options for the target resource. | 4.3.7 |\n| TRACE | Perform a message loop-back test along the path to the target resource. | 4.3.8 |\n\nAll general-purpose servers *MUST* support the methods GET and HEAD. All other methods are *OPTIONAL*.\n\nAdditional methods, outside the scope of this specification, have been standardized for use in HTTP. All such methods ought to be registered within the \"Hypertext Transfer Protocol (HTTP) Method Registry\" maintained by IANA, as defined in Section 8.1.\n\nThe set of methods allowed by a target resource can be listed in an Allow header field (Section 7.4.1). However, the set of allowed methods can change dynamically. When a request method is received that is unrecognized or not implemented by an origin server, the origin server *SHOULD* respond with the 501 (Not Implemented) status code. When a request method is received that is known by an origin server but not allowed for the target resource, the origin server *SHOULD* respond with the 405 (Method Not Allowed) status code.\n\n### 4.2. Common Method Properties\n\n#### 4.2.1. Safe Methods\n\nRequest methods are considered \"safe\" if their defined semantics are essentially read-only; i.e., the client does not request, and does not expect, any state change on the origin server as a result of applying a safe method to a target resource. Likewise, reasonable use of a safe method is not expected to cause any harm, loss of property, or unusual burden on the origin server.\n\nThis definition of safe methods does not prevent an implementation from including behavior that is potentially harmful, that is not entirely read-only, or that causes side effects while invoking a safe method. What is important, however, is that the client did not request that additional behavior and cannot be held accountable for it. For example, most servers append request information to access log files at the completion of every response, regardless of the method, and that is considered safe even though the log storage might become full and crash the server. Likewise, a safe request initiated by selecting an advertisement on the Web will often have the side effect of charging an advertising account.\n\nOf the request methods defined by this specification, the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe.\n\nThe purpose of distinguishing between safe and unsafe methods is to allow automated retrieval processes (spiders) and cache performance optimization (pre-fetching) to work without fear of causing harm. In addition, it allows a user agent to apply appropriate constraints on the automated use of unsafe methods when processing potentially untrusted content.\n\nA user agent *SHOULD* distinguish between safe and unsafe methods when presenting potential actions to a user, such that the user can be made aware of an unsafe action before it is requested.\n\nWhen a resource is constructed such that parameters within the effective request URI have the effect of selecting an action, it is the resource owner's responsibility to ensure that the action is consistent with the request method semantics. For example, it is common for Web-based content editing software to use actions within query parameters, such as \"page?do=delete\". If the purpose of such a resource is to perform an unsafe action, then the resource owner *MUST* disable or disallow that action when it is accessed using a safe request method. Failure to do so will result in unfortunate side effects when automated processes perform a GET on every URI reference for the sake of link maintenance, pre-fetching, building a search index, etc.\n\n#### 4.2.2. Idempotent Methods\n\nA request method is considered \"idempotent\" if the intended effect on the server of multiple identical requests with that method is the same as the effect for a single such request. Of the request methods defined by this specification, PUT, DELETE, and safe request methods are idempotent.\n\nLike 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.\n\nIdempotent methods are distinguished because the request can be repeated automatically if a communication failure occurs before the client is able to read the server's response. For example, if a client sends a PUT request and the underlying connection is closed before any response is received, then the client can establish a new connection and retry the idempotent request. It knows that repeating the request will have the same intended effect, even if the original request succeeded, though the response might differ.\n\n#### 4.2.3. Cacheable Methods\n\nRequest methods can be defined as \"cacheable\" to indicate that responses to them are allowed to be stored for future reuse; for specific requirements see [RFC7234]. In general, safe methods that do not depend on a current or authoritative response are defined as cacheable; this specification defines GET, HEAD, and POST as cacheable, although the overwhelming majority of cache implementations only support GET and HEAD.\n\n### 4.3. Method Definitions\n\n#### 4.3.1. GET\n\nThe GET method requests transfer of a current selected representation for the target resource. GET is the primary mechanism of information retrieval and the focus of almost all performance optimizations. Hence, when people speak of retrieving some identifiable information via HTTP, they are generally referring to making a GET request.\n\nIt is tempting to think of resource identifiers as remote file system pathnames and of representations as being a copy of the contents of such files. In fact, that is how many resources are implemented (see Section 9.1 for related security considerations). However, there are no such limitations in practice. The HTTP interface for a resource is just as likely to be implemented as a tree of content objects, a programmatic view on various database records, or a gateway to other information systems. Even when the URI mapping mechanism is tied to a file system, an origin server might be configured to execute the files with the request as input and send the output as the representation rather than transfer the files directly. Regardless, only the origin server needs to know how each of its resource identifiers corresponds to an implementation and how each implementation manages to select and send a current representation of the target resource in a response to GET.\n\nA client can alter the semantics of GET to be a \"range request\", requesting transfer of only some part(s) of the selected representation, by sending a [Range](rfc7233.html#header.range) header field in the request ([RFC7233]).\n\nA payload within a GET request message has no defined semantics; sending a payload body on a GET request might cause some existing implementations to reject the request.\n\nThe response to a GET request is cacheable; a cache *MAY* use it to satisfy subsequent GET and HEAD requests unless otherwise indicated by the Cache-Control header field ([Section 5.2](rfc7234.html#header.cache-control) of [RFC7234]).\n\n#### 4.3.2. HEAD\n\nThe HEAD method is identical to GET except that the server *MUST NOT* send a message body in the response (i.e., the response terminates at the end of the header section). The server *SHOULD* send the same header fields in response to a HEAD request as it would have sent if the request had been a GET, except that the payload header fields (Section 3.3) *MAY* be omitted. This method can be used for obtaining metadata about the selected representation without transferring the representation data and is often used for testing hypertext links for validity, accessibility, and recent modification.\n\nA payload within a HEAD request message has no defined semantics; sending a payload body on a HEAD request might cause some existing implementations to reject the request.\n\nThe response to a HEAD request is cacheable; a cache *MAY* use it to satisfy subsequent HEAD requests unless otherwise indicated by the Cache-Control header field ([Section 5.2](rfc7234.html#header.cache-control) of [RFC7234]). A HEAD response might also have an effect on previously cached responses to GET; see [Section 4.3.5](rfc7234.html#head.effects) of [RFC7234].\n\n#### 4.3.3. POST\n\nThe 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):\n\n- Providing a block of data, such as the fields entered into an HTML form, to a data-handling process;\n- Posting a message to a bulletin board, newsgroup, mailing list, blog, or similar group of articles;\n- Creating a new resource that has yet to be identified by the origin server; and\n- Appending data to a resource's existing representation(s).\n\nAn origin server indicates response semantics by choosing an appropriate status code depending on the result of processing the POST request; almost all of the status codes defined by this specification might be received in a response to POST (the exceptions being [206 (Partial Content)](rfc7233.html#status.206), [304 (Not Modified)](rfc7232.html#status.304), and [416 (Range Not Satisfiable)](rfc7233.html#status.416)).\n\nIf 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 7.1.2) and a representation that describes the status of the request while referring to the new resource(s).\n\nResponses to POST requests are only cacheable when they include explicit freshness information (see [Section 4.2.1](rfc7234.html#calculating.freshness.lifetime) of [RFC7234]). However, POST caching is not widely implemented. For cases where an origin server wishes the client to be able to cache the result of a POST in a way that can be reused by a later GET, the origin server *MAY* send a 200 (OK) response containing the result and a Content-Location header field that has the same value as the POST's effective request URI (Section 3.1.4.2).\n\nIf the result of processing a POST would be equivalent to a representation of an existing resource, an origin server *MAY* redirect the user agent to that resource by sending a 303 (See Other) response with the existing resource's identifier in the Location field. This has the benefits of providing the user agent a resource identifier and transferring the representation via a method more amenable to shared caching, though at the cost of an extra request if the user agent does not already have the representation cached.\n\n#### 4.3.4. PUT\n\nThe 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 payload. 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.\n\nIf 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.\n\nAn origin server *SHOULD* ignore unrecognized header fields received in a PUT request (i.e., do not save them as part of the resource state).\n\nAn origin server *SHOULD* verify that the PUT representation is consistent with any constraints the server has for the target resource that cannot or will not be changed by the PUT. This is particularly important when the origin server uses internal configuration information related to the URI in order to set the values for representation metadata on GET responses. When a PUT representation is inconsistent with the target resource, the origin server *SHOULD* either make them consistent, by transforming the representation or changing the resource configuration, or respond with an appropriate error message containing sufficient information to explain why the representation is unsuitable. The 409 (Conflict) or 415 (Unsupported Media Type) status codes are suggested, with the latter being specific to constraints on Content-Type values.\n\nFor example, if the target resource is configured to always have a Content-Type of \"text/html\" and the representation being PUT has a Content-Type of \"image/jpeg\", the origin server ought to do one of:\n\n1. reconfigure the target resource to reflect the new media type;\n2. transform the PUT representation to a format consistent with that of the resource before saving it as the new resource state; or,\n3. reject the request with a 415 (Unsupported Media Type) response indicating that the target resource is limited to \"text/html\", perhaps including a link to a different resource that would be a suitable target for the new representation.\n\nHTTP 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.\n\nAn origin server *MUST NOT* send a validator header field (Section 7.2), such as an [ETag](rfc7232.html#header.etag) or [Last-Modified](rfc7232.html#header.last-modified) field, in a successful response to PUT unless the request's representation data was saved without any transformation applied to the body (i.e., the resource's new representation data is identical to the representation data 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 body it has in memory remains current as a result of the PUT, thus not in need of being retrieved again from the origin server, and that the new validator(s) received in the response can be used for future conditional requests in order to prevent accidental overwrites (Section 5.2).\n\nThe fundamental difference between the POST and PUT methods is highlighted by the different intent for the enclosed representation. The target resource in a POST request is intended to handle the enclosed representation according to the resource's own semantics, whereas the enclosed representation in a PUT request is defined as replacing the state of the target resource. Hence, the intent of PUT is idempotent and visible to intermediaries, even though the exact effect is only known by the origin server.\n\nProper interpretation of a PUT request presumes that the user agent knows which target resource is desired. A service that selects a proper URI on behalf of the client, after receiving a state-changing request, *SHOULD* be implemented using the POST method rather than PUT. If the origin server will not make the requested PUT state change to the target resource and instead wishes to have it applied to a different resource, such as when the resource has been moved to a different URI, then the origin server *MUST* send an appropriate 3xx (Redirection) response; the user agent *MAY* then make its own decision regarding whether or not to redirect the request.\n\nA PUT request applied to the target resource can have side effects on other resources. For example, an article might have a URI for identifying \"the current version\" (a resource) that is separate from the URIs identifying each particular version (different resources that at one point shared the same state as the current version resource). A successful PUT request on \"the current version\" URI might therefore create a new version resource in addition to changing the state of the target resource, and might also cause links to be added between the related resources.\n\nAn origin server that allows PUT on a given target resource *MUST* send a 400 (Bad Request) response to a PUT request that contains a [Content-Range](rfc7233.html#header.content-range) header field ([Section 4.2](rfc7233.html#header.content-range) of [RFC7233]), since the payload is likely to be partial content that has been mistakenly PUT as a full representation. Partial content updates are possible by targeting a separately identified resource with state that overlaps a portion of the larger resource, or by using a different method that has been specifically defined for partial updates (for example, the PATCH method defined in [RFC5789]).\n\nResponses to the PUT method are not cacheable. If a successful PUT request passes through a cache that has one or more stored responses for the effective request URI, those stored responses will be invalidated (see [Section 4.4](rfc7234.html#invalidation) of [RFC7234]).\n\n#### 4.3.5. DELETE\n\nThe 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.\n\nIf the target resource has one or more current representations, they might or might not be destroyed by the origin server, and the associated storage might or might not be reclaimed, depending entirely on the nature of the resource and its implementation by the origin server (which are beyond the scope of this specification). Likewise, other implementation aspects of a resource might need to be deactivated or archived as a result of a DELETE, such as database or gateway connections. In general, it is assumed that the origin server will only allow DELETE on resources for which it has a prescribed mechanism for accomplishing the deletion.\n\nRelatively 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.\n\nIf a DELETE method is successfully applied, the origin server *SHOULD* send 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.\n\nA payload within a DELETE request message has no defined semantics; sending a payload body on a DELETE request might cause some existing implementations to reject the request.\n\nResponses to the DELETE method are not cacheable. If a DELETE request passes through a cache that has one or more stored responses for the effective request URI, those stored responses will be invalidated (see [Section 4.4](rfc7234.html#invalidation) of [RFC7234]).\n\n#### 4.3.6. CONNECT\n\nThe 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 packets, 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, [RFC5246]).\n\nCONNECT is intended only for use in requests to a proxy. An origin server that receives a CONNECT request for itself *MAY* respond with a 2xx (Successful) status code to indicate that a connection is established. However, most origin servers do not implement CONNECT.\n\nA client sending a CONNECT request *MUST* send the authority form of request-target ([Section 5.3](rfc7230.html#request-target) of [RFC7230]); i.e., the request-target consists of only the host name and port number of the tunnel destination, separated by a colon. For example,\n\n```\nCONNECT server.example.com:80 HTTP/1.1\nHost: server.example.com:80\n```\n\nThe recipient proxy can establish a tunnel either by directly connecting to the request-target or, if configured to use another proxy, by forwarding the CONNECT request to the next inbound proxy. Any 2xx (Successful) response indicates that the sender (and all inbound proxies) will switch to tunnel mode immediately after the blank line that concludes the successful response's header section; data received after that blank line 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 and that the connection remains governed by HTTP.\n\nA tunnel is closed when a tunnel intermediary detects that either side has closed its connection: the intermediary *MUST* attempt to send any outstanding data that came from the closed side to the other side, close both connections, and then discard any remaining data left undelivered.\n\nProxy authentication might be used to establish the authority to create a tunnel. For example,\n\n```\nCONNECT server.example.com:80 HTTP/1.1\nHost: server.example.com:80\nProxy-Authorization: basic aGVsbG86d29ybGQ=\n```\n\nThere are significant risks in establishing a tunnel to arbitrary servers, particularly when the destination is a well-known or reserved TCP port that is not intended for Web traffic. For example, a CONNECT to a request-target of \"example.com:25\" would suggest that the proxy connect to the reserved port for SMTP traffic; if allowed, that could trick the proxy into relaying spam email. Proxies that support CONNECT *SHOULD* restrict its use to a limited set of known ports or a configurable whitelist of safe request targets.\n\nA server *MUST NOT* send any [Transfer-Encoding](rfc7230.html#header.transfer-encoding) or [Content-Length](rfc7230.html#header.content-length) header fields in a 2xx (Successful) response to CONNECT. A client *MUST* ignore any Content-Length or Transfer-Encoding header fields received in a successful response to CONNECT.\n\nA payload within a CONNECT request message has no defined semantics; sending a payload body on a CONNECT request might cause some existing implementations to reject the request.\n\nResponses to the CONNECT method are not cacheable.\n\n#### 4.3.7. OPTIONS\n\nThe 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.\n\nAn OPTIONS request with an asterisk (\"*\") as the request-target ([Section 5.3](rfc7230.html#request-target) of [RFC7230]) applies to the server in general rather than to a specific resource. Since a server's communication options typically depend on the resource, the \"*\" request is only useful as a \"ping\" or \"no-op\" type of method; it does nothing beyond allowing the client to test the capabilities of the server. For example, this can be used to test a proxy for HTTP/1.1 conformance (or lack thereof).\n\nIf the request-target is not an asterisk, the OPTIONS request applies to the options that are available when communicating with the target resource.\n\nA server generating a successful response to OPTIONS *SHOULD* send any header fields that might indicate optional features implemented by the server and applicable to the target resource (e.g., Allow), including potential extensions not defined by this specification. The response payload, if any, might also describe the communication options in a machine or human-readable representation. A standard format for such a representation is not defined by this specification, but might be defined by future extensions to HTTP. A server *MUST* generate a [Content-Length](rfc7230.html#header.content-length) field with a value of \"0\" if no payload body is to be sent in the response.\n\nA client *MAY* send a Max-Forwards header field in an OPTIONS request to target a specific recipient in the request chain (see Section 5.1.2). A proxy *MUST NOT* generate a Max-Forwards header field while forwarding a request unless that request was received with a Max-Forwards field.\n\nA client that generates an OPTIONS request containing a payload body *MUST* send a valid Content-Type header field describing the representation media type. Although this specification does not define any use for such a payload, future extensions to HTTP might use the OPTIONS body to make more detailed queries about the target resource.\n\nResponses to the OPTIONS method are not cacheable.\n\n#### 4.3.8. TRACE\n\nThe 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 message body of a 200 (OK) response with a Content-Type of \"message/http\" ([Section 8.3.1](rfc7230.html#internet.media.type.message.http) of [RFC7230]). 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 5.1.2).\n\nA client *MUST NOT* generate header fields in a TRACE request containing sensitive data that might be disclosed by the response. For example, it would be foolish for a user agent to send stored user credentials [RFC7235] or cookies [RFC6265] in a TRACE request. The final recipient of the request *SHOULD* exclude any request header fields that are likely to contain sensitive data when that recipient generates the response body.\n\nTRACE 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](rfc7230.html#header.via) header field ([Section 5.7.1](rfc7230.html#header.via) of [RFC7230]) 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.\n\nA client *MUST NOT* send a message body in a TRACE request.\n\nResponses to the TRACE method are not cacheable.\n\n## 5. Request Header Fields\n\nA client sends request header fields to provide more information about the request context, make the request conditional based on the target resource state, suggest preferred formats for the response, supply authentication credentials, or modify the expected request processing. These fields act as request modifiers, similar to the parameters on a programming language method invocation.\n\n### 5.1. Controls\n\nControls are request header fields that direct specific handling of the request.\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| Cache-Control | [Section 5.2](rfc7234.html#header.cache-control) of [RFC7234] |\n| Expect | Section 5.1.1 |\n| Host | [Section 5.4](rfc7230.html#header.host) of [RFC7230] |\n| Max-Forwards | Section 5.1.2 |\n| Pragma | [Section 5.4](rfc7234.html#header.pragma) of [RFC7234] |\n| Range | [Section 3.1](rfc7233.html#header.range) of [RFC7233] |\n| TE | [Section 4.3](rfc7230.html#header.te) of [RFC7230] |\n\n#### 5.1.1. Expect\n\nThe \"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. The only such expectation defined by this specification is 100-continue.\n\n```\n Expect = \"100-continue\"\n```\n\nThe Expect field-value is case-insensitive.\n\nA server that receives an Expect field-value other than 100-continue *MAY* respond with a 417 (Expectation Failed) status code to indicate that the unexpected expectation cannot be met.\n\nA 100-continue expectation informs recipients that the client is about to send a (presumably large) message body in this request and wishes to receive a 100 (Continue) interim response if the request-line and header fields are not sufficient to cause an immediate success, redirect, or error response. This allows the client to wait for an indication that it is worthwhile to send the message body before actually doing so, which can improve efficiency when the message body is huge or when the client anticipates that an error is likely (e.g., when sending a state-changing method, for the first time, without previously verified authentication credentials).\n\nFor example, a request that begins with\n\n```\nPUT /somewhere/fun HTTP/1.1\nHost: origin.example.com\nContent-Type: video/h264\nContent-Length: 1234567890987\nExpect: 100-continue\n```\n\nallows the origin server to immediately respond with an error message, such as [401 (Unauthorized)](rfc7235.html#status.401) or 405 (Method Not Allowed), before the client starts filling the pipes with an unnecessary data transfer.\n\nRequirements for clients:\n\n- A client *MUST NOT* generate a 100-continue expectation in a request that does not include a message body.\n- A client that will wait for a 100 (Continue) response before sending the request message body *MUST* send an Expect header field containing a 100-continue expectation.\n- A client that sends a 100-continue expectation is not required to wait for any specific length of time; such a client *MAY* proceed to send the message body even if it has not yet received a response. Furthermore, since 100 (Continue) responses cannot be sent through an HTTP/1.0 intermediary, such a client *SHOULD NOT* wait for an indefinite period before sending the message body.\n- A client that receives a 417 (Expectation Failed) status code in response to a request containing a 100-continue expectation *SHOULD* repeat that request without a 100-continue expectation, since the 417 response merely indicates that the response chain does not support expectations (e.g., it passes through an HTTP/1.0 server).\n\nRequirements for servers:\n\n- A server that receives a 100-continue expectation in an HTTP/1.0 request *MUST* ignore that expectation.\n- A server *MAY* omit sending a 100 (Continue) response if it has already received some or all of the message body for the corresponding request, or if the framing indicates that there is no message body.\n- A server that sends a 100 (Continue) response *MUST* ultimately send a final status code, once the message body is received and processed, unless the connection is closed prematurely.\n- A server that responds with a final status code before reading the entire message body *SHOULD* indicate in that response whether it intends to close the connection or continue reading and discarding the request message (see [Section 6.6](rfc7230.html#persistent.tear-down) of [RFC7230] ).\n\nAn origin server *MUST*, upon receiving an HTTP/1.1 (or later) request-line and a complete header section that contains a 100-continue expectation and indicates a request message body will follow, either send an immediate response with a final status code, if that status can be determined by examining just the request-line and header fields, or send an immediate 100 (Continue) response to encourage the client to send the request's message body. The origin server *MUST NOT* wait for the message body before sending the 100 (Continue) response.\n\nA proxy *MUST*, upon receiving an HTTP/1.1 (or later) request-line and a complete header section that contains a 100-continue expectation and indicates a request message body will follow, either send an immediate response with a final status code, if that status can be determined by examining just the request-line and header fields, or begin forwarding the request toward the origin server by sending a corresponding request-line and header section to the next inbound server. 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 message body.\n\n#### 5.1.2. Max-Forwards\n\nThe \"Max-Forwards\" header field provides a mechanism with the TRACE (Section 4.3.8) and OPTIONS (Section 4.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.\n\n```\n Max-Forwards = 1*DIGIT \n```\n\nThe Max-Forwards value is a decimal integer indicating the remaining number of times this request message can be forwarded.\n\nEach intermediary that receives a TRACE or OPTIONS request containing a Max-Forwards header field *MUST* check and update its value prior to forwarding the request. If the received value is zero (0), the intermediary *MUST NOT* forward the request; instead, the intermediary *MUST* respond as the final recipient. If the received Max-Forwards value is greater than zero, the intermediary *MUST* generate an updated Max-Forwards field in the forwarded message with a field-value that is the lesser of a) the received value decremented by one (1) or b) the recipient's maximum supported value for Max-Forwards.\n\nA recipient *MAY* ignore a Max-Forwards header field received with any other request methods.\n\n### 5.2. Conditionals\n\nThe HTTP conditional request header fields [RFC7232] allow a client to place a precondition on the state of the target resource, so that the action corresponding to the method semantics will not be applied if the precondition evaluates to false. Each precondition defined by this specification consists of a comparison between a set of validators obtained from prior representations of the target resource to the current state of validators for the selected representation (Section 7.2). Hence, these preconditions evaluate whether the state of the target resource has changed since a given state known by the client. The effect of such an evaluation depends on the method semantics and choice of conditional, as defined in [Section 5](rfc7232.html#evaluation) of [RFC7232].\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| If-Match | [Section 3.1](rfc7232.html#header.if-match) of [RFC7232] |\n| If-None-Match | [Section 3.2](rfc7232.html#header.if-none-match) of [RFC7232] |\n| If-Modified-Since | [Section 3.3](rfc7232.html#header.if-modified-since) of [RFC7232] |\n| If-Unmodified-Since | [Section 3.4](rfc7232.html#header.if-unmodified-since) of [RFC7232] |\n| If-Range | [Section 3.2](rfc7233.html#header.if-range) of [RFC7233] |\n\n### 5.3. Content Negotiation\n\nThe following request header fields are sent by a user agent to engage in proactive negotiation of the response content, as defined in Section 3.4.1. The preferences sent in these fields apply to any content in the response, including representations of the target resource, representations of error or processing status, and potentially even the miscellaneous text strings that might appear within the protocol.\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| Accept | Section 5.3.2 |\n| Accept-Charset | Section 5.3.3 |\n| Accept-Encoding | Section 5.3.4 |\n| Accept-Language | Section 5.3.5 |\n\n#### 5.3.1. Quality Values\n\nMany of the request header fields for proactive negotiation use a common parameter, named \"q\" (case-insensitive), to assign a relative \"weight\" to the preference for that associated kind of content. This weight is referred to as a \"quality value\" (or \"qvalue\") because the same parameter name is often used within server configurations to assign a weight to the relative quality of the various representations that can be selected for a resource.\n\nThe weight is normalized to a real number in the range 0 through 1, where 0.001 is the least preferred and 1 is the most preferred; a value of 0 means \"not acceptable\". If no \"q\" parameter is present, the default weight is 1.\n\n```\n weight = OWS \";\" OWS \"q=\" qvalue qvalue = ( \"0\" [ \".\" 0*3DIGIT ] )\n / ( \"1\" [ \".\" 0*3(\"0\") ] )\n```\n\nA 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.\n\n#### 5.3.2. Accept\n\nThe \"Accept\" header field can be used by user agents to specify response media types that are acceptable. Accept header fields can be used to indicate that the request is specifically limited to a small set of desired types, as in the case of a request for an in-line image.\n\n```\n Accept = #( media-range [ accept-params ] )\n \n media-range = ( \"*/*\"\n / ( type \"/\" \"*\" )\n / ( type \"/\" subtype )\n ) *( OWS \";\" OWS parameter )\n accept-params = weight *( accept-ext )\n accept-ext = OWS \";\" OWS token [ \"=\" ( token / quoted-string ) ]\n```\n\nThe 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.\n\nEach media-range might be followed by zero or more applicable media type parameters (e.g., charset), an optional \"q\" parameter for indicating a relative weight (Section 5.3.1), and then zero or more extension parameters. The \"q\" parameter is necessary if any extensions (accept-ext) are present, since it acts as a separator between the two parameter sets.\n\nThe example\n\n```\n Accept: audio/*; q=0.2, audio/basic\n```\n\nis interpreted as \"I prefer audio/basic, but send me any audio type if it is the best available after an 80% markdown in quality\".\n\nA request without any Accept header field implies that the user agent will accept any media type in response. If the header field is present in a request and none of the available representations for the response have a media type that is listed as acceptable, the origin server can either honor the header field by sending a 406 (Not Acceptable) response or disregard the header field by treating the response as if it is not subject to content negotiation.\n\nA more elaborate example is\n\n```\n Accept: text/plain; q=0.5, text/html,\n text/x-dvi; q=0.8, text/x-c\n```\n\nVerbally, this would be interpreted as \"text/html and text/x-c are the equally preferred media types, but if they do not exist, then send the text/x-dvi representation, and if that does not exist, send the text/plain representation\".\n\nMedia ranges can be overridden by more specific media ranges or specific media types. If more than one media range applies to a given type, the most specific reference has precedence. For example,\n\n```\n Accept: text/*, text/plain, text/plain;format=flowed, */*\n```\n\nhave the following precedence:\n\n1. text/plain;format=flowed\n2. text/plain\n3. text/*\n4. */*\n\nThe 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,\n\n```\n Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1,\n text/html;level=2;q=0.4, */*;q=0.5\n```\n\nwould cause the following values to be associated:\n\n| Media Type | Quality Value |\n| --- | --- |\n| text/html;level=1 | 1 |\n| text/html | 0.7 |\n| text/plain | 0.3 |\n| image/jpeg | 0.5 |\n| text/html;level=2 | 0.4 |\n| text/html;level=3 | 0.7 |\n\n**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.\n\n#### 5.3.3. Accept-Charset\n\nThe \"Accept-Charset\" header field can be sent by a user agent to indicate what charsets are acceptable in textual response content. 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.\n\n```\n Accept-Charset = 1#( ( charset / \"*\" ) [ weight ] )\n```\n\nCharset names are defined in Section 3.1.1.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 5.3.1. An example is\n\n```\n Accept-Charset: iso-8859-5, unicode-1-1;q=0.8\n```\n\nThe special value \"*\", if present in the Accept-Charset field, matches every charset that is not mentioned elsewhere in the Accept-Charset field. If no \"*\" is present in an Accept-Charset field, then any charsets not explicitly mentioned in the field are considered \"not acceptable\" to the client.\n\nA request without any Accept-Charset header field implies that the user agent will accept any charset in response. Most general-purpose user agents do not send Accept-Charset, unless specifically configured to do so, because a detailed list of supported charsets makes it easier for a server to identify an individual by virtue of the user agent's request characteristics (Section 9.7).\n\nIf an Accept-Charset header field is present in a request and none of the available representations for the response has a charset that is listed as acceptable, the origin server can either honor the header field, by sending a 406 (Not Acceptable) response, or disregard the header field by treating the resource as if it is not subject to content negotiation.\n\n#### 5.3.4. Accept-Encoding\n\nThe \"Accept-Encoding\" header field can be used by user agents to indicate what response content-codings (Section 3.1.2.1) are acceptable in the response. An \"identity\" token is used as a synonym for \"no encoding\" in order to communicate when no encoding is preferred.\n\n```\n Accept-Encoding = #( codings [ weight ] )\n codings = content-coding / \"identity\" / \"*\"\n```\n\nEach codings value *MAY* be given an associated quality value representing the preference for that encoding, as defined in Section 5.3.1. The asterisk \"*\" symbol in an Accept-Encoding field matches any available content-coding not explicitly listed in the header field.\n\nFor example,\n\n```\n Accept-Encoding: compress, gzip\n Accept-Encoding:\n Accept-Encoding: *\n Accept-Encoding: compress;q=0.5, gzip;q=1.0\n Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0\n```\n\nA request without an Accept-Encoding header field implies that the user agent has no preferences regarding content-codings. Although this allows the server to use any content-coding in a response, it does not imply that the user agent will be able to correctly process all encodings.\n\nA server tests whether a content-coding for a given representation is acceptable using these rules:\n\n1. If no Accept-Encoding field is in the request, any content-coding is considered acceptable by the user agent.\n2. If the representation has no content-coding, then it is acceptable by default unless specifically excluded by the Accept-Encoding field stating either \"identity;q=0\" or \"*;q=0\" without a more specific entry for \"identity\".\n3. If the representation's content-coding is one of the content-codings listed in the Accept-Encoding field, then it is acceptable unless it is accompanied by a qvalue of 0. (As defined in Section 5.3.1 , a qvalue of 0 means \"not acceptable\".)\n4. If multiple content-codings are acceptable, then the acceptable content-coding with the highest non-zero qvalue is preferred.\n\nAn Accept-Encoding header field with a combined field-value that is empty implies that the user agent does not want any content-coding in response. If an Accept-Encoding header field is present in a request and none of the available representations for the response have a content-coding that is listed as acceptable, the origin server *SHOULD* send a response without any content-coding.\n\n#### 5.3.5. Accept-Language\n\nThe \"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 3.1.3.1.\n\n```\n Accept-Language = 1#( language-range [ weight ] )\n language-range = \n \n```\n\nEach language-range can be given an associated quality value representing an estimate of the user's preference for the languages specified by that range, as defined in Section 5.3.1. For example,\n\n```\n Accept-Language: da, en-gb;q=0.8, en;q=0.7\n```\n\nwould mean: \"I prefer Danish, but will accept British English and other types of English\".\n\nA request without any Accept-Language header field implies that the user agent will accept any language in response. If the header field is present in a request and none of the available representations for the response have a matching language tag, the origin server can either disregard the header field by treating the response as if it is not subject to content negotiation or honor the header field by sending a 406 (Not Acceptable) response. However, the latter is not encouraged, as doing so can prevent users from accessing content that they might be able to use (with translation software, for example).\n\nNote 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](https://www.rfc-editor.org/rfc/rfc4647.html#section-2.3) of [RFC4647].\n\nFor matching, [Section 3](https://www.rfc-editor.org/rfc/rfc4647.html#section-3) of [RFC4647] defines several matching schemes. Implementations can offer the most appropriate matching scheme for their requirements. The \"Basic Filtering\" scheme ([RFC4647], [Section 3.3.1](https://www.rfc-editor.org/rfc/rfc4647.html#section-3.3.1)) is identical to the matching scheme that was previously defined for HTTP in [Section 14.4](https://www.rfc-editor.org/rfc/rfc2616.html#section-14.4) of [RFC2616].\n\nIt might be contrary to the privacy expectations of the user to send an Accept-Language header field with the complete linguistic preferences of the user in every request (Section 9.7).\n\nSince intelligibility is highly dependent on the individual user, user agents need to allow user control over the linguistic preference (either through configuration of the user agent itself or by defaulting to a user controllable system setting). A user agent that does not provide such control to the user *MUST NOT* send an Accept-Language header field.\n\n### 5.4. Authentication Credentials\n\nTwo header fields are used for carrying authentication credentials, as defined in [RFC7235]. Note that various custom mechanisms for user authentication use the Cookie header field for this purpose, as defined in [RFC6265].\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| Authorization | [Section 4.2](rfc7235.html#header.authorization) of [RFC7235] |\n| Proxy-Authorization | [Section 4.4](rfc7235.html#header.proxy-authorization) of [RFC7235] |\n\n### 5.5. Request Context\n\nThe following request header fields provide additional information about the request context, including information about the user, user agent, and resource behind the request.\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| From | Section 5.5.1 |\n| Referer | Section 5.5.2 |\n| User-Agent | Section 5.5.3 |\n\n#### 5.5.1. From\n\nThe \"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](https://www.rfc-editor.org/rfc/rfc5322.html#section-3.4) of [RFC5322]:\n\n```\n From = mailbox mailbox = \n```\n\nAn example is:\n\n```\n From: webmaster@example.org\n```\n\nThe 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.\n\nA 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.\n\nA server *SHOULD NOT* use the From header field for access control or authentication, since most recipients will assume that the field value is public information.\n\n#### 5.5.2. Referer\n\nThe \"Referer\" [sic] header field allows the user agent to specify a URI reference for the resource from which the [target URI](rfc7230.html#target-resource) 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 [RFC3986], if any, when generating the Referer field value.\n\n```\n Referer = absolute-URI / partial-URI \n```\n\nThe Referer header field allows servers to generate back-links to other resources for simple analytics, logging, optimized caching, etc. It also allows obsolete or mistyped links to be found for maintenance. Some servers use the Referer header field as a means of denying links from other sites (so-called \"deep linking\") or restricting cross-site request forgery (CSRF), but not all requests contain it.\n\nExample:\n\n```\n Referer: http://www.example.org/hypertext/Overview.html\n```\n\nIf 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 field or send it with a value of \"about:blank\".\n\nThe Referer 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 *MUST NOT* send a Referer header field in an unsecured HTTP request if the referring page was received with a secure protocol. See Section 9.4 for additional security considerations.\n\nSome intermediaries have been known to indiscriminately remove Referer header fields from outgoing requests. This has the unfortunate side effect of interfering with protection against CSRF attacks, which can be far more harmful to their users. Intermediaries and user agent extensions that wish to limit information disclosure in Referer ought to restrict their changes to specific edits, such as replacing internal domain names with pseudonyms or truncating the query and/or path components. An intermediary *SHOULD NOT* modify or delete the Referer header field when the field value shares the same scheme and host as the request target.\n\n#### 5.5.3. User-Agent\n\nThe \"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 field in each request unless specifically configured not to do so.\n\n```\n User-Agent = product *( RWS ( product / comment ) )\n```\n\nThe User-Agent field-value consists of one or more product identifiers, each followed by zero or more comments ([Section 3.2](rfc7230.html#header.fields) of [RFC7230]), which together identify the user agent software and its significant subproducts. By convention, the product identifiers are listed in decreasing order of their significance for identifying the user agent software. Each product identifier consists of a name and optional version.\n\n```\n product = token [\"/\" product-version]\n product-version = token \n```\n\nA sender *SHOULD* limit generated product identifiers to what is necessary to identify the product; a sender *MUST NOT* generate advertising or other nonessential information within the product identifier. A sender *SHOULD NOT* generate information in product-version that is not a version identifier (i.e., successive versions of the same product name ought to differ only in the product-version portion of the product identifier).\n\nExample:\n\n```\n User-Agent: CERN-LineMode/2.15 libwww/2.17b3\n```\n\nA user agent *SHOULD NOT* generate a User-Agent field containing needlessly fine-grained detail and *SHOULD* limit the addition of subproducts by third parties. Overly long and detailed User-Agent field values increase request latency and the risk of a user being identified against their wishes (\"fingerprinting\").\n\nLikewise, implementations are encouraged not to use the product tokens of other implementations in order to declare compatibility with them, as this circumvents the purpose of the field. If a user agent masquerades as a different user agent, recipients can assume that the user intentionally desires to see responses tailored for that identified user agent, even if they might not work as well for the actual user agent being used.\n\n## 6. Response Status Codes\n\nThe status-code element is a three-digit integer code giving the result of the attempt to understand and satisfy the request.\n\nHTTP status codes are extensible. HTTP clients are not required to understand the meaning of all registered status codes, though such understanding is obviously desirable. However, a client *MUST* understand the class of any status code, as indicated by the first digit, and treat an unrecognized status code as being equivalent to the x00 status code of that class, with the exception that a recipient *MUST NOT* cache a response with an unrecognized status code.\n\nFor example, if an unrecognized status code of 471 is received by a client, the client can assume that there was something wrong with its request and treat the response as if it had received a 400 (Bad Request) status code. The response message will usually contain a representation that explains the status.\n\nThe 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:\n\n- 1xx (Informational) : The request was received, continuing process\n- 2xx (Successful) : The request was successfully received, understood, and accepted\n- 3xx (Redirection) : Further action needs to be taken in order to complete the request\n- 4xx (Client Error) : The request contains bad syntax or cannot be fulfilled\n- 5xx (Server Error) : The server failed to fulfill an apparently valid request\n\n### 6.1. Overview of Status Codes\n\nThe status codes listed below are defined in this specification, [Section 4](rfc7232.html#status.code.definitions) of [RFC7232], [Section 4](rfc7233.html#range.response) of [RFC7233], and [Section 3](rfc7235.html#status.code.definitions) of [RFC7235]. The reason phrases listed here are only recommendations — they can be replaced by local equivalents without affecting the protocol.\n\nResponses with status codes that are defined as cacheable by default (e.g., 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, and 501 in this specification) can be reused by a cache with heuristic expiration unless otherwise indicated by the method definition or explicit cache controls [RFC7234]; all other status codes are not cacheable by default.\n\n| Code | Reason-Phrase | Defined in... |\n| --- | --- | --- |\n| 100 | Continue | Section 6.2.1 |\n| 101 | Switching Protocols | Section 6.2.2 |\n| 200 | OK | Section 6.3.1 |\n| 201 | Created | Section 6.3.2 |\n| 202 | Accepted | Section 6.3.3 |\n| 203 | Non-Authoritative Information | Section 6.3.4 |\n| 204 | No Content | Section 6.3.5 |\n| 205 | Reset Content | Section 6.3.6 |\n| 206 | Partial Content | [Section 4.1](rfc7233.html#status.206) of [RFC7233] |\n| 300 | Multiple Choices | Section 6.4.1 |\n| 301 | Moved Permanently | Section 6.4.2 |\n| 302 | Found | Section 6.4.3 |\n| 303 | See Other | Section 6.4.4 |\n| 304 | Not Modified | [Section 4.1](rfc7232.html#status.304) of [RFC7232] |\n| 305 | Use Proxy | Section 6.4.5 |\n| 307 | Temporary Redirect | Section 6.4.7 |\n| 400 | Bad Request | Section 6.5.1 |\n| 401 | Unauthorized | [Section 3.1](rfc7235.html#status.401) of [RFC7235] |\n| 402 | Payment Required | Section 6.5.2 |\n| 403 | Forbidden | Section 6.5.3 |\n| 404 | Not Found | Section 6.5.4 |\n| 405 | Method Not Allowed | Section 6.5.5 |\n| 406 | Not Acceptable | Section 6.5.6 |\n| 407 | Proxy Authentication Required | [Section 3.2](rfc7235.html#status.407) of [RFC7235] |\n| 408 | Request Timeout | Section 6.5.7 |\n| 409 | Conflict | Section 6.5.8 |\n| 410 | Gone | Section 6.5.9 |\n| 411 | Length Required | Section 6.5.10 |\n| 412 | Precondition Failed | [Section 4.2](rfc7232.html#status.412) of [RFC7232] |\n| 413 | Payload Too Large | Section 6.5.11 |\n| 414 | URI Too Long | Section 6.5.12 |\n| 415 | Unsupported Media Type | Section 6.5.13 |\n| 416 | Range Not Satisfiable | [Section 4.4](rfc7233.html#status.416) of [RFC7233] |\n| 417 | Expectation Failed | Section 6.5.14 |\n| 426 | Upgrade Required | Section 6.5.15 |\n| 500 | Internal Server Error | Section 6.6.1 |\n| 501 | Not Implemented | Section 6.6.2 |\n| 502 | Bad Gateway | Section 6.6.3 |\n| 503 | Service Unavailable | Section 6.6.4 |\n| 504 | Gateway Timeout | Section 6.6.5 |\n| 505 | HTTP Version Not Supported | Section 6.6.6 |\n\nNote that this list is not exhaustive — it does not include extension status codes defined in other specifications. The complete list of status codes is maintained by IANA. See Section 8.2 for details.\n\n### 6.2. Informational 1xx\n\nThe 1xx (Informational) class of status code indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response. 1xx responses are terminated by the first empty line after the status-line (the empty line signaling the end of the header section). Since HTTP/1.0 did not define any 1xx status codes, a server *MUST NOT* send a 1xx response to an HTTP/1.0 client.\n\nA 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.\n\nA 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\" field when it forwards a request, then it need not forward the corresponding 100 (Continue) response(s).\n\n#### 6.2.1. 100 Continue\n\nThe 100 (Continue) status code indicates that the initial part of a request has been received and has not yet been rejected by the server. The server intends to send a final response after the request has been fully received and acted upon.\n\nWhen 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 payload body, as described in Section 5.1.1. The client ought to continue sending the request and discard the 100 response.\n\nIf the request did not contain an Expect header field containing the 100-continue expectation, the client can simply discard this interim response.\n\n#### 6.2.2. 101 Switching Protocols\n\nThe 101 (Switching Protocols) status code indicates that the server understands and is willing to comply with the client's request, via the [Upgrade](rfc7230.html#header.upgrade) header field ([Section 6.7](rfc7230.html#header.upgrade) of [RFC7230]), for a change in the application protocol being used on this connection. The server *MUST* generate an Upgrade header field in the response that indicates which protocol(s) will be switched to immediately after the empty line that terminates the 101 response.\n\nIt 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.\n\n### 6.3. Successful 2xx\n\nThe 2xx (Successful) class of status code indicates that the client's request was successfully received, understood, and accepted.\n\n#### 6.3.1. 200 OK\n\nThe 200 (OK) status code indicates that the request has succeeded. The payload sent in a 200 response depends on the request method. For the methods defined by this specification, the intended meaning of the payload can be summarized as:\n\nGET\n\na representation of the target resource;\n\nHEAD\n\nthe same representation as GET, but without the representation data;\n\nPOST\n\na representation of the status of, or results obtained from, the action;\n\nPUT, DELETE\n\na representation of the status of the action;\n\nOPTIONS\n\na representation of the communications options;\n\nTRACE\n\na representation of the request message as received by the end server.\n\nAside from responses to CONNECT, a 200 response always has a payload, though an origin server *MAY* generate a payload body of zero length. If no payload is desired, an origin server ought to send 204 (No Content) instead. For CONNECT, no payload is allowed because the successful result is a tunnel, which begins immediately after the 200 response header section.\n\nA 200 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n#### 6.3.2. 201 Created\n\nThe 201 (Created) status code indicates that the request has been fulfilled and has resulted in one or more new resources being created. The primary resource created by the request is identified by either a Location header field in the response or, if no Location field is received, by the effective request URI.\n\nThe 201 response payload typically describes and links to the resource(s) created. See Section 7.2 for a discussion of the meaning and purpose of validator header fields, such as [ETag](rfc7232.html#header.etag) and [Last-Modified](rfc7232.html#header.last-modified), in a 201 response.\n\n#### 6.3.3. 202 Accepted\n\nThe 202 (Accepted) status code indicates that the request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility in HTTP for re-sending a status code from an asynchronous operation.\n\nThe 202 response is intentionally noncommittal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the server persist until the process is completed. The representation sent with this response ought to describe the request's current status and point to (or embed) a status monitor that can provide the user with an estimate of when the request will be fulfilled.\n\n#### 6.3.4. 203 Non-Authoritative Information\n\nThe 203 (Non-Authoritative Information) status code indicates that the request was successful but the enclosed payload has been modified from that of the origin server's 200 (OK) response by a transforming proxy ([Section 5.7.2](rfc7230.html#message.transformations) of [RFC7230]). This status code allows the proxy to notify recipients when a transformation has been applied, since that knowledge might impact later decisions regarding the content. For example, future cache validation requests for the content might only be applicable along the same request path (through the same proxies).\n\nThe 203 response is similar to the Warning code of 214 Transformation Applied ([Section 5.5](rfc7234.html#header.warning) of [RFC7234]), which has the advantage of being applicable to responses with any status code.\n\nA 203 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n#### 6.3.5. 204 No Content\n\nThe 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 payload body. Metadata in the response header fields refer to the target resource and its selected representation after the requested action was applied.\n\nFor example, if a 204 status code is received in response to a PUT request and the response contains an [ETag](rfc7232.html#header.etag) header field, then the PUT was successful and the ETag field-value contains the entity-tag for the new representation of that target resource.\n\nThe 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.\n\nFor 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.\n\nA 204 response is terminated by the first empty line after the header fields because it cannot contain a message body.\n\nA 204 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n#### 6.3.6. 205 Reset Content\n\nThe 205 (Reset Content) status code indicates that the server has fulfilled the request and desires that the user agent reset the \"document view\", which caused the request to be sent, to its original state as received from the origin server.\n\nThis response is intended to support a common data entry use case where the user receives content that supports data entry (a form, notepad, canvas, etc.), enters or manipulates data in that space, causes the entered data to be submitted in a request, and then the data entry mechanism is reset for the next entry so that the user can easily initiate another input action.\n\nSince the 205 status code implies that no additional content will be provided, a server *MUST NOT* generate a payload in a 205 response. In other words, a server *MUST* do one of the following for a 205 response: a) indicate a zero-length body for the response by including a [Content-Length](rfc7230.html#header.content-length) header field with a value of 0; b) indicate a zero-length payload for the response by including a [Transfer-Encoding](rfc7230.html#header.transfer-encoding) header field with a value of chunked and a message body consisting of a single chunk of zero-length; or, c) close the connection immediately after sending the blank line terminating the header section.\n\n### 6.4. Redirection 3xx\n\nThe 3xx (Redirection) class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. If a Location header field (Section 7.1.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 done with care for methods not known to be safe, as defined in Section 4.2.1, since the user might not wish to redirect an unsafe request.\n\nThere are several types of redirects:\n\n1. Redirects that indicate the resource might be available at a different URI, as provided by the Location field, as in the status codes 301 (Moved Permanently), 302 (Found), and 307 (Temporary Redirect).\n2. Redirection that offers a choice of matching resources, each capable of representing the original request target, as in the 300 (Multiple Choices) status code.\n3. Redirection to a different resource, identified by the Location field, that can represent an indirect response to the request, as in the 303 (See Other) status code.\n4. Redirection to a previously cached result, as in the [304 (Not Modified)](rfc7232.html#status.304) status code.\n\nA client *SHOULD* detect and intervene in cyclical redirections (i.e., \"infinite\" redirection loops).\n\n#### 6.4.1. 300 Multiple Choices\n\nThe 300 (Multiple Choices) status code indicates that the target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers. In other words, the server desires that the user agent engage in reactive negotiation to select the most appropriate representation(s) for its needs (Section 3.4).\n\nIf the server has a preferred choice, the server *SHOULD* generate a Location header field containing a preferred choice's URI reference. The user agent *MAY* use the Location field value for automatic redirection.\n\nFor request methods other than HEAD, the server *SHOULD* generate a payload 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 payloads. 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.\n\nA 300 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n#### 6.4.2. 301 Moved Permanently\n\nThe 301 (Moved Permanently) status code indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. Clients with link-editing capabilities ought to automatically re-link references to the effective request URI to one or more of the new references sent by the server, where possible.\n\nThe server *SHOULD* generate a Location header field in the response containing a preferred URI reference for the new permanent URI. The user agent *MAY* use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the new URI(s).\n\nA 301 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n#### 6.4.3. 302 Found\n\nThe 302 (Found) status code indicates that the target resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client ought to continue to use the effective request URI for future requests.\n\nThe server *SHOULD* generate a Location header field in the response containing a URI reference for the different URI. The user agent *MAY* use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the different URI(s).\n\n#### 6.4.4. 303 See Other\n\nThe 303 (See Other) status code indicates that the server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request. A user agent can perform a retrieval request targeting that URI (a GET or HEAD request if using HTTP), which might also be redirected, and present the eventual result as an answer to the original request. Note that the new URI in the Location header field is not considered equivalent to the effective request URI.\n\nThis status code is applicable to any HTTP method. It is primarily used to allow the output of a POST action to redirect the user agent to a selected resource, since doing so provides the information corresponding to the POST response in a form that can be separately identified, bookmarked, and cached, independent of the original request.\n\nA 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.\n\nExcept for responses to a HEAD request, the representation of a 303 response ought to contain a short hypertext note with a hyperlink to the same URI reference provided in the Location header field.\n\n#### 6.4.5. 305 Use Proxy\n\nThe 305 (Use Proxy) status code was defined in a previous version of this specification and is now deprecated (Appendix B).\n\n#### 6.4.6. 306 (Unused)\n\nThe 306 status code was defined in a previous version of this specification, is no longer used, and the code is reserved.\n\n#### 6.4.7. 307 Temporary Redirect\n\nThe 307 (Temporary Redirect) status code indicates that the target resource resides temporarily under a different URI and the user agent *MUST NOT* change the request method if it performs an automatic redirection to that URI. Since the redirection can change over time, the client ought to continue using the original effective request URI for future requests.\n\nThe server *SHOULD* generate a Location header field in the response containing a URI reference for the different URI. The user agent *MAY* use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the different URI(s).\n\n### 6.5. Client Error 4xx\n\nThe 4xx (Client Error) class of status code indicates that the client seems to have erred. Except when responding to a HEAD request, the server *SHOULD* send a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. User agents *SHOULD* display any included representation to the user.\n\n#### 6.5.1. 400 Bad Request\n\nThe 400 (Bad Request) status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).\n\n#### 6.5.2. 402 Payment Required\n\nThe 402 (Payment Required) status code is reserved for future use.\n\n#### 6.5.3. 403 Forbidden\n\nThe 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize it. A server that wishes to make public why the request has been forbidden can describe that reason in the response payload (if any).\n\nIf authentication credentials were provided in the request, the server considers them insufficient to grant access. The client *SHOULD NOT* automatically repeat the request with the same credentials. The client *MAY* repeat the request with new or different credentials. However, a request might be forbidden for reasons unrelated to the credentials.\n\nAn origin server that wishes to \"hide\" the current existence of a forbidden target resource *MAY* instead respond with a status code of 404 (Not Found).\n\n#### 6.5.4. 404 Not Found\n\nThe 404 (Not Found) status code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists. A 404 status code does not indicate whether this lack of representation is temporary or permanent; the 410 (Gone) status code is preferred over 404 if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent.\n\nA 404 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n#### 6.5.5. 405 Method Not Allowed\n\nThe 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.\n\nA 405 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n#### 6.5.6. 406 Not Acceptable\n\nThe 406 (Not Acceptable) status code indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request (Section 5.3), and the server is unwilling to supply a default representation.\n\nThe server *SHOULD* generate a payload containing a list of available representation characteristics and corresponding resource identifiers from which the user or user agent can choose the one most appropriate. A user agent *MAY* automatically select the most appropriate choice from that list. However, this specification does not define any standard for such automatic selection, as described in Section 6.4.1.\n\n#### 6.5.7. 408 Request Timeout\n\nThe 408 (Request Timeout) status code indicates that the server did not receive a complete request message within the time that it was prepared to wait. A server *SHOULD* send the \"[close](rfc7230.html#header.connection)\" connection option ([Section 6.1](rfc7230.html#header.connection) of [RFC7230]) in the response, since 408 implies that the server has decided to close the connection rather than continue waiting. If the client has an outstanding request in transit, the client *MAY* repeat that request on a new connection.\n\n#### 6.5.8. 409 Conflict\n\nThe 409 (Conflict) status code indicates that the request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. The server *SHOULD* generate a payload that includes enough information for a user to recognize the source of the conflict.\n\nConflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the representation being PUT included changes to a resource that conflict with those made by an earlier (third-party) request, the origin server might use a 409 response to indicate that it can't complete the request. In this case, the response representation would likely contain information useful for merging the differences based on the revision history.\n\n#### 6.5.9. 410 Gone\n\nThe 410 (Gone) status code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. If the origin server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) ought to be used instead.\n\nThe 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer associated with the origin server's site. It is not necessary to mark all permanently unavailable resources as \"gone\" or to keep the mark for any length of time — that is left to the discretion of the server owner.\n\nA 410 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n#### 6.5.10. 411 Length Required\n\nThe 411 (Length Required) status code indicates that the server refuses to accept the request without a defined [Content-Length](rfc7230.html#header.content-length) ([Section 3.3.2](rfc7230.html#header.content-length) of [RFC7230]). The client *MAY* repeat the request if it adds a valid Content-Length header field containing the length of the message body in the request message.\n\n#### 6.5.11. 413 Payload Too Large\n\nThe 413 (Payload Too Large) status code indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process. The server *MAY* close the connection to prevent the client from continuing the request.\n\nIf the condition is temporary, the server *SHOULD* generate a Retry-After header field to indicate that it is temporary and after what time the client *MAY* try again.\n\n#### 6.5.12. 414 URI Too Long\n\nThe 414 (URI Too Long) status code indicates that the server is refusing to service the request because the request-target ([Section 5.3](rfc7230.html#request-target) of [RFC7230]) is longer than the server is willing to interpret. This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long query information, when the client has descended into a \"black hole\" of redirection (e.g., a redirected URI prefix that points to a suffix of itself) or when the server is under attack by a client attempting to exploit potential security holes.\n\nA 414 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n#### 6.5.13. 415 Unsupported Media Type\n\nThe 415 (Unsupported Media Type) status code indicates that the origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource. The format problem might be due to the request's indicated Content-Type or Content-Encoding, or as a result of inspecting the data directly.\n\n#### 6.5.14. 417 Expectation Failed\n\nThe 417 (Expectation Failed) status code indicates that the expectation given in the request's Expect header field (Section 5.1.1) could not be met by at least one of the inbound servers.\n\n#### 6.5.15. 426 Upgrade Required\n\nThe 426 (Upgrade Required) status code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The server *MUST* send an [Upgrade](rfc7230.html#header.upgrade) header field in a 426 response to indicate the required protocol(s) ([Section 6.7](rfc7230.html#header.upgrade) of [RFC7230]).\n\nExample:\n\n```\nHTTP/1.1 426 Upgrade Required\nUpgrade: HTTP/3.0\nConnection: Upgrade\nContent-Length: 53\nContent-Type: text/plain\n\nThis service requires use of the HTTP/3.0 protocol.\n```\n\n### 6.6. Server Error 5xx\n\nThe 5xx (Server Error) class of status code indicates that the server is aware that it has erred or is incapable of performing the requested method. Except when responding to a HEAD request, the server *SHOULD* send a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. A user agent *SHOULD* display any included representation to the user. These response codes are applicable to any request method.\n\n#### 6.6.1. 500 Internal Server Error\n\nThe 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.\n\n#### 6.6.2. 501 Not Implemented\n\nThe 501 (Not Implemented) status code indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.\n\nA 501 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n#### 6.6.3. 502 Bad Gateway\n\nThe 502 (Bad Gateway) status code indicates that the server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.\n\n#### 6.6.4. 503 Service Unavailable\n\nThe 503 (Service Unavailable) status code indicates that the server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. The server *MAY* send a Retry-After header field (Section 7.1.3) to suggest an appropriate amount of time for the client to wait before retrying the request.\n\n#### 6.6.5. 504 Gateway Timeout\n\nThe 504 (Gateway Timeout) status code indicates that the server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.\n\n#### 6.6.6. 505 HTTP Version Not Supported\n\nThe 505 (HTTP Version Not Supported) status code indicates that the server does not support, or refuses to support, the major version of HTTP that was used in the request message. The server is indicating that it is unable or unwilling to complete the request using the same major version as the client, as described in [Section 2.6](rfc7230.html#http.version) of [RFC7230], other than with this error message. The server *SHOULD* generate a representation for the 505 response that describes why that version is not supported and what other protocols are supported by that server.\n\n## 7. Response Header Fields\n\nThe response header fields allow the server to pass additional information about the response beyond what is placed in the status-line. These header fields give information about the server, about further access to the target resource, or about related resources.\n\nAlthough each response header field has a defined meaning, in general, the precise semantics might be further refined by the semantics of the request method and/or response status code.\n\n### 7.1. Control Data\n\nResponse header fields can supply control data that supplements the status code, directs caching, or instructs the client where to go next.\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| Age | [Section 5.1](rfc7234.html#header.age) of [RFC7234] |\n| Cache-Control | [Section 5.2](rfc7234.html#header.cache-control) of [RFC7234] |\n| Expires | [Section 5.3](rfc7234.html#header.expires) of [RFC7234] |\n| Date | Section 7.1.1.2 |\n| Location | Section 7.1.2 |\n| Retry-After | Section 7.1.3 |\n| Vary | Section 7.1.4 |\n| Warning | [Section 5.5](rfc7234.html#header.warning) of [RFC7234] |\n\n#### 7.1.1. Origination Date\n\n##### 7.1.1.1. Date/Time Formats\n\nPrior to 1995, there were three different formats commonly used by servers to communicate timestamps. For compatibility with old implementations, all three are defined here. The preferred format is a fixed-length and single-zone subset of the date and time specification used by the Internet Message Format [RFC5322].\n\n```\n HTTP-date = IMF-fixdate / obs-date \n```\n\nAn example of the preferred format is\n\n```\nSun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate\n```\n\nExamples of the two obsolete formats are\n\n```\nSunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format\nSun Nov 6 08:49:37 1994 ; ANSI C's asctime() format\n```\n\nA recipient that parses a timestamp value in an HTTP header field *MUST* accept all three HTTP-date formats. When a sender generates a header field that contains one or more timestamps defined as HTTP-date, the sender *MUST* generate those timestamps in the IMF-fixdate format.\n\nAn HTTP-date value represents time as an instance of Coordinated Universal Time (UTC). The first two formats indicate UTC by the three-letter abbreviation for Greenwich Mean Time, \"GMT\", a predecessor of the UTC name; values in the asctime format are assumed to be in UTC. A sender that generates HTTP-date values from a local clock ought to use NTP ([RFC5905]) or some similar protocol to synchronize its clock to UTC.\n\nPreferred format:\n\n```\n IMF-fixdate = day-name \",\" SP date1 SP time-of-day SP GMT\n ; fixed length/zone/capitalization subset of the format\n ; see Section 3.3 of [RFC5322] day-name = %x4D.6F.6E ; \"Mon\", case-sensitive\n / %x54.75.65 ; \"Tue\", case-sensitive\n / %x57.65.64 ; \"Wed\", case-sensitive\n / %x54.68.75 ; \"Thu\", case-sensitive\n / %x46.72.69 ; \"Fri\", case-sensitive\n / %x53.61.74 ; \"Sat\", case-sensitive\n / %x53.75.6E ; \"Sun\", case-sensitive\n \n date1 = day SP month SP year\n ; e.g., 02 Jun 1982\n\n day = 2DIGIT month = %x4A.61.6E ; \"Jan\", case-sensitive\n / %x46.65.62 ; \"Feb\", case-sensitive\n / %x4D.61.72 ; \"Mar\", case-sensitive\n / %x41.70.72 ; \"Apr\", case-sensitive\n / %x4D.61.79 ; \"May\", case-sensitive\n / %x4A.75.6E ; \"Jun\", case-sensitive\n / %x4A.75.6C ; \"Jul\", case-sensitive\n / %x41.75.67 ; \"Aug\", case-sensitive\n / %x53.65.70 ; \"Sep\", case-sensitive\n / %x4F.63.74 ; \"Oct\", case-sensitive\n / %x4E.6F.76 ; \"Nov\", case-sensitive\n / %x44.65.63 ; \"Dec\", case-sensitive\n year = 4DIGIT GMT = %x47.4D.54 ; \"GMT\", case-sensitive\n\n time-of-day = hour \":\" minute \":\" second\n ; 00:00:00 - 23:59:60 (leap second)\n \n hour = 2DIGIT minute = 2DIGIT second = 2DIGIT \n```\n\nObsolete formats:\n\n```\n obs-date = rfc850-date / asctime-date \n```\n\n```\n rfc850-date = day-name-l \",\" SP date2 SP time-of-day SP GMT date2 = day \"-\" month \"-\" 2DIGIT\n ; e.g., 02-Jun-82\n\n day-name-l = %x4D.6F.6E.64.61.79 ; \"Monday\", case-sensitive\n / %x54.75.65.73.64.61.79 ; \"Tuesday\", case-sensitive\n / %x57.65.64.6E.65.73.64.61.79 ; \"Wednesday\", case-sensitive\n / %x54.68.75.72.73.64.61.79 ; \"Thursday\", case-sensitive\n / %x46.72.69.64.61.79 ; \"Friday\", case-sensitive\n / %x53.61.74.75.72.64.61.79 ; \"Saturday\", case-sensitive\n / %x53.75.6E.64.61.79 ; \"Sunday\", case-sensitive\n```\n\n```\n asctime-date = day-name SP date3 SP time-of-day SP year date3 = month SP ( 2DIGIT / ( SP 1DIGIT ))\n ; e.g., Jun 2\n```\n\nHTTP-date is case sensitive. A sender *MUST NOT* generate additional whitespace in an HTTP-date beyond that specifically included as SP in the grammar. The semantics of day-name, day, month, year, and time-of-day are the same as those defined for the Internet Message Format constructs with the corresponding name ([RFC5322], [Section 3.3](https://www.rfc-editor.org/rfc/rfc5322.html#section-3.3)).\n\nRecipients of a timestamp value in rfc850-date format, which uses a two-digit year, *MUST* interpret a timestamp that appears to be more than 50 years in the future as representing the most recent year in the past that had the same last two digits.\n\nRecipients of timestamp values are encouraged to be robust in parsing timestamps unless otherwise restricted by the field definition. For example, messages are occasionally forwarded over HTTP from a non-HTTP source that might generate any of the date and time specifications defined by the Internet Message Format.\n\n##### 7.1.1.2. Date\n\nThe \"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](https://www.rfc-editor.org/rfc/rfc5322.html#section-3.6.1) of [RFC5322]. The field value is an HTTP-date, as defined in Section 7.1.1.1.\n\n```\n Date = HTTP-date \n```\n\nAn example is\n\n```\n Date: Tue, 15 Nov 1994 08:12:31 GMT\n```\n\nWhen a Date header field is generated, the sender *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 the payload is generated. In practice, the date can be generated at any time during message origination.\n\nAn origin server *MUST NOT* send a Date header field if it does not have a clock capable of providing a reasonable approximation of the current instance in Coordinated Universal Time. An origin server *MAY* send a Date header field if the response is in the 1xx (Informational) or 5xx (Server Error) class of status codes. An origin server *MUST* send a Date header field in all other cases.\n\nA recipient with a clock that receives a response message without a Date header field *MUST* record the time it was received and append a corresponding Date header field to the message's header section if it is cached or forwarded downstream.\n\nA user agent *MAY* send a Date header field in a request, though generally will not do so unless it is believed to convey useful information to the server. For example, custom applications of HTTP might convey a Date if the server is expected to adjust its interpretation of the user's request based on differences between the user agent and server clocks.\n\n#### 7.1.2. Location\n\nThe \"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.\n\n```\n Location = URI-reference \n```\n\nThe field value consists of a single URI-reference. When it has the form of a relative reference ([RFC3986], [Section 4.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-4.2)), the final value is computed by resolving it against the effective request URI ([RFC3986], [Section 5](https://www.rfc-editor.org/rfc/rfc3986.html#section-5)).\n\nFor 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.\n\nIf the Location value provided in a 3xx (Redirection) response does not have a fragment component, a user agent *MUST* process the redirection as if the value inherits the fragment component of the URI reference used to generate the request target (i.e., the redirection inherits the original reference's fragment, if any).\n\nFor 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:\n\n```\n Location: /People.html#tim\n```\n\nwhich suggests that the user agent redirect to \"http://www.example.org/People.html#tim\"\n\nLikewise, a GET request generated for the URI reference \"http://www.example.org/index.html#larry\" might result in a 301 (Moved Permanently) response containing the header field:\n\n```\n Location: http://www.example.net/index.html\n```\n\nwhich suggests that the user agent redirect to \"http://www.example.net/index.html#larry\", preserving the original fragment identifier.\n\nThere are circumstances in which a fragment identifier in a Location value would not be appropriate. For example, the Location header field in a 201 (Created) response is supposed to provide a URI that is specific to the created resource.\n\n#### 7.1.3. Retry-After\n\nServers 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.\n\nThe value of this field can be either an HTTP-date or a number of seconds to delay after the response is received.\n\n```\n Retry-After = HTTP-date / delay-seconds \n```\n\nA delay-seconds value is a non-negative decimal integer, representing time in seconds.\n\n```\n delay-seconds = 1*DIGIT \n```\n\nTwo examples of its use are\n\n```\n Retry-After: Fri, 31 Dec 1999 23:59:59 GMT\n Retry-After: 120\n```\n\nIn the latter example, the delay is 2 minutes.\n\n#### 7.1.4. Vary\n\nThe \"Vary\" header field in a response describes what parts of a request message, aside from the method, Host header field, and request target, might influence the origin server's process for selecting and representing this response. The value consists of either a single asterisk (\"*\") or a list of header field names (case-insensitive).\n\n```\n Vary = \"*\" / 1#field-name \n```\n\nA Vary field value of \"*\" signals that anything about the request might play a role in selecting the response representation, possibly including elements 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 a Vary field with a \"*\" value.\n\nA Vary field value consisting of a comma-separated list of names indicates that the named request header fields, known as the selecting header fields, might have a role in selecting the representation. The potential selecting header fields are not limited to those defined by this specification.\n\nFor example, a response that contains\n\n```\n Vary: accept-encoding, accept-language\n```\n\nindicates that the origin server might have used the request's Accept-Encoding and Accept-Language fields (or lack thereof) as determining factors while choosing the content for this response.\n\nAn origin server might send Vary with a list of fields for two purposes:\n\n1. 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 fields as the original request ([Section 4.1](rfc7234.html#caching.negotiated.responses) of [RFC7234]). In other words, Vary expands the cache key required to match a new request to the stored cache entry.\n2. To inform user agent recipients that this response is subject to content negotiation (Section 5.3) and that a different representation might be sent in a subsequent request if additional parameters are provided in the listed header fields (proactive negotiation).\n\nAn origin server *SHOULD* send a Vary header field when its algorithm for selecting a representation varies based on aspects of the request message other than the method and request target, unless the variance cannot be crossed or the origin server has been deliberately configured to prevent cache transparency. For example, there is no need to send the Authorization field name in Vary because reuse across users is constrained by the field definition ([Section 4.2](rfc7235.html#header.authorization) of [RFC7235]). Likewise, an origin server might use Cache-Control directives ([Section 5.2](rfc7234.html#header.cache-control) of [RFC7234]) to supplant Vary if it considers the variance less significant than the performance cost of Vary's impact on caching.\n\n### 7.2. Validator Header Fields\n\nValidator header fields convey metadata about the selected representation (Section 3). In responses to safe requests, validator fields describe the selected representation chosen by the origin server while handling the response. Note that, depending on the status code semantics, the selected representation for a given response is not necessarily the same as the representation enclosed as response payload.\n\nIn a successful response to a state-changing request, validator fields describe the new representation that has replaced the prior selected representation as a result of processing the request.\n\nFor example, an ETag header field in a 201 (Created) response communicates the entity-tag of the newly created resource's representation, so that it can be used in later conditional requests to prevent the \"lost update\" problem [RFC7232].\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| ETag | [Section 2.3](rfc7232.html#header.etag) of [RFC7232] |\n| Last-Modified | [Section 2.2](rfc7232.html#header.last-modified) of [RFC7232] |\n\n### 7.3. Authentication Challenges\n\nAuthentication challenges indicate what mechanisms are available for the client to provide authentication credentials in future requests.\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| WWW-Authenticate | [Section 4.1](rfc7235.html#header.www-authenticate) of [RFC7235] |\n| Proxy-Authenticate | [Section 4.3](rfc7235.html#header.proxy-authenticate) of [RFC7235] |\n\n### 7.4. Response Context\n\nThe remaining response header fields provide more information about the target resource for potential use in later requests.\n\n| Header Field Name | Defined in... |\n| --- | --- |\n| Accept-Ranges | [Section 2.3](rfc7233.html#header.accept-ranges) of [RFC7233] |\n| Allow | Section 7.4.1 |\n| Server | Section 7.4.2 |\n\n#### 7.4.1. Allow\n\nThe \"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.\n\n```\n Allow = #method \n```\n\nExample of use:\n\n```\n Allow: GET, HEAD, PUT\n```\n\nThe actual set of allowed methods is defined by the origin server at the time of each request. An origin server *MUST* generate an Allow 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.\n\nA 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.\n\n#### 7.4.2. Server\n\nThe \"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 field in its responses.\n\n```\n Server = product *( RWS ( product / comment ) )\n```\n\nThe Server field-value consists of one or more product identifiers, each followed by zero or more comments ([Section 3.2](rfc7230.html#header.fields) of [RFC7230]), 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 5.5.3.\n\nExample:\n\n```\n Server: CERN/3.0 libwww/2.17\n```\n\nAn origin server *SHOULD NOT* generate a Server field containing needlessly fine-grained detail and *SHOULD* limit the addition of subproducts by third parties. Overly long and detailed Server field values increase response latency and potentially reveal internal implementation details that might make it (slightly) easier for attackers to find and exploit known security holes.\n\n## 8. IANA Considerations\n\n### 8.1. Method Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Method Registry\" defines the namespace for the request method token (Section 4). The method registry has been created and is now maintained at <[http://www.iana.org/assignments/http-methods](http://www.iana.org/assignments/http-methods)>.\n\n#### 8.1.1. Procedure\n\nHTTP method registrations *MUST* include the following fields:\n\n- Method Name (see Section 4 )\n- Safe (\"yes\" or \"no\", see Section 4.2.1 )\n- Idempotent (\"yes\" or \"no\", see Section 4.2.2 )\n- Pointer to specification text\n\nValues to be added to this namespace require IETF Review (see [RFC5226], [Section 4.1](https://www.rfc-editor.org/rfc/rfc5226.html#section-4.1)).\n\n#### 8.1.2. Considerations for New Methods\n\nStandardized methods are generic; that is, they are potentially applicable to any resource, not just one particular media type, kind of resource, or application. As such, it is preferred that new methods be registered in a document that isn't specific to a single application or data format, since orthogonal technologies deserve orthogonal specification.\n\nSince message parsing ([Section 3.3](rfc7230.html#message.body) of [RFC7230]) needs to be independent of method semantics (aside from responses to HEAD), definitions of new methods cannot change the parsing algorithm or prohibit the presence of a message body on either the request or the response message. Definitions of new methods can specify that only a zero-length message body is allowed by requiring a Content-Length header field with a value of \"0\".\n\nA new method definition needs to indicate whether it is safe (Section 4.2.1), idempotent (Section 4.2.2), cacheable (Section 4.2.3), what semantics are to be associated with the payload body if any is present in the request and what refinements the method makes to header field or status code semantics. If the new method is cacheable, its definition ought to describe how, and under what conditions, a cache can store a response and use it to satisfy a subsequent request. The new method ought to describe whether it can be made conditional (Section 5.2) and, if so, how a server responds when the condition is false. Likewise, if the new method might have some use for partial response semantics ([RFC7233]), it ought to document this, too.\n\n#### 8.1.3. Registrations\n\nThe \"Hypertext Transfer Protocol (HTTP) Method Registry\" has been populated with the registrations below:\n\n| Method | Safe | Idempotent | Reference |\n| --- | --- | --- | --- |\n| CONNECT | no | no | Section 4.3.6 |\n| DELETE | no | yes | Section 4.3.5 |\n| GET | yes | yes | Section 4.3.1 |\n| HEAD | yes | yes | Section 4.3.2 |\n| OPTIONS | yes | yes | Section 4.3.7 |\n| POST | no | no | Section 4.3.3 |\n| PUT | no | yes | Section 4.3.4 |\n| TRACE | yes | yes | Section 4.3.8 |\n\n### 8.2. Status Code Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Status Code Registry\" defines the namespace for the response status-code token (Section 6). The status code registry is maintained at <[http://www.iana.org/assignments/http-status-codes](http://www.iana.org/assignments/http-status-codes)>.\n\nThis section replaces the registration procedure for HTTP Status Codes previously defined in [Section 7.1](https://www.rfc-editor.org/rfc/rfc2817.html#section-7.1) of [RFC2817].\n\n#### 8.2.1. Procedure\n\nA registration *MUST* include the following fields:\n\n- Status Code (3 digits)\n- Short Description\n- Pointer to specification text\n\nValues to be added to the HTTP status code namespace require IETF Review (see [RFC5226], [Section 4.1](https://www.rfc-editor.org/rfc/rfc5226.html#section-4.1)).\n\n#### 8.2.2. Considerations for New Status Codes\n\nWhen it is necessary to express semantics for a response that are not defined by current status codes, a new status code can be registered. Status codes are generic; they are potentially applicable to any resource, not just one particular media type, kind of resource, or application of HTTP. As such, it is preferred that new status codes be registered in a document that isn't specific to a single application.\n\nNew status codes are required to fall under one of the categories defined in Section 6. To allow existing parsers to process the response message, new status codes cannot disallow a payload, although they can mandate a zero-length payload body.\n\nProposals 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.\n\nThe definition of a new status code ought to explain the request conditions that would cause a response containing that status code (e.g., combinations of request header fields and/or method(s)) along with any dependencies on response header fields (e.g., what fields are required, what fields can modify the semantics, and what header field semantics are further refined when used with the new status code).\n\nThe definition of a new status code ought to specify whether or not it is cacheable. Note that all status codes can be cached if the response they occur in has explicit freshness information; however, status codes that are defined as being cacheable are allowed to be cached without explicit freshness information. Likewise, the definition of a status code can place constraints upon cache behavior. See [RFC7234] for more information.\n\nFinally, the definition of a new status code ought to indicate whether the payload has any implied association with an identified resource (Section 3.1.4.1).\n\n#### 8.2.3. Registrations\n\nThe status code registry has been updated with the registrations below:\n\n| Value | Description | Reference |\n| --- | --- | --- |\n| 100 | Continue | Section 6.2.1 |\n| 101 | Switching Protocols | Section 6.2.2 |\n| 200 | OK | Section 6.3.1 |\n| 201 | Created | Section 6.3.2 |\n| 202 | Accepted | Section 6.3.3 |\n| 203 | Non-Authoritative Information | Section 6.3.4 |\n| 204 | No Content | Section 6.3.5 |\n| 205 | Reset Content | Section 6.3.6 |\n| 300 | Multiple Choices | Section 6.4.1 |\n| 301 | Moved Permanently | Section 6.4.2 |\n| 302 | Found | Section 6.4.3 |\n| 303 | See Other | Section 6.4.4 |\n| 305 | Use Proxy | Section 6.4.5 |\n| 306 | (Unused) | Section 6.4.6 |\n| 307 | Temporary Redirect | Section 6.4.7 |\n| 400 | Bad Request | Section 6.5.1 |\n| 402 | Payment Required | Section 6.5.2 |\n| 403 | Forbidden | Section 6.5.3 |\n| 404 | Not Found | Section 6.5.4 |\n| 405 | Method Not Allowed | Section 6.5.5 |\n| 406 | Not Acceptable | Section 6.5.6 |\n| 408 | Request Timeout | Section 6.5.7 |\n| 409 | Conflict | Section 6.5.8 |\n| 410 | Gone | Section 6.5.9 |\n| 411 | Length Required | Section 6.5.10 |\n| 413 | Payload Too Large | Section 6.5.11 |\n| 414 | URI Too Long | Section 6.5.12 |\n| 415 | Unsupported Media Type | Section 6.5.13 |\n| 417 | Expectation Failed | Section 6.5.14 |\n| 426 | Upgrade Required | Section 6.5.15 |\n| 500 | Internal Server Error | Section 6.6.1 |\n| 501 | Not Implemented | Section 6.6.2 |\n| 502 | Bad Gateway | Section 6.6.3 |\n| 503 | Service Unavailable | Section 6.6.4 |\n| 504 | Gateway Timeout | Section 6.6.5 |\n| 505 | HTTP Version Not Supported | Section 6.6.6 |\n\n### 8.3. Header Field Registry\n\nHTTP header fields are registered within the \"Message Headers\" registry located at <[http://www.iana.org/assignments/message-headers](http://www.iana.org/assignments/message-headers)>, as defined by [BCP90].\n\n#### 8.3.1. Considerations for New Header Fields\n\nHeader fields are key:value pairs that can be used to communicate data about the message, its payload, the target resource, or the connection (i.e., control data). See [Section 3.2](rfc7230.html#header.fields) of [RFC7230] for a general definition of header field syntax in HTTP messages.\n\nThe requirements for header field names are defined in [BCP90].\n\nAuthors of specifications defining new fields are advised to keep the name as short as practical and not to prefix the name with \"X-\" unless the header field will never be used on the Internet. (The \"X-\" prefix idiom has been extensively misused in practice; it was intended to only be used as a mechanism for avoiding name collisions inside proprietary software or intranet processing, since the prefix would ensure that private names never collide with a newly registered Internet name; see [BCP178] for further information).\n\nNew header field values typically have their syntax defined using ABNF ([RFC5234]), using the extension defined in [Section 7](rfc7230.html#abnf.extension) of [RFC7230] as necessary, and are usually constrained to the range of US-ASCII characters. Header fields needing a greater range of characters can use an encoding such as the one defined in [RFC5987].\n\nLeading and trailing whitespace in raw field values is removed upon field parsing ([Section 3.2.4](rfc7230.html#field.parsing) of [RFC7230]). Field definitions where leading or trailing whitespace in values is significant will have to use a container syntax such as quoted-string ([Section 3.2.6](rfc7230.html#field.components) of [RFC7230]).\n\nBecause commas (\",\") are used as a generic delimiter between field-values, they need to be treated with care if they are allowed in the field-value. Typically, components that might contain a comma are protected with double-quotes using the quoted-string ABNF production.\n\nFor example, a textual date and a URI (either of which might contain a comma) could be safely carried in field-values like these:\n\n```\n Example-URI-Field: \"http://example.com/a.html,foo\",\n \"http://without-a-comma.example.com/\"\n Example-Date-Field: \"Sat, 04 May 1996\", \"Wed, 14 Sep 2005\"\n```\n\nNote that double-quote delimiters almost always are used with the quoted-string production; using a different syntax inside double-quotes will likely cause unnecessary confusion.\n\nMany header fields use a format including (case-insensitively) named parameters (for instance, Content-Type, defined in Section 3.1.1.5). Allowing both unquoted (token) and quoted (quoted-string) syntax for the parameter value enables recipients to use existing parser components. When allowing both forms, the meaning of a parameter value ought to be independent of the syntax used for it (for an example, see the notes on parameter handling for media types in Section 3.1.1.1).\n\nAuthors of specifications defining new header fields are advised to consider documenting:\n\n- Whether the field is a single value or whether it can be a list (delimited by commas; see [Section 3.2](rfc7230.html#header.fields) of [RFC7230]). If it does not use the list syntax, document how to treat messages where the field occurs multiple times (a sensible default would be to ignore the field, but this might not always be the right choice). Note that intermediaries and software libraries might combine multiple header field instances into a single one, despite the field's definition not allowing the list syntax. A robust format enables recipients to discover these situations (good example: \"Content-Type\", as the comma can only appear inside quoted strings; bad example: \"Location\", as a comma can occur inside a URI).\n- Under what conditions the header field can be used; e.g., only in responses or requests, in all messages, only on responses to a particular request method, etc.\n- Whether the field should be stored by origin servers that understand it upon a PUT request.\n- Whether the field semantics are further refined by the context, such as by existing request methods or status codes.\n- Whether it is appropriate to list the field-name in the [Connection](rfc7230.html#header.connection) header field (i.e., if the header field is to be hop-by-hop; see [Section 6.1](rfc7230.html#header.connection) of [RFC7230]).\n- Under what conditions intermediaries are allowed to insert, delete, or modify the field's value.\n- Whether it is appropriate to list the field-name in a Vary response header field (e.g., when the request header field is used by an origin server's content selection algorithm; see Section 7.1.4).\n- Whether the header field is useful or allowable in trailers (see [Section 4.1](rfc7230.html#chunked.encoding) of [RFC7230]).\n- Whether the header field ought to be preserved across redirects.\n- Whether it introduces any additional security considerations, such as disclosure of privacy-related data.\n\n#### 8.3.2. Registrations\n\nThe \"Message Headers\" registry has been updated with the following permanent registrations:\n\n| Header Field Name | Protocol | Status | Reference |\n| --- | --- | --- | --- |\n| Accept | http | standard | Section 5.3.2 |\n| Accept-Charset | http | standard | Section 5.3.3 |\n| Accept-Encoding | http | standard | Section 5.3.4 |\n| Accept-Language | http | standard | Section 5.3.5 |\n| Allow | http | standard | Section 7.4.1 |\n| Content-Encoding | http | standard | Section 3.1.2.2 |\n| Content-Language | http | standard | Section 3.1.3.2 |\n| Content-Location | http | standard | Section 3.1.4.2 |\n| Content-Type | http | standard | Section 3.1.1.5 |\n| Date | http | standard | Section 7.1.1.2 |\n| Expect | http | standard | Section 5.1.1 |\n| From | http | standard | Section 5.5.1 |\n| Location | http | standard | Section 7.1.2 |\n| Max-Forwards | http | standard | Section 5.1.2 |\n| MIME-Version | http | standard | Appendix A.1 |\n| Referer | http | standard | Section 5.5.2 |\n| Retry-After | http | standard | Section 7.1.3 |\n| Server | http | standard | Section 7.4.2 |\n| User-Agent | http | standard | Section 5.5.3 |\n| Vary | http | standard | Section 7.1.4 |\n\nThe change controller for the above registrations is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n### 8.4. Content Coding Registry\n\nThe \"HTTP Content Coding Registry\" defines the namespace for content coding names ([Section 4.2](rfc7230.html#compression.codings) of [RFC7230]). The content coding registry is maintained at <[http://www.iana.org/assignments/http-parameters](http://www.iana.org/assignments/http-parameters)>.\n\n#### 8.4.1. Procedure\n\nContent coding registrations *MUST* include the following fields:\n\n- Name\n- Description\n- Pointer to specification text\n\nNames of content codings *MUST NOT* overlap with names of transfer codings ([Section 4](rfc7230.html#transfer.codings) of [RFC7230]), unless the encoding transformation is identical (as is the case for the compression codings defined in [Section 4.2](rfc7230.html#compression.codings) of [RFC7230]).\n\nValues to be added to this namespace require IETF Review (see [Section 4.1](https://www.rfc-editor.org/rfc/rfc5226.html#section-4.1) of [RFC5226]) and *MUST* conform to the purpose of content coding defined in this section.\n\n#### 8.4.2. Registrations\n\nThe \"HTTP Content Coding Registry\" has been updated with the registrations below:\n\n| Name | Description | Reference |\n| --- | --- | --- |\n| identity | Reserved (synonym for \"no encoding\" in Accept-Encoding) | Section 5.3.4 |\n\n## 9. Security Considerations\n\nThis section is meant to inform developers, information providers, and users of known security concerns relevant to HTTP semantics and its use for transferring information over the Internet. Considerations related to message syntax, parsing, and routing are discussed in [Section 9](rfc7230.html#security.considerations) of [RFC7230].\n\nThe list of considerations below is not exhaustive. Most security concerns related to HTTP semantics are about securing server-side applications (code behind the HTTP interface), securing user agent processing of payloads received via HTTP, or secure use of the Internet in general, rather than security of the protocol. Various organizations maintain topical information and links to current research on Web application security (e.g., [OWASP]).\n\n### 9.1. Attacks Based on File and Path Names\n\nOrigin servers frequently make use of their local file system to manage the mapping from effective request URI to resource representations. Most file systems are not designed to protect against malicious file or path names. Therefore, an origin server needs to avoid accessing names that have a special significance to the system when mapping the request target to files, folders, or directories.\n\nFor 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.\n\nAttacks based on such special names tend to focus on either denial-of-service (e.g., telling the server to read from a COM port) or disclosure of configuration and source files that are not meant to be served.\n\n### 9.2. Attacks Based on Command, Code, or Query Injection\n\nOrigin servers often use parameters within the URI as a means of identifying system services, selecting database entries, or choosing a data source. However, data received in a request cannot be trusted. An attacker could construct any of the request data elements (method, request-target, header fields, or body) to contain data that might be misinterpreted as a command, code, or query when passed through a command invocation, language interpreter, or database interface.\n\nFor example, SQL injection is a common attack wherein additional query language is inserted within some part of the request-target or header fields (e.g., [Host](rfc7230.html#header.host), Referer, etc.). If the received data is used directly within a SELECT statement, the query language might be interpreted as a database command instead of a simple string value. This type of implementation vulnerability is extremely common, in spite of being easy to prevent.\n\nIn general, resource implementations ought to avoid use of request data in contexts that are processed or interpreted as instructions. Parameters ought to be compared to fixed strings and acted upon as a result of that comparison, rather than passed through an interface that is not prepared for untrusted data. Received data that isn't based on fixed parameters ought to be carefully filtered or encoded to avoid being misinterpreted.\n\nSimilar considerations apply to request data when it is stored and later processed, such as within log files, monitoring tools, or when included within a data format that allows embedded scripts.\n\n### 9.3. Disclosure of Personal Information\n\nClients are often privy to large amounts of personal information, including both information provided by the user to interact with resources (e.g., the user's name, location, mail address, passwords, encryption keys, etc.) and information about the user's browsing activity over time (e.g., history, bookmarks, etc.). Implementations need to prevent unintentional disclosure of personal information.\n\n### 9.4. Disclosure of Sensitive Information in URIs\n\nURIs are intended to be shared, not secured, even when they identify secure resources. URIs are often shown on displays, added to templates when a page is printed, and stored in a variety of unprotected bookmark lists. It is therefore unwise to include information within a URI that is sensitive, personally identifiable, or a risk to disclose.\n\nAuthors of services ought to avoid GET-based forms for the submission of sensitive data because that data will be placed in the request-target. Many existing servers, proxies, and user agents log or display the request-target in places where it might be visible to third parties. Such services ought to use POST-based form submission instead.\n\nSince 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 5.5.2 to address some of its security considerations.\n\n### 9.5. Disclosure of Fragment after Redirects\n\nAlthough fragment identifiers used within URI references are not sent in requests, implementers ought to be aware that they will be visible to the user agent and any extensions or scripts running as a result of the response. In particular, when a redirect occurs and the original request's fragment identifier is inherited by the new reference in Location (Section 7.1.2), this might have the effect of disclosing one site's fragment to another site. If the first site uses personal information in fragments, it ought to ensure that redirects to other sites include a (possibly empty) fragment component in order to block that inheritance.\n\n### 9.6. Disclosure of Product Information\n\nThe User-Agent (Section 5.5.3), [Via](rfc7230.html#header.via) ([Section 5.7.1](rfc7230.html#header.via) of [RFC7230]), and Server (Section 7.4.2) header fields often reveal information about the respective sender's software systems. In theory, this can make it easier for an attacker to exploit known security holes; in practice, attackers tend to try all potential holes regardless of the apparent software versions being used.\n\nProxies that serve as a portal through a network firewall ought to take special precautions regarding the transfer of header information that might identify hosts behind the firewall. The [Via](rfc7230.html#header.via) header field allows intermediaries to replace sensitive machine names with pseudonyms.\n\n### 9.7. Browser Fingerprinting\n\nBrowser fingerprinting is a set of techniques for identifying a specific user agent over time through its unique set of characteristics. These characteristics might include information related to its TCP behavior, feature capabilities, and scripting environment, though of particular interest here is the set of unique characteristics that might be communicated via HTTP. Fingerprinting is considered a privacy concern because it enables tracking of a user agent's behavior over time without the corresponding controls that the user might have over other forms of data collection (e.g., cookies). Many general-purpose user agents (i.e., Web browsers) have taken steps to reduce their fingerprints.\n\nThere are a number of request header fields that might reveal information to servers that is sufficiently unique to enable fingerprinting. The From header field is the most obvious, though it is expected that From will only be sent when self-identification is desired by the user. Likewise, Cookie header fields are deliberately designed to enable re-identification, so fingerprinting concerns only apply to situations where cookies are disabled or restricted by the user agent's configuration.\n\nThe User-Agent header field might contain enough information to uniquely identify a specific device, usually when combined with other characteristics, particularly if the user agent sends excessive details about the user's system or extensions. However, the source of unique information that is least expected by users is proactive negotiation (Section 5.3), including the Accept, Accept-Charset, Accept-Encoding, and Accept-Language header fields.\n\nIn addition to the fingerprinting concern, detailed use of the Accept-Language header field can reveal information the user might consider to be of a private nature. For example, understanding a given language set might be strongly correlated to membership in a particular ethnic group. An approach that limits such loss of privacy would be for a user agent to omit the sending of Accept-Language except for sites that have been whitelisted, perhaps via interaction after detecting a Vary header field that indicates language negotiation might be useful.\n\nIn environments where proxies are used to enhance privacy, user agents ought to be conservative in sending proactive negotiation header fields. General-purpose user agents that provide a high degree of header field configurability ought to inform users about the loss of privacy that might result if too much detail is provided. As an extreme privacy measure, proxies could filter the proactive negotiation header fields in relayed requests.\n\n## 10. Acknowledgments\n\nSee [Section 10](rfc7230.html#acks) of [RFC7230].\n\n## 11. References\n\n### 11.1. Normative References\n\n[RFC2045]\n\nFreed, N. and N. Borenstein, “[Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies](https://www.rfc-editor.org/rfc/rfc2045.html)”, RFC 2045, November 1996.\n\n[RFC2046]\n\nFreed, N. and N. Borenstein, “[Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types](https://www.rfc-editor.org/rfc/rfc2046.html)”, RFC 2046, November 1996.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC3986]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, January 2005.\n\n[RFC4647]\n\nPhillips, A., Ed. and M. Davis, Ed., “[Matching of Language Tags](https://www.rfc-editor.org/rfc/rfc4647.html)”, [BCP 47](https://www.rfc-editor.org/info/bcp47), RFC 4647, September 2006.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, January 2008.\n\n[RFC5646]\n\nPhillips, A., Ed. and M. Davis, Ed., “[Tags for Identifying Languages](https://www.rfc-editor.org/rfc/rfc5646.html)”, [BCP 47](https://www.rfc-editor.org/info/bcp47), RFC 5646, September 2009.\n\n[RFC6365]\n\nHoffman, P. and J. Klensin, “[Terminology Used in Internationalization in the IETF](https://www.rfc-editor.org/rfc/rfc6365.html)”, [BCP 166](https://www.rfc-editor.org/info/bcp166), RFC 6365, September 2011.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, June 2014.\n\n[RFC7232]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests](https://www.rfc-editor.org/rfc/rfc7232.html)”, RFC 7232, June 2014.\n\n[RFC7233]\n\nFielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Range Requests](https://www.rfc-editor.org/rfc/rfc7233.html)”, RFC 7233, June 2014.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, June 2014.\n\n[RFC7235]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Authentication](https://www.rfc-editor.org/rfc/rfc7235.html)”, RFC 7235, June 2014.\n\n### 11.2. Informative References\n\n[BCP13]\n\nFreed, N., Klensin, J., and T. Hansen, “[Media Type Specifications and Registration Procedures](https://www.rfc-editor.org/rfc/rfc6838.html)”, [BCP 13](https://www.rfc-editor.org/info/bcp13), RFC 6838, January 2013.\n\n[BCP178]\n\nSaint-Andre, P., Crocker, D., and M. Nottingham, “[Deprecating the \"X-\" Prefix and Similar Constructs in Application Protocols](https://www.rfc-editor.org/rfc/rfc6648.html)”, [BCP 178](https://www.rfc-editor.org/info/bcp178), RFC 6648, June 2012.\n\n[BCP90]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004.\n\n[OWASP]\n\nvan der Stock, A., Ed., “[A Guide to Building Secure Web Applications and Web Services](https://www.owasp.org/)”, The Open Web Application Security Project (OWASP) 2.0.1, July 2005, <[https://www.owasp.org/](https://www.owasp.org/)>.\n\n[REST]\n\nFielding, R., “[Architectural Styles and the Design of Network-based Software Architectures](http://roy.gbiv.com/pubs/dissertation/top.htm)”, Doctoral Dissertation, University of California, Irvine, September 2000, <[http://roy.gbiv.com/pubs/dissertation/top.htm](http://roy.gbiv.com/pubs/dissertation/top.htm)>.\n\n[RFC1945]\n\nBerners-Lee, T., Fielding, R., and H. Nielsen, “[Hypertext Transfer Protocol -- HTTP/1.0](https://www.rfc-editor.org/rfc/rfc1945.html)”, RFC 1945, May 1996.\n\n[RFC2049]\n\nFreed, N. and N. Borenstein, “[Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples](https://www.rfc-editor.org/rfc/rfc2049.html)”, RFC 2049, November 1996.\n\n[RFC2068]\n\nFielding, R., Gettys, J., Mogul, J., Nielsen, H., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2068.html)”, RFC 2068, January 1997.\n\n[RFC2295]\n\nHoltman, K. and A. Mutz, “[Transparent Content Negotiation in HTTP](https://www.rfc-editor.org/rfc/rfc2295.html)”, RFC 2295, March 1998.\n\n[RFC2388]\n\nMasinter, L., “[Returning Values from Forms: multipart/form-data](https://www.rfc-editor.org/rfc/rfc2388.html)”, RFC 2388, August 1998.\n\n[RFC2557]\n\nPalme, F., Hopmann, A., Shelness, N., and E. Stefferud, “[MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)](https://www.rfc-editor.org/rfc/rfc2557.html)”, RFC 2557, March 1999.\n\n[RFC2616]\n\nFielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n[RFC2774]\n\nFrystyk, H., Leach, P., and S. Lawrence, “[An HTTP Extension Framework](https://www.rfc-editor.org/rfc/rfc2774.html)”, RFC 2774, February 2000.\n\n[RFC2817]\n\nKhare, R. and S. Lawrence, “[Upgrading to TLS Within HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2817.html)”, RFC 2817, May 2000.\n\n[RFC2978]\n\nFreed, N. and J. Postel, “[IANA Charset Registration Procedures](https://www.rfc-editor.org/rfc/rfc2978.html)”, [BCP 19](https://www.rfc-editor.org/info/bcp19), RFC 2978, October 2000.\n\n[RFC5226]\n\nNarten, T. and H. Alvestrand, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc5226.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 5226, May 2008.\n\n[RFC5246]\n\nDierks, T. and E. Rescorla, “[The Transport Layer Security (TLS) Protocol Version 1.2](https://www.rfc-editor.org/rfc/rfc5246.html)”, RFC 5246, August 2008.\n\n[RFC5322]\n\nResnick, P., “[Internet Message Format](https://www.rfc-editor.org/rfc/rfc5322.html)”, RFC 5322, October 2008.\n\n[RFC5789]\n\nDusseault, L. and J. Snell, “[PATCH Method for HTTP](https://www.rfc-editor.org/rfc/rfc5789.html)”, RFC 5789, March 2010.\n\n[RFC5905]\n\nMills, D., Martin, J., Ed., Burbank, J., and W. Kasch, “[Network Time Protocol Version 4: Protocol and Algorithms Specification](https://www.rfc-editor.org/rfc/rfc5905.html)”, RFC 5905, June 2010.\n\n[RFC5987]\n\nReschke, J., “[Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters](https://www.rfc-editor.org/rfc/rfc5987.html)”, RFC 5987, August 2010.\n\n[RFC5988]\n\nNottingham, M., “[Web Linking](https://www.rfc-editor.org/rfc/rfc5988.html)”, RFC 5988, October 2010.\n\n[RFC6265]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, April 2011.\n\n[RFC6266]\n\nReschke, J., “[Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)](https://www.rfc-editor.org/rfc/rfc6266.html)”, RFC 6266, June 2011.\n\n[RFC7238]\n\nReschke, J., “[The Hypertext Transfer Protocol (HTTP) Status Code 308 (Permanent Redirect)](https://www.rfc-editor.org/rfc/rfc7238.html)”, RFC 7238, June 2014.\n\n## Appendix A. Differences between HTTP and MIME\n\nHTTP/1.1 uses many of the constructs defined for the Internet Message Format [RFC5322] and the Multipurpose Internet Mail Extensions (MIME) [RFC2045] to allow a message body to be transmitted in an open variety of representations and with extensible header fields. However, RFC 2045 is focused only on email; applications of HTTP have many characteristics that differ from email; hence, HTTP has features that differ from MIME. These differences were carefully chosen to optimize performance over binary connections, to allow greater freedom in the use of new media types, to make date comparisons easier, and to acknowledge the practice of some early HTTP servers and clients.\n\nThis appendix describes specific areas where HTTP differs from MIME. Proxies and gateways to and from strict MIME environments need to be aware of these differences and provide the appropriate conversions where necessary.\n\n### A.1. MIME-Version\n\nHTTP is not a MIME-compliant protocol. However, messages can include a single MIME-Version header field to indicate what version of the MIME protocol was used to construct the message. Use of the MIME-Version header field indicates that the message is in full conformance with the MIME protocol (as defined in [RFC2045]). Senders are responsible for ensuring full conformance (where possible) when exporting HTTP messages to strict MIME environments.\n\n### A.2. Conversion to Canonical Form\n\nMIME requires that an Internet mail body part be converted to canonical form prior to being transferred, as described in [Section 4](https://www.rfc-editor.org/rfc/rfc2049.html#section-4) of [RFC2049]. Section 3.1.1.3 of this document describes the forms allowed for subtypes of the \"text\" media type when transmitted over HTTP. [RFC2046] requires that content with a type of \"text\" represent line breaks as CRLF and forbids the use of CR or LF outside of line break sequences. HTTP allows CRLF, bare CR, and bare LF to indicate a line break within text content.\n\nA proxy or gateway from HTTP to a strict MIME environment ought to translate all line breaks within the text media types described in Section 3.1.1.3 of this document to the RFC 2049 canonical form of CRLF. Note, however, this might be complicated by the presence of a Content-Encoding and by the fact that HTTP allows the use of some charsets that do not use octets 13 and 10 to represent CR and LF, respectively.\n\nConversion will break any cryptographic checksums applied to the original content unless the original content is already in canonical form. Therefore, the canonical form is recommended for any content that uses such checksums in HTTP.\n\n### A.3. Conversion of Date Formats\n\nHTTP/1.1 uses a restricted set of date formats (Section 7.1.1.1) to simplify the process of date comparison. Proxies and gateways from other protocols ought to ensure that any Date header field present in a message conforms to one of the HTTP/1.1 formats and rewrite the date if necessary.\n\n### A.4. Conversion of Content-Encoding\n\nMIME does not include any concept equivalent to HTTP/1.1's Content-Encoding header field. Since this acts as a modifier on the media type, proxies and gateways from HTTP to MIME-compliant protocols ought to either change the value of the Content-Type header field or decode the representation before forwarding the message. (Some experimental applications of Content-Type for Internet mail have used a media-type parameter of \";conversions=\" to perform a function equivalent to Content-Encoding. However, this parameter is not part of the MIME standards).\n\n### A.5. Conversion of Content-Transfer-Encoding\n\nHTTP does not use the Content-Transfer-Encoding field of MIME. Proxies and gateways from MIME-compliant protocols to HTTP need to remove any Content-Transfer-Encoding prior to delivering the response message to an HTTP client.\n\nProxies and gateways from HTTP to MIME-compliant protocols are responsible for ensuring that the message is in the correct format and encoding for safe transport on that protocol, where \"safe transport\" is defined by the limitations of the protocol being used. Such a proxy or gateway ought to transform and label the data with an appropriate Content-Transfer-Encoding if doing so will improve the likelihood of safe transport over the destination protocol.\n\n### A.6. MHTML and Line Length Limitations\n\nHTTP implementations that share code with MHTML [RFC2557] implementations need to be aware of MIME line length limitations. Since HTTP does not have this limitation, HTTP does not fold long lines. MHTML messages being transported by HTTP follow all conventions of MHTML, including line length limitations and folding, canonicalization, etc., since HTTP transfers message-bodies as payload and, aside from the \"multipart/byteranges\" type ([Appendix A](rfc7233.html#internet.media.type.multipart.byteranges) of [RFC7233]), does not interpret the content or any MIME header lines that might be contained therein.\n\n## Appendix B. Changes from RFC 2616\n\nThe primary changes in this revision have been editorial in nature: extracting the messaging syntax and partitioning HTTP semantics into separate documents for the core features, conditional requests, partial requests, caching, and authentication. The conformance language has been revised to clearly target requirements and the terminology has been improved to distinguish payload from representations and representations from resources.\n\nA new requirement has been added that semantics embedded in a URI be disabled when those semantics are inconsistent with the request method, since this is a common cause of interoperability failure. (Section 2)\n\nAn algorithm has been added for determining if a payload is associated with a specific identifier. (Section 3.1.4.1)\n\nThe default charset of ISO-8859-1 for text media types has been removed; the default is now whatever the media type definition says. Likewise, special treatment of ISO-8859-1 has been removed from the Accept-Charset header field. (Section 3.1.1.3 and Section 5.3.3)\n\nThe definition of Content-Location has been changed to no longer affect the base URI for resolving relative URI references, due to poor implementation support and the undesirable effect of potentially breaking relative links in content-negotiated resources. (Section 3.1.4.2)\n\nTo be consistent with the method-neutral parsing algorithm of [RFC7230], the definition of GET has been relaxed so that requests can have a body, even though a body has no meaning for GET. (Section 4.3.1)\n\nServers are no longer required to handle all Content-* header fields and use of [Content-Range](rfc7233.html#header.content-range) has been explicitly banned in PUT requests. (Section 4.3.4)\n\nDefinition of the CONNECT method has been moved from [RFC2817] to this specification. (Section 4.3.6)\n\nThe OPTIONS and TRACE request methods have been defined as being safe. (Section 4.3.7 and Section 4.3.8)\n\nThe Expect header field's extension mechanism has been removed due to widely-deployed broken implementations. (Section 5.1.1)\n\nThe Max-Forwards header field has been restricted to the OPTIONS and TRACE methods; previously, extension methods could have used it as well. (Section 5.1.2)\n\nThe \"about:blank\" URI has been suggested as a value for the Referer header field when no referring URI is applicable, which distinguishes that case from others where the Referer field is not sent or has been removed. (Section 5.5.2)\n\nThe following status codes are now cacheable (that is, they can be stored and reused by a cache without explicit freshness information present): 204, 404, 405, 414, 501. (Section 6)\n\nThe 201 (Created) status description has been changed to allow for the possibility that more than one resource has been created. (Section 6.3.2)\n\nThe definition of 203 (Non-Authoritative Information) has been broadened to include cases of payload transformations as well. (Section 6.3.4)\n\nThe set of request methods that are safe to automatically redirect is no longer closed; user agents are able to make that determination based upon the request method semantics. The redirect status codes 301, 302, and 307 no longer have normative requirements on response payloads and user interaction. (Section 6.4)\n\nThe status codes 301 and 302 have been changed to allow user agents to rewrite the method from POST to GET. (Sections 6.4.2 and 6.4.3)\n\nThe description of the 303 (See Other) status code has been changed to allow it to be cached if explicit freshness information is given, and a specific definition has been added for a 303 response to GET. (Section 6.4.4)\n\nThe 305 (Use Proxy) status code has been deprecated due to security concerns regarding in-band configuration of a proxy. (Section 6.4.5)\n\nThe 400 (Bad Request) status code has been relaxed so that it isn't limited to syntax errors. (Section 6.5.1)\n\nThe 426 (Upgrade Required) status code has been incorporated from [RFC2817]. (Section 6.5.15)\n\nThe target of requirements on HTTP-date and the Date header field have been reduced to those systems generating the date, rather than all systems sending a date. (Section 7.1.1)\n\nThe syntax of the Location header field has been changed to allow all URI references, including relative references and fragments, along with some clarifications as to when use of fragments would not be appropriate. (Section 7.1.2)\n\nAllow has been reclassified as a response header field, removing the option to specify it in a PUT request. Requirements relating to the content of Allow have been relaxed; correspondingly, clients are not required to always trust its value. (Section 7.4.1)\n\nA Method Registry has been defined. (Section 8.1)\n\nThe Status Code Registry has been redefined by this specification; previously, it was defined in [Section 7.1](https://www.rfc-editor.org/rfc/rfc2817.html#section-7.1) of [RFC2817]. (Section 8.2)\n\nRegistration of content codings has been changed to require IETF Review. (Section 8.4)\n\nThe Content-Disposition header field has been removed since it is now defined by [RFC6266].\n\nThe Content-MD5 header field has been removed because it was inconsistently implemented with respect to partial responses.\n\n## Appendix C. Imported ABNF\n\nThe following core rules are included by reference, as defined in [Appendix B.1](https://www.rfc-editor.org/rfc/rfc5234.html#appendix-B.1) of [RFC5234]: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII character).\n\nThe rules below are defined in [RFC7230]:\n\n```\n BWS = \n OWS = \n RWS = \n URI-reference = \n absolute-URI = \n comment = \n field-name = \n partial-URI = \n quoted-string = \n token = \n```\n\n## Appendix D. Collected ABNF\n\nIn the collected ABNF below, list rules are expanded as per [Section 1.2](rfc7230.html#notation) of [RFC7230].\n\n```\nAccept = [ ( \",\" / ( media-range [ accept-params ] ) ) *( OWS \",\" [\n OWS ( media-range [ accept-params ] ) ] ) ]\nAccept-Charset = *( \",\" OWS ) ( ( charset / \"*\" ) [ weight ] ) *( OWS\n \",\" [ OWS ( ( charset / \"*\" ) [ weight ] ) ] )\nAccept-Encoding = [ ( \",\" / ( codings [ weight ] ) ) *( OWS \",\" [ OWS\n ( codings [ weight ] ) ] ) ]\nAccept-Language = *( \",\" OWS ) ( language-range [ weight ] ) *( OWS\n \",\" [ OWS ( language-range [ weight ] ) ] )\nAllow = [ ( \",\" / method ) *( OWS \",\" [ OWS method ] ) ]\n\nBWS = \n\nContent-Encoding = *( \",\" OWS ) content-coding *( OWS \",\" [ OWS\n content-coding ] )\nContent-Language = *( \",\" OWS ) language-tag *( OWS \",\" [ OWS\n language-tag ] )\nContent-Location = absolute-URI / partial-URI\nContent-Type = media-type\n\nDate = HTTP-date\n\nExpect = \"100-continue\"\n\nFrom = mailbox\n\nGMT = %x47.4D.54 ; GMT\n\nHTTP-date = IMF-fixdate / obs-date\n\nIMF-fixdate = day-name \",\" SP date1 SP time-of-day SP GMT\n\nLocation = URI-reference\n\nMax-Forwards = 1*DIGIT\n\nOWS = \n\nRWS = \nReferer = absolute-URI / partial-URI\nRetry-After = HTTP-date / delay-seconds\n\nServer = product *( RWS ( product / comment ) )\n\nURI-reference = \nUser-Agent = product *( RWS ( product / comment ) )\n\nVary = \"*\" / ( *( \",\" OWS ) field-name *( OWS \",\" [ OWS field-name ]\n ) )\n\nabsolute-URI = \naccept-ext = OWS \";\" OWS token [ \"=\" ( token / quoted-string ) ]\naccept-params = weight *accept-ext\nasctime-date = day-name SP date3 SP time-of-day SP year\n\ncharset = token\ncodings = content-coding / \"identity\" / \"*\"\ncomment = \ncontent-coding = token\n\ndate1 = day SP month SP year\ndate2 = day \"-\" month \"-\" 2DIGIT\ndate3 = month SP ( 2DIGIT / ( SP DIGIT ) )\nday = 2DIGIT\nday-name = %x4D.6F.6E ; Mon\n / %x54.75.65 ; Tue\n / %x57.65.64 ; Wed\n / %x54.68.75 ; Thu\n / %x46.72.69 ; Fri\n / %x53.61.74 ; Sat\n / %x53.75.6E ; Sun\nday-name-l = %x4D.6F.6E.64.61.79 ; Monday\n / %x54.75.65.73.64.61.79 ; Tuesday\n / %x57.65.64.6E.65.73.64.61.79 ; Wednesday\n / %x54.68.75.72.73.64.61.79 ; Thursday\n / %x46.72.69.64.61.79 ; Friday\n / %x53.61.74.75.72.64.61.79 ; Saturday\n / %x53.75.6E.64.61.79 ; Sunday\ndelay-seconds = 1*DIGIT\n\nfield-name = \n\nhour = 2DIGIT\n\nlanguage-range = \nlanguage-tag = \n\nmailbox = \nmedia-range = ( \"*/*\" / ( type \"/*\" ) / ( type \"/\" subtype ) ) *( OWS\n \";\" OWS parameter )\nmedia-type = type \"/\" subtype *( OWS \";\" OWS parameter )\nmethod = token\nminute = 2DIGIT\nmonth = %x4A.61.6E ; Jan\n / %x46.65.62 ; Feb\n / %x4D.61.72 ; Mar\n / %x41.70.72 ; Apr\n / %x4D.61.79 ; May\n / %x4A.75.6E ; Jun\n / %x4A.75.6C ; Jul\n / %x41.75.67 ; Aug\n / %x53.65.70 ; Sep\n / %x4F.63.74 ; Oct\n / %x4E.6F.76 ; Nov\n / %x44.65.63 ; Dec\n\nobs-date = rfc850-date / asctime-date\n\nparameter = token \"=\" ( token / quoted-string )\npartial-URI = \nproduct = token [ \"/\" product-version ]\nproduct-version = token\n\nquoted-string = \nqvalue = ( \"0\" [ \".\" *3DIGIT ] ) / ( \"1\" [ \".\" *3\"0\" ] )\n\nrfc850-date = day-name-l \",\" SP date2 SP time-of-day SP GMT\n\nsecond = 2DIGIT\nsubtype = token\n\ntime-of-day = hour \":\" minute \":\" second\ntoken = \ntype = token\n\nweight = OWS \";\" OWS \"q=\" qvalue\n\nyear = 4DIGIT\n```\n\n## Index\n\n1 2 3 4 5 A B C D E F G H I L M O P R S T U V X\n\n- **1**\n - 100 Continue (status code) 6.1 , **6.2.1** , 8.2.3\n - 100-continue (expect value) **5.1.1**\n - 101 Switching Protocols (status code) 6.1 , **6.2.2** , 8.2.3\n - 1xx Informational (status code class) **6.2**\n- **2**\n - 200 OK (status code) 6.1 , **6.3.1** , 8.2.3\n - 201 Created (status code) 6.1 , **6.3.2** , 8.2.3 , B\n - 202 Accepted (status code) 6.1 , **6.3.3** , 8.2.3\n - 203 Non-Authoritative Information (status code) 6.1 , **6.3.4** , 8.2.3 , B\n - 204 No Content (status code) 6.1 , **6.3.5** , 8.2.3\n - 205 Reset Content (status code) 6.1 , **6.3.6** , 8.2.3\n - 2xx Successful (status code class) **6.3**\n- **3**\n - 300 Multiple Choices (status code) 6.1 , **6.4.1** , 6.5.6 , 8.2.3\n - 301 Moved Permanently (status code) 6.1 , **6.4.2** , 8.2.3 , B\n - 302 Found (status code) 6.1 , **6.4.3** , 8.2.3 , B\n - 303 See Other (status code) 6.1 , **6.4.4** , 8.2.3 , B\n - 305 Use Proxy (status code) 6.1 , **6.4.5** , 8.2.3 , B\n - 306 (Unused) (status code) **6.4.6** , 8.2.3\n - 307 Temporary Redirect (status code) 6.1 , **6.4.7** , 8.2.3\n - 3xx Redirection (status code class) **6.4** , B\n- **4**\n - 400 Bad Request (status code) 6.1 , **6.5.1** , 8.2.3 , B\n - 402 Payment Required (status code) 6.1 , **6.5.2** , 8.2.3\n - 403 Forbidden (status code) 6.1 , **6.5.3** , 8.2.3\n - 404 Not Found (status code) 6.1 , **6.5.4** , 8.2.3\n - 405 Method Not Allowed (status code) 6.1 , **6.5.5** , 8.2.3\n - 406 Not Acceptable (status code) 6.1 , **6.5.6** , 8.2.3\n - 408 Request Timeout (status code) 6.1 , **6.5.7** , 8.2.3\n - 409 Conflict (status code) 6.1 , **6.5.8** , 8.2.3\n - 410 Gone (status code) 6.1 , **6.5.9** , 8.2.3\n - 411 Length Required (status code) 6.1 , **6.5.10** , 8.2.3\n - 413 Payload Too Large (status code) 6.1 , **6.5.11** , 8.2.3\n - 414 URI Too Long (status code) 6.1 , **6.5.12** , 8.2.3\n - 415 Unsupported Media Type (status code) 6.1 , **6.5.13** , 8.2.3\n - 417 Expectation Failed (status code) 6.1 , **6.5.14** , 8.2.3\n - 426 Upgrade Required (status code) 6.1 , **6.5.15** , 8.2.3 , B\n - 4xx Client Error (status code class) **6.5**\n- **5**\n - 500 Internal Server Error (status code) 6.1 , **6.6.1** , 8.2.3\n - 501 Not Implemented (status code) 6.1 , **6.6.2** , 8.2.3\n - 502 Bad Gateway (status code) 6.1 , **6.6.3** , 8.2.3\n - 503 Service Unavailable (status code) 6.1 , **6.6.4** , 8.2.3\n - 504 Gateway Timeout (status code) 6.1 , **6.6.5** , 8.2.3\n - 505 HTTP Version Not Supported (status code) 6.1 , **6.6.6** , 8.2.3\n - 5xx Server Error (status code class) **6.6**\n- **A**\n - Accept header field 3.1.1.1 , 5.3 , **5.3.2** , 8.3.2\n - Accept-Charset header field 5.3 , **5.3.3** , 8.3.2 , B\n - Accept-Encoding header field 3.1.2.1 , 5.3 , **5.3.4** , 8.3.2 , 8.4.2\n - Accept-Language header field 3.1.3.1 , 5.3 , **5.3.5** , 8.3.2\n - Allow header field 4.1 , 7.4 , **7.4.1** , 8.3.2 , B\n- **B**\n - *BCP13* 3.1.1.1 , **11.2**\n - *BCP178* 8.3.1 , **11.2**\n - *BCP90* 8.3 , 8.3.1 , **11.2**\n- **C**\n - cacheable **4.2.3**\n - compress (content coding) **3.1.2.1**\n - conditional request **5.2**\n - CONNECT method 4.1 , **4.3.6** , 8.1.3 , B\n - content coding **3.1.2.1**\n - content negotiation 1\n - Content-Encoding header field 3.1 , 3.1.2.1 , **3.1.2.2** , 8.3.2\n - Content-Language header field 3.1 , **3.1.3.2** , 8.3.2\n - Content-Location header field 3.1 , **3.1.4.2** , 4.3.3 , 7.1.2 , 8.3.2 , B\n - Content-Transfer-Encoding header field A.5\n - Content-Type header field 3.1 , 3.1.1.1 , **3.1.1.5** , 8.3.1 , 8.3.2\n- **D**\n - Date header field 3.3 , 7.1 , **7.1.1.2** , 8.3.2\n - deflate (content coding) **3.1.2.1**\n - DELETE method 4.1 , **4.3.5** , 8.1.3\n- **E**\n - Expect header field 5.1 , **5.1.1** , 6.2.1 , 6.5.14 , 8.3.2 , B\n- **F**\n - From header field 5.5 , **5.5.1** , 8.3.2\n- **G**\n - GET method 3 , 3.1.4.2 , 3.3 , 4.1 , **4.3.1** , 8.1.3 , B\n - Grammar\n - Accept **5.3.2**\n - Accept-Charset **5.3.3**\n - Accept-Encoding **5.3.4**\n - accept-ext **5.3.2**\n - Accept-Language **5.3.5**\n - accept-params **5.3.2**\n - Allow **7.4.1**\n - asctime-date **7.1.1.1**\n - charset **3.1.1.2**\n - codings **5.3.4**\n - content-coding **3.1.2.1**\n - Content-Encoding **3.1.2.2**\n - Content-Language **3.1.3.2**\n - Content-Location **3.1.4.2**\n - Content-Type **3.1.1.5**\n - Date **7.1.1.2**\n - date1 **7.1.1.1**\n - day **7.1.1.1**\n - day-name **7.1.1.1**\n - day-name-l **7.1.1.1**\n - delay-seconds **7.1.3**\n - Expect **5.1.1**\n - From **5.5.1**\n - GMT **7.1.1.1**\n - hour **7.1.1.1**\n - HTTP-date **7.1.1.1**\n - IMF-fixdate **7.1.1.1**\n - language-range **5.3.5**\n - language-tag **3.1.3.1**\n - Location **7.1.2**\n - Max-Forwards **5.1.2**\n - media-range **5.3.2**\n - media-type **3.1.1.1**\n - method **4.1**\n - minute **7.1.1.1**\n - month **7.1.1.1**\n - obs-date **7.1.1.1**\n - parameter **3.1.1.1**\n - product **5.5.3**\n - product-version **5.5.3**\n - qvalue **5.3.1**\n - Referer **5.5.2**\n - Retry-After **7.1.3**\n - rfc850-date **7.1.1.1**\n - second **7.1.1.1**\n - Server **7.4.2**\n - subtype **3.1.1.1**\n - time-of-day **7.1.1.1**\n - type **3.1.1.1**\n - User-Agent **5.5.3**\n - Vary **7.1.4**\n - weight **5.3.1**\n - year **7.1.1.1**\n - gzip (content coding) **3.1.2.1**\n- **H**\n - HEAD method 3.1.4.2 , 4.1 , **4.3.2** , 8.1.3\n- **I**\n - idempotent **4.2.2**\n- **L**\n - Location header field 4.3.3 , 6.4 , 7.1 , **7.1.2** , 8.3.2 , 9.5 , B\n- **M**\n - Max-Forwards header field 4.3.7 , 4.3.8 , 5.1 , **5.1.2** , 8.3.2 , B\n - MIME-Version header field 8.3.2 , **A.1**\n- **O**\n - OPTIONS method 4.1 , **4.3.7** , 5.1.2 , 8.1.3 , B , B , B\n - *OWASP* 9 , **11.2**\n- **P**\n - payload 3.3\n - POST method 3.1.4.2 , 3.3 , 4.1 , **4.3.3** , 8.1.3\n - PUT method 3.1.4.2 , 3.3 , 4.1 , **4.3.4** , 8.1.3 , B\n- **R**\n - Referer header field 5.5 , **5.5.2** , 8.3.2 , 9.4 , B\n - representation **3**\n - *REST* 3 , 4.1 , **11.2**\n - Retry-After header field 6.6.4 , 7.1 , **7.1.3** , 8.3.2\n - *RFC1945* 6.4 , **11.2**\n - *Section 9.3* 6.4\n - *RFC2045* 3.1.1.3 , **11.1** , A , A.1\n - *RFC2046* 3.1.1.1 , 3.1.1.4 , 3.1.1.5 , **11.1** , A.2\n - *Section 4.5.1* 3.1.1.5\n - *Section 5.1.1* 3.1.1.4\n - *RFC2049* **11.2** , A.2\n - *Section 4* A.2\n - *RFC2068* 5.1.1 , 6.4 , **11.2**\n - *Section 10.3* 6.4\n - *RFC2119* 1.1 , **11.1**\n - *RFC2295* 3.4 , **11.2**\n - *RFC2388* 3.1.1.4 , **11.2**\n - *RFC2557* 3.1.4.2 , **11.2** , A.6\n - *Section 4* 3.1.4.2\n - *RFC2616* 5.3.5 , **11.2**\n - *Section 14.4* 5.3.5\n - *RFC2774* 8.1.2 , **11.2**\n - *RFC2817* 8.2 , **11.2** , B , B , B\n - *Section 7.1* 8.2 , B\n - *RFC2978* 3.1.1.2 , **11.2**\n - *RFC3986* 5.5.2 , 7.1.2 , 7.1.2 , **11.1**\n - *Section 4.2* 7.1.2\n - *Section 5* 7.1.2\n - *RFC4647* 5.3.5 , 5.3.5 , 5.3.5 , 5.3.5 , **11.1**\n - *Section 2.1* 5.3.5\n - *Section 2.3* 5.3.5\n - *Section 3* 5.3.5\n - *Section 3.3.1* 5.3.5\n - *RFC5226* 8.1.1 , 8.2.1 , 8.4.1 , **11.2**\n - *Section 4.1* 8.1.1 , 8.2.1 , 8.4.1\n - *RFC5234* 1.2 , 8.3.1 , **11.1** , C\n - *Appendix B.1* C\n - *RFC5246* 4.3.6 , **11.2**\n - *RFC5322* 5.5.1 , 5.5.1 , 7.1.1.1 , 7.1.1.1 , 7.1.1.1 , 7.1.1.2 , **11.2** , A\n - *Section 3.3* 7.1.1.1 , 7.1.1.1\n - *Section 3.4* 5.5.1 , 5.5.1\n - *Section 3.6.1* 7.1.1.2\n - *RFC5646* 3.1.3.1 , 3.1.3.1 , 3.1.3.1 , **11.1**\n - *Section 2.1* 3.1.3.1\n - *RFC5789* 4.3.4 , **11.2**\n - *RFC5905* 7.1.1.1 , **11.2**\n - *RFC5987* 8.3.1 , **11.2**\n - *RFC5988* 6.4.1 , **11.2**\n - *RFC6265* 4.3.8 , 5.4 , **11.2**\n - *RFC6266* **11.2** , B\n - *RFC6365* 1.2 , 3.1.1.2 , **11.1**\n - *RFC7230* 1 , 1.1 , 1.2 , 2 , 2 , 2 , 3.1.2.1 , 3.1.2.1 , 3.1.2.1 , 3.1.2.2 , 3.1.4.1 , 3.1.4.2 , 3.3 , 3.3 , 3.3 , 4.3.6 , 4.3.7 , 4.3.8 , 4.3.8 , 5.1 , 5.1 , 5.1.1 , 5.5.3 , 6.2.2 , 6.3.4 , 6.5.7 , 6.5.10 , 6.5.12 , 6.5.15 , 6.6.6 , 7.4.2 , 8.1.2 , 8.3.1 , 8.3.1 , 8.3.1 , 8.3.1 , 8.3.1 , 8.3.1 , 8.3.1 , 8.4 , 8.4.1 , 8.4.1 , 9 , 9.6 , 10 , **11.1** , B , C , C , C , C , C , C , C , C , C , C , C , D\n - *Section 1.2* D\n - *Section 2.5* 1.1\n - *Section 2.6* 6.6.6\n - *Section 2.7* 2 , C , C , C\n - *Section 3.2* 5.5.3 , 7.4.2 , 8.3.1 , 8.3.1 , C\n - *Section 3.2.3* C , C , C\n - *Section 3.2.4* 8.3.1\n - *Section 3.2.6* 8.3.1 , C , C , C\n - *Section 3.3.1* 3.1.2.2 , 3.3\n - *Section 3.3* 8.1.2\n - *Section 3.3.2* 3.3 , 6.5.10\n - *Section 4* 8.4.1\n - *Section 4.1* 8.3.1\n - *Section 4.2.1* 3.1.2.1\n - *Section 4.2* 8.4 , 8.4.1\n - *Section 4.2.2* 3.1.2.1\n - *Section 4.2.3* 3.1.2.1\n - *Section 4.3* 5.1\n - *Section 4.4* 3.3\n - *Section 5.3* 2 , 4.3.6 , 4.3.7 , 6.5.12\n - *Section 5.4* 5.1\n - *Section 5.5* 2 , 3.1.4.1 , 3.1.4.2\n - *Section 5.7.1* 4.3.8 , 9.6\n - *Section 5.7.2* 6.3.4\n - *Section 6.1* 6.5.7 , 8.3.1\n - *Section 6.6* 5.1.1\n - *Section 6.7* 6.2.2 , 6.5.15\n - *Section 7* 1.2 , 8.3.1\n - *Section 8.3.1* 4.3.8\n - *Section 9* 9\n - *Section 10* 10\n - *RFC7232* 3 , 4.1 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 6.1 , 6.1 , 6.1 , 7.2 , 7.2 , 7.2 , **11.1**\n - *Section 2.2* 7.2\n - *Section 2.3* 7.2\n - *Section 3.1* 5.2\n - *Section 3.2* 5.2\n - *Section 3.3* 5.2\n - *Section 3.4* 5.2\n - *Section 4* 6.1\n - *Section 4.1* 6.1\n - *Section 4.2* 6.1\n - *Section 5* 5.2\n - *RFC7233* 3.1.1.4 , 3.3 , 4.3.1 , 4.3.4 , 5.1 , 5.2 , 6.1 , 6.1 , 6.1 , 7.4 , 8.1.2 , **11.1** , A.6\n - *Section 2.3* 7.4\n - *Section 3.1* 5.1\n - *Section 3.2* 5.2\n - *Section 4* 6.1\n - *Section 4.1* 6.1\n - *Section 4.2* 3.3 , 4.3.4\n - *Section 4.4* 6.1\n - *Appendix A* A.6\n - *RFC7234* 4.2.3 , 4.3.1 , 4.3.2 , 4.3.2 , 4.3.3 , 4.3.4 , 4.3.5 , 5.1 , 5.1 , 6.1 , 6.3.1 , 6.3.4 , 6.3.4 , 6.3.5 , 6.4.1 , 6.4.2 , 6.5.4 , 6.5.5 , 6.5.9 , 6.5.12 , 6.6.2 , 7.1 , 7.1 , 7.1 , 7.1 , 7.1.4 , 7.1.4 , 8.2.2 , **11.1**\n - *Section 4.1* 7.1.4\n - *Section 4.2.1* 4.3.3\n - *Section 4.2.2* 6.3.1 , 6.3.4 , 6.3.5 , 6.4.1 , 6.4.2 , 6.5.4 , 6.5.5 , 6.5.9 , 6.5.12 , 6.6.2\n - *Section 4.3.5* 4.3.2\n - *Section 4.4* 4.3.4 , 4.3.5\n - *Section 5.1* 7.1\n - *Section 5.2* 4.3.1 , 4.3.2 , 5.1 , 7.1 , 7.1.4\n - *Section 5.3* 7.1\n - *Section 5.4* 5.1\n - *Section 5.5* 6.3.4 , 7.1\n - *RFC7235* 4.3.8 , 5.4 , 5.4 , 5.4 , 6.1 , 6.1 , 6.1 , 7.1.4 , 7.3 , 7.3 , **11.1**\n - *Section 3* 6.1\n - *Section 3.1* 6.1\n - *Section 3.2* 6.1\n - *Section 4.1* 7.3\n - *Section 4.2* 5.4 , 7.1.4\n - *Section 4.3* 7.3\n - *Section 4.4* 5.4\n - *RFC7238* 6.4.7 , **11.2**\n- **S**\n - safe **4.2.1**\n - selected representation **3** , 7.2\n - Server header field 7.4 , **7.4.2** , 8.3.2 , 9.6\n - Status Codes Classes\n - 1xx Informational **6.2**\n - 2xx Successful **6.3**\n - 3xx Redirection **6.4** , B\n - 4xx Client Error **6.5**\n - 5xx Server Error **6.6**\n- **T**\n - TRACE method 4.1 , **4.3.8** , 5.1.2 , 8.1.3 , B , B , B\n- **U**\n - User-Agent header field 5.5 , **5.5.3** , 7.4.2 , 8.3.2 , 9.6\n- **V**\n - Vary header field 3.4.1 , 7.1 , **7.1.4** , 8.3.1 , 8.3.2\n- **X**\n - x-compress (content coding) **3.1.2.1**\n - x-gzip (content coding) **3.1.2.1**\n\n## Authors' Addresses\n\n**Roy T. Fielding** (editor)\nAdobe Systems Incorporated\n345 Park Ave\nSan Jose, CA 95110\nUSA\nEmail: fielding@gbiv.com\nURI: [http://roy.gbiv.com/](http://roy.gbiv.com/)\n\n**Julian F. Reschke** (editor)\ngreenbytes GmbH\nHafenweg 16\nMuenster, NW 48155\nGermany\nEmail: julian.reschke@greenbytes.de\nURI: [http://greenbytes.de/tech/webdav/](http://greenbytes.de/tech/webdav/)", "znaku_textu": 200023, "slov": 31084, "odkazu": 961, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:28", "sha256": "07684d24dcf2d58c48c26524c75fe2abd4d799cd397aca334268542009f550be", "hloubka": 2, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7231", "http://trustee.ietf.org/license-info", "http://www.iana.org/assignments/character-sets", "https://www.rfc-editor.org/rfc/rfc2046.html", "https://www.rfc-editor.org/rfc/rfc5646.html", "https://www.rfc-editor.org/rfc/rfc2557.html", "https://www.rfc-editor.org/rfc/rfc4647.html", "https://www.rfc-editor.org/rfc/rfc2616.html", "https://www.rfc-editor.org/rfc/rfc5322.html", "https://www.rfc-editor.org/rfc/rfc1945.html", "https://www.rfc-editor.org/rfc/rfc2068.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "http://www.iana.org/assignments/http-methods", "https://www.rfc-editor.org/rfc/rfc5226.html", "http://www.iana.org/assignments/http-status-codes", "https://www.rfc-editor.org/rfc/rfc2817.html", "http://www.iana.org/assignments/message-headers", "http://www.iana.org/assignments/http-parameters", "https://www.rfc-editor.org/rfc/rfc2045.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/info/std66", "https://www.rfc-editor.org/info/bcp47", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://www.rfc-editor.org/rfc/rfc6365.html", "https://www.rfc-editor.org/info/bcp166", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://www.rfc-editor.org/rfc/rfc7232.html", "https://www.rfc-editor.org/rfc/rfc7233.html", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://www.rfc-editor.org/rfc/rfc7235.html", "https://www.rfc-editor.org/rfc/rfc6838.html", "https://www.rfc-editor.org/info/bcp13", "https://www.rfc-editor.org/rfc/rfc6648.html", "https://www.rfc-editor.org/info/bcp178", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://www.owasp.org/", "http://roy.gbiv.com/pubs/dissertation/top.htm", "https://www.rfc-editor.org/rfc/rfc2049.html", "https://www.rfc-editor.org/rfc/rfc2295.html", "https://www.rfc-editor.org/rfc/rfc2388.html", "https://www.rfc-editor.org/rfc/rfc2774.html", "https://www.rfc-editor.org/rfc/rfc2978.html", "https://www.rfc-editor.org/info/bcp19", "https://www.rfc-editor.org/info/bcp26", "https://www.rfc-editor.org/rfc/rfc5246.html", "https://www.rfc-editor.org/rfc/rfc5789.html", "https://www.rfc-editor.org/rfc/rfc5905.html", "https://www.rfc-editor.org/rfc/rfc5987.html", "https://www.rfc-editor.org/rfc/rfc5988.html", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://www.rfc-editor.org/rfc/rfc6266.html", "https://www.rfc-editor.org/rfc/rfc7238.html", "http://roy.gbiv.com/", "http://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc7232.html", "titulek": "RFC 7232 - Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests", "h1": "Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests", "popis": "The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP/1.1 conditional requests, including metadata header fields for indicating state changes, request header fields for making preconditions on such state, and rules for constructing the responses to a conditional request when one or more preconditions evaluate to false.", "klicova_slova": "Hypertext Transfer Protocol, HTTP, HTTP conditional requests", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7232", "og:description": "Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests", "og:url": "https://httpwg.org/specs/rfc7232.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Conformance and Error Handling"}, {"uroven": 3, "text": "1.2. Syntax Notation"}, {"uroven": 2, "text": "2. Validators"}, {"uroven": 3, "text": "2.1. Weak versus Strong"}, {"uroven": 3, "text": "2.2. Last-Modified"}, {"uroven": 4, "text": "2.2.1. Generation"}, {"uroven": 4, "text": "2.2.2. Comparison"}, {"uroven": 3, "text": "2.3. ETag"}, {"uroven": 4, "text": "2.3.1. Generation"}, {"uroven": 4, "text": "2.3.2. Comparison"}, {"uroven": 4, "text": "2.3.3. Example: Entity-Tags Varying on Content-Negotiated Resources"}, {"uroven": 3, "text": "2.4. When to Use Entity-Tags and Last-Modified Dates"}, {"uroven": 2, "text": "3. Precondition Header Fields"}, {"uroven": 3, "text": "3.1. If-Match"}, {"uroven": 3, "text": "3.2. If-None-Match"}, {"uroven": 3, "text": "3.3. If-Modified-Since"}, {"uroven": 3, "text": "3.4. If-Unmodified-Since"}, {"uroven": 3, "text": "3.5. If-Range"}, {"uroven": 2, "text": "4. Status Code Definitions"}, {"uroven": 3, "text": "4.1. 304 Not Modified"}, {"uroven": 3, "text": "4.2. 412 Precondition Failed"}, {"uroven": 2, "text": "5. Evaluation"}, {"uroven": 2, "text": "6. Precedence"}, {"uroven": 2, "text": "7. IANA Considerations"}, {"uroven": 3, "text": "7.1. Status Code Registration"}, {"uroven": 3, "text": "7.2. Header Field Registration"}, {"uroven": 2, "text": "8. Security Considerations"}, {"uroven": 2, "text": "9. Acknowledgments"}, {"uroven": 2, "text": "10. References"}, {"uroven": 3, "text": "10.1. Normative References"}, {"uroven": 3, "text": "10.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Changes from RFC 2616"}, {"uroven": 2, "text": "Appendix B. Imported ABNF"}, {"uroven": 2, "text": "Appendix C. Collected ABNF"}, {"uroven": 2, "text": "Index"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP/1.1 conditional requests, including metadata header fields for indicating state changes, request header fields for making preconditions on such state, and rules for constructing the responses to a conditional request when one or more preconditions evaluate to false.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7232](http://www.rfc-editor.org/info/rfc7232).\n\n## Copyright Notice\n\nCopyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Conformance and Error Handling\n - 1.2. Syntax Notation\n- 2. Validators\n - 2.1. Weak versus Strong\n - 2.2. Last-Modified\n - 2.2.1. Generation\n - 2.2.2. Comparison\n - 2.3. ETag\n - 2.3.1. Generation\n - 2.3.2. Comparison\n - 2.3.3. Example: Entity-Tags Varying on Content-Negotiated Resources\n - 2.4. When to Use Entity-Tags and Last-Modified Dates\n- 3. Precondition Header Fields\n - 3.1. If-Match\n - 3.2. If-None-Match\n - 3.3. If-Modified-Since\n - 3.4. If-Unmodified-Since\n - 3.5. If-Range\n- 4. Status Code Definitions\n - 4.1. 304 Not Modified\n - 4.2. 412 Precondition Failed\n- 5. Evaluation\n- 6. Precedence\n- 7. IANA Considerations\n - 7.1. Status Code Registration\n - 7.2. Header Field Registration\n- 8. Security Considerations\n- 9. Acknowledgments\n- 10. References\n - 10.1. Normative References\n - 10.2. Informative References\n- Appendix A. Changes from RFC 2616\n- Appendix B. Imported ABNF\n- Appendix C. Collected ABNF\n- Index\n- Authors' Addresses\n\n## 1. Introduction\n\nConditional requests are HTTP requests [RFC7231] that include one or more header fields indicating a precondition to be tested before applying the method semantics to the target resource. This document defines the HTTP/1.1 conditional request mechanisms in terms of the architecture, syntax notation, and conformance criteria defined in [RFC7230].\n\nConditional GET requests are the most efficient mechanism for HTTP cache updates [RFC7234]. 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.\n\nConditional request preconditions are based on the 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). A resource might have multiple current representations, each with its own observable state. The conditional request mechanisms assume that the mapping of requests to a \"selected representation\" ([Section 3](rfc7231.html#representations) of [RFC7231]) will be consistent over time if the server intends to take advantage of conditionals. Regardless, if the mapping is inconsistent and the server is unable to select the appropriate representation, then no harm will result when the precondition evaluates to false.\n\nThe conditional request preconditions defined by this specification (Section 3) are evaluated when applicable to the recipient (Section 5) according to their order of precedence (Section 6).\n\n### 1.1. Conformance and Error Handling\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nConformance criteria and considerations regarding error handling are defined in [Section 2.5](rfc7230.html#conformance) of [RFC7230].\n\n### 1.2. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234] with a list extension, defined in [Section 7](rfc7230.html#abnf.extension) of [RFC7230], that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). Appendix B describes rules imported from other documents. Appendix C shows the collected grammar with all list operators expanded to standard ABNF notation.\n\n## 2. Validators\n\nThis specification defines two forms of metadata that are commonly used to observe resource state and test for preconditions: modification dates (Section 2.2) and opaque entity tags (Section 2.3). Additional metadata that reflects resource state has been defined by various extensions of HTTP, such as Web Distributed Authoring and Versioning (WebDAV, [RFC4918]), that are beyond the scope of this specification. A resource metadata value is referred to as a \"validator\" when it is used within a precondition.\n\n### 2.1. Weak versus Strong\n\nValidators come in two flavors: strong or weak. Weak validators are easy to generate but are far less useful for comparisons. Strong validators are ideal for comparisons but can be very difficult (and occasionally impossible) to generate efficiently. Rather than impose that all forms of resource adhere to the same strength of validator, HTTP exposes the type of validator in use and imposes restrictions on when weak validators can be used as preconditions.\n\nA \"strong validator\" is representation metadata that changes value whenever a change occurs to the representation data that would be observable in the payload body of a [200 (OK)](rfc7231.html#status.200) response to GET.\n\nA 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](rfc7231.html#header.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.\n\nCache entries might persist for arbitrarily long periods, regardless of expiration times. Thus, a cache might attempt to validate an entry using a validator that it obtained in the distant past. A strong validator is unique across all versions of all representations associated with a particular resource over time. However, there is no implication of uniqueness across representations of different resources (i.e., the same strong validator might be in use for representations of multiple resources at the same time and does not imply that those representations are equivalent).\n\nThere 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.\n\nIn contrast, a \"weak validator\" is representation metadata that might not change for every change to the representation data. This weakness might be due to limitations in how the value is calculated, such as clock resolution, an inability to ensure uniqueness for all possible representations of the resource, or a desire of the resource owner to group representations by some self-determined set of equivalency rather than unique sequences of data. An origin server *SHOULD* change a weak entity-tag whenever it considers prior representations to be unacceptable as a substitute for the current representation. In other words, a weak entity-tag ought to change whenever the origin server wants caches to invalidate old responses.\n\nFor example, the representation of a weather report that changes in content every second, based on dynamic measurements, might be grouped into sets of equivalent representations (from the origin server's perspective) with the same weak validator in order to allow cached representations to be valid for a reasonable period of time (perhaps adjusted dynamically based on server load or weather quality). Likewise, a representation's modification time, if defined with only one-second resolution, might be a weak validator if it is possible for the representation to be modified twice during a single second and retrieved between those modifications.\n\nLikewise, a validator is weak if it is shared by two or more representations of a given resource at the same time, unless those representations have identical representation data. For example, if the origin server sends the same validator for a representation with a gzip content coding applied as it does for a representation with no content coding, then that validator is weak. However, two simultaneous representations might share the same strong validator if they differ only in the representation metadata, such as when two different media types are available for the same representation data.\n\nStrong 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.\n\n### 2.2. Last-Modified\n\nThe \"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.\n\n```\n Last-Modified = HTTP-date \n```\n\nAn example of its use is\n\n```\n Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT\n```\n\n#### 2.2.1. Generation\n\nAn 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 ([RFC7234]) results in a substantial reduction of HTTP traffic on the Internet and can be a significant factor in improving service scalability and reliability.\n\nA representation is typically the sum of many parts behind the resource interface. The last-modified time would usually be the most recent time that any of those parts were changed. How that value is determined for any given resource is an implementation detail beyond the scope of this specification. What matters to HTTP is how recipients of the Last-Modified header field can use its value to make conditional requests and test the validity of locally cached responses.\n\nAn origin server *SHOULD* obtain the Last-Modified value of the representation as close as possible to the time that it generates the [Date](rfc7231.html#header.date) field value for its response. This allows a recipient to make an accurate assessment of the representation's modification time, especially if the representation changes near the time that the response is generated.\n\nAn origin server with a clock *MUST NOT* send a Last-Modified date that is later than the server's time of message origination ([Date](rfc7231.html#header.date)). 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.\n\nAn origin server without a clock *MUST NOT* assign Last-Modified values to a response unless these values were associated with the resource by some other system or user with a reliable clock.\n\n#### 2.2.2. Comparison\n\nA 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:\n\n- The validator is being compared by an origin server to the actual current validator for the representation and,\n- That origin server reliably knows that the associated representation did not change twice during the second covered by the presented validator.\n\nor\n\n- The validator is about to be used by a client in an If-Modified-Since , If-Unmodified-Since , or [If-Range](rfc7233.html#header.if-range) header field, because the client has a cache entry for the associated representation, and\n- That cache entry includes a [Date](rfc7231.html#header.date) value, which gives the time when the origin server sent the original response, and\n- The presented Last-Modified time is at least 60 seconds before the Date value.\n\nor\n\n- The validator is being compared by an intermediate cache to the validator stored in its cache entry for the representation, and\n- That cache entry includes a [Date](rfc7231.html#header.date) value, which gives the time when the origin server sent the original response, and\n- The presented Last-Modified time is at least 60 seconds before the Date value.\n\nThis 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](rfc7231.html#header.date) value equal to its Last-Modified time. The arbitrary 60-second limit guards against the possibility that the Date and Last-Modified values are generated from different clocks or at somewhat different times during the preparation of the response. An implementation *MAY* use a value larger than 60 seconds, if it is believed that 60 seconds is too short.\n\n### 2.3. ETag\n\nThe \"ETag\" header 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.\n\n```\n ETag = entity-tag entity-tag = [ weak ] opaque-tag weak = %x57.2F ; \"W/\", case-sensitive\n opaque-tag = DQUOTE *etagc DQUOTE etagc = %x21 / %x23-7E / obs-text\n ; VCHAR except double quotes, plus obs-text\n```\n\nAn 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.\n\nExamples:\n\n```\n ETag: \"xyzzy\"\n ETag: W/\"xyzzy\"\n ETag: \"\"\n```\n\nAn 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 2.1), then the origin server *MUST* mark the entity-tag as weak by prefixing its opaque value with \"W/\" (case-sensitive).\n\n#### 2.3.1. Generation\n\nThe 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.\n\nFor example, a resource that has implementation-specific versioning applied to all changes might use an internal revision number, perhaps combined with a variance identifier for content negotiation, to accurately differentiate between representations. Other implementations might use a collision-resistant hash of representation content, a combination of various file attributes, or a modification timestamp that has sub-second resolution.\n\nAn origin server *SHOULD* send an ETag for any selected representation for which detection of changes can be reasonably and consistently determined, since the entity-tag's use in conditional requests and evaluating cache freshness ([RFC7234]) can result in a substantial reduction of HTTP network traffic and can be a significant factor in improving service scalability and reliability.\n\n#### 2.3.2. Comparison\n\nThere are two entity-tag comparison functions, depending on whether or not the comparison context allows the use of weak validators:\n\n- Strong comparison : two entity-tags are equivalent if both are not weak and their opaque-tags match character-by-character.\n- Weak comparison : two entity-tags are equivalent if their opaque-tags match character-by-character, regardless of either or both being tagged as \"weak\".\n\nThe example below shows the results for a set of entity-tag pairs and both the weak and strong comparison function results:\n\n| ETag 1 | ETag 2 | Strong Comparison | Weak Comparison |\n| --- | --- | --- | --- |\n| W/\"1\" | W/\"1\" | no match | match |\n| W/\"1\" | W/\"2\" | no match | no match |\n| W/\"1\" | \"1\" | no match | match |\n| \"1\" | \"1\" | match | match |\n\n#### 2.3.3. Example: Entity-Tags Varying on Content-Negotiated Resources\n\nConsider a resource that is subject to content negotiation ([Section 3.4](rfc7231.html#content.negotiation) of [RFC7231]), and where the representations sent in response to a GET request vary based on the [Accept-Encoding](rfc7231.html#header.accept-encoding) request header field ([Section 5.3.4](rfc7231.html#header.accept-encoding) of [RFC7231]):\n\n>> Request:\n\n```\nGET /index HTTP/1.1\nHost: www.example.com\nAccept-Encoding: gzip\n```\n\nIn this case, the response might or might not use the gzip content coding. If it does not, the response might look like:\n\n>> Response:\n\n```\nHTTP/1.1 200 OK\nDate: Fri, 26 Mar 2010 00:05:00 GMT\nETag: \"123-a\"\nContent-Length: 70\nVary: Accept-Encoding\nContent-Type: text/plain\n\nHello World!\nHello World!\nHello World!\nHello World!\nHello World!\n```\n\nAn alternative representation that does use gzip content coding would be:\n\n>> Response:\n\n```\nHTTP/1.1 200 OK\nDate: Fri, 26 Mar 2010 00:05:00 GMT\nETag: \"123-b\"\nContent-Length: 43\nVary: Accept-Encoding\nContent-Type: text/plain\nContent-Encoding: gzip\n\n...binary data...\n```\n\n### 2.4. When to Use Entity-Tags and Last-Modified Dates\n\nIn [200 (OK)](rfc7231.html#status.200) responses to GET or HEAD, an origin server:\n\n- *SHOULD* send an entity-tag validator unless it is not feasible to generate one.\n- *MAY* send a weak entity-tag instead of a strong entity-tag, if performance considerations support the use of weak entity-tags, or if it is unfeasible to send a strong entity-tag.\n- *SHOULD* send a Last-Modified value if it is feasible to send one.\n\nIn other words, the preferred behavior for an origin server is to send both a strong entity-tag and a Last-Modified value in successful responses to a retrieval request.\n\nA client:\n\n- *MUST* send that entity-tag in any cache validation request (using If-Match or If-None-Match ) if an entity-tag has been provided by the origin server.\n- *SHOULD* send the Last-Modified value in non-subrange cache validation requests (using If-Modified-Since ) if only a Last-Modified value has been provided by the origin server.\n- *MAY* send the Last-Modified value in subrange cache validation requests (using If-Unmodified-Since ) if only a Last-Modified value has been provided by an HTTP/1.0 origin server. The user agent *SHOULD* provide a way to disable this, in case of difficulty.\n- *SHOULD* send both validators in cache validation requests if both an entity-tag and a Last-Modified value have been provided by the origin server. This allows both HTTP/1.0 and HTTP/1.1 caches to respond appropriately.\n\n## 3. Precondition Header Fields\n\nThis section defines the syntax and semantics of HTTP/1.1 header fields for applying preconditions on requests. Section 5 defines when the preconditions are applied. Section 6 defines the order of evaluation when more than one precondition is present.\n\n### 3.1. If-Match\n\nThe \"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.\n\nAn origin server *MUST* use the strong comparison function when comparing entity-tags for If-Match (Section 2.3.2), since the client intends this precondition to prevent the method from being applied if there have been any changes to the representation data.\n\n```\n If-Match = \"*\" / 1#entity-tag \n```\n\nExamples:\n\n```\n If-Match: \"xyzzy\"\n If-Match: \"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"\n If-Match: *\n```\n\nIf-Match is most often used with state-changing methods (e.g., POST, PUT, DELETE) to prevent accidental overwrites when multiple user agents might be acting in parallel on the same resource (i.e., to prevent the \"lost update\" problem). It can also be used with safe methods to abort a request if the [selected representation](rfc7231.html#representations) does not match one already stored (or partially stored) from a prior request.\n\nAn origin server that receives an If-Match header field *MUST* evaluate the condition prior to performing the method (Section 5). If the field-value is \"*\", the condition is false if the origin server does not have a current representation for the target resource. If the field-value is a list of entity-tags, the condition is false if none of the listed tags match the entity-tag of the selected representation.\n\nAn origin server *MUST NOT* perform the requested method if a received If-Match condition evaluates to false; instead, the origin server *MUST* respond with either a) the 412 (Precondition Failed) status code or b) one of the [2xx (Successful)](rfc7231.html#status.2xx) status codes if the origin server has verified that a state change is being requested and the final state is already reflected in the current state of the target resource (i.e., the change requested by the user agent has already succeeded, but the user agent might not be aware of it, perhaps because the prior response was lost or a compatible change was made by some other user agent). In the latter case, the origin server *MUST NOT* send a validator header field in the response unless it can verify that the request is a duplicate of an immediately prior change made by the same user agent.\n\nThe If-Match header field can be ignored by caches and intermediaries because it is not applicable to a stored response.\n\n### 3.2. If-None-Match\n\nThe \"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.\n\nA recipient *MUST* use the weak comparison function when comparing entity-tags for If-None-Match (Section 2.3.2), since weak entity-tags can be used for cache validation even if there have been changes to the representation data.\n\n```\n If-None-Match = \"*\" / 1#entity-tag \n```\n\nExamples:\n\n```\n If-None-Match: \"xyzzy\"\n If-None-Match: W/\"xyzzy\"\n If-None-Match: \"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"\n If-None-Match: W/\"xyzzy\", W/\"r2d2xxxx\", W/\"c3piozzzz\"\n If-None-Match: *\n```\n\nIf-None-Match is primarily used in conditional GET requests to enable efficient updates of cached information with a minimum amount of transaction overhead. When a client desires to update one or more stored responses that have entity-tags, the client *SHOULD* generate an If-None-Match header field containing a list of those entity-tags when making a GET request; this allows recipient servers to send a 304 (Not Modified) response to indicate when one of those stored responses matches the selected representation.\n\nIf-None-Match can also be used with a value of \"*\" to prevent an unsafe request method (e.g., PUT) from inadvertently modifying an existing representation of the target resource when the client believes that the resource does not have a current representation ([Section 4.2.1](rfc7231.html#safe.methods) of [RFC7231]). This is a variation on the \"lost update\" problem that might arise if more than one client attempts to create an initial representation for the target resource.\n\nAn origin server that receives an If-None-Match header field *MUST* evaluate the condition prior to performing the method (Section 5). If the field-value is \"*\", the condition is false if the origin server has a current representation for the target resource. If the field-value is a list of entity-tags, the condition is false if one of the listed tags match the entity-tag of the selected representation.\n\nAn origin server *MUST NOT* perform the requested method if the condition evaluates to false; instead, the origin server *MUST* respond with either a) the 304 (Not Modified) status code if the request method is GET or HEAD or b) the 412 (Precondition Failed) status code for all other request methods.\n\nRequirements on cache handling of a received If-None-Match header field are defined in [Section 4.3.2](rfc7234.html#validation.received) of [RFC7234].\n\n### 3.3. If-Modified-Since\n\nThe \"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.\n\n```\n If-Modified-Since = HTTP-date \n```\n\nAn example of the field is:\n\n```\n If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT\n```\n\nA recipient *MUST* ignore If-Modified-Since if the request contains an If-None-Match header field; the condition in If-None-Match is considered to be a more accurate replacement for the condition in If-Modified-Since, and the two are only combined for the sake of interoperating with older intermediaries that might not implement If-None-Match.\n\nA recipient *MUST* ignore the If-Modified-Since header field if the received field-value is not a valid HTTP-date, or if the request method is neither GET nor HEAD.\n\nA recipient *MUST* interpret an If-Modified-Since field-value's timestamp in terms of the origin server's clock.\n\nIf-Modified-Since is typically used for two distinct purposes: 1) to allow efficient updates of a cached representation that does not have an entity-tag and 2) to limit the scope of a web traversal to resources that have recently changed.\n\nWhen used for cache updates, a cache will typically use the value of the cached message's Last-Modified 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](rfc7231.html#header.date) header field of the cached message or the local clock time that the message was received, particularly when the cached message does not contain a Last-Modified field.\n\nWhen 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 local clock or a [Date](rfc7231.html#header.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 field will not be able to help the user agent limit its data transfers to only those changed during the specified window.\n\nAn origin server that receives an If-Modified-Since header field *SHOULD* evaluate the condition prior to performing the method (Section 5). The origin server *SHOULD NOT* perform the requested method if the selected representation's last modification date is earlier than or equal to the date provided in the field-value; instead, the origin server *SHOULD* generate a 304 (Not Modified) response, including only those metadata that are useful for identifying or updating a previously cached response.\n\nRequirements on cache handling of a received If-Modified-Since header field are defined in [Section 4.3.2](rfc7234.html#validation.received) of [RFC7234].\n\n### 3.4. If-Unmodified-Since\n\nThe \"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.\n\n```\n If-Unmodified-Since = HTTP-date \n```\n\nAn example of the field is:\n\n```\n If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT\n```\n\nA recipient *MUST* ignore If-Unmodified-Since if the request contains an If-Match header field; the condition in If-Match is considered to be a more accurate replacement for the condition in If-Unmodified-Since, and the two are only combined for the sake of interoperating with older intermediaries that might not implement If-Match.\n\nA recipient *MUST* ignore the If-Unmodified-Since header field if the received field-value is not a valid HTTP-date.\n\nA recipient *MUST* interpret an If-Unmodified-Since field-value's timestamp in terms of the origin server's clock.\n\nIf-Unmodified-Since is most often used with state-changing methods (e.g., POST, PUT, DELETE) to prevent accidental overwrites when multiple user agents might be acting in parallel on a resource that does not supply entity-tags with its representations (i.e., to prevent the \"lost update\" problem). It can also be used with safe methods to abort a request if the [selected representation](rfc7231.html#representations) does not match one already stored (or partially stored) from a prior request.\n\nAn origin server that receives an If-Unmodified-Since header field *MUST* evaluate the condition prior to performing the method (Section 5). The origin server *MUST NOT* perform the requested method if the selected representation's last modification date is more recent than the date provided in the field-value; instead the origin server *MUST* respond with either a) the 412 (Precondition Failed) status code or b) one of the [2xx (Successful)](rfc7231.html#status.2xx) status codes if the origin server has verified that a state change is being requested and the final state is already reflected in the current state of the target resource (i.e., the change requested by the user agent has already succeeded, but the user agent might not be aware of that because the prior response message was lost or a compatible change was made by some other user agent). In the latter case, the origin server *MUST NOT* send a validator header field in the response unless it can verify that the request is a duplicate of an immediately prior change made by the same user agent.\n\nThe If-Unmodified-Since header field can be ignored by caches and intermediaries because it is not applicable to a stored response.\n\n### 3.5. If-Range\n\nThe \"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](rfc7233.html#header.range) header field if the validator doesn't match, resulting in transfer of the new selected representation instead of a 412 (Precondition Failed) response. If-Range is defined in [Section 3.2](rfc7233.html#header.if-range) of [RFC7233].\n\n## 4. Status Code Definitions\n\n### 4.1. 304 Not Modified\n\nThe 304 (Not Modified) status code indicates that a conditional GET or HEAD request has been received and would have resulted in a [200 (OK)](rfc7231.html#status.200) response if it were not for the fact that the condition evaluated to false. In other words, there is no need for the server to transfer a representation of the target resource because the request indicates that the client, which made the request conditional, already has a valid representation; the server is therefore redirecting the client to make use of that stored representation as if it were the payload of a [200 (OK)](rfc7231.html#status.200) response.\n\nThe server generating a 304 response *MUST* generate any of the following header fields that would have been sent in a [200 (OK)](rfc7231.html#status.200) response to the same request: [Cache-Control](rfc7234.html#header.cache-control), [Content-Location](rfc7231.html#header.content-location), [Date](rfc7231.html#header.date), ETag, [Expires](rfc7234.html#header.expires), and [Vary](rfc7231.html#header.vary).\n\nSince the goal of a 304 response is to minimize information transfer when the recipient already has one or more cached representations, a sender *SHOULD NOT* generate representation metadata other than the above listed fields unless said metadata exists for the purpose of guiding cache updates (e.g., Last-Modified might be useful if the response does not have an ETag field).\n\nRequirements on a cache that receives a 304 response are defined in [Section 4.3.4](rfc7234.html#freshening.responses) of [RFC7234]. If the conditional request originated with an outbound client, such as a user agent with its own cache sending a conditional GET to a shared proxy, then the proxy *SHOULD* forward the 304 response to that client.\n\nA 304 response cannot contain a message-body; it is always terminated by the first empty line after the header fields.\n\n### 4.2. 412 Precondition Failed\n\nThe 412 (Precondition Failed) status code indicates that one or more conditions given in the request header fields evaluated to false when tested on the server. This response code allows the client to place preconditions on the current resource state (its current representations and metadata) and, thus, prevent the request method from being applied if the target resource is in an unexpected state.\n\n## 5. Evaluation\n\nExcept when excluded below, a recipient cache or origin server *MUST* evaluate received request preconditions after it has successfully performed its normal request checks and just before it would perform the action associated with the request method. A server *MUST* ignore all received preconditions if its response to the same request without those conditions would have been a status code other than a [2xx (Successful)](rfc7231.html#status.2xx) or 412 (Precondition Failed). In other words, redirects and failures take precedence over the evaluation of preconditions in conditional requests.\n\nA 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](rfc7231.html#representations), such as CONNECT, OPTIONS, or TRACE.\n\nConditional request header fields that are defined by extensions to HTTP might place conditions on all recipients, on the state of the target resource in general, or on a group of resources. For instance, the \"If\" header field in WebDAV can make a request conditional on various aspects of multiple resources, such as locks, if the recipient understands and implements that field ([RFC4918], [Section 10.4](https://www.rfc-editor.org/rfc/rfc4918.html#section-10.4)).\n\nAlthough conditional request header fields are defined as being usable with the HEAD method (to keep HEAD's semantics consistent with those of GET), there is no point in sending a conditional HEAD because a successful response is around the same size as a 304 (Not Modified) response and more useful than a 412 (Precondition Failed) response.\n\n## 6. Precedence\n\nWhen more than one conditional request header field is present in a request, the order in which the fields are evaluated becomes important. In practice, the fields defined in this document are consistently implemented in a single, logical order, since \"lost update\" preconditions have more strict requirements than cache validation, a validated cache is more efficient than a partial response, and entity tags are presumed to be more accurate than date validators.\n\nA recipient cache or origin server *MUST* evaluate the request preconditions defined by this specification in the following order:\n\n1. When recipient is the origin server and If-Match is present, evaluate the If-Match precondition:\n - if true, continue to step 3\n - if false, respond 412 (Precondition Failed) unless it can be determined that the state-changing request has already succeeded (see Section 3.1 )\n2. When recipient is the origin server, If-Match is not present, and If-Unmodified-Since is present, evaluate the If-Unmodified-Since precondition:\n - if true, continue to step 3\n - if false, respond 412 (Precondition Failed) unless it can be determined that the state-changing request has already succeeded (see Section 3.4 )\n3. When If-None-Match is present, evaluate the If-None-Match precondition:\n - if true, continue to step 5\n - if false for GET/HEAD, respond 304 (Not Modified)\n - if false for other methods, respond 412 (Precondition Failed)\n4. When the method is GET or HEAD, If-None-Match is not present, and If-Modified-Since is present, evaluate the If-Modified-Since precondition:\n - if true, continue to step 5\n - if false, respond 304 (Not Modified)\n5. When the method is GET and both [Range](rfc7233.html#header.range) and [If-Range](rfc7233.html#header.if-range) are present, evaluate the [If-Range](rfc7233.html#header.if-range) precondition:\n - if the validator matches and the Range specification is applicable to the selected representation, respond [206 (Partial Content)](rfc7233.html#status.206) [RFC7233]\n6. Otherwise,\n - all conditions are met, so perform the requested action and respond according to its success or failure.\n\nAny extension to HTTP/1.1 that defines additional conditional request header fields ought to define its own expectations regarding the order for evaluating such fields in relation to those defined in this document and other conditionals that might be found in practice.\n\n## 7. IANA Considerations\n\n### 7.1. Status Code Registration\n\nThe \"Hypertext Transfer Protocol (HTTP) Status Code Registry\" located at <[http://www.iana.org/assignments/http-status-codes](http://www.iana.org/assignments/http-status-codes)> has been updated with the registrations below:\n\n| Value | Description | Reference |\n| --- | --- | --- |\n| 304 | Not Modified | Section 4.1 |\n| 412 | Precondition Failed | Section 4.2 |\n\n### 7.2. Header Field Registration\n\nHTTP header fields are registered within the \"Message Headers\" registry maintained at <[http://www.iana.org/assignments/message-headers/](http://www.iana.org/assignments/message-headers/)>.\n\nThis document defines the following HTTP header fields, so their associated registry entries have been updated according to the permanent registrations below (see [BCP90]):\n\n| Header Field Name | Protocol | Status | Reference |\n| --- | --- | --- | --- |\n| ETag | http | standard | Section 2.3 |\n| If-Match | http | standard | Section 3.1 |\n| If-Modified-Since | http | standard | Section 3.3 |\n| If-None-Match | http | standard | Section 3.2 |\n| If-Unmodified-Since | http | standard | Section 3.4 |\n| Last-Modified | http | standard | Section 2.2 |\n\nThe change controller is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n## 8. Security Considerations\n\nThis section is meant to inform developers, information providers, and users of known security concerns specific to the HTTP conditional request mechanisms. More general security considerations are addressed in HTTP \"Message Syntax and Routing\" [RFC7230] and \"Semantics and Content\" [RFC7231].\n\nThe validators defined by this specification are not intended to ensure the validity of a representation, guard against malicious changes, or detect man-in-the-middle attacks. At best, they enable more efficient cache updates and optimistic concurrent writes when all participants are behaving nicely. At worst, the conditions will fail and the client will receive a response that is no more harmful than an HTTP exchange without conditional requests.\n\nAn 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.\n\n## 9. Acknowledgments\n\nSee [Section 10](rfc7230.html#acks) of [RFC7230].\n\n## 10. References\n\n### 10.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, January 2008.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, June 2014.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, June 2014.\n\n[RFC7233]\n\nFielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Range Requests](https://www.rfc-editor.org/rfc/rfc7233.html)”, RFC 7233, June 2014.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, June 2014.\n\n### 10.2. Informative References\n\n[BCP90]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004.\n\n[RFC2616]\n\nFielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n[RFC4918]\n\nDusseault, L., Ed., “[HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)](https://www.rfc-editor.org/rfc/rfc4918.html)”, RFC 4918, June 2007.\n\n## Appendix A. Changes from RFC 2616\n\nThe definition of validator weakness has been expanded and clarified. (Section 2.1)\n\nWeak entity-tags are now allowed in all requests except range requests. (Sections 2.1 and 3.2)\n\nThe ETag header field ABNF has been changed to not use quoted-string, thus avoiding escaping issues. (Section 2.3)\n\nETag is defined to provide an entity tag for the selected representation, thereby clarifying what it applies to in various situations (such as a PUT response). (Section 2.3)\n\nThe precedence for evaluation of conditional requests has been defined. (Section 6)\n\n## Appendix B. Imported ABNF\n\nThe following core rules are included by reference, as defined in [Appendix B.1](https://www.rfc-editor.org/rfc/rfc5234.html#appendix-B.1) of [RFC5234]: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII character).\n\nThe rules below are defined in [RFC7230]:\n\n```\n OWS = \n obs-text = \n```\n\nThe rules below are defined in other parts:\n\n```\n HTTP-date = \n```\n\n## Appendix C. Collected ABNF\n\nIn the collected ABNF below, list rules are expanded as per [Section 1.2](rfc7230.html#notation) of [RFC7230].\n\n```\nETag = entity-tag\n\nHTTP-date = \n\nIf-Match = \"*\" / ( *( \",\" OWS ) entity-tag *( OWS \",\" [ OWS\n entity-tag ] ) )\nIf-Modified-Since = HTTP-date\nIf-None-Match = \"*\" / ( *( \",\" OWS ) entity-tag *( OWS \",\" [ OWS\n entity-tag ] ) )\nIf-Unmodified-Since = HTTP-date\n\nLast-Modified = HTTP-date\n\nOWS = \n\nentity-tag = [ weak ] opaque-tag\netagc = \"!\" / %x23-7E ; '#'-'~'\n / obs-text\n\nobs-text = \nopaque-tag = DQUOTE *etagc DQUOTE\n\nweak = %x57.2F ; W/\n```\n\n## Index\n\n3 4 B E G I L M R S V\n\n- **3**\n - 304 Not Modified (status code) **4.1** , 7.1\n- **4**\n - 412 Precondition Failed (status code) **4.2** , 7.1\n- **B**\n - *BCP90* 7.2 , **10.2**\n- **E**\n - ETag header field 2 , **2.3** , 7.2 , A , A\n- **G**\n - Grammar\n - entity-tag **2.3**\n - ETag **2.3**\n - etagc **2.3**\n - If-Match **3.1**\n - If-Modified-Since **3.3**\n - If-None-Match **3.2**\n - If-Unmodified-Since **3.4**\n - Last-Modified **2.2**\n - opaque-tag **2.3**\n - weak **2.3**\n- **I**\n - If-Match header field **3.1** , 6 , 7.2\n - If-Modified-Since header field **3.3** , 7.2\n - If-None-Match header field **3.2** , 7.2 , A\n - If-Unmodified-Since header field **3.4** , 6 , 7.2\n- **L**\n - Last-Modified header field 2 , **2.2** , 7.2\n- **M**\n - metadata **2**\n- **R**\n - *RFC2119* 1.1 , **10.1**\n - *RFC2616* 2.3 , **10.2**\n - *Section 3.11* 2.3\n - *RFC4918* 2 , 5 , **10.2**\n - *Section 10.4* 5\n - *RFC5234* 1.2 , **10.1** , B\n - *Appendix B.1* B\n - *RFC7230* 1 , 1.1 , 1.2 , 2.3.3 , 8 , 9 , **10.1** , B , B , B , C\n - *Section 1.2* C\n - *Section 2.5* 1.1\n - *Section 3.2.3* B\n - *Section 3.2.6* B\n - *Section 4* 2.3.3\n - *Section 7* 1.2\n - *Section 10* 9\n - *RFC7231* 1 , 1 , 2.3.3 , 2.3.3 , 3.2 , 8 , **10.1** , B\n - *Section 3* 1\n - *Section 3.4* 2.3.3\n - *Section 4.2.1* 3.2\n - *Section 5.3.4* 2.3.3\n - *Section 7.1.1.1* B\n - *RFC7233* 3.5 , 6 , **10.1**\n - *Section 3.2* 3.5\n - *RFC7234* 1 , 2.2.1 , 2.3.1 , 3.2 , 3.3 , 4.1 , **10.1**\n - *Section 4.3.2* 3.2 , 3.3\n - *Section 4.3.4* 4.1\n- **S**\n - selected representation **1**\n- **V**\n - validator **2**\n - strong **2.1**\n - weak **2.1**\n\n## Authors' Addresses\n\n**Roy T. Fielding** (editor)\nAdobe Systems Incorporated\n345 Park Ave\nSan Jose, CA 95110\nUSA\nEmail: fielding@gbiv.com\nURI: [http://roy.gbiv.com/](http://roy.gbiv.com/)\n\n**Julian F. Reschke** (editor)\ngreenbytes GmbH\nHafenweg 16\nMuenster, NW 48155\nGermany\nEmail: julian.reschke@greenbytes.de\nURI: [http://greenbytes.de/tech/webdav/](http://greenbytes.de/tech/webdav/)", "znaku_textu": 48297, "slov": 7535, "odkazu": 214, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:30", "sha256": "322e8df60a760e00730fcbd6167a6161ec85334218fdd2d4171584eaa5fce54a", "hloubka": 3, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7232", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2616.html", "https://www.rfc-editor.org/rfc/rfc4918.html", "http://www.iana.org/assignments/http-status-codes", "http://www.iana.org/assignments/message-headers/", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc7233.html", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "http://roy.gbiv.com/", "http://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc7233.html", "titulek": "RFC 7233 - Hypertext Transfer Protocol (HTTP/1.1): Range Requests", "h1": "Hypertext Transfer Protocol (HTTP/1.1): Range Requests", "popis": "The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines range requests and the rules for constructing and combining responses to those requests.", "klicova_slova": "Hypertext Transfer Protocol, HTTP, HTTP Range Requests", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7233", "og:description": "Hypertext Transfer Protocol (HTTP/1.1): Range Requests", "og:url": "https://httpwg.org/specs/rfc7233.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Conformance and Error Handling"}, {"uroven": 3, "text": "1.2. Syntax Notation"}, {"uroven": 2, "text": "2. Range Units"}, {"uroven": 3, "text": "2.1. Byte Ranges"}, {"uroven": 3, "text": "2.2. Other Range Units"}, {"uroven": 3, "text": "2.3. Accept-Ranges"}, {"uroven": 2, "text": "3. Range Requests"}, {"uroven": 3, "text": "3.1. Range"}, {"uroven": 3, "text": "3.2. If-Range"}, {"uroven": 2, "text": "4. Responses to a Range Request"}, {"uroven": 3, "text": "4.1. 206 Partial Content"}, {"uroven": 3, "text": "4.2. Content-Range"}, {"uroven": 3, "text": "4.3. Combining Ranges"}, {"uroven": 3, "text": "4.4. 416 Range Not Satisfiable"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 3, "text": "5.1. Range Unit Registry"}, {"uroven": 4, "text": "5.1.1. Procedure"}, {"uroven": 4, "text": "5.1.2. Registrations"}, {"uroven": 3, "text": "5.2. Status Code Registration"}, {"uroven": 3, "text": "5.3. Header Field Registration"}, {"uroven": 3, "text": "5.4. Internet Media Type Registration"}, {"uroven": 4, "text": "5.4.1. Internet Media Type multipart/byteranges"}, {"uroven": 2, "text": "6. Security Considerations"}, {"uroven": 3, "text": "6.1. Denial-of-Service Attacks Using Range"}, {"uroven": 2, "text": "7. Acknowledgments"}, {"uroven": 2, "text": "8. References"}, {"uroven": 3, "text": "8.1. Normative References"}, {"uroven": 3, "text": "8.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Internet Media Type multipart/byteranges"}, {"uroven": 2, "text": "Appendix B. Changes from RFC 2616"}, {"uroven": 2, "text": "Appendix C. Imported ABNF"}, {"uroven": 2, "text": "Appendix D. Collected ABNF"}, {"uroven": 2, "text": "Index"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines range requests and the rules for constructing and combining responses to those requests.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7233](http://www.rfc-editor.org/info/rfc7233).\n\n## Copyright Notice\n\nCopyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Conformance and Error Handling\n - 1.2. Syntax Notation\n- 2. Range Units\n - 2.1. Byte Ranges\n - 2.2. Other Range Units\n - 2.3. Accept-Ranges\n- 3. Range Requests\n - 3.1. Range\n - 3.2. If-Range\n- 4. Responses to a Range Request\n - 4.1. 206 Partial Content\n - 4.2. Content-Range\n - 4.3. Combining Ranges\n - 4.4. 416 Range Not Satisfiable\n- 5. IANA Considerations\n - 5.1. Range Unit Registry\n - 5.1.1. Procedure\n - 5.1.2. Registrations\n - 5.2. Status Code Registration\n - 5.3. Header Field Registration\n - 5.4. Internet Media Type Registration\n - 5.4.1. Internet Media Type multipart/byteranges\n- 6. Security Considerations\n - 6.1. Denial-of-Service Attacks Using Range\n- 7. Acknowledgments\n- 8. References\n - 8.1. Normative References\n - 8.2. Informative References\n- Appendix A. Internet Media Type multipart/byteranges\n- Appendix B. Changes from RFC 2616\n- Appendix C. Imported ABNF\n- Appendix D. Collected ABNF\n- Index\n- Authors' Addresses\n\n## 1. Introduction\n\nHypertext Transfer Protocol (HTTP) clients often encounter interrupted data transfers as a result of canceled requests or dropped connections. When a client has stored a partial representation, it is desirable to request the remainder of that representation in a subsequent request rather than transfer the entire representation. Likewise, devices with limited local storage might benefit from being able to request only a subset of a larger representation, such as a single page of a very large document, or the dimensions of an embedded image.\n\nThis document defines HTTP/1.1 range requests, partial responses, and the multipart/byteranges media type. Range requests are an *OPTIONAL* feature of HTTP, designed so that recipients not implementing this feature (or not supporting it for the target resource) can respond as if it is a normal GET request without impacting interoperability. Partial responses are indicated by a distinct status code to not be mistaken for full responses by caches that might not implement the feature.\n\nAlthough the range request mechanism is designed to allow for extensible range types, this specification only defines requests for byte ranges.\n\n### 1.1. Conformance and Error Handling\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nConformance criteria and considerations regarding error handling are defined in [Section 2.5](rfc7230.html#conformance) of [RFC7230].\n\n### 1.2. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234] with a list extension, defined in [Section 7](rfc7230.html#abnf.extension) of [RFC7230], that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). Appendix C describes rules imported from other documents. Appendix D shows the collected grammar with all list operators expanded to standard ABNF notation.\n\n## 2. Range Units\n\nA representation can be partitioned into subranges according to various structural units, depending on the structure inherent in the representation's media type. This \"range unit\" is used in the Accept-Ranges (Section 2.3) response header field to advertise support for range requests, the Range (Section 3.1) request header field to delineate the parts of a representation that are requested, and the Content-Range (Section 4.2) payload header field to describe which part of a representation is being transferred.\n\n```\n range-unit = bytes-unit / other-range-unit \n```\n\n### 2.1. Byte Ranges\n\nSince representation data is transferred in payloads as a sequence of octets, a byte range is a meaningful substructure for any representation transferable over HTTP ([Section 3](rfc7231.html#representations) of [RFC7231]). The \"bytes\" range unit is defined for expressing subranges of the data's octet sequence.\n\n```\n bytes-unit = \"bytes\"\n```\n\nA byte-range request can specify a single range of bytes or a set of ranges within a single representation.\n\n```\n byte-ranges-specifier = bytes-unit \"=\" byte-range-set byte-range-set = 1#( byte-range-spec / suffix-byte-range-spec )\n byte-range-spec = first-byte-pos \"-\" [ last-byte-pos ]\n first-byte-pos = 1*DIGIT last-byte-pos = 1*DIGIT \n```\n\nThe first-byte-pos value in a byte-range-spec gives the byte-offset of the first byte in a range. The last-byte-pos value gives the byte-offset of the last byte in the range; that is, the byte positions specified are inclusive. Byte offsets start at zero.\n\nExamples of byte-ranges-specifier values:\n\n- The first 500 bytes (byte offsets 0-499, inclusive): bytes=0-499\n- The second 500 bytes (byte offsets 500-999, inclusive): bytes=500-999\n\nA byte-range-spec is invalid if the last-byte-pos value is present and less than the first-byte-pos.\n\nA client can limit the number of bytes requested without knowing the size of the selected representation. If the last-byte-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-byte-pos with a value that is one less than the current length of the selected representation).\n\nA client can request the last N bytes of the selected representation using a suffix-byte-range-spec.\n\n```\n suffix-byte-range-spec = \"-\" suffix-length suffix-length = 1*DIGIT \n```\n\nIf the selected representation is shorter than the specified suffix-length, the entire representation is used.\n\nAdditional examples, assuming a representation of length 10000:\n\n- The final 500 bytes (byte offsets 9500-9999, inclusive): bytes=-500 Or: bytes=9500-\n- The first and last bytes only (bytes 0 and 9999): bytes=0-0,-1\n- Other valid (but not canonical) specifications of the second 500 bytes (byte offsets 500-999, inclusive): bytes=500-600,601-999\n bytes=500-700,601-999\n\nIf a valid byte-range-set includes at least one byte-range-spec with a first-byte-pos that is less than the current length of the representation, or at least one suffix-byte-range-spec with a non-zero suffix-length, then the byte-range-set is satisfiable. Otherwise, the byte-range-set is unsatisfiable.\n\nIn the byte-range syntax, first-byte-pos, last-byte-pos, and suffix-length are expressed as decimal number of octets. Since there is no predefined limit to the length of a payload, recipients *MUST* anticipate potentially large decimal numerals and prevent parsing errors due to integer conversion overflows.\n\n### 2.2. Other Range Units\n\nRange units are intended to be extensible. New range units ought to be registered with IANA, as defined in Section 5.1.\n\n```\n other-range-unit = token \n```\n\n### 2.3. Accept-Ranges\n\nThe \"Accept-Ranges\" header field allows a server to indicate that it supports range requests for the target resource.\n\n```\n Accept-Ranges = acceptable-ranges acceptable-ranges = 1#range-unit / \"none\"\n```\n\nAn origin server that supports byte-range requests for a given target resource *MAY* send\n\n```\n Accept-Ranges: bytes\n```\n\nto indicate what range units are supported. A client *MAY* generate range requests without having received this header field for the resource involved. Range units are defined in Section 2.\n\nA server that does not support any kind of range request for the target resource *MAY* send\n\n```\n Accept-Ranges: none\n```\n\nto advise the client not to attempt a range request.\n\n## 3. Range Requests\n\n### 3.1. Range\n\nThe \"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, rather than the entire selected representation data.\n\n```\n Range = byte-ranges-specifier / other-ranges-specifier other-ranges-specifier = other-range-unit \"=\" other-range-set other-range-set = 1*VCHAR \n```\n\nA server *MAY* ignore the Range header field. However, origin servers and intermediate caches ought to support byte ranges when possible, since Range supports efficient recovery from partially failed transfers and partial retrieval of large representations. A server *MUST* ignore a Range header field received with a request method other than GET.\n\nAn 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.\n\nA server that supports range requests *MAY* ignore or reject a Range header field that consists of more than two overlapping ranges, or a set of many small ranges that are not listed in ascending order, since both are indications of either a broken client or a deliberate denial-of-service attack (Section 6.1). A client *SHOULD NOT* request multiple ranges that are inherently less efficient to process and transfer than a single range that encompasses the same data.\n\nA client that is requesting multiple ranges *SHOULD* list those ranges in ascending order (the order in which they would typically be received in a complete representation) unless there is a specific need to request a later part earlier. For example, a user agent processing a large representation with an internal catalog of parts might need to request later parts first, particularly if the representation consists of pages stored in reverse order and the user agent wishes to transfer one page at a time.\n\nThe Range header field is evaluated after evaluating the precondition header fields defined in [RFC7232], and only if the result in absence of the Range header field would be a [200 (OK)](rfc7231.html#status.200) response. In other words, Range is ignored when a conditional GET would result in a [304 (Not Modified)](rfc7232.html#status.304) response.\n\nThe If-Range header field (Section 3.2) can be used as a precondition to applying the Range header field.\n\nIf all of the preconditions are true, the server supports the Range header field for the target resource, and the specified range(s) are valid and satisfiable (as defined in Section 2.1), the server *SHOULD* send a 206 (Partial Content) response with a payload containing one or more partial representations that correspond to the satisfiable ranges requested, as defined in Section 4.\n\nIf all of the preconditions are true, the server supports the Range header field for the target resource, and the specified range(s) are invalid or unsatisfiable, the server *SHOULD* send a 416 (Range Not Satisfiable) response.\n\n### 3.2. If-Range\n\nIf a client has a partial copy of a representation and wishes to have an up-to-date copy of the entire representation, it could use the Range header field with a conditional GET (using either or both of [If-Unmodified-Since](rfc7232.html#header.if-unmodified-since) and [If-Match](rfc7232.html#header.if-match).) However, if the precondition fails because the representation has been modified, the client would then have to make a second request to obtain the entire current representation.\n\nThe \"If-Range\" header field allows a client to \"short-circuit\" the second request. Informally, its meaning is as follows: if the representation is unchanged, send me the part(s) that I am requesting in Range; otherwise, send me the entire representation.\n\n```\n If-Range = entity-tag / HTTP-date \n```\n\nA client *MUST NOT* generate an If-Range header field in a request that does not contain a Range header field. A server *MUST* ignore an If-Range header field received in a request that does not contain a Range header field. An origin server *MUST* ignore an If-Range header field received in a request for a target resource that does not support Range requests.\n\nA client *MUST NOT* generate an If-Range header field containing an entity-tag that is marked as weak. A client *MUST NOT* generate an If-Range header field containing an HTTP-date unless the client has no entity-tag for the corresponding representation and the date is a strong validator in the sense defined by [Section 2.2.2](rfc7232.html#lastmod.comparison) of [RFC7232].\n\nA server that evaluates an If-Range precondition *MUST* use the strong comparison function when comparing entity-tags ([Section 2.3.2](rfc7232.html#entity.tag.comparison) of [RFC7232]) and *MUST* evaluate the condition as false if an HTTP-date validator is provided that is not a strong validator in the sense defined by [Section 2.2.2](rfc7232.html#lastmod.comparison) of [RFC7232]. A valid entity-tag can be distinguished from a valid HTTP-date by examining the first two characters for a DQUOTE.\n\nIf the validator given in the If-Range header field matches the current validator for the selected representation of the target resource, then the server *SHOULD* process the Range header field as requested. If the validator does not match, the server *MUST* ignore the Range header field. Note that this comparison by exact match, including when the validator is an HTTP-date, differs from the \"earlier than or equal to\" comparison used when evaluating an [If-Unmodified-Since](rfc7232.html#header.if-unmodified-since) conditional.\n\n## 4. Responses to a Range Request\n\n### 4.1. 206 Partial Content\n\nThe 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 that correspond to the satisfiable ranges found in the request's Range header field (Section 3.1).\n\nIf a single part is being transferred, the server generating the 206 response *MUST* generate a Content-Range header field, describing what range of the selected representation is enclosed, and a payload consisting of the range. For example:\n\n```\nHTTP/1.1 206 Partial Content\nDate: Wed, 15 Nov 1995 06:25:24 GMT\nLast-Modified: Wed, 15 Nov 1995 04:58:08 GMT\nContent-Range: bytes 21010-47021/47022\nContent-Length: 26012\nContent-Type: image/gif\n\n... 26012 bytes of partial image data ...\n```\n\nIf multiple parts are being transferred, the server generating the 206 response *MUST* generate a \"multipart/byteranges\" payload, as defined in Appendix A, and a [Content-Type](rfc7231.html#header.content-type) header field containing the multipart/byteranges media type and its required boundary parameter. To avoid confusion with single-part responses, a server *MUST NOT* generate a Content-Range header field in the HTTP header section of a multiple part response (this field will be sent in each part instead).\n\nWithin the header area of each body part in the multipart payload, 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](rfc7231.html#header.content-type) header field in a [200 (OK)](rfc7231.html#status.200) response, the server *SHOULD* generate that same [Content-Type](rfc7231.html#header.content-type) field in the header area of each body part. For example:\n\n```\nHTTP/1.1 206 Partial Content\nDate: Wed, 15 Nov 1995 06:25:24 GMT\nLast-Modified: Wed, 15 Nov 1995 04:58:08 GMT\nContent-Length: 1741\nContent-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES\n\n--THIS_STRING_SEPARATES\nContent-Type: application/pdf\nContent-Range: bytes 500-999/8000\n\n...the first range...\n--THIS_STRING_SEPARATES\nContent-Type: application/pdf\nContent-Range: bytes 7000-7999/8000\n\n...the second range\n--THIS_STRING_SEPARATES--\n```\n\nWhen 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 byte-range-spec appeared in the received Range header field. Since the typical overhead between parts of a multipart/byteranges payload 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.\n\nA server *MUST NOT* generate a multipart response to a request for a single range, since a client that does not request multiple parts might not support multipart responses. However, a server *MAY* generate a multipart/byteranges payload with only a single body part if multiple ranges were requested and only one range was found to be satisfiable or only one range remained after coalescing. A client that cannot process a multipart/byteranges response *MUST NOT* generate a request that asks for multiple ranges.\n\nWhen a multipart response payload is generated, the server *SHOULD* send the parts in the same order that the corresponding byte-range-spec appeared in the received Range header field, excluding those ranges that were deemed unsatisfiable or that were coalesced into other ranges. A client that receives a multipart response *MUST* inspect the Content-Range header field present in each body part in order to determine which range is contained in that body part; a client cannot rely on receiving the same ranges that it requested, nor the same order that it requested.\n\nWhen a 206 response is generated, the server *MUST* generate the following header fields, in addition to those required above, if the field would have been sent in a [200 (OK)](rfc7231.html#status.200) response to the same request: [Date](rfc7231.html#header.date), [Cache-Control](rfc7234.html#header.cache-control), [ETag](rfc7232.html#header.etag), [Expires](rfc7234.html#header.expires), [Content-Location](rfc7231.html#header.content-location), and [Vary](rfc7231.html#header.vary).\n\nIf a 206 is generated in response to a request with an If-Range header field, the sender *SHOULD NOT* generate other representation header fields beyond those required above, because the client is understood to already have a prior response containing those header fields. Otherwise, the sender *MUST* generate all of the representation header fields that would have been sent in a [200 (OK)](rfc7231.html#status.200) response to the same request.\n\nA 206 response is cacheable by default; i.e., unless otherwise indicated by explicit cache controls (see [Section 4.2.2](rfc7234.html#heuristic.freshness) of [RFC7234]).\n\n### 4.2. Content-Range\n\nThe \"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 payload, sent in each part of a multipart 206 response to indicate the range enclosed within each body part, and sent in 416 (Range Not Satisfiable) responses to provide information about the selected representation.\n\n```\n Content-Range = byte-content-range\n / other-content-range byte-content-range = bytes-unit SP\n ( byte-range-resp / unsatisfied-range )\n\n byte-range-resp = byte-range \"/\" ( complete-length / \"*\" )\n byte-range = first-byte-pos \"-\" last-byte-pos unsatisfied-range = \"*/\" complete-length complete-length = 1*DIGIT other-content-range = other-range-unit SP other-range-resp other-range-resp = *CHAR \n```\n\nIf a 206 (Partial Content) response contains a Content-Range header field with a range unit (Section 2) 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.\n\nFor 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.\n\nThe following example illustrates when the complete length of the selected representation is known by the sender to be 1234 bytes:\n\n```\n Content-Range: bytes 42-1233/1234\n```\n\nand this second example illustrates when the complete length is unknown:\n\n```\n Content-Range: bytes 42-1233/*\n```\n\nA Content-Range field value is invalid if it contains a byte-range-resp that has a last-byte-pos value less than its first-byte-pos value, or a complete-length value less than or equal to its last-byte-pos value. The recipient of an invalid Content-Range *MUST NOT* attempt to recombine the received content with a stored representation.\n\nA server generating a 416 (Range Not Satisfiable) response to a byte-range request *SHOULD* send a Content-Range header field with an unsatisfied-range value, as in the following example:\n\n```\n Content-Range: bytes */1234\n```\n\nThe complete-length in a 416 response indicates the current length of the selected representation.\n\nThe Content-Range header field has no meaning for status codes that do not explicitly describe its semantic. For this specification, only the 206 (Partial Content) and 416 (Range Not Satisfiable) status codes describe a meaning for Content-Range.\n\nThe following are examples of Content-Range values in which the selected representation contains a total of 1234 bytes:\n\n- The first 500 bytes: Content-Range: bytes 0-499/1234\n- The second 500 bytes: Content-Range: bytes 500-999/1234\n- All except for the first 500 bytes: Content-Range: bytes 500-1233/1234\n- The last 500 bytes: Content-Range: bytes 734-1233/1234\n\n### 4.3. Combining Ranges\n\nA response might transfer only a subrange of a representation if the connection closed prematurely or if the request used one or more Range specifications. After several such transfers, a client might have received several ranges of the same representation. These ranges can only be safely combined if they all have in common the same strong validator ([Section 2.1](rfc7232.html#weak.and.strong.validators) of [RFC7232]).\n\nA client that has received multiple partial responses to GET requests on a target resource *MAY* combine those responses into a larger continuous range if they share the same strong validator.\n\nIf the most recent response is an incomplete [200 (OK)](rfc7231.html#status.200) response, then the header fields of that response are used for any combined response and replace those of the matching stored responses.\n\nIf the most recent response is a 206 (Partial Content) response and at least one of the matching stored responses is a [200 (OK)](rfc7231.html#status.200), then the combined response header fields consist of the most recent 200 response's header fields. If all of the matching stored responses are 206 responses, then the stored response with the most recent header fields is used as the source of header fields for the combined response, except that the client *MUST* use other header fields provided in the new response, aside from Content-Range, to replace all instances of the corresponding header fields in the stored response.\n\nThe combined response message body consists of the union of partial content ranges in the new response and each of the selected responses. If the union consists of the entire range of the representation, then the client *MUST* process the combined response as if it were a complete [200 (OK)](rfc7231.html#status.200) response, including a [Content-Length](rfc7230.html#header.content-length) header field that reflects the complete length. Otherwise, the client *MUST* process the set of continuous ranges as one of the following: an incomplete [200 (OK)](rfc7231.html#status.200) response if the combined response is a prefix of the representation, a single 206 (Partial Content) response containing a multipart/byteranges body, or multiple 206 (Partial Content) responses, each with one continuous range that is indicated by a Content-Range header field.\n\n### 4.4. 416 Range Not Satisfiable\n\nThe 416 (Range Not Satisfiable) status code indicates that none of the ranges in the request's Range header field (Section 3.1) overlap the current extent of the selected resource or that the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges.\n\nFor byte ranges, failing to overlap the current extent means that the first-byte-pos of all of the byte-range-spec values were greater than the current length of the selected representation. When this status code is generated in response to a byte-range request, the sender *SHOULD* generate a Content-Range header field specifying the current length of the selected representation (Section 4.2).\n\nFor example:\n\n```\nHTTP/1.1 416 Range Not Satisfiable\nDate: Fri, 20 Jan 2012 15:41:54 GMT\nContent-Range: bytes */47022\n```\n\n## 5. IANA Considerations\n\n### 5.1. Range Unit Registry\n\nThe \"HTTP Range Unit Registry\" defines the namespace for the range unit names and refers to their corresponding specifications. The registry has been created and is now maintained at <[http://www.iana.org/assignments/http-parameters](http://www.iana.org/assignments/http-parameters)>.\n\n#### 5.1.1. Procedure\n\nRegistration of an HTTP Range Unit *MUST* include the following fields:\n\n- Name\n- Description\n- Pointer to specification text\n\nValues to be added to this namespace require IETF Review (see [RFC5226], [Section 4.1](https://www.rfc-editor.org/rfc/rfc5226.html#section-4.1)).\n\n#### 5.1.2. Registrations\n\nThe initial range unit registry contains the registrations below:\n\n| Range Unit Name | Description | Reference |\n| --- | --- | --- |\n| bytes | a range of octets | Section 2.1 |\n| none | reserved as keyword, indicating no ranges are supported | Section 2.3 |\n\nThe change controller is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n### 5.2. Status Code Registration\n\nThe \"Hypertext Transfer Protocol (HTTP) Status Code Registry\" located at <[http://www.iana.org/assignments/http-status-codes](http://www.iana.org/assignments/http-status-codes)> has been updated to include the registrations below:\n\n| Value | Description | Reference |\n| --- | --- | --- |\n| 206 | Partial Content | Section 4.1 |\n| 416 | Range Not Satisfiable | Section 4.4 |\n\n### 5.3. Header Field Registration\n\nHTTP header fields are registered within the \"Message Headers\" registry maintained at <[http://www.iana.org/assignments/message-headers/](http://www.iana.org/assignments/message-headers/)>.\n\nThis document defines the following HTTP header fields, so their associated registry entries have been updated according to the permanent registrations below (see [BCP90]):\n\n| Header Field Name | Protocol | Status | Reference |\n| --- | --- | --- | --- |\n| Accept-Ranges | http | standard | Section 2.3 |\n| Content-Range | http | standard | Section 4.2 |\n| If-Range | http | standard | Section 3.2 |\n| Range | http | standard | Section 3.1 |\n\nThe change controller is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n### 5.4. Internet Media Type Registration\n\nIANA maintains the registry of Internet media types [BCP13] at <[http://www.iana.org/assignments/media-types](http://www.iana.org/assignments/media-types)>.\n\nThis document serves as the specification for the Internet media type \"multipart/byteranges\". The following has been registered with IANA.\n\n#### 5.4.1. Internet Media Type multipart/byteranges\n\nType name:\n\nmultipart\n\nSubtype name:\n\nbyteranges\n\nRequired parameters:\n\nboundary\n\nOptional parameters:\n\nN/A\n\nEncoding considerations:\n\nonly \"7bit\", \"8bit\", or \"binary\" are permitted\n\nSecurity considerations:\n\nsee Section 6\n\nInteroperability considerations:\n\nN/A\n\nPublished specification:\n\nThis specification (see Appendix A).\n\nApplications that use this media type:\n\nHTTP components supporting multiple ranges in a single request.\n\nFragment identifier considerations:\n\nN/A\n\nAdditional information:\n\nDeprecated alias names for this type:\n\nN/A\n\nMagic number(s):\n\nN/A\n\nFile extension(s):\n\nN/A\n\nMacintosh file type code(s):\n\nN/A\n\nPerson and email address to contact for further information:\n\nSee Authors' Addresses section.\n\nIntended usage:\n\nCOMMON\n\nRestrictions on usage:\n\nN/A\n\nAuthor:\n\nSee Authors' Addresses section.\n\nChange controller:\n\nIESG\n\n## 6. Security Considerations\n\nThis section is meant to inform developers, information providers, and users of known security concerns specific to the HTTP range request mechanisms. More general security considerations are addressed in HTTP messaging [RFC7230] and semantics [RFC7231].\n\n### 6.1. Denial-of-Service Attacks Using Range\n\nUnconstrained multiple range requests are susceptible to denial-of-service attacks because the effort required to request many overlapping ranges of the same data is tiny compared to the time, memory, and bandwidth consumed by attempting to serve the requested data in many parts. Servers ought to ignore, coalesce, or reject egregious range requests, such as requests for more than two overlapping ranges or for many small ranges in a single set, particularly when the ranges are requested out of order for no apparent reason. Multipart range requests are not designed to support random access.\n\n## 7. Acknowledgments\n\nSee [Section 10](rfc7230.html#acks) of [RFC7230].\n\n## 8. References\n\n### 8.1. Normative References\n\n[RFC2046]\n\nFreed, N. and N. Borenstein, “[Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types](https://www.rfc-editor.org/rfc/rfc2046.html)”, RFC 2046, November 1996.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, January 2008.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, June 2014.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, June 2014.\n\n[RFC7232]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests](https://www.rfc-editor.org/rfc/rfc7232.html)”, RFC 7232, June 2014.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, June 2014.\n\n### 8.2. Informative References\n\n[BCP13]\n\nFreed, N., Klensin, J., and T. Hansen, “[Media Type Specifications and Registration Procedures](https://www.rfc-editor.org/rfc/rfc6838.html)”, [BCP 13](https://www.rfc-editor.org/info/bcp13), RFC 6838, January 2013.\n\n[BCP90]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004.\n\n[RFC2616]\n\nFielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n[RFC5226]\n\nNarten, T. and H. Alvestrand, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc5226.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 5226, May 2008.\n\n## Appendix A. Internet Media Type multipart/byteranges\n\nWhen a 206 (Partial Content) response message includes the content of multiple ranges, they are transmitted as body parts in a multipart message body ([RFC2046], [Section 5.1](https://www.rfc-editor.org/rfc/rfc2046.html#section-5.1)) with the media type of \"multipart/byteranges\".\n\nThe multipart/byteranges media type includes one or more body parts, each with its own [Content-Type](rfc7231.html#header.content-type) and Content-Range fields. The required boundary parameter specifies the boundary string used to separate each body part.\n\nImplementation Notes:\n\n1. Additional CRLFs might precede the first boundary string in the body.\n2. Although [RFC2046] permits the boundary string to be quoted, some existing implementations handle a quoted boundary string incorrectly.\n3. A number of clients and servers were coded to an early draft of the byteranges specification that used a media type of multipart/x-byteranges , which is almost (but not quite) compatible with this type.\n\nDespite the name, the \"multipart/byteranges\" media type is not limited to byte ranges. The following example uses an \"exampleunit\" range unit:\n\n```\nHTTP/1.1 206 Partial Content\nDate: Tue, 14 Nov 1995 06:25:24 GMT\nLast-Modified: Tue, 14 July 04:58:08 GMT\nContent-Length: 2331785\nContent-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES\n\n--THIS_STRING_SEPARATES\nContent-Type: video/example\nContent-Range: exampleunit 1.2-4.3/25\n\n...the first range...\n--THIS_STRING_SEPARATES\nContent-Type: video/example\nContent-Range: exampleunit 11.2-14.3/25\n\n...the second range\n--THIS_STRING_SEPARATES--\n```\n\n## Appendix B. Changes from RFC 2616\n\nServers are given more leeway in how they respond to a range request, in order to mitigate abuse by malicious (or just greedy) clients. (Section 3.1)\n\nA weak validator cannot be used in a 206 response. (Section 4.1)\n\nThe Content-Range header field only has meaning when the status code explicitly defines its use. (Section 4.2)\n\nThis specification introduces a Range Unit Registry. (Section 5.1)\n\nmultipart/byteranges can consist of a single part. (Appendix A)\n\n## Appendix C. Imported ABNF\n\nThe following core rules are included by reference, as defined in [Appendix B.1](https://www.rfc-editor.org/rfc/rfc5234.html#appendix-B.1) of [RFC5234]: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII character).\n\nNote that all rules derived from token are to be compared case-insensitively, like range-unit and acceptable-ranges.\n\nThe rules below are defined in [RFC7230]:\n\n```\n OWS = \n token = \n```\n\nThe rules below are defined in other parts:\n\n```\n HTTP-date = \n entity-tag = \n```\n\n## Appendix D. Collected ABNF\n\nIn the collected ABNF below, list rules are expanded as per [Section 1.2](rfc7230.html#notation) of [RFC7230].\n\n```\nAccept-Ranges = acceptable-ranges\n\nContent-Range = byte-content-range / other-content-range\n\nHTTP-date = \n\nIf-Range = entity-tag / HTTP-date\n\nOWS = \n\nRange = byte-ranges-specifier / other-ranges-specifier\n\nacceptable-ranges = ( *( \",\" OWS ) range-unit *( OWS \",\" [ OWS\n range-unit ] ) ) / \"none\"\n\nbyte-content-range = bytes-unit SP ( byte-range-resp /\n unsatisfied-range )\nbyte-range = first-byte-pos \"-\" last-byte-pos\nbyte-range-resp = byte-range \"/\" ( complete-length / \"*\" )\nbyte-range-set = *( \",\" OWS ) ( byte-range-spec /\n suffix-byte-range-spec ) *( OWS \",\" [ OWS ( byte-range-spec /\n suffix-byte-range-spec ) ] )\nbyte-range-spec = first-byte-pos \"-\" [ last-byte-pos ]\nbyte-ranges-specifier = bytes-unit \"=\" byte-range-set\nbytes-unit = \"bytes\"\n\ncomplete-length = 1*DIGIT\n\nentity-tag = \n\nfirst-byte-pos = 1*DIGIT\n\nlast-byte-pos = 1*DIGIT\n\nother-content-range = other-range-unit SP other-range-resp\nother-range-resp = *CHAR\nother-range-set = 1*VCHAR\nother-range-unit = token\nother-ranges-specifier = other-range-unit \"=\" other-range-set\n\nrange-unit = bytes-unit / other-range-unit\n\nsuffix-byte-range-spec = \"-\" suffix-length\nsuffix-length = 1*DIGIT\n\ntoken = \n\nunsatisfied-range = \"*/\" complete-length\n```\n\n## Index\n\n2 4 A B C G I M R\n\n- **2**\n - 206 Partial Content (status code) **4.1** , 5.2 , B\n- **4**\n - 416 Range Not Satisfiable (status code) **4.4** , 5.2\n- **A**\n - Accept-Ranges header field 2 , **2.3** , 5.1.2 , 5.3\n- **B**\n - *BCP13* 5.4 , **8.2**\n - *BCP90* 5.3 , **8.2**\n- **C**\n - Content-Range header field 2 , **4.2** , 4.4 , 5.3 , B\n- **G**\n - Grammar\n - Accept-Ranges **2.3**\n - acceptable-ranges **2.3**\n - byte-content-range **4.2**\n - byte-range **4.2**\n - byte-range-resp **4.2**\n - byte-range-set **2.1**\n - byte-range-spec **2.1**\n - byte-ranges-specifier **2.1**\n - bytes-unit 2 , **2.1**\n - complete-length **4.2**\n - Content-Range **4.2**\n - first-byte-pos **2.1**\n - If-Range **3.2**\n - last-byte-pos **2.1**\n - other-content-range **4.2**\n - other-range-resp **4.2**\n - other-range-unit 2 , **2.2**\n - Range **3.1**\n - range-unit **2**\n - ranges-specifier **2.1**\n - suffix-byte-range-spec **2.1**\n - suffix-length **2.1**\n - unsatisfied-range **4.2**\n- **I**\n - If-Range header field 3.1 , **3.2** , 5.3\n- **M**\n - Media Type\n - multipart/byteranges **5.4.1** , **A**\n - multipart/x-byteranges A\n - multipart/byteranges Media Type **5.4.1** , **A**\n - multipart/x-byteranges Media Type A\n- **R**\n - Range header field 2 , **3.1** , 4.1 , 4.4 , 5.3 , B\n - *RFC2046* **8.1** , A , A\n - *Section 5.1* A\n - *RFC2119* 1.1 , **8.1**\n - *RFC2616* **8.2**\n - *RFC5226* 5.1.1 , **8.2**\n - *Section 4.1* 5.1.1\n - *RFC5234* 1.2 , **8.1** , C\n - *Appendix B.1* C\n - *RFC7230* 1.1 , 1.2 , 6 , 7 , **8.1** , C , C , C , D\n - *Section 1.2* D\n - *Section 2.5* 1.1\n - *Section 3.2.3* C\n - *Section 3.2.6* C\n - *Section 7* 1.2\n - *Section 10* 7\n - *RFC7231* 2.1 , 6 , **8.1** , C\n - *Section 3* 2.1\n - *Section 7.1.1.1* C\n - *RFC7232* 3.1 , 3.2 , 3.2 , 3.2 , 4.3 , **8.1** , C\n - *Section 2.1* 4.3\n - *Section 2.2.2* 3.2 , 3.2\n - *Section 2.3* C\n - *Section 2.3.2* 3.2\n - *RFC7234* 4.1 , **8.1**\n - *Section 4.2.2* 4.1\n\n## Authors' Addresses\n\n**Roy T. Fielding** (editor)\nAdobe Systems Incorporated\n345 Park Ave\nSan Jose, CA 95110\nUSA\nEmail: fielding@gbiv.com\nURI: [http://roy.gbiv.com/](http://roy.gbiv.com/)\n\n**Yves Lafon** (editor)\nWorld Wide Web Consortium\nW3C / ERCIM\n2004, rte des Lucioles\nSophia-Antipolis, AM 06902\nFrance\nEmail: ylafon@w3.org\nURI: [http://www.raubacapeu.net/people/yves/](http://www.raubacapeu.net/people/yves/)\n\n**Julian F. Reschke** (editor)\ngreenbytes GmbH\nHafenweg 16\nMuenster, NW 48155\nGermany\nEmail: julian.reschke@greenbytes.de\nURI: [http://greenbytes.de/tech/webdav/](http://greenbytes.de/tech/webdav/)", "znaku_textu": 39449, "slov": 6009, "odkazu": 227, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:31", "sha256": "49c1cfbf5f92e4267d8ca1d2b51ba357958dfafcf30aae08f9c5d1077818d5a3", "hloubka": 3, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7233", "http://trustee.ietf.org/license-info", "http://www.iana.org/assignments/http-parameters", "https://www.rfc-editor.org/rfc/rfc5226.html", "http://www.iana.org/assignments/http-status-codes", "http://www.iana.org/assignments/message-headers/", "http://www.iana.org/assignments/media-types", "https://www.rfc-editor.org/rfc/rfc2046.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc7232.html", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://www.rfc-editor.org/rfc/rfc6838.html", "https://www.rfc-editor.org/info/bcp13", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://www.rfc-editor.org/rfc/rfc2616.html", "https://www.rfc-editor.org/info/bcp26", "http://roy.gbiv.com/", "http://www.raubacapeu.net/people/yves/", "http://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc7234.html", "titulek": "RFC 7234 - Hypertext Transfer Protocol (HTTP/1.1): Caching", "h1": "Hypertext Transfer Protocol (HTTP/1.1): Caching", "popis": "The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP caches and the associated header fields that control cache behavior or indicate cacheable response messages.", "klicova_slova": "Hypertext Transfer Protocol, HTTP, HTTP Caching", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7234", "og:description": "Hypertext Transfer Protocol (HTTP/1.1): Caching", "og:url": "https://httpwg.org/specs/rfc7234.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Conformance and Error Handling"}, {"uroven": 3, "text": "1.2. Syntax Notation"}, {"uroven": 4, "text": "1.2.1. Delta Seconds"}, {"uroven": 2, "text": "2. Overview of Cache Operation"}, {"uroven": 2, "text": "3. Storing Responses in Caches"}, {"uroven": 3, "text": "3.1. Storing Incomplete Responses"}, {"uroven": 3, "text": "3.2. Storing Responses to Authenticated Requests"}, {"uroven": 3, "text": "3.3. Combining Partial Content"}, {"uroven": 2, "text": "4. Constructing Responses from Caches"}, {"uroven": 3, "text": "4.1. Calculating Secondary Keys with Vary"}, {"uroven": 3, "text": "4.2. Freshness"}, {"uroven": 4, "text": "4.2.1. Calculating Freshness Lifetime"}, {"uroven": 4, "text": "4.2.2. Calculating Heuristic Freshness"}, {"uroven": 4, "text": "4.2.3. Calculating Age"}, {"uroven": 4, "text": "4.2.4. Serving Stale Responses"}, {"uroven": 3, "text": "4.3. Validation"}, {"uroven": 4, "text": "4.3.1. Sending a Validation Request"}, {"uroven": 4, "text": "4.3.2. Handling a Received Validation Request"}, {"uroven": 4, "text": "4.3.3. Handling a Validation Response"}, {"uroven": 4, "text": "4.3.4. Freshening Stored Responses upon Validation"}, {"uroven": 4, "text": "4.3.5. Freshening Responses via HEAD"}, {"uroven": 3, "text": "4.4. Invalidation"}, {"uroven": 2, "text": "5. Header Field Definitions"}, {"uroven": 3, "text": "5.1. Age"}, {"uroven": 3, "text": "5.2. Cache-Control"}, {"uroven": 4, "text": "5.2.1. Request Cache-Control Directives"}, {"uroven": 5, "text": "5.2.1.1. max-age"}, {"uroven": 5, "text": "5.2.1.2. max-stale"}, {"uroven": 5, "text": "5.2.1.3. min-fresh"}, {"uroven": 5, "text": "5.2.1.4. no-cache"}, {"uroven": 5, "text": "5.2.1.5. no-store"}, {"uroven": 5, "text": "5.2.1.6. no-transform"}, {"uroven": 5, "text": "5.2.1.7. only-if-cached"}, {"uroven": 4, "text": "5.2.2. Response Cache-Control Directives"}, {"uroven": 5, "text": "5.2.2.1. must-revalidate"}, {"uroven": 5, "text": "5.2.2.2. no-cache"}, {"uroven": 5, "text": "5.2.2.3. no-store"}, {"uroven": 5, "text": "5.2.2.4. no-transform"}, {"uroven": 5, "text": "5.2.2.5. public"}, {"uroven": 5, "text": "5.2.2.6. private"}, {"uroven": 5, "text": "5.2.2.7. proxy-revalidate"}, {"uroven": 5, "text": "5.2.2.8. max-age"}, {"uroven": 5, "text": "5.2.2.9. s-maxage"}, {"uroven": 4, "text": "5.2.3. Cache Control Extensions"}, {"uroven": 3, "text": "5.3. Expires"}, {"uroven": 3, "text": "5.4. Pragma"}, {"uroven": 3, "text": "5.5. Warning"}, {"uroven": 4, "text": "5.5.1. Warning: 110 - \"Response is Stale\""}, {"uroven": 4, "text": "5.5.2. Warning: 111 - \"Revalidation Failed\""}, {"uroven": 4, "text": "5.5.3. Warning: 112 - \"Disconnected Operation\""}, {"uroven": 4, "text": "5.5.4. Warning: 113 - \"Heuristic Expiration\""}, {"uroven": 4, "text": "5.5.5. Warning: 199 - \"Miscellaneous Warning\""}, {"uroven": 4, "text": "5.5.6. Warning: 214 - \"Transformation Applied\""}, {"uroven": 4, "text": "5.5.7. Warning: 299 - \"Miscellaneous Persistent Warning\""}, {"uroven": 2, "text": "6. History Lists"}, {"uroven": 2, "text": "7. IANA Considerations"}, {"uroven": 3, "text": "7.1. Cache Directive Registry"}, {"uroven": 4, "text": "7.1.1. Procedure"}, {"uroven": 4, "text": "7.1.2. Considerations for New Cache Control Directives"}, {"uroven": 4, "text": "7.1.3. Registrations"}, {"uroven": 3, "text": "7.2. Warn Code Registry"}, {"uroven": 4, "text": "7.2.1. Procedure"}, {"uroven": 4, "text": "7.2.2. Registrations"}, {"uroven": 3, "text": "7.3. Header Field Registration"}, {"uroven": 2, "text": "8. Security Considerations"}, {"uroven": 2, "text": "9. Acknowledgments"}, {"uroven": 2, "text": "10. References"}, {"uroven": 3, "text": "10.1. Normative References"}, {"uroven": 3, "text": "10.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Changes from RFC 2616"}, {"uroven": 2, "text": "Appendix B. Imported ABNF"}, {"uroven": 2, "text": "Appendix C. Collected ABNF"}, {"uroven": 2, "text": "Index"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP caches and the associated header fields that control cache behavior or indicate cacheable response messages.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7234](http://www.rfc-editor.org/info/rfc7234).\n\n## Copyright Notice\n\nCopyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Conformance and Error Handling\n - 1.2. Syntax Notation\n - 1.2.1. Delta Seconds\n- 2. Overview of Cache Operation\n- 3. Storing Responses in Caches\n - 3.1. Storing Incomplete Responses\n - 3.2. Storing Responses to Authenticated Requests\n - 3.3. Combining Partial Content\n- 4. Constructing Responses from Caches\n - 4.1. Calculating Secondary Keys with Vary\n - 4.2. Freshness\n - 4.2.1. Calculating Freshness Lifetime\n - 4.2.2. Calculating Heuristic Freshness\n - 4.2.3. Calculating Age\n - 4.2.4. Serving Stale Responses\n - 4.3. Validation\n - 4.3.1. Sending a Validation Request\n - 4.3.2. Handling a Received Validation Request\n - 4.3.3. Handling a Validation Response\n - 4.3.4. Freshening Stored Responses upon Validation\n - 4.3.5. Freshening Responses via HEAD\n - 4.4. Invalidation\n- 5. Header Field Definitions\n - 5.1. Age\n - 5.2. Cache-Control\n - 5.2.1. Request Cache-Control Directives\n - 5.2.2. Response Cache-Control Directives\n - 5.2.3. Cache Control Extensions\n - 5.3. Expires\n - 5.4. Pragma\n - 5.5. Warning\n - 5.5.1. Warning: 110 - \"Response is Stale\"\n - 5.5.2. Warning: 111 - \"Revalidation Failed\"\n - 5.5.3. Warning: 112 - \"Disconnected Operation\"\n - 5.5.4. Warning: 113 - \"Heuristic Expiration\"\n - 5.5.5. Warning: 199 - \"Miscellaneous Warning\"\n - 5.5.6. Warning: 214 - \"Transformation Applied\"\n - 5.5.7. Warning: 299 - \"Miscellaneous Persistent Warning\"\n- 6. History Lists\n- 7. IANA Considerations\n - 7.1. Cache Directive Registry\n - 7.1.1. Procedure\n - 7.1.2. Considerations for New Cache Control Directives\n - 7.1.3. Registrations\n - 7.2. Warn Code Registry\n - 7.2.1. Procedure\n - 7.2.2. Registrations\n - 7.3. Header Field Registration\n- 8. Security Considerations\n- 9. Acknowledgments\n- 10. References\n - 10.1. Normative References\n - 10.2. Informative References\n- Appendix A. Changes from RFC 2616\n- Appendix B. Imported ABNF\n- Appendix C. Collected ABNF\n- Index\n- Authors' Addresses\n\n## 1. Introduction\n\nHTTP is typically used for distributed information systems, where performance can be improved by the use of response caches. This document defines aspects of HTTP/1.1 related to caching and reusing response messages.\n\nAn HTTP cache is a local store of response messages and the subsystem that controls storage, retrieval, and deletion of messages in it. 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 by a server that is acting as a tunnel.\n\nA shared cache is a cache that stores responses to be reused by more than one user; shared caches are usually (but not always) deployed as a part of an intermediary. A private cache, in contrast, is dedicated to a single user; often, they are deployed as a component of a user agent.\n\nThe goal of caching in HTTP/1.1 is to significantly improve performance by reusing a prior response message to satisfy a current request. A stored response is considered \"fresh\", as defined in Section 4.2, if the response can be reused without \"validation\" (checking with the origin server to see if the cached response remains valid for this request). A fresh response can therefore reduce both latency and network overhead each time it is reused. When a cached response is not fresh, it might still be reusable if it can be freshened by validation (Section 4.3) or if the origin is unavailable (Section 4.2.4).\n\n### 1.1. Conformance and Error Handling\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nConformance criteria and considerations regarding error handling are defined in [Section 2.5](rfc7230.html#conformance) of [RFC7230].\n\n### 1.2. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234] with a list extension, defined in [Section 7](rfc7230.html#abnf.extension) of [RFC7230], that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). Appendix B describes rules imported from other documents. Appendix C shows the collected grammar with all list operators expanded to standard ABNF notation.\n\n#### 1.2.1. Delta Seconds\n\nThe delta-seconds rule specifies a non-negative integer, representing time in seconds.\n\n```\n delta-seconds = 1*DIGIT \n```\n\nA recipient parsing a delta-seconds value and converting it to binary form ought to use an arithmetic type of at least 31 bits of non-negative integer range. If a cache receives a delta-seconds value greater than the greatest integer it can represent, or if any of its subsequent calculations overflows, the cache *MUST* consider the value to be either 2147483648 (231) or the greatest positive integer it can conveniently represent.\n\n## 2. Overview of Cache Operation\n\nProper cache operation preserves the semantics of HTTP transfers ([RFC7231]) while eliminating the transfer of information already held in the cache. Although caching is an entirely *OPTIONAL* feature of HTTP, it can be assumed that reusing a cached response is desirable and that such reuse is the default behavior when no requirement or local configuration prevents it. Therefore, HTTP cache requirements are focused on preventing a cache from either storing a non-reusable response or reusing a stored response inappropriately, rather than mandating that caches always store and reuse particular responses.\n\nEach cache entry consists of a cache key and one or more HTTP responses corresponding to prior requests that used the same key. The most common form of cache entry is a successful result of a retrieval request: i.e., a [200 (OK)](rfc7231.html#status.200) response to a GET request, which contains a representation of the resource identified by the request target ([Section 4.3.1](rfc7231.html#GET) of [RFC7231]). However, it is also possible to cache permanent redirects, negative results (e.g., [404 (Not Found)](rfc7231.html#status.404)), incomplete results (e.g., [206 (Partial Content)](rfc7233.html#status.206)), and responses to methods other than GET if the method's definition allows such caching and defines something suitable for use as a cache key.\n\nThe primary cache key consists of the request method and target URI. However, since HTTP caches in common use today are typically limited to caching responses to GET, many caches simply decline other methods and use only the URI as the primary cache key.\n\nIf a request target is subject to content negotiation, its cache entry might consist of multiple stored responses, each differentiated by a secondary key for the values of the original request's selecting header fields (Section 4.1).\n\n## 3. Storing Responses in Caches\n\nA cache *MUST NOT* store a response to any request, unless:\n\n- The request method is understood by the cache and defined as being cacheable, and\n- the response status code is understood by the cache, and\n- the \"no-store\" cache directive (see Section 5.2 ) does not appear in request or response header fields, and\n- the \"private\" response directive (see Section 5.2.2.6 ) does not appear in the response, if the cache is shared, and\n- the [Authorization](rfc7235.html#header.authorization) header field (see [Section 4.2](rfc7235.html#header.authorization) of [RFC7235] ) does not appear in the request, if the cache is shared, unless the response explicitly allows it (see Section 3.2 ), and\n- the response either:\n - contains an Expires header field (see Section 5.3 ), or\n - contains a max-age response directive (see Section 5.2.2.8 ), or\n - contains a s-maxage response directive (see Section 5.2.2.9 ) and the cache is shared, or\n - contains a Cache Control Extension (see Section 5.2.3 ) that allows it to be cached, or\n - has a status code that is defined as cacheable by default (see Section 4.2.2 ), or\n - contains a public response directive (see Section 5.2.2.5 ).\n\nNote that any of the requirements listed above can be overridden by a cache-control extension; see Section 5.2.3.\n\nIn this context, a cache has \"understood\" a request method or a response status code if it recognizes it and implements all specified caching-related behavior.\n\nNote that, in normal operation, some caches will not store a response that has neither a cache validator nor an explicit expiration time, as such responses are not usually useful to store. However, caches are not prohibited from storing such responses.\n\n### 3.1. Storing Incomplete Responses\n\nA response message is considered complete when all of the octets indicated by the message framing ([RFC7230]) are received prior to the connection being closed. If the request method is GET, the response status code is [200 (OK)](rfc7231.html#status.200), and the entire response header section has been received, a cache *MAY* store an incomplete response message body if the cache entry is recorded as incomplete. Likewise, a [206 (Partial Content)](rfc7233.html#status.206) response *MAY* be stored as if it were an incomplete [200\n (OK)](rfc7231.html#status.200) cache entry. However, a cache *MUST NOT* store incomplete or partial-content responses if it does not support the [Range](rfc7233.html#header.range) and [Content-Range](rfc7233.html#header.content-range) header fields or if it does not understand the range units used in those fields.\n\nA cache *MAY* complete a stored incomplete response by making a subsequent range request ([RFC7233]) and combining the successful response with the stored entry, as defined in Section 3.3. A cache *MUST NOT* use an incomplete response to answer requests unless the response has been made complete or the request is partial and specifies a range that is wholly within the incomplete response. A cache *MUST NOT* send a partial response to a client without explicitly marking it as such using the [206 (Partial Content)](rfc7233.html#status.206) status code.\n\n### 3.2. Storing Responses to Authenticated Requests\n\nA shared cache *MUST NOT* use a cached response to a request with an [Authorization](rfc7235.html#header.authorization) header field ([Section 4.2](rfc7235.html#header.authorization) of [RFC7235]) to satisfy any subsequent request unless a cache directive that allows such responses to be stored is present in the response.\n\nIn this specification, the following Cache-Control response directives (Section 5.2.2) have such an effect: must-revalidate, public, and s-maxage.\n\nNote that cached responses that contain the \"must-revalidate\" and/or \"s-maxage\" response directives are not allowed to be served stale (Section 4.2.4) by shared caches. In particular, a response with either \"max-age=0, must-revalidate\" or \"s-maxage=0\" cannot be used to satisfy a subsequent request without revalidating it on the origin server.\n\n### 3.3. Combining Partial Content\n\nA response might transfer only a partial representation if the connection closed prematurely or if the request used one or more Range specifiers ([RFC7233]). After several such transfers, a cache might have received several ranges of the same representation. A cache *MAY* combine these ranges into a single stored response, and reuse that response to satisfy later requests, if they all share the same strong validator and the cache complies with the client requirements in [Section 4.3](rfc7233.html#combining.byte.ranges) of [RFC7233].\n\nWhen combining the new response with one or more stored responses, a cache *MUST*:\n\n- delete any Warning header fields in the stored response with warn-code 1xx (see Section 5.5 );\n- retain any Warning header fields in the stored response with warn-code 2xx; and,\n- use other header fields provided in the new response, aside from [Content-Range](rfc7233.html#header.content-range) , to replace all instances of the corresponding header fields in the stored response.\n\n## 4. Constructing Responses from Caches\n\nWhen presented with a request, a cache *MUST NOT* reuse a stored response, unless:\n\n- The presented effective request URI ( [Section 5.5](rfc7230.html#effective.request.uri) of [RFC7230] ) and that of the stored response match, and\n- the request method associated with the stored response allows it to be used for the presented request, and\n- selecting header fields nominated by the stored response (if any) match those presented (see Section 4.1 ), and\n- the presented request does not contain the no-cache pragma ( Section 5.4 ), nor the no-cache cache directive ( Section 5.2.1 ), unless the stored response is successfully validated ( Section 4.3 ), and\n- the stored response does not contain the no-cache cache directive ( Section 5.2.2.2 ), unless it is successfully validated ( Section 4.3 ), and\n- the stored response is either:\n - fresh (see Section 4.2 ), or\n - allowed to be served stale (see Section 4.2.4 ), or\n - successfully validated (see Section 4.3 ).\n\nNote that any of the requirements listed above can be overridden by a cache-control extension; see Section 5.2.3.\n\nWhen a stored response is used to satisfy a request without validation, a cache *MUST* generate an Age header field (Section 5.1), replacing any present in the response with a value equal to the stored response's current_age; see Section 4.2.3.\n\nA cache *MUST* write through requests with methods that are unsafe ([Section 4.2.1](rfc7231.html#safe.methods) of [RFC7231]) to the origin server; i.e., a cache is not allowed to generate a reply to such a request before having forwarded the request and having received a corresponding response.\n\nAlso, note that unsafe requests might invalidate already-stored responses; see Section 4.4.\n\nWhen more than one suitable response is stored, a cache *MUST* use the most recent response (as determined by the [Date](rfc7231.html#header.date) header field). It can also forward the request with \"Cache-Control: max-age=0\" or \"Cache-Control: no-cache\" to disambiguate which response to use.\n\nA cache that does not have a clock available *MUST NOT* use stored responses without revalidating them upon every use.\n\n### 4.1. Calculating Secondary Keys with Vary\n\nWhen a cache receives a request that can be satisfied by a stored response that has a [Vary](rfc7231.html#header.vary) header field ([Section 7.1.4](rfc7231.html#header.vary) of [RFC7231]), it *MUST NOT* use that response unless all of the selecting header fields nominated by the Vary header field match in both the original request (i.e., that associated with the stored response), and the presented request.\n\nThe selecting header fields from two requests are defined to match if and only if those in the first request can be transformed to those in the second request by applying any of the following:\n\n- adding or removing whitespace, where allowed in the header field's syntax\n- combining multiple header fields with the same field name (see [Section 3.2](rfc7230.html#header.fields) of [RFC7230] )\n- normalizing both header field values in a way that is known to have identical semantics, according to the header field's specification (e.g., reordering field values when order is not significant; case-normalization, where values are defined to be case-insensitive)\n\nIf (after any normalization that might take place) a header field is absent from a request, it can only match another request if it is also absent there.\n\nA [Vary](rfc7231.html#header.vary) header field-value of \"*\" always fails to match.\n\nThe stored response with matching selecting header fields is known as the selected response.\n\nIf multiple selected responses are available (potentially including responses without a Vary header field), the cache will need to choose one to use. When a selecting header field has a known mechanism for doing so (e.g., qvalues on [Accept](rfc7231.html#header.accept) and similar request header fields), that mechanism *MAY* be used to select preferred responses; of the remainder, the most recent response (as determined by the [Date](rfc7231.html#header.date) header field) is used, as per Section 4.\n\nIf no selected response is available, the cache cannot satisfy the presented request. Typically, it is forwarded to the origin server in a (possibly conditional; see Section 4.3) request.\n\n### 4.2. Freshness\n\nA fresh response is one whose age has not yet exceeded its freshness lifetime. Conversely, a stale response is one where it has.\n\nA response's freshness lifetime is the length of time between its generation by the origin server and its expiration time. An explicit expiration time is the time at which the origin server intends that a stored response can no longer be used by a cache without further validation, whereas a heuristic expiration time is assigned by a cache when no explicit expiration time is available.\n\nA response's age is the time that has passed since it was generated by, or successfully validated with, the origin server.\n\nWhen a response is \"fresh\" in the cache, it can be used to satisfy subsequent requests without contacting the origin server, thereby improving efficiency.\n\nThe primary mechanism for determining freshness is for an origin server to provide an explicit expiration time in the future, using either the Expires header field (Section 5.3) or the max-age response directive (Section 5.2.2.8). Generally, origin servers will assign future explicit expiration times to responses in the belief that the representation is not likely to change in a semantically significant way before the expiration time is reached.\n\nIf an origin server wishes to force a cache to validate every request, it can assign an explicit expiration time in the past to indicate that the response is already stale. Compliant caches will normally validate a stale cached response before reusing it for subsequent requests (see Section 4.2.4).\n\nSince origin servers do not always provide explicit expiration times, caches are also allowed to use a heuristic to determine an expiration time under certain circumstances (see Section 4.2.2).\n\nThe calculation to determine if a response is fresh is:\n\n```\n response_is_fresh = (freshness_lifetime > current_age)\n```\n\nfreshness_lifetime is defined in Section 4.2.1; current_age is defined in Section 4.2.3.\n\nClients can send the max-age or min-fresh cache directives in a request to constrain or relax freshness calculations for the corresponding response (Section 5.2.1).\n\nWhen calculating freshness, to avoid common problems in date parsing:\n\n- Although all date formats are specified to be case-sensitive, a cache recipient *SHOULD* match day, week, and time-zone names case-insensitively.\n- If a cache recipient's internal implementation of time has less resolution than the value of an HTTP-date, the recipient *MUST* internally represent a parsed Expires date as the nearest time equal to or earlier than the received value.\n- A cache recipient *MUST NOT* allow local time zones to influence the calculation or comparison of an age or expiration time.\n- A cache recipient *SHOULD* consider a date with a zone abbreviation other than GMT or UTC to be invalid for calculating expiration.\n\nNote that freshness applies only to cache operation; it cannot be used to force a user agent to refresh its display or reload a resource. See Section 6 for an explanation of the difference between caches and history mechanisms.\n\n#### 4.2.1. Calculating Freshness Lifetime\n\nA cache can calculate the freshness lifetime (denoted as freshness_lifetime) of a response by using the first match of the following:\n\n- If the cache is shared and the s-maxage response directive ( Section 5.2.2.9 ) is present, use its value, or\n- If the max-age response directive ( Section 5.2.2.8 ) is present, use its value, or\n- If the Expires response header field ( Section 5.3 ) is present, use its value minus the value of the [Date](rfc7231.html#header.date) response header field, or\n- Otherwise, no explicit expiration time is present in the response. A heuristic freshness lifetime might be applicable; see Section 4.2.2 .\n\nNote that this calculation is not vulnerable to clock skew, since all of the information comes from the origin server.\n\nWhen there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives), the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale.\n\n#### 4.2.2. Calculating Heuristic Freshness\n\nSince origin servers do not always provide explicit expiration times, a cache *MAY* assign a heuristic expiration time when an explicit time is not specified, employing algorithms that use other header field values (such as the [Last-Modified](rfc7232.html#header.last-modified) time) to estimate a plausible expiration time. This specification does not provide specific algorithms, but does impose worst-case constraints on their results.\n\nA cache *MUST NOT* use heuristics to determine freshness when an explicit expiration time is present in the stored response. Because of the requirements in Section 3, this means that, effectively, heuristics can only be used on responses without explicit freshness whose status codes are defined as cacheable by default (see [Section 6.1](rfc7231.html#overview.of.status.codes) of [RFC7231]), and those responses without explicit freshness that have been marked as explicitly cacheable (e.g., with a \"public\" response directive).\n\nIf the response has a [Last-Modified](rfc7232.html#header.last-modified) header field ([Section 2.2](rfc7232.html#header.last-modified) of [RFC7232]), caches are encouraged to use a heuristic expiration value that is no more than some fraction of the interval since that time. A typical setting of this fraction might be 10%.\n\nWhen a heuristic is used to calculate freshness lifetime, a cache *SHOULD* generate a Warning header field with a 113 warn-code (see Section 5.5.4) in the response if its current_age is more than 24 hours and such a warning is not already present.\n\n#### 4.2.3. Calculating Age\n\nThe Age header field is used to convey an estimated age of the response message when obtained from a cache. The Age field value is the cache's estimate of the number of seconds since the response was generated or validated by the origin server. In essence, the Age value is the sum of the time that the response has been resident in each of the caches along the path from the origin server, plus the amount of time it has been in transit along network paths.\n\nThe following data is used for the age calculation:\n\nage_value\n\n- The term \"age_value\" denotes the value of the Age header field ( Section 5.1 ), in a form appropriate for arithmetic operation; or 0, if not available.\n\ndate_value\n\n- The term \"date_value\" denotes the value of the Date header field, in a form appropriate for arithmetic operations. See [Section 7.1.1.2](rfc7231.html#header.date) of [RFC7231] for the definition of the Date header field, and for requirements regarding responses without it.\n\nnow\n\n- The term \"now\" means \"the current value of the clock at the host performing the calculation\". A host ought to use NTP ( [RFC5905] ) or some similar protocol to synchronize its clocks to Coordinated Universal Time.\n\nrequest_time\n\n- The current value of the clock at the host at the time the request resulting in the stored response was made.\n\nresponse_time\n\n- The current value of the clock at the host at the time the response was received.\n\nA response's age can be calculated in two entirely independent ways:\n\n1. the \"apparent_age\": response_time minus date_value, if the local clock is reasonably well synchronized to the origin server's clock. If the result is negative, the result is replaced by zero.\n2. the \"corrected_age_value\", if all of the caches along the response path implement HTTP/1.1. A cache *MUST* interpret this value relative to the time the request was initiated, not the time that the response was received.\n\n```\n apparent_age = max(0, response_time - date_value);\n\n response_delay = response_time - request_time;\n corrected_age_value = age_value + response_delay; \n```\n\nThese are combined as\n\n```\n corrected_initial_age = max(apparent_age, corrected_age_value);\n```\n\nunless the cache is confident in the value of the Age header field (e.g., because there are no HTTP/1.0 hops in the [Via](rfc7230.html#header.via) header field), in which case the corrected_age_value *MAY* be used as the corrected_initial_age.\n\nThe current_age of a stored response can then be calculated by adding the amount of time (in seconds) since the stored response was last validated by the origin server to the corrected_initial_age.\n\n```\n resident_time = now - response_time;\n current_age = corrected_initial_age + resident_time;\n```\n\n#### 4.2.4. Serving Stale Responses\n\nA \"stale\" response is one that either has explicit expiry information or is allowed to have heuristic expiry calculated, but is not fresh according to the calculations in Section 4.2.\n\nA cache *MUST NOT* generate a stale response if it is prohibited by an explicit in-protocol directive (e.g., by a \"no-store\" or \"no-cache\" cache directive, a \"must-revalidate\" cache-response-directive, or an applicable \"s-maxage\" or \"proxy-revalidate\" cache-response-directive; see Section 5.2.2).\n\nA cache *MUST NOT* send stale responses unless it is disconnected (i.e., it cannot contact the origin server or otherwise find a forward path) or doing so is explicitly allowed (e.g., by the max-stale request directive; see Section 5.2.1).\n\nA cache *SHOULD* generate a Warning header field with the 110 warn-code (see Section 5.5.1) in stale responses. Likewise, a cache *SHOULD* generate a 112 warn-code (see Section 5.5.3) in stale responses if the cache is disconnected.\n\nA cache *SHOULD NOT* generate a new Warning header field when forwarding a response that does not have an Age header field, even if the response is already stale. A cache need not validate a response that merely became stale in transit.\n\n### 4.3. Validation\n\nWhen a cache has one or more stored responses for a requested URI, but cannot serve any of them (e.g., because they are not fresh, or one cannot be selected; see Section 4.1), it can use the conditional request mechanism [RFC7232] in the forwarded request to give the next inbound server an opportunity to select a valid stored response to use, updating the stored metadata in the process, or to replace the stored response(s) with a new response. This process is known as \"validating\" or \"revalidating\" the stored response.\n\n#### 4.3.1. Sending a Validation Request\n\nWhen sending a conditional request for cache validation, a cache sends one or more precondition header fields containing validator metadata from its stored response(s), which is then compared by recipients to determine whether a stored response is equivalent to a current representation of the resource.\n\nOne such validator is the timestamp given in a [Last-Modified](rfc7232.html#header.last-modified) header field ([Section 2.2](rfc7232.html#header.last-modified) of [RFC7232]), which can be used in an [If-Modified-Since](rfc7232.html#header.if-modified-since) header field for response validation, or in an [If-Unmodified-Since](rfc7232.html#header.if-unmodified-since) or [If-Range](rfc7233.html#header.if-range) header field for representation selection (i.e., the client is referring specifically to a previously obtained representation with that timestamp).\n\nAnother validator is the entity-tag given in an [ETag](rfc7232.html#header.etag) header field ([Section 2.3](rfc7232.html#header.etag) of [RFC7232]). One or more entity-tags, indicating one or more stored responses, can be used in an [If-None-Match](rfc7232.html#header.if-none-match) header field for response validation, or in an [If-Match](rfc7232.html#header.if-match) or [If-Range](rfc7233.html#header.if-range) header field for representation selection (i.e., the client is referring specifically to one or more previously obtained representations with the listed entity-tags).\n\n#### 4.3.2. Handling a Received Validation Request\n\nEach client in the request chain may have its own cache, so it is common for a cache at an intermediary to receive conditional requests from other (outbound) caches. Likewise, some user agents make use of conditional requests to limit data transfers to recently modified representations or to complete the transfer of a partially retrieved representation.\n\nIf a cache receives a request that can be satisfied by reusing one of its stored [200 (OK)](rfc7231.html#status.200) or [206 (Partial Content)](rfc7233.html#status.206) responses, the cache *SHOULD* evaluate any applicable conditional header field preconditions received in that request with respect to the corresponding validators contained within the selected response. A cache *MUST NOT* evaluate conditional header fields that are only applicable to an origin server, found in a request with semantics that cannot be satisfied with a cached response, or applied to a target resource for which it has no stored responses; such preconditions are likely intended for some other (inbound) server.\n\nThe proper evaluation of conditional requests by a cache depends on the received precondition header fields and their precedence, as defined in [Section 6](rfc7232.html#precedence) of [RFC7232]. The [If-Match](rfc7232.html#header.if-match) and [If-Unmodified-Since](rfc7232.html#header.if-unmodified-since) conditional header fields are not applicable to a cache.\n\nA request containing an [If-None-Match](rfc7232.html#header.if-none-match) header field ([Section 3.2](rfc7232.html#header.if-none-match) of [RFC7232]) indicates that the client wants to validate one or more of its own stored responses in comparison to whichever stored response is selected by the cache. If the field-value is \"*\", or if the field-value is a list of entity-tags and at least one of them matches the entity-tag of the selected stored response, a cache recipient *SHOULD* generate a [304 (Not Modified)](rfc7232.html#status.304) response (using the metadata of the selected stored response) instead of sending that stored response.\n\nWhen a cache decides to revalidate its own stored responses for a request that contains an [If-None-Match](rfc7232.html#header.if-none-match) list of entity-tags, the cache *MAY* combine the received list with a list of entity-tags from its own stored set of responses (fresh or stale) and send the union of the two lists as a replacement [If-None-Match](rfc7232.html#header.if-none-match) header field value in the forwarded request. If a stored response contains only partial content, the cache *MUST NOT* include its entity-tag in the union unless the request is for a range that would be fully satisfied by that partial stored response. If the response to the forwarded request is [304 (Not Modified)](rfc7232.html#status.304) and has an ETag header field value with an entity-tag that is not in the client's list, the cache *MUST* generate a [200 (OK)](rfc7231.html#status.200) response for the client by reusing its corresponding stored response, as updated by the 304 response metadata (Section 4.3.4).\n\nIf an [If-None-Match](rfc7232.html#header.if-none-match) header field is not present, a request containing an [If-Modified-Since](rfc7232.html#header.if-modified-since) header field ([Section 3.3](rfc7232.html#header.if-modified-since) of [RFC7232]) indicates that the client wants to validate one or more of its own stored responses by modification date. A cache recipient *SHOULD* generate a [304 (Not Modified)](rfc7232.html#status.304) response (using the metadata of the selected stored response) if one of the following cases is true: 1) the selected stored response has a [Last-Modified](rfc7232.html#header.last-modified) field-value that is earlier than or equal to the conditional timestamp; 2) no [Last-Modified](rfc7232.html#header.last-modified) field is present in the selected stored response, but it has a [Date](rfc7231.html#header.date) field-value that is earlier than or equal to the conditional timestamp; or, 3) neither [Last-Modified](rfc7232.html#header.last-modified) nor [Date](rfc7231.html#header.date) is present in the selected stored response, but the cache recorded it as having been received at a time earlier than or equal to the conditional timestamp.\n\nA cache that implements partial responses to range requests, as defined in [RFC7233], also needs to evaluate a received [If-Range](rfc7233.html#header.if-range) header field ([Section 3.2](rfc7233.html#header.if-range) of [RFC7233]) with respect to its selected stored response.\n\n#### 4.3.3. Handling a Validation Response\n\nCache handling of a response to a conditional request is dependent upon its status code:\n\n- A [304 (Not Modified)](rfc7232.html#status.304) response status code indicates that the stored response can be updated and reused; see Section 4.3.4 .\n- A full response (i.e., one with a payload body) indicates that none of the stored responses nominated in the conditional request is suitable. Instead, the cache *MUST* use the full response to satisfy the request and *MAY* replace the stored response(s).\n- However, if a cache receives a [5xx (Server Error)](rfc7231.html#status.5xx) response while attempting to validate a response, it can either forward this response to the requesting client, or act as if the server failed to respond. In the latter case, the cache *MAY* send a previously stored response (see Section 4.2.4 ).\n\n#### 4.3.4. Freshening Stored Responses upon Validation\n\nWhen a cache receives a [304 (Not Modified)](rfc7232.html#status.304) response and already has one or more stored [200 (OK)](rfc7231.html#status.200) responses for the same cache key, the cache needs to identify which of the stored responses are updated by this new response and then update the stored response(s) with the new information provided in the [304](rfc7232.html#status.304) response.\n\nThe stored response to update is identified by using the first match (if any) of the following:\n\n- If the new response contains a strong validator (see [Section 2.1](rfc7232.html#weak.and.strong.validators) of [RFC7232] ), then that strong validator identifies the selected representation for update. All of the stored responses with the same strong validator are selected. If none of the stored responses contain the same strong validator, then the cache *MUST NOT* use the new response to update any stored responses.\n- If the new response contains a weak validator and that validator corresponds to one of the cache's stored responses, then the most recent of those matching stored responses is selected for update.\n- If the new response does not include any form of validator (such as in the case where a client generates an If-Modified-Since request from a source other than the Last-Modified response header field), and there is only one stored response, and that stored response also lacks a validator, then that stored response is selected for update.\n\nIf a stored response is selected for update, the cache *MUST*:\n\n- delete any Warning header fields in the stored response with warn-code 1xx (see Section 5.5 );\n- retain any Warning header fields in the stored response with warn-code 2xx; and,\n- use other header fields provided in the [304 (Not Modified)](rfc7232.html#status.304) response to replace all instances of the corresponding header fields in the stored response.\n\n#### 4.3.5. Freshening Responses via HEAD\n\nA response to the HEAD method is identical to what an equivalent request made with a GET would have been, except it lacks a body. This property of HEAD responses can be used to invalidate or update a cached GET response if the more efficient conditional GET request mechanism is not available (due to no validators being present in the stored response) or if transmission of the representation body is not desired even if it has changed.\n\nWhen a cache makes an inbound HEAD request for a given request target and receives a [200 (OK)](rfc7231.html#status.200) response, the cache *SHOULD* update or invalidate each of its stored GET responses that could have been selected for that request (see Section 4.1).\n\nFor each of the stored responses that could have been selected, if the stored response and HEAD response have matching values for any received validator fields ([ETag](rfc7232.html#header.etag) and [Last-Modified](rfc7232.html#header.last-modified)) and, if the HEAD response has a [Content-Length](rfc7230.html#header.content-length) header field, the value of [Content-Length](rfc7230.html#header.content-length) matches that of the stored response, the cache *SHOULD* update the stored response as described below; otherwise, the cache *SHOULD* consider the stored response to be stale.\n\nIf a cache updates a stored response with the metadata provided in a HEAD response, the cache *MUST*:\n\n- delete any Warning header fields in the stored response with warn-code 1xx (see Section 5.5 );\n- retain any Warning header fields in the stored response with warn-code 2xx; and,\n- use other header fields provided in the HEAD response to replace all instances of the corresponding header fields in the stored response and append new header fields to the stored response's header section unless otherwise restricted by the Cache-Control header field.\n\n### 4.4. Invalidation\n\nBecause unsafe request methods ([Section 4.2.1](rfc7231.html#safe.methods) of [RFC7231]) such as PUT, POST or DELETE have the potential for changing state on the origin server, intervening caches can use them to keep their contents up to date.\n\nA cache *MUST* invalidate the effective Request URI ([Section 5.5](rfc7230.html#effective.request.uri) of [RFC7230]) as well as the URI(s) in the [Location](rfc7231.html#header.location) and [Content-Location](rfc7231.html#header.content-location) response header fields (if present) when a non-error status code is received in response to an unsafe request method.\n\nHowever, a cache *MUST NOT* invalidate a URI from a [Location](rfc7231.html#header.location) or [Content-Location](rfc7231.html#header.content-location) response header field if the host part of that URI differs from the host part in the effective request URI ([Section 5.5](rfc7230.html#effective.request.uri) of [RFC7230]). This helps prevent denial-of-service attacks.\n\nA cache *MUST* invalidate the effective request URI ([Section 5.5](rfc7230.html#effective.request.uri) of [RFC7230]) when it receives a non-error response to a request with a method whose safety is unknown.\n\nHere, a \"non-error response\" is one with a [2xx (Successful)](rfc7231.html#status.2xx) or [3xx (Redirection)](rfc7231.html#status.3xx) status code. \"Invalidate\" means that the cache will either remove all stored responses related to the effective request URI or will mark these as \"invalid\" and in need of a mandatory validation before they can be sent in response to a subsequent request.\n\nNote that this does not guarantee that all appropriate responses are invalidated. For example, a state-changing request might invalidate responses in the caches it travels through, but relevant responses still might be stored in other caches that it has not.\n\n## 5. Header Field Definitions\n\nThis section defines the syntax and semantics of HTTP/1.1 header fields related to caching.\n\n### 5.1. Age\n\nThe \"Age\" header field conveys the sender's estimate of the amount of time since the response was generated or successfully validated at the origin server. Age values are calculated as specified in Section 4.2.3.\n\n```\n Age = delta-seconds \n```\n\nThe Age field-value is a non-negative integer, representing time in seconds (see Section 1.2.1).\n\nThe presence of an Age header field implies that the response was not generated or validated by the origin server for this request. However, lack of an Age header field does not imply the origin was contacted, since the response might have been received from an HTTP/1.0 cache that does not implement Age.\n\n### 5.2. Cache-Control\n\nThe \"Cache-Control\" header field is used to specify directives for caches along the request/response chain. Such cache directives are unidirectional in that the presence of a directive in a request does not imply that the same directive is to be given in the response.\n\nA cache *MUST* obey the requirements of the Cache-Control directives defined in this section. See Section 5.2.3 for information about how Cache-Control directives defined elsewhere are handled.\n\nA proxy, whether or not it implements a cache, *MUST* pass cache directives through in forwarded messages, regardless of their significance to that application, since the directives might be applicable to all recipients along the request/response chain. It is not possible to target a directive to a specific cache.\n\nCache directives are identified by a token, to be compared case-insensitively, and have an optional argument, that can use both token and quoted-string syntax. For the directives defined below that define arguments, recipients ought to accept both forms, even if one is documented to be preferred. For any directive not defined by this specification, a recipient *MUST* accept both forms.\n\n```\n Cache-Control = 1#cache-directive cache-directive = token [ \"=\" ( token / quoted-string ) ]\n```\n\nFor the cache directives defined below, no argument is defined (nor allowed) unless stated otherwise.\n\n#### 5.2.1. Request Cache-Control Directives\n\n##### 5.2.1.1. max-age\n\nArgument syntax:\n\n- delta-seconds (see Section 1.2.1 )\n\nThe \"max-age\" request directive indicates that the client is unwilling to accept a response whose age is greater than the specified number of seconds. Unless the max-stale request directive is also present, the client is not willing to accept a stale response.\n\nThis directive uses the token form of the argument syntax: e.g., 'max-age=5' not 'max-age=\"5\"'. A sender *SHOULD NOT* generate the quoted-string form.\n\n##### 5.2.1.2. max-stale\n\nArgument syntax:\n\n- delta-seconds (see Section 1.2.1 )\n\nThe \"max-stale\" request directive indicates that the client is willing to accept a response that has exceeded its freshness lifetime. If max-stale is assigned a value, then the client is willing to accept a response that has exceeded its freshness lifetime by no more than the specified number of seconds. If no value is assigned to max-stale, then the client is willing to accept a stale response of any age.\n\nThis directive uses the token form of the argument syntax: e.g., 'max-stale=10' not 'max-stale=\"10\"'. A sender *SHOULD NOT* generate the quoted-string form.\n\n##### 5.2.1.3. min-fresh\n\nArgument syntax:\n\n- delta-seconds (see Section 1.2.1 )\n\nThe \"min-fresh\" request directive indicates that the client is willing to accept a response whose freshness lifetime is no less than its current age plus the specified time in seconds. That is, the client wants a response that will still be fresh for at least the specified number of seconds.\n\nThis directive uses the token form of the argument syntax: e.g., 'min-fresh=20' not 'min-fresh=\"20\"'. A sender *SHOULD NOT* generate the quoted-string form.\n\n##### 5.2.1.4. no-cache\n\nThe \"no-cache\" request directive indicates that a cache *MUST NOT* use a stored response to satisfy the request without successful validation on the origin server.\n\n##### 5.2.1.5. no-store\n\nThe \"no-store\" request directive indicates that a cache *MUST NOT* store any part of either this request or any response to it. This directive applies to both private and shared caches. \"*MUST NOT* store\" in this context means that the cache *MUST NOT* intentionally store the information in non-volatile storage, and *MUST* make a best-effort attempt to remove the information from volatile storage as promptly as possible after forwarding it.\n\nThis directive is NOT a reliable or sufficient mechanism for ensuring privacy. In particular, malicious or compromised caches might not recognize or obey this directive, and communications networks might be vulnerable to eavesdropping.\n\nNote that if a request containing this directive is satisfied from a cache, the no-store request directive does not apply to the already stored response.\n\n##### 5.2.1.6. no-transform\n\nThe \"no-transform\" request directive indicates that an intermediary (whether or not it implements a cache) *MUST NOT* transform the payload, as defined in [Section 5.7.2](rfc7230.html#message.transformations) of [RFC7230].\n\n##### 5.2.1.7. only-if-cached\n\nThe \"only-if-cached\" request directive indicates that the client only wishes to obtain a stored response. If it receives this directive, a cache *SHOULD* either respond using a stored response that is consistent with the other constraints of the request, or respond with a [504 (Gateway\n Timeout)](rfc7231.html#status.504) status code. If a group of caches is being operated as a unified system with good internal connectivity, a member cache *MAY* forward such a request within that group of caches.\n\n#### 5.2.2. Response Cache-Control Directives\n\n##### 5.2.2.1. must-revalidate\n\nThe \"must-revalidate\" response directive indicates that once it has become stale, a cache *MUST NOT* use the response to satisfy subsequent requests without successful validation on the origin server.\n\nThe must-revalidate directive is necessary to support reliable operation for certain protocol features. In all circumstances a cache *MUST* obey the must-revalidate directive; in particular, if a cache cannot reach the origin server for any reason, it *MUST* generate a [504 (Gateway Timeout)](rfc7231.html#status.504) response.\n\nThe must-revalidate directive ought to be used by servers if and only if failure to validate a request on the representation could result in incorrect operation, such as a silently unexecuted financial transaction.\n\n##### 5.2.2.2. no-cache\n\nArgument syntax:\n\n- # field-name\n\nThe \"no-cache\" response directive indicates that the response *MUST NOT* be used to satisfy a subsequent request without successful validation on the origin server. This allows an origin server to prevent a cache from using it to satisfy a request without contacting it, even by caches that have been configured to send stale responses.\n\nIf the no-cache response directive specifies one or more field-names, then a cache *MAY* use the response to satisfy a subsequent request, subject to any other restrictions on caching. However, any header fields in the response that have the field-name(s) listed *MUST NOT* be sent in the response to a subsequent request without successful revalidation with the origin server. This allows an origin server to prevent the re-use of certain header fields in a response, while still allowing caching of the rest of the response.\n\nThe field-names given are not limited to the set of header fields defined by this specification. Field names are case-insensitive.\n\nThis directive uses the quoted-string form of the argument syntax. A sender *SHOULD NOT* generate the token form (even if quoting appears not to be needed for single-entry lists).\n\n**Note:** Although it has been back-ported to many implementations, some HTTP/1.0 caches will not recognize or obey this directive. Also, no-cache response directives with field-names are often handled by caches as if an unqualified no-cache directive was received; i.e., the special handling for the qualified form is not widely implemented.\n\n##### 5.2.2.3. no-store\n\nThe \"no-store\" response directive indicates that a cache *MUST NOT* store any part of either the immediate request or response. This directive applies to both private and shared caches. \"*MUST NOT* store\" in this context means that the cache *MUST NOT* intentionally store the information in non-volatile storage, and *MUST* make a best-effort attempt to remove the information from volatile storage as promptly as possible after forwarding it.\n\nThis directive is NOT a reliable or sufficient mechanism for ensuring privacy. In particular, malicious or compromised caches might not recognize or obey this directive, and communications networks might be vulnerable to eavesdropping.\n\n##### 5.2.2.4. no-transform\n\nThe \"no-transform\" response directive indicates that an intermediary (regardless of whether it implements a cache) *MUST NOT* transform the payload, as defined in [Section 5.7.2](rfc7230.html#message.transformations) of [RFC7230].\n\n##### 5.2.2.5. public\n\nThe \"public\" response directive indicates that any cache *MAY* store the response, even if the response would normally be non-cacheable or cacheable only within a private cache. (See Section 3.2 for additional details related to the use of public in response to a request containing [Authorization](rfc7235.html#header.authorization), and Section 3 for details of how public affects responses that would normally not be stored, due to their status codes not being defined as cacheable by default; see Section 4.2.2.)\n\n##### 5.2.2.6. private\n\nArgument syntax:\n\n- # field-name\n\nThe \"private\" response directive indicates that the response message is intended for a single user and *MUST NOT* be stored by a shared cache. A private cache *MAY* store the response and reuse it for later requests, even if the response would normally be non-cacheable.\n\nIf the private response directive specifies one or more field-names, this requirement is limited to the field-values associated with the listed response header fields. That is, a shared cache *MUST NOT* store the specified field-names(s), whereas it *MAY* store the remainder of the response message.\n\nThe field-names given are not limited to the set of header fields defined by this specification. Field names are case-insensitive.\n\nThis directive uses the quoted-string form of the argument syntax. A sender *SHOULD NOT* generate the token form (even if quoting appears not to be needed for single-entry lists).\n\n**Note:** This usage of the word \"private\" only controls where the response can be stored; it cannot ensure the privacy of the message content. Also, private response directives with field-names are often handled by caches as if an unqualified private directive was received; i.e., the special handling for the qualified form is not widely implemented.\n\n##### 5.2.2.7. proxy-revalidate\n\nThe \"proxy-revalidate\" response directive has the same meaning as the must-revalidate response directive, except that it does not apply to private caches.\n\n##### 5.2.2.8. max-age\n\nArgument syntax:\n\n- delta-seconds (see Section 1.2.1 )\n\nThe \"max-age\" response directive indicates that the response is to be considered stale after its age is greater than the specified number of seconds.\n\nThis directive uses the token form of the argument syntax: e.g., 'max-age=5' not 'max-age=\"5\"'. A sender *SHOULD NOT* generate the quoted-string form.\n\n##### 5.2.2.9. s-maxage\n\nArgument syntax:\n\n- delta-seconds (see Section 1.2.1 )\n\nThe \"s-maxage\" response directive indicates that, in shared caches, the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the Expires header field. The s-maxage directive also implies the semantics of the proxy-revalidate response directive.\n\nThis directive uses the token form of the argument syntax: e.g., 's-maxage=10' not 's-maxage=\"10\"'. A sender *SHOULD NOT* generate the quoted-string form.\n\n#### 5.2.3. Cache Control Extensions\n\nThe Cache-Control header field can be extended through the use of one or more cache-extension tokens, each with an optional value. A cache *MUST* ignore unrecognized cache directives.\n\nInformational extensions (those that do not require a change in cache behavior) can be added without changing the semantics of other directives.\n\nBehavioral extensions are designed to work by acting as modifiers to the existing base of cache directives. Both the new directive and the old directive are supplied, such that applications that do not understand the new directive will default to the behavior specified by the old directive, and those that understand the new directive will recognize it as modifying the requirements associated with the old directive. In this way, extensions to the existing cache-control directives can be made without breaking deployed caches.\n\nFor example, consider a hypothetical new response directive called \"community\" that acts as a modifier to the private directive: in addition to private caches, any cache that is shared only by members of the named community is allowed to cache the response. An origin server wishing to allow the UCI community to use an otherwise private response in their shared cache(s) could do so by including\n\n```\n Cache-Control: private, community=\"UCI\"\n```\n\nA cache that recognizes such a community cache-extension could broaden its behavior in accordance with that extension. A cache that does not recognize the community cache-extension would ignore it and adhere to the private directive.\n\n### 5.3. Expires\n\nThe \"Expires\" header field gives the date/time after which the response is considered stale. See Section 4.2 for further discussion of the freshness model.\n\nThe presence of an Expires field does not imply that the original resource will change or cease to exist at, before, or after that time.\n\nThe Expires value is an HTTP-date timestamp, as defined in [Section 7.1.1.1](rfc7231.html#http.date) of [RFC7231].\n\n```\n Expires = HTTP-date \n```\n\nFor example\n\n```\n Expires: Thu, 01 Dec 1994 16:00:00 GMT\n```\n\nA cache recipient *MUST* interpret invalid date formats, especially the value \"0\", as representing a time in the past (i.e., \"already expired\").\n\nIf a response includes a Cache-Control field with the max-age directive (Section 5.2.2.8), a recipient *MUST* ignore the Expires field. Likewise, if a response includes the s-maxage directive (Section 5.2.2.9), a shared cache recipient *MUST* ignore the Expires field. In both these cases, the value in Expires is only intended for recipients that have not yet implemented the Cache-Control field.\n\nAn origin server without a clock *MUST NOT* generate an Expires field unless its value represents a fixed time in the past (always expired) or its value has been associated with the resource by a system or user with a reliable clock.\n\nHistorically, HTTP required the Expires field-value to be no more than a year in the future. While longer freshness lifetimes are no longer prohibited, extremely large values have been demonstrated to cause problems (e.g., clock overflows due to use of 32-bit integers for time values), and many caches will evict a response far sooner than that.\n\n### 5.4. Pragma\n\nThe \"Pragma\" header field allows backwards compatibility with HTTP/1.0 caches, so that clients can specify a \"no-cache\" request that they will understand (as Cache-Control was not defined until HTTP/1.1). When the Cache-Control header field is also present and understood in a request, Pragma is ignored.\n\nIn HTTP/1.0, Pragma was defined as an extensible field for implementation-specified directives for recipients. This specification deprecates such extensions to improve interoperability.\n\n```\n Pragma = 1#pragma-directive pragma-directive = \"no-cache\" / extension-pragma extension-pragma = token [ \"=\" ( token / quoted-string ) ]\n```\n\nWhen the Cache-Control header field is not present in a request, caches *MUST* consider the no-cache request pragma-directive as having the same effect as if \"Cache-Control: no-cache\" were present (see Section 5.2.1).\n\nWhen sending a no-cache request, a client ought to include both the pragma and cache-control directives, unless Cache-Control: no-cache is purposefully omitted to target other Cache-Control response directives at HTTP/1.1 caches. For example:\n\n```\nGET / HTTP/1.1\nHost: www.example.com\nCache-Control: max-age=30\nPragma: no-cache\n```\n\nwill constrain HTTP/1.1 caches to serve a response no older than 30 seconds, while precluding implementations that do not understand Cache-Control from serving a cached response.\n\n### 5.5. Warning\n\nThe \"Warning\" header field is used to carry additional information about the status or transformation of a message that might not be reflected in the status code. This information is typically used to warn about possible incorrectness introduced by caching operations or transformations applied to the payload of the message.\n\nWarnings can be used for other purposes, both cache-related and otherwise. The use of a warning, rather than an error status code, distinguishes these responses from true failures.\n\nWarning header fields can in general be applied to any message, however some warn-codes are specific to caches and can only be applied to response messages.\n\n```\n Warning = 1#warning-value warning-value = warn-code SP warn-agent SP warn-text\n [ SP warn-date ]\n \n warn-code = 3DIGIT warn-agent = ( uri-host [ \":\" port ] ) / pseudonym\n ; the name or pseudonym of the server adding\n ; the Warning header field, for use in debugging\n ; a single \"-\" is recommended when agent unknown\n warn-text = quoted-string warn-date = DQUOTE HTTP-date DQUOTE \n```\n\nMultiple warnings can be generated in a response (either by the origin server or by a cache), including multiple warnings with the same warn-code number that only differ in warn-text.\n\nA user agent that receives one or more Warning header fields *SHOULD* inform the user of as many of them as possible, in the order that they appear in the response. Senders that generate multiple Warning header fields are encouraged to order them with this user agent behavior in mind. A sender that generates new Warning header fields *MUST* append them after any existing Warning header fields.\n\nWarnings are assigned three digit warn-codes. The first digit indicates whether the Warning is required to be deleted from a stored response after validation:\n\n- 1xx warn-codes describe the freshness or validation status of the response, and so they *MUST* be deleted by a cache after validation. They can only be generated by a cache when validating a cached entry, and *MUST NOT* be generated in any other situation.\n- 2xx warn-codes describe some aspect of the representation that is not rectified by a validation (for example, a lossy compression of the representation) and they *MUST NOT* be deleted by a cache after validation, unless a full response is sent, in which case they *MUST* be.\n\nIf a sender generates one or more 1xx warn-codes in a message to be sent to a recipient known to implement only HTTP/1.0, the sender *MUST* include in each corresponding warning-value a warn-date that matches the [Date](rfc7231.html#header.date) header field in the message. For example:\n\n```\nHTTP/1.1 200 OK\nDate: Sat, 25 Aug 2012 23:34:45 GMT\nWarning: 112 - \"network down\" \"Sat, 25 Aug 2012 23:34:45 GMT\"\n```\n\nWarnings have accompanying warn-text that describes the error, e.g., for logging. It is advisory only, and its content does not affect interpretation of the warn-code.\n\nIf a recipient that uses, evaluates, or displays Warning header fields receives a warn-date that is different from the [Date](rfc7231.html#header.date) value in the same message, the recipient *MUST* exclude the warning-value containing that warn-date before storing, forwarding, or using the message. This allows recipients to exclude warning-values that were improperly retained after a cache validation. If all of the warning-values are excluded, the recipient *MUST* exclude the Warning header field as well.\n\nThe following warn-codes are defined by this specification, each with a recommended warn-text in English, and a description of its meaning. The procedure for defining additional warn codes is described in Section 7.2.1.\n\n#### 5.5.1. Warning: 110 - \"Response is Stale\"\n\nA cache *SHOULD* generate this whenever the sent response is stale.\n\n#### 5.5.2. Warning: 111 - \"Revalidation Failed\"\n\nA cache *SHOULD* generate this when sending a stale response because an attempt to validate the response failed, due to an inability to reach the server.\n\n#### 5.5.3. Warning: 112 - \"Disconnected Operation\"\n\nA cache *SHOULD* generate this if it is intentionally disconnected from the rest of the network for a period of time.\n\n#### 5.5.4. Warning: 113 - \"Heuristic Expiration\"\n\nA cache *SHOULD* generate this if it heuristically chose a freshness lifetime greater than 24 hours and the response's age is greater than 24 hours.\n\n#### 5.5.5. Warning: 199 - \"Miscellaneous Warning\"\n\nThe warning text can include arbitrary information to be presented to a human user or logged. A system receiving this warning *MUST NOT* take any automated action, besides presenting the warning to the user.\n\n#### 5.5.6. Warning: 214 - \"Transformation Applied\"\n\nThis Warning code *MUST* be added by a proxy if it applies any transformation to the representation, such as changing the content-coding, media-type, or modifying the representation data, unless this Warning code already appears in the response.\n\n#### 5.5.7. Warning: 299 - \"Miscellaneous Persistent Warning\"\n\nThe warning text can include arbitrary information to be presented to a human user or logged. A system receiving this warning *MUST NOT* take any automated action.\n\n## 6. History Lists\n\nUser agents often have history mechanisms, such as \"Back\" buttons and history lists, that can be used to redisplay a representation retrieved earlier in a session.\n\nThe freshness model (Section 4.2) does not necessarily apply to history mechanisms. That is, a history mechanism can display a previous representation even if it has expired.\n\nThis does not prohibit the history mechanism from telling the user that a view might be stale or from honoring cache directives (e.g., Cache-Control: no-store).\n\n## 7. IANA Considerations\n\n### 7.1. Cache Directive Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Cache Directive Registry\" defines the namespace for the cache directives. It has been created and is now maintained at <[http://www.iana.org/assignments/http-cache-directives](http://www.iana.org/assignments/http-cache-directives)>.\n\n#### 7.1.1. Procedure\n\nA registration *MUST* include the following fields:\n\n- Cache Directive Name\n- Pointer to specification text\n\nValues to be added to this namespace require IETF Review (see [RFC5226], [Section 4.1](https://www.rfc-editor.org/rfc/rfc5226.html#section-4.1)).\n\n#### 7.1.2. Considerations for New Cache Control Directives\n\nNew extension directives ought to consider defining:\n\n- What it means for a directive to be specified multiple times,\n- When the directive does not take an argument, what it means when an argument is present,\n- When the directive requires an argument, what it means when it is missing,\n- Whether the directive is specific to requests, responses, or able to be used in either.\n\nSee also Section 5.2.3.\n\n#### 7.1.3. Registrations\n\nThe registry has been populated with the registrations below:\n\n| Cache Directive | Reference |\n| --- | --- |\n| max-age | Section 5.2.1.1, Section 5.2.2.8 |\n| max-stale | Section 5.2.1.2 |\n| min-fresh | Section 5.2.1.3 |\n| must-revalidate | Section 5.2.2.1 |\n| no-cache | Section 5.2.1.4, Section 5.2.2.2 |\n| no-store | Section 5.2.1.5, Section 5.2.2.3 |\n| no-transform | Section 5.2.1.6, Section 5.2.2.4 |\n| only-if-cached | Section 5.2.1.7 |\n| private | Section 5.2.2.6 |\n| proxy-revalidate | Section 5.2.2.7 |\n| public | Section 5.2.2.5 |\n| s-maxage | Section 5.2.2.9 |\n| stale-if-error | [RFC5861], [Section 4](https://www.rfc-editor.org/rfc/rfc5861.html#section-4) |\n| stale-while-revalidate | [RFC5861], [Section 3](https://www.rfc-editor.org/rfc/rfc5861.html#section-3) |\n\n### 7.2. Warn Code Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Warn Codes\" registry defines the namespace for warn codes. It has been created and is now maintained at <[http://www.iana.org/assignments/http-warn-codes](http://www.iana.org/assignments/http-warn-codes)>.\n\n#### 7.2.1. Procedure\n\nA registration *MUST* include the following fields:\n\n- Warn Code (3 digits)\n- Short Description\n- Pointer to specification text\n\nValues to be added to this namespace require IETF Review (see [RFC5226], [Section 4.1](https://www.rfc-editor.org/rfc/rfc5226.html#section-4.1)).\n\n#### 7.2.2. Registrations\n\nThe registry has been populated with the registrations below:\n\n| Warn Code | Short Description | Reference |\n| --- | --- | --- |\n| 110 | Response is Stale | Section 5.5.1 |\n| 111 | Revalidation Failed | Section 5.5.2 |\n| 112 | Disconnected Operation | Section 5.5.3 |\n| 113 | Heuristic Expiration | Section 5.5.4 |\n| 199 | Miscellaneous Warning | Section 5.5.5 |\n| 214 | Transformation Applied | Section 5.5.6 |\n| 299 | Miscellaneous Persistent Warning | Section 5.5.7 |\n\n### 7.3. Header Field Registration\n\nHTTP header fields are registered within the \"Message Headers\" registry maintained at <[http://www.iana.org/assignments/message-headers/](http://www.iana.org/assignments/message-headers/)>.\n\nThis document defines the following HTTP header fields, so the \"Permanent Message Header Field Names\" registry has been updated accordingly (see [BCP90]).\n\n| Header Field Name | Protocol | Status | Reference |\n| --- | --- | --- | --- |\n| Age | http | standard | Section 5.1 |\n| Cache-Control | http | standard | Section 5.2 |\n| Expires | http | standard | Section 5.3 |\n| Pragma | http | standard | Section 5.4 |\n| Warning | http | standard | Section 5.5 |\n\nThe change controller is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n## 8. Security Considerations\n\nThis section is meant to inform developers, information providers, and users of known security concerns specific to HTTP caching. More general security considerations are addressed in HTTP messaging [RFC7230] and semantics [RFC7231].\n\nCaches expose additional potential vulnerabilities, since the contents of the cache represent an attractive target for malicious exploitation. Because cache contents persist after an HTTP request is complete, an attack on the cache can reveal information long after a user believes that the information has been removed from the network. Therefore, cache contents need to be protected as sensitive information.\n\nIn particular, various attacks might be amplified by being stored in a shared cache; such \"cache poisoning\" attacks use the cache to distribute a malicious payload to many clients, and are especially effective when an attacker can use implementation flaws, elevated privileges, or other techniques to insert such a response into a cache. One common attack vector for cache poisoning is to exploit differences in message parsing on proxies and in user agents; see [Section 3.3.3](rfc7230.html#message.body.length) of [RFC7230] for the relevant requirements.\n\nLikewise, implementation flaws (as well as misunderstanding of cache operation) might lead to caching of sensitive information (e.g., authentication credentials) that is thought to be private, exposing it to unauthorized parties.\n\nFurthermore, the very use of a cache can bring about privacy concerns. For example, if two users share a cache, and the first one browses to a site, the second may be able to detect that the other has been to that site, because the resources from it load more quickly, thanks to the cache.\n\nNote that the Set-Cookie response header field [RFC6265] does not inhibit caching; a cacheable response with a Set-Cookie header field can be (and often is) used to satisfy subsequent requests to caches. Servers who wish to control caching of these responses are encouraged to emit appropriate Cache-Control response header fields.\n\n## 9. Acknowledgments\n\nSee [Section 10](rfc7230.html#acks) of [RFC7230].\n\n## 10. References\n\n### 10.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, January 2008.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, June 2014.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, June 2014.\n\n[RFC7232]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests](https://www.rfc-editor.org/rfc/rfc7232.html)”, RFC 7232, June 2014.\n\n[RFC7233]\n\nFielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Range Requests](https://www.rfc-editor.org/rfc/rfc7233.html)”, RFC 7233, June 2014.\n\n[RFC7235]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Authentication](https://www.rfc-editor.org/rfc/rfc7235.html)”, RFC 7235, June 2014.\n\n### 10.2. Informative References\n\n[BCP90]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004.\n\n[RFC2616]\n\nFielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n[RFC5226]\n\nNarten, T. and H. Alvestrand, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc5226.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 5226, May 2008.\n\n[RFC5861]\n\nNottingham, M., “[HTTP Cache-Control Extensions for Stale Content](https://www.rfc-editor.org/rfc/rfc5861.html)”, RFC 5861, April 2010.\n\n[RFC5905]\n\nMills, D., Martin, J., Ed., Burbank, J., and W. Kasch, “[Network Time Protocol Version 4: Protocol and Algorithms Specification](https://www.rfc-editor.org/rfc/rfc5905.html)”, RFC 5905, June 2010.\n\n[RFC6265]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, April 2011.\n\n## Appendix A. Changes from RFC 2616\n\nThe specification has been substantially rewritten for clarity.\n\nThe conditions under which an authenticated response can be cached have been clarified. (Section 3.2)\n\nNew status codes can now define that caches are allowed to use heuristic freshness with them. Caches are now allowed to calculate heuristic freshness for URIs with query components. (Section 4.2.2)\n\nThe algorithm for calculating age is now less conservative. Caches are now required to handle dates with time zones as if they're invalid, because it's not possible to accurately guess. (Section 4.2.3)\n\nThe [Content-Location](rfc7231.html#header.content-location) response header field is no longer used to determine the appropriate response to use when validating. (Section 4.3)\n\nThe algorithm for selecting a cached negotiated response to use has been clarified in several ways. In particular, it now explicitly allows header-specific canonicalization when processing selecting header fields. (Section 4.1)\n\nRequirements regarding denial-of-service attack avoidance when performing invalidation have been clarified. (Section 4.4)\n\nCache invalidation only occurs when a successful response is received. (Section 4.4)\n\nCache directives are explicitly defined to be case-insensitive. Handling of multiple instances of cache directives when only one is expected is now defined. (Section 5.2)\n\nThe \"no-store\" request directive doesn't apply to responses; i.e., a cache can satisfy a request with no-store on it and does not invalidate it. (Section 5.2.1.5)\n\nThe qualified forms of the private and no-cache cache directives are noted to not be widely implemented; for example, \"private=foo\" is interpreted by many caches as simply \"private\". Additionally, the meaning of the qualified form of no-cache has been clarified. (Section 5.2.2)\n\nThe \"no-cache\" response directive's meaning has been clarified. (Section 5.2.2.2)\n\nThe one-year limit on Expires header field values has been removed; instead, the reasoning for using a sensible value is given. (Section 5.3)\n\nThe Pragma header field is now only defined for backwards compatibility; future pragmas are deprecated. (Section 5.4)\n\nSome requirements regarding production and processing of the Warning header fields have been relaxed, as it is not widely implemented. Furthermore, the Warning header field no longer uses RFC 2047 encoding, nor does it allow multiple languages, as these aspects were not implemented. (Section 5.5)\n\nThis specification introduces the Cache Directive and Warn Code Registries, and defines considerations for new cache directives. (Section 7.1 and Section 7.2)\n\n## Appendix B. Imported ABNF\n\nThe following core rules are included by reference, as defined in [Appendix B.1](https://www.rfc-editor.org/rfc/rfc5234.html#appendix-B.1) of [RFC5234]: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII character).\n\nThe rules below are defined in [RFC7230]:\n\n```\n OWS = \n field-name = \n quoted-string = \n token = \n\n port = \n pseudonym = \n uri-host = \n```\n\nThe rules below are defined in other parts:\n\n```\n HTTP-date = \n```\n\n## Appendix C. Collected ABNF\n\nIn the collected ABNF below, list rules are expanded as per [Section 1.2](rfc7230.html#notation) of [RFC7230].\n\n```\nAge = delta-seconds\n\nCache-Control = *( \",\" OWS ) cache-directive *( OWS \",\" [ OWS\n cache-directive ] )\n\nExpires = HTTP-date\n\nHTTP-date = \n\nOWS = \n\nPragma = *( \",\" OWS ) pragma-directive *( OWS \",\" [ OWS\n pragma-directive ] )\n\nWarning = *( \",\" OWS ) warning-value *( OWS \",\" [ OWS warning-value ]\n )\n\ncache-directive = token [ \"=\" ( token / quoted-string ) ]\n\ndelta-seconds = 1*DIGIT\n\nextension-pragma = token [ \"=\" ( token / quoted-string ) ]\n\nfield-name = \n\nport = \npragma-directive = \"no-cache\" / extension-pragma\npseudonym = \n\nquoted-string = \n\ntoken = \n\nuri-host = \n\nwarn-agent = ( uri-host [ \":\" port ] ) / pseudonym\nwarn-code = 3DIGIT\nwarn-date = DQUOTE HTTP-date DQUOTE\nwarn-text = quoted-string\nwarning-value = warn-code SP warn-agent SP warn-text [ SP warn-date\n ]\n```\n\n## Index\n\n1 2 A B C D E F G H M N O P R S T V W\n\n- **1**\n - 110 (warn-code) 4.2.4 , **5.5.1** , 7.2.2\n - 111 (warn-code) **5.5.2** , 7.2.2\n - 112 (warn-code) 4.2.4 , **5.5.3** , 7.2.2\n - 113 (warn-code) 4.2.2 , **5.5.4** , 7.2.2\n - 199 (warn-code) **5.5.5** , 7.2.2\n- **2**\n - 214 (warn-code) **5.5.6** , 7.2.2\n - 299 (warn-code) **5.5.7** , 7.2.2\n- **A**\n - age 4.2\n - Age header field 4 , 4.2.3 , **5.1** , 7.3\n- **B**\n - *BCP90* 7.3 , **10.2**\n- **C**\n - cache 1\n - cache entry 2\n - cache key 2 , 2\n - Cache-Control header field 3 , **5.2** , 7.3 , A\n- **D**\n - Disconnected Operation (warn-text) 4.2.4 , **5.5.3** , 7.2.2\n- **E**\n - Expires header field 3 , 4.2 , 4.2.1 , **5.3** , 7.3 , A\n - explicit expiration time 4.2\n- **F**\n - fresh 4.2\n - freshness lifetime 4.2\n- **G**\n - Grammar\n - Age **5.1**\n - Cache-Control **5.2**\n - cache-directive **5.2**\n - delta-seconds **1.2.1**\n - Expires **5.3**\n - extension-pragma **5.4**\n - Pragma **5.4**\n - pragma-directive **5.4**\n - warn-agent **5.5**\n - warn-code **5.5**\n - warn-date **5.5**\n - warn-text **5.5**\n - Warning **5.5**\n - warning-value **5.5**\n- **H**\n - Heuristic Expiration (warn-text) 4.2.2 , **5.5.4** , 7.2.2\n - heuristic expiration time 4.2\n- **M**\n - max-age (cache directive) **5.2.1.1** , **5.2.2.8**\n - max-stale (cache directive) **5.2.1.2**\n - min-fresh (cache directive) **5.2.1.3**\n - Miscellaneous Persistent Warning (warn-text) **5.5.7** , 7.2.2\n - Miscellaneous Warning (warn-text) **5.5.5** , 7.2.2\n - must-revalidate (cache directive) **5.2.2.1**\n- **N**\n - no-cache (cache directive) **5.2.1.4** , **5.2.2.2**\n - no-store (cache directive) **5.2.1.5** , **5.2.2.3**\n - no-transform (cache directive) **5.2.1.6** , **5.2.2.4**\n- **O**\n - only-if-cached (cache directive) **5.2.1.7**\n- **P**\n - Pragma header field 4 , **5.4** , 7.3 , A\n - private (cache directive) **5.2.2.6**\n - private cache 1\n - proxy-revalidate (cache directive) **5.2.2.7**\n - public (cache directive) **5.2.2.5**\n- **R**\n - Response is Stale (warn-text) 4.2.4 , **5.5.1** , 7.2.2\n - Revalidation Failed (warn-text) **5.5.2** , 7.2.2\n - *RFC2119* 1.1 , **10.1**\n - *RFC2616* 4.2.2 , **10.2**\n - *Section 13.9* 4.2.2\n - *RFC5226* 7.1.1 , 7.2.1 , **10.2**\n - *Section 4.1* 7.1.1 , 7.2.1\n - *RFC5234* 1.2 , **10.1** , B\n - *Appendix B.1* B\n - *RFC5861* 7.1.3 , 7.1.3 , **10.2**\n - *Section 3* 7.1.3\n - *Section 4* 7.1.3\n - *RFC5905* 4.2.3 , **10.2**\n - *RFC6265* 8 , **10.2**\n - *RFC7230* 1.1 , 1.2 , 3.1 , 4 , 4.1 , 4.4 , 4.4 , 4.4 , 5.2.1.6 , 5.2.2.4 , 8 , 8 , 9 , **10.1** , B , B , B , B , B , B , B , B , C\n - *Section 1.2* C\n - *Section 2.5* 1.1\n - *Section 2.7* B , B\n - *Section 3.2* 4.1 , B\n - *Section 3.2.3* B\n - *Section 3.2.6* B , B\n - *Section 3.3.3* 8\n - *Section 5.5* 4 , 4.4 , 4.4 , 4.4\n - *Section 5.7.1* B\n - *Section 5.7.2* 5.2.1.6 , 5.2.2.4\n - *Section 7* 1.2\n - *Section 10* 9\n - *RFC7231* 2 , 2 , 4 , 4.1 , 4.2.2 , 4.2.3 , 4.4 , 5.3 , 8 , **10.1** , B\n - *Section 4.2.1* 4 , 4.4\n - *Section 4.3.1* 2\n - *Section 6.1* 4.2.2\n - *Section 7.1.1.1* 5.3 , B\n - *Section 7.1.1.2* 4.2.3\n - *Section 7.1.4* 4.1\n - *RFC7232* 4.2.2 , 4.3 , 4.3.1 , 4.3.1 , 4.3.2 , 4.3.2 , 4.3.2 , 4.3.4 , **10.1**\n - *Section 2.1* 4.3.4\n - *Section 2.2* 4.2.2 , 4.3.1\n - *Section 2.3* 4.3.1\n - *Section 3.2* 4.3.2\n - *Section 3.3* 4.3.2\n - *Section 6* 4.3.2\n - *RFC7233* 3.1 , 3.3 , 3.3 , 4.3.2 , 4.3.2 , **10.1**\n - *Section 3.2* 4.3.2\n - *Section 4.3* 3.3\n - *RFC7235* 3 , 3.2 , **10.1**\n - *Section 4.2* 3 , 3.2\n- **S**\n - s-maxage (cache directive) **5.2.2.9**\n - shared cache 1\n - stale 4.2\n - strong validator 4.3.4\n- **T**\n - Transformation Applied (warn-text) **5.5.6** , 7.2.2\n- **V**\n - validator 4.3.1\n- **W**\n - Warning header field 3.3 , 4.3.4 , 4.3.5 , **5.5** , 7.3 , A\n\n## Authors' Addresses\n\n**Roy T. Fielding** (editor)\nAdobe Systems Incorporated\n345 Park Ave\nSan Jose, CA 95110\nUSA\nEmail: fielding@gbiv.com\nURI: [http://roy.gbiv.com/](http://roy.gbiv.com/)\n\n**Mark Nottingham** (editor)\nAkamai\nEmail: mnot@mnot.net\nURI: [http://www.mnot.net/](http://www.mnot.net/)\n\n**Julian F. Reschke** (editor)\ngreenbytes GmbH\nHafenweg 16\nMuenster, NW 48155\nGermany\nEmail: julian.reschke@greenbytes.de\nURI: [http://greenbytes.de/tech/webdav/](http://greenbytes.de/tech/webdav/)", "znaku_textu": 79451, "slov": 12244, "odkazu": 379, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:32", "sha256": "12f3e768801f0f592cb03bb59888583ec01207ddf88f3f836b620e8ea1f00fba", "hloubka": 3, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7234", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2616.html", "http://www.iana.org/assignments/http-cache-directives", "https://www.rfc-editor.org/rfc/rfc5226.html", "https://www.rfc-editor.org/rfc/rfc5861.html", "http://www.iana.org/assignments/http-warn-codes", "http://www.iana.org/assignments/message-headers/", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc7232.html", "https://www.rfc-editor.org/rfc/rfc7233.html", "https://www.rfc-editor.org/rfc/rfc7235.html", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://www.rfc-editor.org/info/bcp26", "https://www.rfc-editor.org/rfc/rfc5905.html", "https://www.rfc-editor.org/rfc/rfc6265.html", "http://roy.gbiv.com/", "http://www.mnot.net/", "http://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc7235.html", "titulek": "RFC 7235 - Hypertext Transfer Protocol (HTTP/1.1): Authentication", "h1": "Hypertext Transfer Protocol (HTTP/1.1): Authentication", "popis": "The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypermedia information systems. This document defines the HTTP Authentication framework.", "klicova_slova": "Hypertext Transfer Protocol, HTTP, HTTP authentication", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7235", "og:description": "Hypertext Transfer Protocol (HTTP/1.1): Authentication", "og:url": "https://httpwg.org/specs/rfc7235.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Conformance and Error Handling"}, {"uroven": 3, "text": "1.2. Syntax Notation"}, {"uroven": 2, "text": "2. Access Authentication Framework"}, {"uroven": 3, "text": "2.1. Challenge and Response"}, {"uroven": 3, "text": "2.2. Protection Space (Realm)"}, {"uroven": 2, "text": "3. Status Code Definitions"}, {"uroven": 3, "text": "3.1. 401 Unauthorized"}, {"uroven": 3, "text": "3.2. 407 Proxy Authentication Required"}, {"uroven": 2, "text": "4. Header Field Definitions"}, {"uroven": 3, "text": "4.1. WWW-Authenticate"}, {"uroven": 3, "text": "4.2. Authorization"}, {"uroven": 3, "text": "4.3. Proxy-Authenticate"}, {"uroven": 3, "text": "4.4. Proxy-Authorization"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 3, "text": "5.1. Authentication Scheme Registry"}, {"uroven": 4, "text": "5.1.1. Procedure"}, {"uroven": 4, "text": "5.1.2. Considerations for New Authentication Schemes"}, {"uroven": 3, "text": "5.2. Status Code Registration"}, {"uroven": 3, "text": "5.3. Header Field Registration"}, {"uroven": 2, "text": "6. Security Considerations"}, {"uroven": 3, "text": "6.1. Confidentiality of Credentials"}, {"uroven": 3, "text": "6.2. Authentication Credentials and Idle Clients"}, {"uroven": 3, "text": "6.3. Protection Spaces"}, {"uroven": 2, "text": "7. Acknowledgments"}, {"uroven": 2, "text": "8. References"}, {"uroven": 3, "text": "8.1. Normative References"}, {"uroven": 3, "text": "8.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Changes from RFCs 2616 and 2617"}, {"uroven": 2, "text": "Appendix B. Imported ABNF"}, {"uroven": 2, "text": "Appendix C. Collected ABNF"}, {"uroven": 2, "text": "Index"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypermedia information systems. This document defines the HTTP Authentication framework.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7235](http://www.rfc-editor.org/info/rfc7235).\n\n## Copyright Notice\n\nCopyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Conformance and Error Handling\n - 1.2. Syntax Notation\n- 2. Access Authentication Framework\n - 2.1. Challenge and Response\n - 2.2. Protection Space (Realm)\n- 3. Status Code Definitions\n - 3.1. 401 Unauthorized\n - 3.2. 407 Proxy Authentication Required\n- 4. Header Field Definitions\n - 4.1. WWW-Authenticate\n - 4.2. Authorization\n - 4.3. Proxy-Authenticate\n - 4.4. Proxy-Authorization\n- 5. IANA Considerations\n - 5.1. Authentication Scheme Registry\n - 5.1.1. Procedure\n - 5.1.2. Considerations for New Authentication Schemes\n - 5.2. Status Code Registration\n - 5.3. Header Field Registration\n- 6. Security Considerations\n - 6.1. Confidentiality of Credentials\n - 6.2. Authentication Credentials and Idle Clients\n - 6.3. Protection Spaces\n- 7. Acknowledgments\n- 8. References\n - 8.1. Normative References\n - 8.2. Informative References\n- Appendix A. Changes from RFCs 2616 and 2617\n- Appendix B. Imported ABNF\n- Appendix C. Collected ABNF\n- Index\n- Authors' Addresses\n\n## 1. Introduction\n\nHTTP provides a general framework for access control and authentication, via an extensible set of challenge-response authentication schemes, which can be used by a server to challenge a client request and by a client to provide authentication information. This document defines HTTP/1.1 authentication in terms of the architecture defined in \"Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing\" [RFC7230], including the general framework previously described in \"HTTP Authentication: Basic and Digest Access Authentication\" [RFC2617] and the related fields and status codes previously defined in \"Hypertext Transfer Protocol -- HTTP/1.1\" [RFC2616].\n\nThe IANA Authentication Scheme Registry (Section 5.1) lists registered authentication schemes and their corresponding specifications, including the \"basic\" and \"digest\" authentication schemes previously defined by RFC 2617.\n\n### 1.1. Conformance and Error Handling\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nConformance criteria and considerations regarding error handling are defined in [Section 2.5](rfc7230.html#conformance) of [RFC7230].\n\n### 1.2. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234] with a list extension, defined in [Section 7](rfc7230.html#abnf.extension) of [RFC7230], that allows for compact definition of comma-separated lists using a '#' operator (similar to how the '*' operator indicates repetition). Appendix B describes rules imported from other documents. Appendix C shows the collected grammar with all list operators expanded to standard ABNF notation.\n\n## 2. Access Authentication Framework\n\n### 2.1. Challenge and Response\n\nHTTP provides a simple challenge-response authentication framework that can be used by a server to challenge a client request and by a client to provide authentication information. It uses a case-insensitive token as a means to identify the authentication scheme, followed by additional information necessary for achieving authentication via that scheme. The latter can be either a comma-separated list of parameters or a single sequence of characters capable of holding base64-encoded information.\n\nAuthentication parameters are name=value pairs, where the name token is matched case-insensitively, and each parameter name *MUST* only occur once per challenge.\n\n```\n auth-scheme = token\n \n auth-param = token BWS \"=\" BWS ( token / quoted-string )\n\n token68 = 1*( ALPHA / DIGIT /\n \"-\" / \".\" / \"_\" / \"~\" / \"+\" / \"/\" ) *\"=\" \n```\n\nThe token68 syntax allows the 66 unreserved URI characters ([RFC3986]), 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]).\n\nA 401 (Unauthorized) response message is used by an origin server to challenge the authorization of a user agent, including a WWW-Authenticate header field containing at least one challenge applicable to the requested resource.\n\nA 407 (Proxy Authentication Required) response message is used by a proxy to challenge the authorization of a client, including a Proxy-Authenticate header field containing at least one challenge applicable to the proxy for the requested resource.\n\n```\n challenge = auth-scheme [ 1*SP ( token68 / #auth-param ) ]\n```\n\nA user agent that wishes to authenticate itself with an origin server — usually, but not necessarily, after receiving a 401 (Unauthorized) — can do so by including an Authorization header field with the request.\n\nA 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.\n\nBoth 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 6.1.\n\n```\n credentials = auth-scheme [ 1*SP ( token68 / #auth-param ) ]\n```\n\nUpon receipt of a request for a protected resource that omits credentials, contains invalid credentials (e.g., a bad password) or partial credentials (e.g., when the authentication scheme requires more than one round trip), an origin server *SHOULD* send a 401 (Unauthorized) response that contains a WWW-Authenticate header field with at least one (possibly new) challenge applicable to the requested resource.\n\nLikewise, upon receipt of a request that omits proxy credentials or contains invalid or partial proxy credentials, a proxy that requires authentication *SHOULD* generate a 407 (Proxy Authentication Required) response that contains a Proxy-Authenticate header field with at least one (possibly new) challenge applicable to the proxy.\n\nA server that receives valid credentials that are not adequate to gain access ought to respond with the [403 (Forbidden)](rfc7231.html#status.403) status code ([Section 6.5.3](rfc7231.html#status.403) of [RFC7231]).\n\nHTTP does not restrict applications to this simple challenge-response framework for access authentication. Additional mechanisms can be used, such as authentication at the transport level or via message encapsulation, and with additional header fields specifying authentication information. However, such additional mechanisms are not defined by this specification.\n\n### 2.2. Protection Space (Realm)\n\nThe \"realm\" authentication parameter is reserved for use by authentication schemes that wish to indicate a scope of protection.\n\nA protection space is defined by the canonical root URI (the scheme and authority components of the effective request URI; see [Section 5.5](rfc7230.html#effective.request.uri) of [RFC7230]) of the server being accessed, in combination with the realm value if present. These realms allow the protected resources on a server to be partitioned into a set of protection spaces, each with its own authentication scheme and/or authorization database. The realm value is a string, generally assigned by the origin server, that can have additional semantics specific to the authentication scheme. Note that a response can have multiple challenges with the same auth-scheme but with different realms.\n\nThe protection space determines the domain over which credentials can be automatically applied. If a prior request has been authorized, the user agent *MAY* reuse the same credentials for all other requests within that protection space for a period of time determined by the authentication scheme, parameters, and/or user preferences (such as a configurable inactivity timeout). Unless specifically allowed by the authentication scheme, a single protection space cannot extend outside the scope of its server.\n\nFor historical reasons, a sender *MUST* only generate the quoted-string syntax. Recipients might have to support both token and quoted-string syntax for maximum interoperability with existing clients that have been accepting both notations for a long time.\n\n## 3. Status Code Definitions\n\n### 3.1. 401 Unauthorized\n\nThe 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 4.1) containing at least one challenge applicable to the target resource.\n\nIf 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 4.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.\n\n### 3.2. 407 Proxy Authentication Required\n\nThe 407 (Proxy Authentication Required) status code is similar to 401 (Unauthorized), but it indicates that the client needs to authenticate itself in order to use a proxy. The proxy *MUST* send a Proxy-Authenticate header field (Section 4.3) containing a challenge applicable to that proxy for the target resource. The client *MAY* repeat the request with a new or replaced Proxy-Authorization header field (Section 4.4).\n\n## 4. Header Field Definitions\n\nThis section defines the syntax and semantics of header fields related to the HTTP authentication framework.\n\n### 4.1. WWW-Authenticate\n\nThe \"WWW-Authenticate\" header field indicates the authentication scheme(s) and parameters applicable to the target resource.\n\n```\n WWW-Authenticate = 1#challenge \n```\n\nA server generating a 401 (Unauthorized) response *MUST* send a WWW-Authenticate header field containing at least one challenge. A server *MAY* generate a WWW-Authenticate header field in other response messages to indicate that supplying credentials (or different credentials) might affect the response.\n\nA proxy forwarding a response *MUST NOT* modify any WWW-Authenticate fields in that response.\n\nUser 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.\n\nFor instance:\n\n```\n WWW-Authenticate: Newauth realm=\"apps\", type=1,\n title=\"Login to \\\"apps\\\"\", Basic realm=\"simple\"\n```\n\nThis header field contains two challenges; one for the \"Newauth\" scheme with a realm value of \"apps\", and two additional parameters \"type\" and \"title\", and another one for the \"Basic\" scheme with a realm value of \"simple\".\n\n### 4.2. Authorization\n\nThe \"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.\n\n```\n Authorization = credentials \n```\n\nIf a request is authenticated and a realm specified, the same credentials are presumed to be valid for all other requests within this realm (assuming that the authentication scheme itself does not require otherwise, such as credentials that vary according to a challenge value or using synchronized clocks).\n\nA proxy forwarding a request *MUST NOT* modify any Authorization fields in that request. See [Section 3.2](rfc7234.html#caching.authenticated.responses) of [RFC7234] for details of and requirements pertaining to handling of the Authorization field by HTTP caches.\n\n### 4.3. Proxy-Authenticate\n\nThe \"Proxy-Authenticate\" header field consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the proxy for this effective request URI ([Section 5.5](rfc7230.html#effective.request.uri) of [RFC7230]). A proxy *MUST* send at least one Proxy-Authenticate header field in each 407 (Proxy Authentication Required) response that it generates.\n\n```\n Proxy-Authenticate = 1#challenge \n```\n\nUnlike WWW-Authenticate, the Proxy-Authenticate header field applies only to the next outbound client on the response chain. This is because only the client that chose a given proxy is likely to have the credentials necessary for authentication. However, when multiple proxies are used within the same administrative domain, such as office and regional caching proxies within a large corporate network, it is common for credentials to be generated by the user agent and passed through the hierarchy until consumed. Hence, in such a configuration, it will appear as if Proxy-Authenticate is being forwarded because each proxy will send the same challenge set.\n\nNote that the parsing considerations for WWW-Authenticate apply to this header field as well; see Section 4.1 for details.\n\n### 4.4. Proxy-Authorization\n\nThe \"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.\n\n```\n Proxy-Authorization = credentials \n```\n\nUnlike Authorization, the Proxy-Authorization header field applies only to the next inbound proxy that demanded authentication using the Proxy-Authenticate field. When multiple proxies are used in a chain, the Proxy-Authorization header field is consumed by the first inbound proxy that was expecting to receive credentials. A proxy *MAY* relay the credentials from the client request to the next proxy if that is the mechanism by which the proxies cooperatively authenticate a given request.\n\n## 5. IANA Considerations\n\n### 5.1. Authentication Scheme Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Authentication Scheme Registry\" defines the namespace for the authentication schemes in challenges and credentials. It has been created and is now maintained at <[http://www.iana.org/assignments/http-authschemes](http://www.iana.org/assignments/http-authschemes)>.\n\n#### 5.1.1. Procedure\n\nRegistrations *MUST* include the following fields:\n\n- Authentication Scheme Name\n- Pointer to specification text\n- Notes (optional)\n\nValues to be added to this namespace require IETF Review (see [RFC5226], [Section 4.1](https://www.rfc-editor.org/rfc/rfc5226.html#section-4.1)).\n\n#### 5.1.2. Considerations for New Authentication Schemes\n\nThere are certain aspects of the HTTP Authentication Framework that put constraints on how new authentication schemes can work:\n\n- HTTP authentication is presumed to be stateless: all of the information necessary to authenticate a request *MUST* be provided in the request, rather than be dependent on the server remembering prior requests. Authentication based on, or bound to, the underlying connection is outside the scope of this specification and inherently flawed unless steps are taken to ensure that the connection cannot be used by any party other than the authenticated user (see [Section 2.3](rfc7230.html#intermediaries) of [RFC7230]).\n- The authentication parameter \"realm\" is reserved for defining protection spaces as described in Section 2.2. New schemes *MUST NOT* use it in a way incompatible with that definition.\n- The \"token68\" notation was introduced for compatibility with existing authentication schemes and can only be used once per challenge or credential. Thus, new schemes ought to use the auth-param syntax instead, because otherwise future extensions will be impossible.\n- The parsing of challenges and credentials is defined by this specification and cannot be modified by new authentication schemes. When the auth-param syntax is used, all parameters ought to support both token and quoted-string syntax, and syntactical constraints ought to be defined on the field value after parsing (i.e., quoted-string processing). This is necessary so that recipients can use a generic parser that applies to all authentication schemes. **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.\n- Definitions of new schemes ought to define the treatment of unknown extension parameters. In general, a \"must-ignore\" rule is preferable to a \"must-understand\" rule, because otherwise it will be hard to introduce new parameters in the presence of legacy recipients. Furthermore, it's good to describe the policy for defining new parameters (such as \"update the specification\" or \"use this registry\").\n- Authentication schemes need to document whether they are usable in origin-server authentication (i.e., using WWW-Authenticate), and/or proxy authentication (i.e., using Proxy-Authenticate).\n- The credentials carried in an Authorization header field are specific to the user agent and, therefore, have the same effect on HTTP caches as the \"private\" Cache-Control response directive ([Section 5.2.2.6](rfc7234.html#cache-response-directive.private) of [RFC7234]), within the scope of the request in which they appear. Therefore, new authentication schemes that choose not to carry credentials in the Authorization header field (e.g., using a newly defined header field) will need to explicitly disallow caching, by mandating the use of either Cache-Control request directives (e.g., \"no-store\", [Section 5.2.1.5](rfc7234.html#cache-request-directive.no-store) of [RFC7234]) or response directives (e.g., \"private\").\n\n### 5.2. Status Code Registration\n\nThe \"Hypertext Transfer Protocol (HTTP) Status Code Registry\" located at <[http://www.iana.org/assignments/http-status-codes](http://www.iana.org/assignments/http-status-codes)> has been updated with the registrations below:\n\n| Value | Description | Reference |\n| --- | --- | --- |\n| 401 | Unauthorized | Section 3.1 |\n| 407 | Proxy Authentication Required | Section 3.2 |\n\n### 5.3. Header Field Registration\n\nHTTP header fields are registered within the \"Message Headers\" registry maintained at <[http://www.iana.org/assignments/message-headers/](http://www.iana.org/assignments/message-headers/)>.\n\nThis document defines the following HTTP header fields, so the \"Permanent Message Header Field Names\" registry has been updated accordingly (see [BCP90]).\n\n| Header Field Name | Protocol | Status | Reference |\n| --- | --- | --- | --- |\n| Authorization | http | standard | Section 4.2 |\n| Proxy-Authenticate | http | standard | Section 4.3 |\n| Proxy-Authorization | http | standard | Section 4.4 |\n| WWW-Authenticate | http | standard | Section 4.1 |\n\nThe change controller is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n## 6. Security Considerations\n\nThis section is meant to inform developers, information providers, and users of known security concerns specific to HTTP authentication. More general security considerations are addressed in HTTP messaging [RFC7230] and semantics [RFC7231].\n\nEverything about the topic of HTTP authentication is a security consideration, so the list of considerations below is not exhaustive. Furthermore, it is limited to security considerations regarding the authentication framework, in general, rather than discussing all of the potential considerations for specific authentication schemes (which ought to be documented in the specifications that define those schemes). Various organizations maintain topical information and links to current research on Web application security (e.g., [OWASP]), including common pitfalls for implementing and using the authentication schemes found in practice.\n\n### 6.1. Confidentiality of Credentials\n\nThe HTTP authentication framework does not define a single mechanism for maintaining the confidentiality of credentials; instead, each authentication scheme defines how the credentials are encoded prior to transmission. While this provides flexibility for the development of future authentication schemes, it is inadequate for the protection of existing schemes that provide no confidentiality on their own, or that do not sufficiently protect against replay attacks. Furthermore, if the server expects credentials that are specific to each individual user, the exchange of those credentials will have the effect of identifying that user even if the content within credentials remains confidential.\n\nHTTP depends on the security properties of the underlying transport- or session-level connection to provide confidential transmission of header fields. In other words, if a server limits access to authenticated users using this framework, the server needs to ensure that the connection is properly secured in accordance with the nature of the authentication scheme used. For example, services that depend on individual user authentication often require a connection to be secured with TLS (\"Transport Layer Security\", [RFC5246]) prior to exchanging any credentials.\n\n### 6.2. Authentication Credentials and Idle Clients\n\nExisting HTTP clients and user agents typically retain authentication information indefinitely. HTTP does not provide a mechanism for the origin server to direct clients to discard these cached credentials, since the protocol has no awareness of how credentials are obtained or managed by the user agent. The mechanisms for expiring or revoking credentials can be specified as part of an authentication scheme definition.\n\nCircumstances under which credential caching can interfere with the application's security model include but are not limited to:\n\n- 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.\n- 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.\n\nUser agents that cache credentials are encouraged to provide a readily accessible mechanism for discarding cached credentials under user control.\n\n### 6.3. Protection Spaces\n\nAuthentication schemes that solely rely on the \"realm\" mechanism for establishing a protection space will expose credentials to all resources on an origin server. Clients that have successfully made authenticated requests with a resource can use the same authentication credentials for other resources on the same origin server. This makes it possible for a different resource to harvest authentication credentials for other resources.\n\nThis is of particular concern when an origin server hosts resources for multiple parties under the same canonical root URI (Section 2.2). Possible mitigation strategies include restricting direct access to authentication credentials (i.e., not making the content of the Authorization request header field available), and separating protection spaces by using a different host name (or port number) for each party.\n\n## 7. Acknowledgments\n\nThis specification takes over the definition of the HTTP Authentication Framework, previously defined in RFC 2617. We thank John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. Lawrence, Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for their work on that specification. See [Section 6](https://www.rfc-editor.org/rfc/rfc2617.html#section-6) of [RFC2617] for further acknowledgements.\n\nSee [Section 10](rfc7230.html#acks) of [RFC7230] for the Acknowledgments related to this document revision.\n\n## 8. References\n\n### 8.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, January 2008.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, June 2014.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, June 2014.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, June 2014.\n\n### 8.2. Informative References\n\n[BCP90]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004.\n\n[OWASP]\n\nvan der Stock, A., Ed., “[A Guide to Building Secure Web Applications and Web Services](https://www.owasp.org/)”, The Open Web Application Security Project (OWASP) 2.0.1, July 2005, <[https://www.owasp.org/](https://www.owasp.org/)>.\n\n[RFC2616]\n\nFielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, June 1999.\n\n[RFC2617]\n\nFranks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A., and L. Stewart, “[HTTP Authentication: Basic and Digest Access Authentication](https://www.rfc-editor.org/rfc/rfc2617.html)”, RFC 2617, June 1999.\n\n[RFC3986]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, January 2005.\n\n[RFC4648]\n\nJosefsson, S., “[The Base16, Base32, and Base64 Data Encodings](https://www.rfc-editor.org/rfc/rfc4648.html)”, RFC 4648, October 2006.\n\n[RFC5226]\n\nNarten, T. and H. Alvestrand, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc5226.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 5226, May 2008.\n\n[RFC5246]\n\nDierks, T. and E. Rescorla, “[The Transport Layer Security (TLS) Protocol Version 1.2](https://www.rfc-editor.org/rfc/rfc5246.html)”, RFC 5246, August 2008.\n\n## Appendix A. Changes from RFCs 2616 and 2617\n\nThe framework for HTTP Authentication is now defined by this document, rather than RFC 2617.\n\nThe \"realm\" parameter is no longer always required on challenges; consequently, the ABNF allows challenges without any auth parameters. (Section 2)\n\nThe \"token68\" alternative to auth-param lists has been added for consistency with legacy authentication schemes such as \"Basic\". (Section 2)\n\nThis specification introduces the Authentication Scheme Registry, along with considerations for new authentication schemes. (Section 5.1)\n\n## Appendix B. Imported ABNF\n\nThe following core rules are included by reference, as defined in [Appendix B.1](https://www.rfc-editor.org/rfc/rfc5234.html#appendix-B.1) of [RFC5234]: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII character).\n\nThe rules below are defined in [RFC7230]:\n\n```\n BWS = \n OWS = \n quoted-string = \n token = \n```\n\n## Appendix C. Collected ABNF\n\nIn the collected ABNF below, list rules are expanded as per [Section 1.2](rfc7230.html#notation) of [RFC7230].\n\n```\nAuthorization = credentials\n\nBWS = \n\nOWS = \n\nProxy-Authenticate = *( \",\" OWS ) challenge *( OWS \",\" [ OWS\n challenge ] )\nProxy-Authorization = credentials\n\nWWW-Authenticate = *( \",\" OWS ) challenge *( OWS \",\" [ OWS challenge\n ] )\n\nauth-param = token BWS \"=\" BWS ( token / quoted-string )\nauth-scheme = token\n\nchallenge = auth-scheme [ 1*SP ( token68 / [ ( \",\" / auth-param ) *(\n OWS \",\" [ OWS auth-param ] ) ] ) ]\ncredentials = auth-scheme [ 1*SP ( token68 / [ ( \",\" / auth-param )\n *( OWS \",\" [ OWS auth-param ] ) ] ) ]\n\nquoted-string = \n\ntoken = \ntoken68 = 1*( ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\" / \"+\" / \"/\" )\n *\"=\"\n```\n\n## Index\n\n4 A B C G O P R W\n\n- **4**\n - 401 Unauthorized (status code) **3.1** , 5.2\n - 407 Proxy Authentication Required (status code) **3.2** , 5.2\n- **A**\n - Authorization header field 3.1 , **4.2** , 5.3\n- **B**\n - *BCP90* 5.3 , **8.2**\n- **C**\n - Canonical Root URI 2.2\n- **G**\n - Grammar\n - auth-param **2.1**\n - auth-scheme **2.1**\n - Authorization **4.2**\n - challenge **2.1**\n - credentials **2.1**\n - Proxy-Authenticate **4.3**\n - Proxy-Authorization **4.4**\n - token68 **2.1**\n - WWW-Authenticate **4.1**\n- **O**\n - *OWASP* 6 , **8.2**\n- **P**\n - Protection Space 2.2\n - Proxy-Authenticate header field 3.2 , **4.3** , 5.3\n - Proxy-Authorization header field 3.2 , **4.4** , 5.3\n- **R**\n - Realm 2.2\n - *RFC2119* 1.1 , **8.1**\n - *RFC2616* 1 , **8.2**\n - *RFC2617* 1 , 1 , 7 , 7 , **8.2**\n - *Section 6* 7\n - *RFC3986* 2.1 , **8.2**\n - *RFC4648* 2.1 , **8.2**\n - *RFC5226* 5.1.1 , **8.2**\n - *Section 4.1* 5.1.1\n - *RFC5234* 1.2 , **8.1** , B\n - *Appendix B.1* B\n - *RFC5246* 6.1 , **8.2**\n - *RFC7230* 1 , 1.1 , 1.2 , 2.2 , 4.3 , 5.1.2 , 6 , 7 , **8.1** , B , B , B , B , B , C\n - *Section 1.2* C\n - *Section 2.3* 5.1.2\n - *Section 2.5* 1.1\n - *Section 3.2.3* B , B\n - *Section 3.2.6* B , B\n - *Section 5.5* 2.2 , 4.3\n - *Section 7* 1.2\n - *Section 10* 7\n - *RFC7231* 2.1 , 6 , **8.1**\n - *Section 6.5.3* 2.1\n - *RFC7234* 4.2 , 5.1.2 , 5.1.2 , **8.1**\n - *Section 3.2* 4.2\n - *Section 5.2.1.5* 5.1.2\n - *Section 5.2.2.6* 5.1.2\n- **W**\n - WWW-Authenticate header field 3.1 , **4.1** , 4.3 , 5.3\n\n## Authors' Addresses\n\n**Roy T. Fielding** (editor)\nAdobe Systems Incorporated\n345 Park Ave\nSan Jose, CA 95110\nUSA\nEmail: fielding@gbiv.com\nURI: [http://roy.gbiv.com/](http://roy.gbiv.com/)\n\n**Julian F. Reschke** (editor)\ngreenbytes GmbH\nHafenweg 16\nMuenster, NW 48155\nGermany\nEmail: julian.reschke@greenbytes.de\nURI: [http://greenbytes.de/tech/webdav/](http://greenbytes.de/tech/webdav/)", "znaku_textu": 32399, "slov": 4678, "odkazu": 195, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:33", "sha256": "8c388d6aab06ed5ac1b93f7a3fdd5c744d03f79c89823da65b92b198a7215b01", "hloubka": 3, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7235", "http://trustee.ietf.org/license-info", "http://www.iana.org/assignments/http-authschemes", "https://www.rfc-editor.org/rfc/rfc5226.html", "http://www.iana.org/assignments/http-status-codes", "http://www.iana.org/assignments/message-headers/", "https://www.rfc-editor.org/rfc/rfc2617.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://www.owasp.org/", "https://www.rfc-editor.org/rfc/rfc2616.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/info/std66", "https://www.rfc-editor.org/rfc/rfc4648.html", "https://www.rfc-editor.org/info/bcp26", "https://www.rfc-editor.org/rfc/rfc5246.html", "http://roy.gbiv.com/", "http://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc7240.html", "titulek": "RFC 7240 - Prefer Header for HTTP", "h1": "Prefer Header for HTTP", "popis": "This specification defines an HTTP header field that can be used by a client to request that certain behaviors be employed by a server while processing a request.", "klicova_slova": "http, prefer", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7240", "og:description": "Prefer Header for HTTP", "og:url": "https://httpwg.org/specs/rfc7240.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Syntax Notation"}, {"uroven": 2, "text": "2. The Prefer Request Header Field"}, {"uroven": 3, "text": "2.1. Examples"}, {"uroven": 2, "text": "3. The Preference-Applied Response Header Field"}, {"uroven": 2, "text": "4. Preference Definitions"}, {"uroven": 3, "text": "4.1. The \"respond-async\" Preference"}, {"uroven": 3, "text": "4.2. The \"return=representation\" and \"return=minimal\" Preferences"}, {"uroven": 3, "text": "4.3. The \"wait\" Preference"}, {"uroven": 3, "text": "4.4. The \"handling=strict\" and \"handling=lenient\" Processing Preferences"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 3, "text": "5.1. The Registry of Preferences"}, {"uroven": 3, "text": "5.2. Initial Registry Contents"}, {"uroven": 2, "text": "6. Security Considerations"}, {"uroven": 2, "text": "7. References"}, {"uroven": 3, "text": "7.1. Normative References"}, {"uroven": 3, "text": "7.2. Informative References"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThis specification defines an HTTP header field that can be used by a client to request that certain behaviors be employed by a server while processing a request.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7240](http://www.rfc-editor.org/info/rfc7240).\n\n## Copyright Notice\n\nCopyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n - 1.1. Syntax Notation\n- 2. The Prefer Request Header Field\n - 2.1. Examples\n- 3. The Preference-Applied Response Header Field\n- 4. Preference Definitions\n - 4.1. The \"respond-async\" Preference\n - 4.2. The \"return=representation\" and \"return=minimal\" Preferences\n - 4.3. The \"wait\" Preference\n - 4.4. The \"handling=strict\" and \"handling=lenient\" Processing Preferences\n- 5. IANA Considerations\n - 5.1. The Registry of Preferences\n - 5.2. Initial Registry Contents\n- 6. Security Considerations\n- 7. References\n - 7.1. Normative References\n - 7.2. Informative References\n- Author's Address\n\n## 1. Introduction\n\nWithin the course of processing an HTTP request, there are typically a range of required and optional behaviors that a server or intermediary can employ. These often manifest in a variety of subtle and not-so-subtle ways within the response.\n\nFor example, when using the HTTP PUT method to modify a resource -- similar to that defined for the Atom Publishing Protocol [RFC5023] -- the server is given the option of returning either a complete representation of a modified resource or a minimal response that indicates only the successful completion of the operation. The selection of which type of response to return to the client generally has no bearing on the successful processing of the request but could, for instance, have an impact on what actions the client must take after receiving the response. That is, returning a representation of the modified resource within the response can allow the client to avoid sending an additional subsequent GET request.\n\nSimilarly, servers that process requests are often faced with decisions about how to process requests that may be technically invalid or incorrect but are still understandable. It might be the case that the server is able to overlook the technical errors in the request but still successfully process the request. Depending on the specific requirements of the application and the nature of the request being made, the client might or might not consider such lenient processing of its request to be appropriate.\n\nWhile the decision of exactly which behaviors to apply in these cases lies with the server processing the request, the server might wish to defer to the client to specify which optional behavior is preferred.\n\nCurrently, HTTP offers no explicitly defined means of expressing the client's preferences regarding the optional aspects of handling of a given request. While HTTP does provide the Expect header -- which can be used to identify mandatory expectations for the processing of a request -- use of the field to communicate optional preferences is problematic:\n\n1. The semantics of the Expect header field are such that intermediaries and servers are required to reject any request that states unrecognized or unsupported expectations.\n2. While the Expect header field is end to end, the HTTP specification requires that the header be processed hop by hop. That is, every interceding intermediary that handles a request between the client and the origin server is required to process an expectation and determine whether it is capable of appropriately handling it.\n\nThe must-understand semantics of the Expect header make it a poor choice for the expression of optional preferences.\n\nAnother option available to clients is to utilize Request URI query-string parameters to express preferences. However, any mechanism that alters the URI can have undesirable effects, such as when caches record the altered URI.\n\nAs an alternative, this specification defines a new HTTP request header field that can be used by clients to request that optional behaviors be applied by a server during the processing the request. Additionally, a handful of initial preference tokens for use with the new header are defined.\n\nIn this document, the key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" are to be interpreted as described in [RFC2119].\n\n### 1.1. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234] and includes, by reference, the \"token\", \"word\", \"OWS\", and \"BWS\" rules and the #rule extension as defined within Sections 3.2.1 and 3.2.4 of [RFC7230]; as well as the \"delta-seconds\" rule defined in Section 8.1.3 of [RFC7231].\n\n## 2. The Prefer Request Header Field\n\nThe Prefer request header field is used to indicate that particular server behaviors are preferred by the client but are not required for successful completion of the request. Prefer is similar in nature to the Expect header field defined by Section 6.1.2 of [RFC7231] with the exception that servers are allowed to ignore stated preferences.\n\nABNF:\n\n```\n \n Prefer = \"Prefer\" \":\" 1#preference\n preference = token [ BWS \"=\" BWS word ] \n *( OWS \";\" [ OWS parameter ] )\n parameter = token [ BWS \"=\" BWS word ]\n \n```\n\nThis header field is defined with an extensible syntax to allow for future values included in the Registry of Preferences (Section 5.1). A server that does not recognize or is unable to comply with particular preference tokens in the Prefer header field of a request MUST ignore those tokens and continue processing instead of signaling an error.\n\nEmpty or zero-length values on both the preference token and within parameters are equivalent to no value being specified at all. The following, then, are equivalent examples of a \"foo\" preference with a single \"bar\" parameter.\n\n```\n Prefer: foo; bar\n Prefer: foo; bar=\"\"\n Prefer: foo=\"\"; bar\n \n```\n\nAn optional set of parameters can be specified for any preference token. The meaning and application of such parameters is dependent on the definition of each preference token and the server's implementation thereof. There is no significance given to the ordering of parameters on any given preference.\n\nFor both preference token names and parameter names, comparison is case insensitive while values are case sensitive regardless of whether token or quoted-string values are used.\n\nThe Prefer header field is end to end and MUST be forwarded by a proxy if the request is forwarded unless Prefer is explicitly identified as being hop by hop using the Connection header field defined by [RFC7230], Section 6.1.\n\nIn various situations, a proxy might determine that it is capable of honoring a preference independently of the server to which the request has been directed. For instance, an intervening proxy might be capable of providing asynchronous handling of a request using 202 (Accepted) responses independently of the origin server. Such proxies can choose to honor the \"respond-async\" preference on their own regardless of whether or not the origin is capable or willing to do so.\n\nIndividual preference tokens MAY define their own requirements and restrictions as to whether and how intermediaries can apply the preference to a request independently of the origin server.\n\nA client MAY use multiple instances of the Prefer header field in a single message, or it MAY use a single Prefer header field with multiple comma-separated preference tokens. If multiple Prefer header fields are used, it is equivalent to a single Prefer header field with the comma-separated concatenation of all of the tokens. For example, the following are equivalent:\n\nMultiple Prefer header fields defining three distinct preference tokens:\n\n```\nPOST /foo HTTP/1.1\nHost: example.org\nPrefer: respond-async, wait=100\nPrefer: handling=lenient\nDate: Tue, 20 Dec 2011 12:34:56 GMT\n```\n\nA single Prefer header field defining the same three preference tokens:\n\n```\nPOST /foo HTTP/1.1\nHost: example.org\nPrefer: handling=lenient, wait=100, respond-async\nDate: Tue, 20 Dec 2011 12:34:56 GMT\n```\n\nTo avoid any possible ambiguity, individual preference tokens SHOULD NOT appear multiple times within a single request. If any preference is specified more than once, only the first instance is to be considered. All subsequent occurrences SHOULD be ignored without signaling an error or otherwise altering the processing of the request. This is the only case in which the ordering of preferences within a request is considered to be significant.\n\nDue to the inherent complexities involved with properly implementing server-driven content negotiation, effective caching, and the application of optional preferences, implementers are urged to exercise caution when using preferences in a way that impacts the caching of a response and SHOULD NOT use the Prefer header mechanism for content negotiation. If a server supports the optional application of a preference that might result in a variance to a cache's handling of a response entity, a Vary header field MUST be included in the response listing the Prefer header field regardless of whether the client actually used Prefer in the request. Alternatively, the server MAY include a Vary header with the special value \"*\" as defined by [RFC7231], Section 8.2.1. Note, however, that use of the \"Vary: *\" header will make it impossible for a proxy to cache the response.\n\nNote that while Preference tokens are similar in structure to HTTP Expect tokens, the Prefer and Expect header fields serve very distinct purposes and preferences cannot be used as expectations.\n\n### 2.1. Examples\n\nThe following examples illustrate the use of various preferences defined by this specification, as well as undefined extensions for strictly illustrative purposes:\n\n1. Return a 202 (Accepted) response for asynchronous processing if the request cannot be processed within 10 seconds. An undefined \"priority\" preference is also specified:\n\n```\nPOST /some-resource HTTP/1.1\nHost: example.org\nContent-Type: text/plain\nPrefer: respond-async, wait=10\nPrefer: priority=5\n\n{...}\n```\n\n2. Use lenient processing:\n\n```\nPOST /some-resource HTTP/1.1\nHost: example.org\nContent-Type: text/plain\nPrefer: Lenient\n\n{...}\n```\n\n3. Use of an optional, undefined parameter on the return=minimal preference:\n\n```\nPOST /some-resource HTTP/1.1\nHost: example.org\nContent-Type: text/plain\nPrefer: return=minimal; foo=\"some parameter\"\n\n{...}\n```\n\n## 3. The Preference-Applied Response Header Field\n\nThe Preference-Applied response header MAY be included within a response message as an indication as to which Prefer tokens were honored by the server and applied to the processing of a request.\n\nABNF:\n\n```\n \n Preference-Applied = \"Preference-Applied\" \":\" 1#applied-pref\n applied-pref = token [ BWS \"=\" BWS word ]\n \n```\n\nThe syntax of the Preference-Applied header differs from that of the Prefer header in that parameters are not included.\n\nUse of the Preference-Applied header is only necessary when it is not readily and obviously apparent that a server applied a given preference and such ambiguity might have an impact on the client's handling of the response. For instance, when using either the \"return=representation\" or \"return=minimal\" preferences, a client application might not be capable of reliably determining if the preference was (or was not) applied simply by examining the payload of the response. In such a case, the Preference-Applied header field can be used.\n\nRequest:\n\n```\nPATCH /my-document HTTP/1.1\nHost: example.org\nContent-Type: application/example-patch\nPrefer: return=representation\n\n[{\"op\": \"add\", \"path\": \"/a\", \"value\": 1}]\n```\n\nResponse:\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/json\nPreference-Applied: return=representation\nContent-Location: /my-document\n\n{\"a\": 1}\n```\n\n## 4. Preference Definitions\n\nThe following subsections define an initial set of preferences. Additional preferences can be registered for convenience and/or to promote reuse by other applications. This specification establishes an IANA registry of preferences (see Section 5.1).\n\n### 4.1. The \"respond-async\" Preference\n\nThe \"respond-async\" preference indicates that the client prefers the server to respond asynchronously to a response. For instance, in the case when the length of time it takes to generate a response will exceed some arbitrary threshold established by the server, the server can honor the \"respond-async\" preference by returning a 202 (Accepted) response.\n\nABNF:\n\n```\n respond-async = \"respond-async\"\n \n```\n\nThe key motivation for the \"respond-async\" preference is to facilitate the operation of asynchronous request handling by allowing the client to indicate to a server its capability and preference for handling asynchronous responses.\n\nAn example request specifying the \"respond-async\" preference:\n\n```\nPOST /collection HTTP/1.1\nHost: example.org\nContent-Type: text/plain\nPrefer: respond-async\n\n{Data}\n```\n\nAn example asynchronous response using 202 (Accepted):\n\n```\nHTTP/1.1 202 Accepted\nLocation: http://example.org/collection/123\n```\n\nWhile the 202 (Accepted) response status is defined by [RFC7231], little guidance is given on how and when to use the response code and the process for determining the subsequent final result of the operation is left entirely undefined. Therefore, whether and how any given server supports asynchronous responses is an implementation-specific detail that is considered to be out of the scope of this specification.\n\n### 4.2. The \"return=representation\" and \"return=minimal\" Preferences\n\nThe \"return=representation\" preference indicates that the client prefers that the server include an entity representing the current state of the resource in the response to a successful request.\n\nThe \"return=minimal\" preference, on the other hand, indicates that the client wishes the server to return only a minimal response to a successful request. Typically, such responses would utilize the 204 (No Content) status, but other codes MAY be used as appropriate, such as a 200 (OK) status with a zero-length response entity. The determination of what constitutes an appropriate minimal response is solely at the discretion of the server.\n\nABNF:\n\n```\n return = \"return\" BWS \"=\" BWS (\"representation\" / \"minimal\")\n \n```\n\nWhen honoring the \"return=representation\" preference, the returned representation might not be a representation of the effective request URI when the request is affecting another resource. In such cases, the Content-Location header can be used to identify the URI of the returned representation.\n\nThe \"return=representation\" preference is intended to provide a means of optimizing communication between the client and server by eliminating the need for a subsequent GET request to retrieve the current representation of the resource following a modification.\n\nAfter successfully processing a modification request such as a POST or PUT, a server can choose to return either an entity describing the status of the operation or a representation of the modified resource itself. While the selection of which type of entity to return, if any at all, is solely at the discretion of the server, the \"return=representation\" preference -- along with the \"return=minimal\" preference defined below -- allow the server to take the client's preferences into consideration while constructing the response.\n\nAn example request specifying the \"return=representation\" preference:\n\n```\nPATCH /item/123 HTTP/1.1\nHost: example.org\nContent-Type: application/example-patch\nPrefer: return=representation\n\n1c1\n< ABCDEFGHIJKLMNOPQRSTUVWXYZ\n---\n> BCDFGHJKLMNPQRSTVWXYZ\n```\n\nAn example response containing the resource representation:\n\n```\nHTTP/1.1 200 OK\nContent-Location: http://example.org/item/123\nContent-Type: text/plain\nETag: \"d3b07384d113edec49eaa6238ad5ff00\"\n\nBCDFGHJKLMNPQRSTVWXYZ\n```\n\nIn contrast, the \"return=minimal\" preference can reduce the amount of data the server is required to return to the client following a request. This can be particularly useful, for instance, when communicating with limited-bandwidth mobile devices or when the client simply does not require any further information about the result of a request beyond knowing if it was successfully processed.\n\nAn example request specifying the \"return=minimal\" preference:\n\n```\nPOST /collection HTTP/1.1\nHost: example.org\nContent-Type: text/plain\nPrefer: return=minimal\n\n{Data}\n```\n\nAn example minimal response:\n\n```\nHTTP/1.1 201 Created\nLocation: http://example.org/collection/123\n```\n\nThe \"return=minimal\" and \"return=representation\" preferences are mutually exclusive directives. It is anticipated that there will never be a situation where it will make sense for a single request to include both preferences. Any such requests will likely be the result of a coding error within the client. As such, a request containing both preferences can be treated as though neither were specified.\n\n### 4.3. The \"wait\" Preference\n\nThe \"wait\" preference can be used to establish an upper bound on the length of time, in seconds, the client expects it will take the server to process the request once it has been received. In the case that generating a response will take longer than the time specified, the server, or proxy, can choose to utilize an asynchronous processing model by returning -- for example -- a 202 (Accepted) response.\n\nABNF:\n\n```\n wait = \"wait\" BWS \"=\" BWS delta-seconds\n \n```\n\nIt is important to consider that HTTP messages spend some time traversing the network and being processed by intermediaries. This increases the length of time that a client will wait for a response in addition to the time the server takes to process the request. A client that has strict timing requirements can estimate these factors and adjust the wait value accordingly.\n\nAs with other preferences, the \"wait\" preference could be ignored. Clients can abandon requests that take longer than they are prepared to wait.\n\nFor example, a server receiving the following request might choose to respond asynchronously if processing the request will take longer than 10 seconds:\n\n```\nPOST /collection HTTP/1.1\nHost: example.org\nContent-Type: text/plain\nPrefer: respond-async, wait=10\n\n{Data}\n```\n\n### 4.4. The \"handling=strict\" and \"handling=lenient\" Processing Preferences\n\nThe \"handling=strict\" and \"handling=lenient\" preferences indicate, at the server's discretion, how the client wishes the server to handle potential error conditions that can arise in the processing of a request. For instance, if the payload of a request contains various minor syntactical or semantic errors, but the server is still capable of comprehending and successfully processing the request, a decision must be made to either reject the request with an appropriate \"4xx\" error response or go ahead with processing. The \"handling=strict\" preference can be used to indicate that, while any particular error may be recoverable, the client would prefer that the server reject the request. The \"handling=lenient\" preference, on the other hand, indicates that the client wishes the server to attempt to process the request.\n\nABNF:\n\n```\n handling = \"handling\" BWS \"=\" BWS (\"strict\" / \"lenient\")\n \n```\n\nAn example request specifying the \"strict\" preference:\n\n```\nPOST /collection HTTP/1.1\nHost: example.org\nContent-Type: text/plain\nPrefer: handling=strict\n```\n\nThe \"handling=strict\" and \"handling=lenient\" preferences are mutually exclusive directives. It is anticipated that there will never be a situation where it will make sense for a single request to include both preferences. Any such requests will likely be the result of a coding error within the client. As such, a request containing both preferences can be treated as though neither were specified.\n\n## 5. IANA Considerations\n\nThe 'Prefer' and 'Preference-Applied' header fields have been added to the \"Permanent Message Header Field Names\" registry defined in [RFC3864] (http://www.iana.org/assignments/message-headers).\n\n- Header field name: Prefer\n- Applicable Protocol: HTTP\n- Status: Standard\n- Author: James M Snell \n- Change controller: IETF\n- Specification document: this specification, Section 2\n\n- Header field name: Preference-Applied\n- Applicable Protocol: HTTP\n- Status: Standard\n- Author: James M Snell \n- Change controller: IETF\n- Specification document: this specification, Section 3\n\n### 5.1. The Registry of Preferences\n\nIANA has created a new registry, \"HTTP Preferences\", under the \"Hypertext Transfer Protocol (HTTP) Parameters\" registry. New registrations will use the Specification Required policy [RFC5226]. The requirements for registered preferences are described in Section 4.\n\nRegistration requests consist of the completed registration template below, typically published in the required specification. However, to allow for the allocation of values prior to publication, the Designated Expert can approve registration based on a separately submitted template once they are satisfied that a specification will be published. Preferences can be registered by third parties if the Designated Expert determines that an unregistered preference is widely deployed and not likely to be registered in a timely manner.\n\nThe registration template is:\n\n- Preference: (A value for the Prefer request header field that conforms to the syntax rule given in Section 2 )\n- Value: (An enumeration or description of possible values for the preference token).\n- Optional Parameters: (An enumeration of optional parameters, and their values, associated with the preference token).\n- Description:\n- Reference:\n- Notes: [optional]\n\nThe \"Value\" and \"Optional Parameters\" fields MAY be omitted from the registration template if the specific preference token definition does not define either.\n\nRegistration requests should be sent to the mailing list, marked clearly in the subject line (e.g., \"NEW PREFERENCE - example\" to register an \"example\" preference). Within at most 14 days of the request, the Designated Expert(s) will either approve or deny the registration request, communicating this decision to the review list and IANA. Denials should include an explanation and, if applicable, suggestions as to how to make the request successful.\n\nThe Expert Reviewer shall ensure:\n\n- That the requested preference name conforms to the token rule in Section 2 and that it is not identical to any other registered preference name;\n- That any associated value, parameter names, and values conform to the relevant ABNF grammar specifications in Section 2 ;\n- That the name is appropriate to the specificity of the preference; i.e., if the semantics are highly specific to a particular application, the name should reflect that, so that more general names remain available for less specific uses.\n- That requested preferences do not constrain servers, clients, or any intermediaries to any behavior required for successful processing; and\n- That the specification document defining the preference includes a proper and complete discussion of any security considerations relevant to the use of the preference.\n\n### 5.2. Initial Registry Contents\n\nThe \"HTTP Preferences\" registry's initial contents are:\n\n- Preference: respond-async\n- Description: Indicates that the client prefers that the server respond asynchronously to a request.\n- Reference: [this specification], Section 4.1\n\n- Preference: return\n- Value: One of either \"minimal\" or \"representation\"\n- Description: When the value is \"minimal\", it indicates that the client prefers that the server return a minimal response to a request. When the value is \"representation\", it indicates that the client prefers that the server include a representation of the current state of the resource in response to a request.\n- Reference: [this specification], Section 4.2\n\n- Preference: wait\n- Description: Indicates an upper bound to the length of time the client expects it will take for the server to process the request once it has been received.\n- Reference: [this specification], Section 4.3\n\n- Preference: handling\n- Value: One of either \"strict\" or \"lenient\"\n- Description: When value is \"strict\", it indicates that the client wishes the server to apply strict validation and error handling to the processing of a request. When the value is \"lenient\", it indicates that the client wishes the server to apply lenient validation and error handling to the processing of the request.\n- Reference: [this specification], Section 4.4\n\n## 6. Security Considerations\n\nSpecific preferences requested by a client can introduce security considerations and concerns beyond those discussed within HTTP/1.1 [RFC7230] and its associated specification documents (see [RFC7230] for the list of associated works). Implementers need to refer to the specifications and descriptions of each preference to determine the security considerations relevant to each.\n\nA server could incur greater costs in attempting to comply with a particular preference (for instance, the cost of providing a representation in a response that would not ordinarily contain one; or the commitment of resources necessary to track state for an asynchronous response). Unconditional compliance from a server could allow the use of preferences for denial of service. A server can ignore an expressed preference to avoid expending resources that it does not wish to commit.\n\n## 7. References\n\n### 7.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, March 1997, <[http://www.rfc-editor.org/info/rfc2119](http://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC3864]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004, <[https://www.rfc-editor.org/info/rfc3864](https://www.rfc-editor.org/info/rfc3864)>.\n\n[RFC5226]\n\nNarten, T. and H. Alvestrand, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc5226.html)”, RFC 5226, May 2008, <[https://www.rfc-editor.org/info/rfc5226](https://www.rfc-editor.org/info/rfc5226)>.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, June 2014.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, June 2014.\n\n### 7.2. Informative References\n\n[RFC5023]\n\nGregorio, J., Ed. and B. de hOra, Ed., “[The Atom Publishing Protocol](https://www.rfc-editor.org/rfc/rfc5023.html)”, RFC 5023, October 2007, <[https://www.rfc-editor.org/info/rfc5023](https://www.rfc-editor.org/info/rfc5023)>.\n\n## Author's Address\n\n**James M Snell**\nEmail: [jasnell@gmail.com](mailto:jasnell@gmail.com)", "znaku_textu": 28105, "slov": 4064, "odkazu": 76, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:08", "sha256": "4d807680c5b741b52da3088e7c4fc6980dfd6ee8ad9b1a763a840c632a5aea56", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7240", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "http://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://www.rfc-editor.org/info/rfc3864", "https://www.rfc-editor.org/rfc/rfc5226.html", "https://www.rfc-editor.org/info/rfc5226", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://www.rfc-editor.org/info/rfc5234", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc5023.html", "https://www.rfc-editor.org/info/rfc5023"]} {"url": "https://httpwg.org/specs/rfc7541.html", "titulek": "RFC 7541 - HPACK: Header Compression for HTTP/2", "h1": "HPACK: Header Compression for HTTP/2", "popis": "This specification defines HPACK, a compression format for efficiently representing HTTP header fields, to be used in HTTP/2.", "klicova_slova": "HTTP, Header", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7541", "og:description": "HPACK: Header Compression for HTTP/2", "og:url": "https://httpwg.org/specs/rfc7541.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Overview"}, {"uroven": 3, "text": "1.2. Conventions"}, {"uroven": 3, "text": "1.3. Terminology"}, {"uroven": 2, "text": "2. Compression Process Overview"}, {"uroven": 3, "text": "2.1. Header List Ordering"}, {"uroven": 3, "text": "2.2. Encoding and Decoding Contexts"}, {"uroven": 3, "text": "2.3. Indexing Tables"}, {"uroven": 4, "text": "2.3.1. Static Table"}, {"uroven": 4, "text": "2.3.2. Dynamic Table"}, {"uroven": 4, "text": "2.3.3. Index Address Space"}, {"uroven": 3, "text": "2.4. Header Field Representation"}, {"uroven": 2, "text": "3. Header Block Decoding"}, {"uroven": 3, "text": "3.1. Header Block Processing"}, {"uroven": 3, "text": "3.2. Header Field Representation Processing"}, {"uroven": 2, "text": "4. Dynamic Table Management"}, {"uroven": 3, "text": "4.1. Calculating Table Size"}, {"uroven": 3, "text": "4.2. Maximum Table Size"}, {"uroven": 3, "text": "4.3. Entry Eviction When Dynamic Table Size Changes"}, {"uroven": 3, "text": "4.4. Entry Eviction When Adding New Entries"}, {"uroven": 2, "text": "5. Primitive Type Representations"}, {"uroven": 3, "text": "5.1. Integer Representation"}, {"uroven": 3, "text": "5.2. String Literal Representation"}, {"uroven": 2, "text": "6. Binary Format"}, {"uroven": 3, "text": "6.1. Indexed Header Field Representation"}, {"uroven": 3, "text": "6.2. Literal Header Field Representation"}, {"uroven": 4, "text": "6.2.1. Literal Header Field with Incremental Indexing"}, {"uroven": 4, "text": "6.2.2. Literal Header Field without Indexing"}, {"uroven": 4, "text": "6.2.3. Literal Header Field Never Indexed"}, {"uroven": 3, "text": "6.3. Dynamic Table Size Update"}, {"uroven": 2, "text": "7. Security Considerations"}, {"uroven": 3, "text": "7.1. Probing Dynamic Table State"}, {"uroven": 4, "text": "7.1.1. Applicability to HPACK and HTTP"}, {"uroven": 4, "text": "7.1.2. Mitigation"}, {"uroven": 4, "text": "7.1.3. Never-Indexed Literals"}, {"uroven": 3, "text": "7.2. Static Huffman Encoding"}, {"uroven": 3, "text": "7.3. Memory Consumption"}, {"uroven": 3, "text": "7.4. Implementation Limits"}, {"uroven": 2, "text": "8. References"}, {"uroven": 3, "text": "8.1. Normative References"}, {"uroven": 3, "text": "8.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Static Table Definition"}, {"uroven": 2, "text": "Appendix B. Huffman Code"}, {"uroven": 2, "text": "Appendix C. Examples"}, {"uroven": 3, "text": "C.1. Integer Representation Examples"}, {"uroven": 4, "text": "C.1.1. Example 1: Encoding 10 Using a 5-Bit Prefix"}, {"uroven": 4, "text": "C.1.2. Example 2: Encoding 1337 Using a 5-Bit Prefix"}, {"uroven": 4, "text": "C.1.3. Example 3: Encoding 42 Starting at an Octet Boundary"}, {"uroven": 3, "text": "C.2. Header Field Representation Examples"}, {"uroven": 3, "text": "C.3. Request Examples without Huffman Coding"}, {"uroven": 4, "text": "C.3.1. First Request"}, {"uroven": 4, "text": "C.3.2. Second Request"}, {"uroven": 4, "text": "C.3.3. Third Request"}, {"uroven": 3, "text": "C.4. Request Examples with Huffman Coding"}, {"uroven": 4, "text": "C.4.1. First Request"}, {"uroven": 4, "text": "C.4.2. Second Request"}, {"uroven": 4, "text": "C.4.3. Third Request"}, {"uroven": 3, "text": "C.5. Response Examples without Huffman Coding"}, {"uroven": 4, "text": "C.5.1. First Response"}, {"uroven": 4, "text": "C.5.2. Second Response"}, {"uroven": 4, "text": "C.5.3. Third Response"}, {"uroven": 3, "text": "C.6. Response Examples with Huffman Coding"}, {"uroven": 4, "text": "C.6.1. First Response"}, {"uroven": 4, "text": "C.6.2. Second Response"}, {"uroven": 4, "text": "C.6.3. Third Response"}, {"uroven": 2, "text": "Acknowledgments"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis specification defines HPACK, a compression format for efficiently representing HTTP header fields, to be used in HTTP/2.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7541](http://www.rfc-editor.org/info/rfc7541).\n\n## Copyright Notice\n\nCopyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n - 1.1. Overview\n - 1.2. Conventions\n - 1.3. Terminology\n- 2. Compression Process Overview\n - 2.1. Header List Ordering\n - 2.2. Encoding and Decoding Contexts\n - 2.3. Indexing Tables\n - 2.3.1. Static Table\n - 2.3.2. Dynamic Table\n - 2.3.3. Index Address Space\n - 2.4. Header Field Representation\n- 3. Header Block Decoding\n - 3.1. Header Block Processing\n - 3.2. Header Field Representation Processing\n- 4. Dynamic Table Management\n - 4.1. Calculating Table Size\n - 4.2. Maximum Table Size\n - 4.3. Entry Eviction When Dynamic Table Size Changes\n - 4.4. Entry Eviction When Adding New Entries\n- 5. Primitive Type Representations\n - 5.1. Integer Representation\n - 5.2. String Literal Representation\n- 6. Binary Format\n - 6.1. Indexed Header Field Representation\n - 6.2. Literal Header Field Representation\n - 6.2.1. Literal Header Field with Incremental Indexing\n - 6.2.2. Literal Header Field without Indexing\n - 6.2.3. Literal Header Field Never Indexed\n - 6.3. Dynamic Table Size Update\n- 7. Security Considerations\n - 7.1. Probing Dynamic Table State\n - 7.1.1. Applicability to HPACK and HTTP\n - 7.1.2. Mitigation\n - 7.1.3. Never-Indexed Literals\n - 7.2. Static Huffman Encoding\n - 7.3. Memory Consumption\n - 7.4. Implementation Limits\n- 8. References\n - 8.1. Normative References\n - 8.2. Informative References\n- Appendix A. Static Table Definition\n- Appendix B. Huffman Code\n- Appendix C. Examples\n - C.1. Integer Representation Examples\n - C.1.1. Example 1: Encoding 10 Using a 5-Bit Prefix\n - C.1.2. Example 2: Encoding 1337 Using a 5-Bit Prefix\n - C.1.3. Example 3: Encoding 42 Starting at an Octet Boundary\n - C.2. Header Field Representation Examples\n - C.2.1. Literal Header Field with Indexing\n - C.2.2. Literal Header Field without Indexing\n - C.2.3. Literal Header Field Never Indexed\n - C.2.4. Indexed Header Field\n - C.3. Request Examples without Huffman Coding\n - C.3.1. First Request\n - C.3.2. Second Request\n - C.3.3. Third Request\n - C.4. Request Examples with Huffman Coding\n - C.4.1. First Request\n - C.4.2. Second Request\n - C.4.3. Third Request\n - C.5. Response Examples without Huffman Coding\n - C.5.1. First Response\n - C.5.2. Second Response\n - C.5.3. Third Response\n - C.6. Response Examples with Huffman Coding\n - C.6.1. First Response\n - C.6.2. Second Response\n - C.6.3. Third Response\n- Acknowledgments\n- Authors' Addresses\n\n## 1. Introduction\n\nIn HTTP/1.1 (see [RFC7230]), header fields are not compressed. As web pages have grown to require dozens to hundreds of requests, the redundant header fields in these requests unnecessarily consume bandwidth, measurably increasing latency.\n\nSPDY [SPDY] initially addressed this redundancy by compressing header fields using the DEFLATE [DEFLATE] format, which proved very effective at efficiently representing the redundant header fields. However, that approach exposed a security risk as demonstrated by the CRIME (Compression Ratio Info-leak Made Easy) attack (see [CRIME]).\n\nThis specification defines HPACK, a new compressor that eliminates redundant header fields, limits vulnerability to known security attacks, and has a bounded memory requirement for use in constrained environments. Potential security concerns for HPACK are described in Section 7.\n\nThe HPACK format is intentionally simple and inflexible. Both characteristics reduce the risk of interoperability or security issues due to implementation error. No extensibility mechanisms are defined; changes to the format are only possible by defining a complete replacement.\n\n### 1.1. Overview\n\nThe format defined in this specification treats a list of header fields as an ordered collection of name-value pairs that can include duplicate pairs. Names and values are considered to be opaque sequences of octets, and the order of header fields is preserved after being compressed and decompressed.\n\nEncoding is informed by header field tables that map header fields to indexed values. These header field tables can be incrementally updated as new header fields are encoded or decoded.\n\nIn the encoded form, a header field is represented either literally or as a reference to a header field in one of the header field tables. Therefore, a list of header fields can be encoded using a mixture of references and literal values.\n\nLiteral values are either encoded directly or use a static Huffman code.\n\nThe encoder is responsible for deciding which header fields to insert as new entries in the header field tables. The decoder executes the modifications to the header field tables prescribed by the encoder, reconstructing the list of header fields in the process. This enables decoders to remain simple and interoperate with a wide variety of encoders.\n\nExamples illustrating the use of these different mechanisms to represent header fields are available in Appendix C.\n\n### 1.2. Conventions\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in RFC 2119 [RFC2119].\n\nAll numeric values are in network byte order. Values are unsigned unless otherwise indicated. Literal values are provided in decimal or hexadecimal as appropriate.\n\n### 1.3. Terminology\n\nThis specification uses the following terms:\n\nHeader Field:\n\nA name-value pair. Both the name and value are treated as opaque sequences of octets.\n\nDynamic Table:\n\nThe dynamic table (see Section 2.3.2) is a table that associates stored header fields with index values. This table is dynamic and specific to an encoding or decoding context.\n\nStatic Table:\n\nThe static table (see Section 2.3.1) is a table that statically associates header fields that occur frequently with index values. This table is ordered, read-only, always accessible, and it may be shared amongst all encoding or decoding contexts.\n\nHeader List:\n\nA header list is an ordered collection of header fields that are encoded jointly and can contain duplicate header fields. A complete list of header fields contained in an HTTP/2 header block is a header list.\n\nHeader Field Representation:\n\nA header field can be represented in encoded form either as a literal or as an index (see Section 2.4).\n\nHeader Block:\n\nAn ordered list of header field representations, which, when decoded, yields a complete header list.\n\n## 2. Compression Process Overview\n\nThis specification does not describe a specific algorithm for an encoder. Instead, it defines precisely how a decoder is expected to operate, allowing encoders to produce any encoding that this definition permits.\n\n### 2.1. Header List Ordering\n\nHPACK preserves the ordering of header fields inside the header list. An encoder MUST order header field representations in the header block according to their ordering in the original header list. A decoder MUST order header fields in the decoded header list according to their ordering in the header block.\n\n### 2.2. Encoding and Decoding Contexts\n\nTo decompress header blocks, a decoder only needs to maintain a dynamic table (see Section 2.3.2) as a decoding context. No other dynamic state is needed.\n\nWhen used for bidirectional communication, such as in HTTP, the encoding and decoding dynamic tables maintained by an endpoint are completely independent, i.e., the request and response dynamic tables are separate.\n\n### 2.3. Indexing Tables\n\nHPACK uses two tables for associating header fields to indexes. The static table (see Section 2.3.1) is predefined and contains common header fields (most of them with an empty value). The dynamic table (see Section 2.3.2) is dynamic and can be used by the encoder to index header fields repeated in the encoded header lists.\n\nThese two tables are combined into a single address space for defining index values (see Section 2.3.3).\n\n#### 2.3.1. Static Table\n\nThe static table consists of a predefined static list of header fields. Its entries are defined in Appendix A.\n\n#### 2.3.2. Dynamic Table\n\nThe dynamic table consists of a list of header fields maintained in first-in, first-out order. The first and newest entry in a dynamic table is at the lowest index, and the oldest entry of a dynamic table is at the highest index.\n\nThe dynamic table is initially empty. Entries are added as each header block is decompressed.\n\nThe dynamic table can contain duplicate entries (i.e., entries with the same name and same value). Therefore, duplicate entries MUST NOT be treated as an error by a decoder.\n\nThe encoder decides how to update the dynamic table and as such can control how much memory is used by the dynamic table. To limit the memory requirements of the decoder, the dynamic table size is strictly bounded (see Section 4.2).\n\nThe decoder updates the dynamic table during the processing of a list of header field representations (see Section 3.2).\n\n#### 2.3.3. Index Address Space\n\nThe static table and the dynamic table are combined into a single index address space.\n\nIndices between 1 and the length of the static table (inclusive) refer to elements in the static table (see Section 2.3.1).\n\nIndices strictly greater than the length of the static table refer to elements in the dynamic table (see Section 2.3.2). The length of the static table is subtracted to find the index into the dynamic table.\n\nIndices strictly greater than the sum of the lengths of both tables MUST be treated as a decoding error.\n\nFor a static table size of s and a dynamic table size of k, the following diagram shows the entire valid index address space.\n\n```\n <---------- Index Address Space ---------->\n <-- Static Table --> <-- Dynamic Table -->\n +---+-----------+---+ +---+-----------+---+\n | 1 | ... | s | |s+1| ... |s+k|\n +---+-----------+---+ +---+-----------+---+\n ^ |\n | V\n Insertion Point Dropping Point\n```\n\nFigure 1: Index Address Space\n\n### 2.4. Header Field Representation\n\nAn encoded header field can be represented either as an index or as a literal.\n\nAn indexed representation defines a header field as a reference to an entry in either the static table or the dynamic table (see Section 6.1).\n\nA literal representation defines a header field by specifying its name and value. The header field name can be represented literally or as a reference to an entry in either the static table or the dynamic table. The header field value is represented literally.\n\nThree different literal representations are defined:\n\n- A literal representation that adds the header field as a new entry at the beginning of the dynamic table (see Section 6.2.1 ).\n- A literal representation that does not add the header field to the dynamic table (see Section 6.2.2 ).\n- A literal representation that does not add the header field to the dynamic table, with the additional stipulation that this header field always use a literal representation, in particular when re-encoded by an intermediary (see Section 6.2.3 ). This representation is intended for protecting header field values that are not to be put at risk by compressing them (see Section 7.1.3 for more details).\n\nThe selection of one of these literal representations can be guided by security considerations, in order to protect sensitive header field values (see Section 7.1).\n\nThe literal representation of a header field name or of a header field value can encode the sequence of octets either directly or using a static Huffman code (see Section 5.2).\n\n## 3. Header Block Decoding\n\n### 3.1. Header Block Processing\n\nA decoder processes a header block sequentially to reconstruct the original header list.\n\nA header block is the concatenation of header field representations. The different possible header field representations are described in Section 6.\n\nOnce a header field is decoded and added to the reconstructed header list, the header field cannot be removed. A header field added to the header list can be safely passed to the application.\n\nBy passing the resulting header fields to the application, a decoder can be implemented with minimal transitory memory commitment in addition to the memory required for the dynamic table.\n\n### 3.2. Header Field Representation Processing\n\nThe processing of a header block to obtain a header list is defined in this section. To ensure that the decoding will successfully produce a header list, a decoder MUST obey the following rules.\n\nAll the header field representations contained in a header block are processed in the order in which they appear, as specified below. Details on the formatting of the various header field representations and some additional processing instructions are found in Section 6.\n\nAn *indexed representation* entails the following actions:\n\n- The header field corresponding to the referenced entry in either the static table or dynamic table is appended to the decoded header list.\n\nA *literal representation* that is *not added* to the dynamic table entails the following action:\n\n- The header field is appended to the decoded header list.\n\nA *literal representation* that is *added* to the dynamic table entails the following actions:\n\n- The header field is appended to the decoded header list.\n- The header field is inserted at the beginning of the dynamic table. This insertion could result in the eviction of previous entries in the dynamic table (see Section 4.4 ).\n\n## 4. Dynamic Table Management\n\nTo limit the memory requirements on the decoder side, the dynamic table is constrained in size.\n\n### 4.1. Calculating Table Size\n\nThe size of the dynamic table is the sum of the size of its entries.\n\nThe size of an entry is the sum of its name's length in octets (as defined in Section 5.2), its value's length in octets, and 32.\n\nThe size of an entry is calculated using the length of its name and value without any Huffman encoding applied.\n\n### 4.2. Maximum Table Size\n\nProtocols that use HPACK determine the maximum size that the encoder is permitted to use for the dynamic table. In HTTP/2, this value is determined by the SETTINGS_HEADER_TABLE_SIZE setting (see [Section 6.5.2](https://www.rfc-editor.org/rfc/rfc7540.html#section-6.5.2) of [HTTP2]).\n\nAn encoder can choose to use less capacity than this maximum size (see Section 6.3), but the chosen size MUST stay lower than or equal to the maximum set by the protocol.\n\nA change in the maximum size of the dynamic table is signaled via a dynamic table size update (see Section 6.3). This dynamic table size update MUST occur at the beginning of the first header block following the change to the dynamic table size. In HTTP/2, this follows a settings acknowledgment (see [Section 6.5.3](https://www.rfc-editor.org/rfc/rfc7540.html#section-6.5.3) of [HTTP2]).\n\nMultiple updates to the maximum table size can occur between the transmission of two header blocks. In the case that this size is changed more than once in this interval, the smallest maximum table size that occurs in that interval MUST be signaled in a dynamic table size update. The final maximum size is always signaled, resulting in at most two dynamic table size updates. This ensures that the decoder is able to perform eviction based on reductions in dynamic table size (see Section 4.3).\n\nThis mechanism can be used to completely clear entries from the dynamic table by setting a maximum size of 0, which can subsequently be restored.\n\n### 4.3. Entry Eviction When Dynamic Table Size Changes\n\nWhenever the maximum size for the dynamic table is reduced, entries are evicted from the end of the dynamic table until the size of the dynamic table is less than or equal to the maximum size.\n\n### 4.4. Entry Eviction When Adding New Entries\n\nBefore a new entry is added to the dynamic table, entries are evicted from the end of the dynamic table until the size of the dynamic table is less than or equal to (maximum size - new entry size) or until the table is empty.\n\nIf the size of the new entry is less than or equal to the maximum size, that entry is added to the table. It is not an error to attempt to add an entry that is larger than the maximum size; an attempt to add an entry larger than the maximum size causes the table to be emptied of all existing entries and results in an empty table.\n\nA new entry can reference the name of an entry in the dynamic table that will be evicted when adding this new entry into the dynamic table. Implementations are cautioned to avoid deleting the referenced name if the referenced entry is evicted from the dynamic table prior to inserting the new entry.\n\n## 5. Primitive Type Representations\n\nHPACK encoding uses two primitive types: unsigned variable-length integers and strings of octets.\n\n### 5.1. Integer Representation\n\nIntegers are used to represent name indexes, header field indexes, or string lengths. An integer representation can start anywhere within an octet. To allow for optimized processing, an integer representation always finishes at the end of an octet.\n\nAn integer is represented in two parts: a prefix that fills the current octet and an optional list of octets that are used if the integer value does not fit within the prefix. The number of bits of the prefix (called N) is a parameter of the integer representation.\n\nIf the integer value is small enough, i.e., strictly less than 2N-1, it is encoded within the N-bit prefix.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| ? | ? | ? | Value |\n+---+---+---+-------------------+\n```\n\nFigure 2: Integer Value Encoded within the Prefix (Shown for N = 5)\n\nOtherwise, all the bits of the prefix are set to 1, and the value, decreased by 2N-1, is encoded using a list of one or more octets. The most significant bit of each octet is used as a continuation flag: its value is set to 1 except for the last octet in the list. The remaining bits of the octets are used to encode the decreased value.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| ? | ? | ? | 1 1 1 1 1 |\n+---+---+---+-------------------+\n| 1 | Value-(2^N-1) LSB |\n+---+---------------------------+\n ...\n+---+---------------------------+\n| 0 | Value-(2^N-1) MSB |\n+---+---------------------------+\n```\n\nFigure 3: Integer Value Encoded after the Prefix (Shown for N = 5)\n\nDecoding the integer value from the list of octets starts by reversing the order of the octets in the list. Then, for each octet, its most significant bit is removed. The remaining bits of the octets are concatenated, and the resulting value is increased by 2N-1 to obtain the integer value.\n\nThe prefix size, N, is always between 1 and 8 bits. An integer starting at an octet boundary will have an 8-bit prefix.\n\nPseudocode to represent an integer I is as follows:\n\n```\nif I < 2^N - 1, encode I on N bits\nelse\n encode (2^N - 1) on N bits\n I = I - (2^N - 1)\n while I >= 128\n encode (I % 128 + 128) on 8 bits\n I = I / 128\n encode I on 8 bits\n```\n\nPseudocode to decode an integer I is as follows:\n\n```\ndecode I from the next N bits\nif I < 2^N - 1, return I\nelse\n M = 0\n repeat\n B = next octet\n I = I + (B & 127) * 2^M\n M = M + 7\n while B & 128 == 128\n return I\n```\n\nExamples illustrating the encoding of integers are available in Appendix C.1.\n\nThis integer representation allows for values of indefinite size. It is also possible for an encoder to send a large number of zero values, which can waste octets and could be used to overflow integer values. Integer encodings that exceed implementation limits — in value or octet length — MUST be treated as decoding errors. Different limits can be set for each of the different uses of integers, based on implementation constraints.\n\n### 5.2. String Literal Representation\n\nHeader field names and header field values can be represented as string literals. A string literal is encoded as a sequence of octets, either by directly encoding the string literal's octets or by using a Huffman code (see [HUFFMAN]).\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| H | String Length (7+) |\n+---+---------------------------+\n| String Data (Length octets) |\n+-------------------------------+\n```\n\nFigure 4: String Literal Representation\n\nA string literal representation contains the following fields:\n\nH:\n\nA one-bit flag, H, indicating whether or not the octets of the string are Huffman encoded.\n\nString Length:\n\nThe number of octets used to encode the string literal, encoded as an integer with a 7-bit prefix (see Section 5.1).\n\nString Data:\n\nThe encoded data of the string literal. If H is '0', then the encoded data is the raw octets of the string literal. If H is '1', then the encoded data is the Huffman encoding of the string literal.\n\nString literals that use Huffman encoding are encoded with the Huffman code defined in Appendix B (see examples for requests in Appendix C.4 and for responses in Appendix C.6). The encoded data is the bitwise concatenation of the codes corresponding to each octet of the string literal.\n\nAs the Huffman-encoded data doesn't always end at an octet boundary, some padding is inserted after it, up to the next octet boundary. To prevent this padding from being misinterpreted as part of the string literal, the most significant bits of the code corresponding to the EOS (end-of-string) symbol are used.\n\nUpon decoding, an incomplete code at the end of the encoded data is to be considered as padding and discarded. A padding strictly longer than 7 bits MUST be treated as a decoding error. A padding not corresponding to the most significant bits of the code for the EOS symbol MUST be treated as a decoding error. A Huffman-encoded string literal containing the EOS symbol MUST be treated as a decoding error.\n\n## 6. Binary Format\n\nThis section describes the detailed format of each of the different header field representations and the dynamic table size update instruction.\n\n### 6.1. Indexed Header Field Representation\n\nAn indexed header field representation identifies an entry in either the static table or the dynamic table (see Section 2.3).\n\nAn indexed header field representation causes a header field to be added to the decoded header list, as described in Section 3.2.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 1 | Index (7+) |\n+---+---------------------------+\n```\n\nFigure 5: Indexed Header Field\n\nAn indexed header field starts with the '1' 1-bit pattern, followed by the index of the matching header field, represented as an integer with a 7-bit prefix (see Section 5.1).\n\nThe index value of 0 is not used. It MUST be treated as a decoding error if found in an indexed header field representation.\n\n### 6.2. Literal Header Field Representation\n\nA literal header field representation contains a literal header field value. Header field names are provided either as a literal or by reference to an existing table entry, either from the static table or the dynamic table (see Section 2.3).\n\nThis specification defines three forms of literal header field representations: with indexing, without indexing, and never indexed.\n\n#### 6.2.1. Literal Header Field with Incremental Indexing\n\nA literal header field with incremental indexing representation results in appending a header field to the decoded header list and inserting it as a new entry into the dynamic table.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 1 | Index (6+) |\n+---+---+-----------------------+\n| H | Value Length (7+) |\n+---+---------------------------+\n| Value String (Length octets) |\n+-------------------------------+\n```\n\nFigure 6: Literal Header Field with Incremental Indexing — Indexed Name\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 1 | 0 |\n+---+---+-----------------------+\n| H | Name Length (7+) |\n+---+---------------------------+\n| Name String (Length octets) |\n+---+---------------------------+\n| H | Value Length (7+) |\n+---+---------------------------+\n| Value String (Length octets) |\n+-------------------------------+\n```\n\nFigure 7: Literal Header Field with Incremental Indexing — New Name\n\nA literal header field with incremental indexing representation starts with the '01' 2-bit pattern.\n\nIf the header field name matches the header field name of an entry stored in the static table or the dynamic table, the header field name can be represented using the index of that entry. In this case, the index of the entry is represented as an integer with a 6-bit prefix (see Section 5.1). This value is always non-zero.\n\nOtherwise, the header field name is represented as a string literal (see Section 5.2). A value 0 is used in place of the 6-bit index, followed by the header field name.\n\nEither form of header field name representation is followed by the header field value represented as a string literal (see Section 5.2).\n\n#### 6.2.2. Literal Header Field without Indexing\n\nA literal header field without indexing representation results in appending a header field to the decoded header list without altering the dynamic table.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 0 | 0 | 0 | Index (4+) |\n+---+---+-----------------------+\n| H | Value Length (7+) |\n+---+---------------------------+\n| Value String (Length octets) |\n+-------------------------------+\n```\n\nFigure 8: Literal Header Field without Indexing — Indexed Name\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 0 | 0 | 0 | 0 |\n+---+---+-----------------------+\n| H | Name Length (7+) |\n+---+---------------------------+\n| Name String (Length octets) |\n+---+---------------------------+\n| H | Value Length (7+) |\n+---+---------------------------+\n| Value String (Length octets) |\n+-------------------------------+\n```\n\nFigure 9: Literal Header Field without Indexing — New Name\n\nA literal header field without indexing representation starts with the '0000' 4-bit pattern.\n\nIf the header field name matches the header field name of an entry stored in the static table or the dynamic table, the header field name can be represented using the index of that entry. In this case, the index of the entry is represented as an integer with a 4-bit prefix (see Section 5.1). This value is always non-zero.\n\nOtherwise, the header field name is represented as a string literal (see Section 5.2). A value 0 is used in place of the 4-bit index, followed by the header field name.\n\nEither form of header field name representation is followed by the header field value represented as a string literal (see Section 5.2).\n\n#### 6.2.3. Literal Header Field Never Indexed\n\nA literal header field never-indexed representation results in appending a header field to the decoded header list without altering the dynamic table. Intermediaries MUST use the same representation for encoding this header field.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 0 | 0 | 1 | Index (4+) |\n+---+---+-----------------------+\n| H | Value Length (7+) |\n+---+---------------------------+\n| Value String (Length octets) |\n+-------------------------------+\n```\n\nFigure 10: Literal Header Field Never Indexed — Indexed Name\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 0 | 0 | 1 | 0 |\n+---+---+-----------------------+\n| H | Name Length (7+) |\n+---+---------------------------+\n| Name String (Length octets) |\n+---+---------------------------+\n| H | Value Length (7+) |\n+---+---------------------------+\n| Value String (Length octets) |\n+-------------------------------+\n```\n\nFigure 11: Literal Header Field Never Indexed — New Name\n\nA literal header field never-indexed representation starts with the '0001' 4-bit pattern.\n\nWhen a header field is represented as a literal header field never indexed, it MUST always be encoded with this specific literal representation. In particular, when a peer sends a header field that it received represented as a literal header field never indexed, it MUST use the same representation to forward this header field.\n\nThis representation is intended for protecting header field values that are not to be put at risk by compressing them (see Section 7.1 for more details).\n\nThe encoding of the representation is identical to the literal header field without indexing (see Section 6.2.2).\n\n### 6.3. Dynamic Table Size Update\n\nA dynamic table size update signals a change to the size of the dynamic table.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 0 | 1 | Max size (5+) |\n+---+---------------------------+\n```\n\nFigure 12: Maximum Dynamic Table Size Change\n\nA dynamic table size update starts with the '001' 3-bit pattern, followed by the new maximum size, represented as an integer with a 5-bit prefix (see Section 5.1).\n\nThe new maximum size MUST be lower than or equal to the limit determined by the protocol using HPACK. A value that exceeds this limit MUST be treated as a decoding error. In HTTP/2, this limit is the last value of the SETTINGS_HEADER_TABLE_SIZE parameter (see [Section 6.5.2](https://www.rfc-editor.org/rfc/rfc7540.html#section-6.5.2) of [HTTP2]) received from the decoder and acknowledged by the encoder (see [Section 6.5.3](https://www.rfc-editor.org/rfc/rfc7540.html#section-6.5.3) of [HTTP2]).\n\nReducing the maximum size of the dynamic table can cause entries to be evicted (see Section 4.3).\n\n## 7. Security Considerations\n\nThis section describes potential areas of security concern with HPACK:\n\n- Use of compression as a length-based oracle for verifying guesses about secrets that are compressed into a shared compression context.\n- Denial of service resulting from exhausting processing or memory capacity at a decoder.\n\n### 7.1. Probing Dynamic Table State\n\nHPACK reduces the length of header field encodings by exploiting the redundancy inherent in protocols like HTTP. The ultimate goal of this is to reduce the amount of data that is required to send HTTP requests or responses.\n\nThe compression context used to encode header fields can be probed by an attacker who can both define header fields to be encoded and transmitted and observe the length of those fields once they are encoded. When an attacker can do both, they can adaptively modify requests in order to confirm guesses about the dynamic table state. If a guess is compressed into a shorter length, the attacker can observe the encoded length and infer that the guess was correct.\n\nThis is possible even over the Transport Layer Security (TLS) protocol (see [TLS12]), because while TLS provides confidentiality protection for content, it only provides a limited amount of protection for the length of that content.\n\nAttacks like CRIME [CRIME] demonstrated the existence of these general attacker capabilities. The specific attack exploited the fact that DEFLATE [DEFLATE] removes redundancy based on prefix matching. This permitted the attacker to confirm guesses a character at a time, reducing an exponential-time attack into a linear-time attack.\n\n#### 7.1.1. Applicability to HPACK and HTTP\n\nHPACK mitigates but does not completely prevent attacks modeled on CRIME [CRIME] by forcing a guess to match an entire header field value rather than individual characters. Attackers can only learn whether a guess is correct or not, so they are reduced to brute-force guesses for the header field values.\n\nThe viability of recovering specific header field values therefore depends on the entropy of values. As a result, values with high entropy are unlikely to be recovered successfully. However, values with low entropy remain vulnerable.\n\nAttacks of this nature are possible any time that two mutually distrustful entities control requests or responses that are placed onto a single HTTP/2 connection. If the shared HPACK compressor permits one entity to add entries to the dynamic table and the other to access those entries, then the state of the table can be learned.\n\nHaving requests or responses from mutually distrustful entities occurs when an intermediary either:\n\n- sends requests from multiple clients on a single connection toward an origin server, or\n- takes responses from multiple origin servers and places them on a shared connection toward a client.\n\nWeb browsers also need to assume that requests made on the same connection by different web origins [ORIGIN] are made by mutually distrustful entities.\n\n#### 7.1.2. Mitigation\n\nUsers of HTTP that require confidentiality for header fields can use values with entropy sufficient to make guessing infeasible. However, this is impractical as a general solution because it forces all users of HTTP to take steps to mitigate attacks. It would impose new constraints on how HTTP is used.\n\nRather than impose constraints on users of HTTP, an implementation of HPACK can instead constrain how compression is applied in order to limit the potential for dynamic table probing.\n\nAn ideal solution segregates access to the dynamic table based on the entity that is constructing header fields. Header field values that are added to the table are attributed to an entity, and only the entity that created a particular value can extract that value.\n\nTo improve compression performance of this option, certain entries might be tagged as being public. For example, a web browser might make the values of the Accept-Encoding header field available in all requests.\n\nAn encoder without good knowledge of the provenance of header fields might instead introduce a penalty for a header field with many different values, such that a large number of attempts to guess a header field value results in the header field no longer being compared to the dynamic table entries in future messages, effectively preventing further guesses.\n\nThis response might be made inversely proportional to the length of the header field value. Marking a header field as not using the dynamic table anymore might occur for shorter values more quickly or with higher probability than for longer values.\n\n#### 7.1.3. Never-Indexed Literals\n\nImplementations can also choose to protect sensitive header fields by not compressing them and instead encoding their value as literals.\n\nRefusing to generate an indexed representation for a header field is only effective if compression is avoided on all hops. The never-indexed literal (see Section 6.2.3) can be used to signal to intermediaries that a particular value was intentionally sent as a literal.\n\nAn intermediary MUST NOT re-encode a value that uses the never-indexed literal representation with another representation that would index it. If HPACK is used for re-encoding, the never-indexed literal representation MUST be used.\n\nThe choice to use a never-indexed literal representation for a header field depends on several factors. Since HPACK doesn't protect against guessing an entire header field value, short or low-entropy values are more readily recovered by an adversary. Therefore, an encoder might choose not to index values with low entropy.\n\nAn encoder might also choose not to index values for header fields that are considered to be highly valuable or sensitive to recovery, such as the Cookie or Authorization header fields.\n\nOn the contrary, an encoder might prefer indexing values for header fields that have little or no value if they were exposed. For instance, a User-Agent header field does not commonly vary between requests and is sent to any server. In that case, confirmation that a particular User-Agent value has been used provides little value.\n\nNote that these criteria for deciding to use a never-indexed literal representation will evolve over time as new attacks are discovered.\n\n### 7.2. Static Huffman Encoding\n\nThere is no currently known attack against a static Huffman encoding. A study has shown that using a static Huffman encoding table created an information leakage; however, this same study concluded that an attacker could not take advantage of this information leakage to recover any meaningful amount of information (see [PETAL]).\n\n### 7.3. Memory Consumption\n\nAn attacker can try to cause an endpoint to exhaust its memory. HPACK is designed to limit both the peak and state amounts of memory allocated by an endpoint.\n\nThe amount of memory used by the compressor is limited by the protocol using HPACK through the definition of the maximum size of the dynamic table. In HTTP/2, this value is controlled by the decoder through the setting parameter SETTINGS_HEADER_TABLE_SIZE (see [Section 6.5.2](https://www.rfc-editor.org/rfc/rfc7540.html#section-6.5.2) of [HTTP2]). This limit takes into account both the size of the data stored in the dynamic table, plus a small allowance for overhead.\n\nA decoder can limit the amount of state memory used by setting an appropriate value for the maximum size of the dynamic table. In HTTP/2, this is realized by setting an appropriate value for the SETTINGS_HEADER_TABLE_SIZE parameter. An encoder can limit the amount of state memory it uses by signaling a lower dynamic table size than the decoder allows (see Section 6.3).\n\nThe amount of temporary memory consumed by an encoder or decoder can be limited by processing header fields sequentially. An implementation does not need to retain a complete list of header fields. Note, however, that it might be necessary for an application to retain a complete header list for other reasons; even though HPACK does not force this to occur, application constraints might make this necessary.\n\n### 7.4. Implementation Limits\n\nAn implementation of HPACK needs to ensure that large values for integers, long encoding for integers, or long string literals do not create security weaknesses.\n\nAn implementation has to set a limit for the values it accepts for integers, as well as for the encoded length (see Section 5.1). In the same way, it has to set a limit to the length it accepts for string literals (see Section 5.2).\n\n## 8. References\n\n### 8.1. Normative References\n\n[HTTP2]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol Version 2 (HTTP/2)](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[http://www.rfc-editor.org/info/rfc7540](http://www.rfc-editor.org/info/rfc7540)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[http://www.rfc-editor.org/info/rfc2119](http://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[http://www.rfc-editor.org/info/rfc7230](http://www.rfc-editor.org/info/rfc7230)>.\n\n### 8.2. Informative References\n\n[CANONICAL]\n\nSchwartz, E. and B. Kallick, “[Generating a canonical prefix encoding](https://dl.acm.org/citation.cfm?id=363991)”, Communications of the ACM, Volume 7 Issue 3, pp. 166-169, March 1964, <[https://dl.acm.org/citation.cfm?id=363991](https://dl.acm.org/citation.cfm?id=363991)>.\n\n[CRIME]\n\nWikipedia, “[CRIME](http://en.wikipedia.org/w/index.php?title=CRIME&oldid=660948120)”, May 2015, <[http://en.wikipedia.org/w/index.php?title=CRIME&oldid=660948120](http://en.wikipedia.org/w/index.php?title=CRIME&oldid=660948120)>.\n\n[DEFLATE]\n\nDeutsch, P., “[DEFLATE Compressed Data Format Specification version 1.3](https://www.rfc-editor.org/rfc/rfc1951.html)”, RFC 1951, [DOI 10.17487/RFC1951](https://dx.doi.org/10.17487/RFC1951), May 1996, <[http://www.rfc-editor.org/info/rfc1951](http://www.rfc-editor.org/info/rfc1951)>.\n\n[HUFFMAN]\n\nHuffman, D., “[A Method for the Construction of Minimum-Redundancy Codes](http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=4051119)”, Proceedings of the Institute of Radio Engineers, Volume 40, Number 9, pp. 1098-1101, September 1952, <[http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=4051119](http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=4051119)>.\n\n[ORIGIN]\n\nBarth, A., “[The Web Origin Concept](https://www.rfc-editor.org/rfc/rfc6454.html)”, RFC 6454, [DOI 10.17487/RFC6454](https://dx.doi.org/10.17487/RFC6454), December 2011, <[http://www.rfc-editor.org/info/rfc6454](http://www.rfc-editor.org/info/rfc6454)>.\n\n[PETAL]\n\nTan, J. and J. Nahata, “[PETAL: Preset Encoding Table Information Leakage](http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-13-106.pdf)”, April 2013, <[http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-13-106.pdf](http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-13-106.pdf)>.\n\n[SPDY]\n\nBelshe, M. and R. Peon, “[SPDY Protocol](https://datatracker.ietf.org/doc/html/draft-mbelshe-httpbis-spdy-00)”, [Work in Progress](https://datatracker.ietf.org/doc/draft-mbelshe-httpbis-spdy), draft-mbelshe-httpbis-spdy-00, February 2012.\n\n[TLS12]\n\nDierks, T. and E. Rescorla, “[The Transport Layer Security (TLS) Protocol Version 1.2](https://www.rfc-editor.org/rfc/rfc5246.html)”, RFC 5246, [DOI 10.17487/RFC5246](https://dx.doi.org/10.17487/RFC5246), August 2008, <[http://www.rfc-editor.org/info/rfc5246](http://www.rfc-editor.org/info/rfc5246)>.\n\n## Appendix A. Static Table Definition\n\nThe static table (see Section 2.3.1) consists in a predefined and unchangeable list of header fields.\n\nThe static table was created from the most frequent header fields used by popular web sites, with the addition of HTTP/2-specific pseudo-header fields (see [Section 8.1.2.1](https://www.rfc-editor.org/rfc/rfc7540.html#section-8.1.2.1) of [HTTP2]). For header fields with a few frequent values, an entry was added for each of these frequent values. For other header fields, an entry was added with an empty value.\n\nTable 1 lists the predefined header fields that make up the static table and gives the index of each entry.\n\n| Index | Header Name | Header Value |\n| --- | --- | --- |\n| 1 | :authority | |\n| 2 | :method | GET |\n| 3 | :method | POST |\n| 4 | :path | / |\n| 5 | :path | /index.html |\n| 6 | :scheme | http |\n| 7 | :scheme | https |\n| 8 | :status | 200 |\n| 9 | :status | 204 |\n| 10 | :status | 206 |\n| 11 | :status | 304 |\n| 12 | :status | 400 |\n| 13 | :status | 404 |\n| 14 | :status | 500 |\n| 15 | accept-charset | |\n| 16 | accept-encoding | gzip, deflate |\n| 17 | accept-language | |\n| 18 | accept-ranges | |\n| 19 | accept | |\n| 20 | access-control-allow-origin | |\n| 21 | age | |\n| 22 | allow | |\n| 23 | authorization | |\n| 24 | cache-control | |\n| 25 | content-disposition | |\n| 26 | content-encoding | |\n| 27 | content-language | |\n| 28 | content-length | |\n| 29 | content-location | |\n| 30 | content-range | |\n| 31 | content-type | |\n| 32 | cookie | |\n| 33 | date | |\n| 34 | etag | |\n| 35 | expect | |\n| 36 | expires | |\n| 37 | from | |\n| 38 | host | |\n| 39 | if-match | |\n| 40 | if-modified-since | |\n| 41 | if-none-match | |\n| 42 | if-range | |\n| 43 | if-unmodified-since | |\n| 44 | last-modified | |\n| 45 | link | |\n| 46 | location | |\n| 47 | max-forwards | |\n| 48 | proxy-authenticate | |\n| 49 | proxy-authorization | |\n| 50 | range | |\n| 51 | referer | |\n| 52 | refresh | |\n| 53 | retry-after | |\n| 54 | server | |\n| 55 | set-cookie | |\n| 56 | strict-transport-security | |\n| 57 | transfer-encoding | |\n| 58 | user-agent | |\n| 59 | vary | |\n| 60 | via | |\n| 61 | www-authenticate | |\n\n## Appendix B. Huffman Code\n\nThe following Huffman code is used when encoding string literals with a Huffman coding (see Section 5.2).\n\nThis Huffman code was generated from statistics obtained on a large sample of HTTP headers. It is a canonical Huffman code (see [CANONICAL]) with some tweaking to ensure that no symbol has a unique code length.\n\nEach row in the table defines the code used to represent a symbol:\n\nsym:\n\nThe symbol to be represented. It is the decimal value of an octet, possibly prepended with its ASCII representation. A specific symbol, \"EOS\", is used to indicate the end of a string literal.\n\ncode as bits:\n\nThe Huffman code for the symbol represented as a base-2 integer, aligned on the most significant bit (MSB).\n\ncode as hex:\n\nThe Huffman code for the symbol, represented as a hexadecimal integer, aligned on the least significant bit (LSB).\n\nlen:\n\nThe number of bits for the code representing the symbol.\n\nAs an example, the code for the symbol 47 (corresponding to the ASCII character \"/\") consists in the 6 bits \"0\", \"1\", \"1\", \"0\", \"0\", \"0\". This corresponds to the value 0x18 (in hexadecimal) encoded in 6 bits.\n\n```\n code\n code as bits as hex len\n sym aligned to MSB aligned in\n to LSB bits\n ( 0) |11111111|11000 1ff8 [13]\n ( 1) |11111111|11111111|1011000 7fffd8 [23]\n ( 2) |11111111|11111111|11111110|0010 fffffe2 [28]\n ( 3) |11111111|11111111|11111110|0011 fffffe3 [28]\n ( 4) |11111111|11111111|11111110|0100 fffffe4 [28]\n ( 5) |11111111|11111111|11111110|0101 fffffe5 [28]\n ( 6) |11111111|11111111|11111110|0110 fffffe6 [28]\n ( 7) |11111111|11111111|11111110|0111 fffffe7 [28]\n ( 8) |11111111|11111111|11111110|1000 fffffe8 [28]\n ( 9) |11111111|11111111|11101010 ffffea [24]\n ( 10) |11111111|11111111|11111111|111100 3ffffffc [30]\n ( 11) |11111111|11111111|11111110|1001 fffffe9 [28]\n ( 12) |11111111|11111111|11111110|1010 fffffea [28]\n ( 13) |11111111|11111111|11111111|111101 3ffffffd [30]\n ( 14) |11111111|11111111|11111110|1011 fffffeb [28]\n ( 15) |11111111|11111111|11111110|1100 fffffec [28]\n ( 16) |11111111|11111111|11111110|1101 fffffed [28]\n ( 17) |11111111|11111111|11111110|1110 fffffee [28]\n ( 18) |11111111|11111111|11111110|1111 fffffef [28]\n ( 19) |11111111|11111111|11111111|0000 ffffff0 [28]\n ( 20) |11111111|11111111|11111111|0001 ffffff1 [28]\n ( 21) |11111111|11111111|11111111|0010 ffffff2 [28]\n ( 22) |11111111|11111111|11111111|111110 3ffffffe [30]\n ( 23) |11111111|11111111|11111111|0011 ffffff3 [28]\n ( 24) |11111111|11111111|11111111|0100 ffffff4 [28]\n ( 25) |11111111|11111111|11111111|0101 ffffff5 [28]\n ( 26) |11111111|11111111|11111111|0110 ffffff6 [28]\n ( 27) |11111111|11111111|11111111|0111 ffffff7 [28]\n ( 28) |11111111|11111111|11111111|1000 ffffff8 [28]\n ( 29) |11111111|11111111|11111111|1001 ffffff9 [28]\n ( 30) |11111111|11111111|11111111|1010 ffffffa [28]\n ( 31) |11111111|11111111|11111111|1011 ffffffb [28]\n' ' ( 32) |010100 14 [ 6]\n'!' ( 33) |11111110|00 3f8 [10]\n'\"' ( 34) |11111110|01 3f9 [10]\n'#' ( 35) |11111111|1010 ffa [12]\n'$' ( 36) |11111111|11001 1ff9 [13]\n'%' ( 37) |010101 15 [ 6]\n'&' ( 38) |11111000 f8 [ 8]\n''' ( 39) |11111111|010 7fa [11]\n'(' ( 40) |11111110|10 3fa [10]\n')' ( 41) |11111110|11 3fb [10]\n'*' ( 42) |11111001 f9 [ 8]\n'+' ( 43) |11111111|011 7fb [11]\n',' ( 44) |11111010 fa [ 8]\n'-' ( 45) |010110 16 [ 6]\n'.' ( 46) |010111 17 [ 6]\n'/' ( 47) |011000 18 [ 6]\n'0' ( 48) |00000 0 [ 5]\n'1' ( 49) |00001 1 [ 5]\n'2' ( 50) |00010 2 [ 5]\n'3' ( 51) |011001 19 [ 6]\n'4' ( 52) |011010 1a [ 6]\n'5' ( 53) |011011 1b [ 6]\n'6' ( 54) |011100 1c [ 6]\n'7' ( 55) |011101 1d [ 6]\n'8' ( 56) |011110 1e [ 6]\n'9' ( 57) |011111 1f [ 6]\n':' ( 58) |1011100 5c [ 7]\n';' ( 59) |11111011 fb [ 8]\n'<' ( 60) |11111111|1111100 7ffc [15]\n'=' ( 61) |100000 20 [ 6]\n'>' ( 62) |11111111|1011 ffb [12]\n'?' ( 63) |11111111|00 3fc [10]\n'@' ( 64) |11111111|11010 1ffa [13]\n'A' ( 65) |100001 21 [ 6]\n'B' ( 66) |1011101 5d [ 7]\n'C' ( 67) |1011110 5e [ 7]\n'D' ( 68) |1011111 5f [ 7]\n'E' ( 69) |1100000 60 [ 7]\n'F' ( 70) |1100001 61 [ 7]\n'G' ( 71) |1100010 62 [ 7]\n'H' ( 72) |1100011 63 [ 7]\n'I' ( 73) |1100100 64 [ 7]\n'J' ( 74) |1100101 65 [ 7]\n'K' ( 75) |1100110 66 [ 7]\n'L' ( 76) |1100111 67 [ 7]\n'M' ( 77) |1101000 68 [ 7]\n'N' ( 78) |1101001 69 [ 7]\n'O' ( 79) |1101010 6a [ 7]\n'P' ( 80) |1101011 6b [ 7]\n'Q' ( 81) |1101100 6c [ 7]\n'R' ( 82) |1101101 6d [ 7]\n'S' ( 83) |1101110 6e [ 7]\n'T' ( 84) |1101111 6f [ 7]\n'U' ( 85) |1110000 70 [ 7]\n'V' ( 86) |1110001 71 [ 7]\n'W' ( 87) |1110010 72 [ 7]\n'X' ( 88) |11111100 fc [ 8]\n'Y' ( 89) |1110011 73 [ 7]\n'Z' ( 90) |11111101 fd [ 8]\n'[' ( 91) |11111111|11011 1ffb [13]\n'\\' ( 92) |11111111|11111110|000 7fff0 [19]\n']' ( 93) |11111111|11100 1ffc [13]\n'^' ( 94) |11111111|111100 3ffc [14]\n'_' ( 95) |100010 22 [ 6]\n'`' ( 96) |11111111|1111101 7ffd [15]\n'a' ( 97) |00011 3 [ 5]\n'b' ( 98) |100011 23 [ 6]\n'c' ( 99) |00100 4 [ 5]\n'd' (100) |100100 24 [ 6]\n'e' (101) |00101 5 [ 5]\n'f' (102) |100101 25 [ 6]\n'g' (103) |100110 26 [ 6]\n'h' (104) |100111 27 [ 6]\n'i' (105) |00110 6 [ 5]\n'j' (106) |1110100 74 [ 7]\n'k' (107) |1110101 75 [ 7]\n'l' (108) |101000 28 [ 6]\n'm' (109) |101001 29 [ 6]\n'n' (110) |101010 2a [ 6]\n'o' (111) |00111 7 [ 5]\n'p' (112) |101011 2b [ 6]\n'q' (113) |1110110 76 [ 7]\n'r' (114) |101100 2c [ 6]\n's' (115) |01000 8 [ 5]\n't' (116) |01001 9 [ 5]\n'u' (117) |101101 2d [ 6]\n'v' (118) |1110111 77 [ 7]\n'w' (119) |1111000 78 [ 7]\n'x' (120) |1111001 79 [ 7]\n'y' (121) |1111010 7a [ 7]\n'z' (122) |1111011 7b [ 7]\n'{' (123) |11111111|1111110 7ffe [15]\n'|' (124) |11111111|100 7fc [11]\n'}' (125) |11111111|111101 3ffd [14]\n'~' (126) |11111111|11101 1ffd [13]\n (127) |11111111|11111111|11111111|1100 ffffffc [28]\n (128) |11111111|11111110|0110 fffe6 [20]\n (129) |11111111|11111111|010010 3fffd2 [22]\n (130) |11111111|11111110|0111 fffe7 [20]\n (131) |11111111|11111110|1000 fffe8 [20]\n (132) |11111111|11111111|010011 3fffd3 [22]\n (133) |11111111|11111111|010100 3fffd4 [22]\n (134) |11111111|11111111|010101 3fffd5 [22]\n (135) |11111111|11111111|1011001 7fffd9 [23]\n (136) |11111111|11111111|010110 3fffd6 [22]\n (137) |11111111|11111111|1011010 7fffda [23]\n (138) |11111111|11111111|1011011 7fffdb [23]\n (139) |11111111|11111111|1011100 7fffdc [23]\n (140) |11111111|11111111|1011101 7fffdd [23]\n (141) |11111111|11111111|1011110 7fffde [23]\n (142) |11111111|11111111|11101011 ffffeb [24]\n (143) |11111111|11111111|1011111 7fffdf [23]\n (144) |11111111|11111111|11101100 ffffec [24]\n (145) |11111111|11111111|11101101 ffffed [24]\n (146) |11111111|11111111|010111 3fffd7 [22]\n (147) |11111111|11111111|1100000 7fffe0 [23]\n (148) |11111111|11111111|11101110 ffffee [24]\n (149) |11111111|11111111|1100001 7fffe1 [23]\n (150) |11111111|11111111|1100010 7fffe2 [23]\n (151) |11111111|11111111|1100011 7fffe3 [23]\n (152) |11111111|11111111|1100100 7fffe4 [23]\n (153) |11111111|11111110|11100 1fffdc [21]\n (154) |11111111|11111111|011000 3fffd8 [22]\n (155) |11111111|11111111|1100101 7fffe5 [23]\n (156) |11111111|11111111|011001 3fffd9 [22]\n (157) |11111111|11111111|1100110 7fffe6 [23]\n (158) |11111111|11111111|1100111 7fffe7 [23]\n (159) |11111111|11111111|11101111 ffffef [24]\n (160) |11111111|11111111|011010 3fffda [22]\n (161) |11111111|11111110|11101 1fffdd [21]\n (162) |11111111|11111110|1001 fffe9 [20]\n (163) |11111111|11111111|011011 3fffdb [22]\n (164) |11111111|11111111|011100 3fffdc [22]\n (165) |11111111|11111111|1101000 7fffe8 [23]\n (166) |11111111|11111111|1101001 7fffe9 [23]\n (167) |11111111|11111110|11110 1fffde [21]\n (168) |11111111|11111111|1101010 7fffea [23]\n (169) |11111111|11111111|011101 3fffdd [22]\n (170) |11111111|11111111|011110 3fffde [22]\n (171) |11111111|11111111|11110000 fffff0 [24]\n (172) |11111111|11111110|11111 1fffdf [21]\n (173) |11111111|11111111|011111 3fffdf [22]\n (174) |11111111|11111111|1101011 7fffeb [23]\n (175) |11111111|11111111|1101100 7fffec [23]\n (176) |11111111|11111111|00000 1fffe0 [21]\n (177) |11111111|11111111|00001 1fffe1 [21]\n (178) |11111111|11111111|100000 3fffe0 [22]\n (179) |11111111|11111111|00010 1fffe2 [21]\n (180) |11111111|11111111|1101101 7fffed [23]\n (181) |11111111|11111111|100001 3fffe1 [22]\n (182) |11111111|11111111|1101110 7fffee [23]\n (183) |11111111|11111111|1101111 7fffef [23]\n (184) |11111111|11111110|1010 fffea [20]\n (185) |11111111|11111111|100010 3fffe2 [22]\n (186) |11111111|11111111|100011 3fffe3 [22]\n (187) |11111111|11111111|100100 3fffe4 [22]\n (188) |11111111|11111111|1110000 7ffff0 [23]\n (189) |11111111|11111111|100101 3fffe5 [22]\n (190) |11111111|11111111|100110 3fffe6 [22]\n (191) |11111111|11111111|1110001 7ffff1 [23]\n (192) |11111111|11111111|11111000|00 3ffffe0 [26]\n (193) |11111111|11111111|11111000|01 3ffffe1 [26]\n (194) |11111111|11111110|1011 fffeb [20]\n (195) |11111111|11111110|001 7fff1 [19]\n (196) |11111111|11111111|100111 3fffe7 [22]\n (197) |11111111|11111111|1110010 7ffff2 [23]\n (198) |11111111|11111111|101000 3fffe8 [22]\n (199) |11111111|11111111|11110110|0 1ffffec [25]\n (200) |11111111|11111111|11111000|10 3ffffe2 [26]\n (201) |11111111|11111111|11111000|11 3ffffe3 [26]\n (202) |11111111|11111111|11111001|00 3ffffe4 [26]\n (203) |11111111|11111111|11111011|110 7ffffde [27]\n (204) |11111111|11111111|11111011|111 7ffffdf [27]\n (205) |11111111|11111111|11111001|01 3ffffe5 [26]\n (206) |11111111|11111111|11110001 fffff1 [24]\n (207) |11111111|11111111|11110110|1 1ffffed [25]\n (208) |11111111|11111110|010 7fff2 [19]\n (209) |11111111|11111111|00011 1fffe3 [21]\n (210) |11111111|11111111|11111001|10 3ffffe6 [26]\n (211) |11111111|11111111|11111100|000 7ffffe0 [27]\n (212) |11111111|11111111|11111100|001 7ffffe1 [27]\n (213) |11111111|11111111|11111001|11 3ffffe7 [26]\n (214) |11111111|11111111|11111100|010 7ffffe2 [27]\n (215) |11111111|11111111|11110010 fffff2 [24]\n (216) |11111111|11111111|00100 1fffe4 [21]\n (217) |11111111|11111111|00101 1fffe5 [21]\n (218) |11111111|11111111|11111010|00 3ffffe8 [26]\n (219) |11111111|11111111|11111010|01 3ffffe9 [26]\n (220) |11111111|11111111|11111111|1101 ffffffd [28]\n (221) |11111111|11111111|11111100|011 7ffffe3 [27]\n (222) |11111111|11111111|11111100|100 7ffffe4 [27]\n (223) |11111111|11111111|11111100|101 7ffffe5 [27]\n (224) |11111111|11111110|1100 fffec [20]\n (225) |11111111|11111111|11110011 fffff3 [24]\n (226) |11111111|11111110|1101 fffed [20]\n (227) |11111111|11111111|00110 1fffe6 [21]\n (228) |11111111|11111111|101001 3fffe9 [22]\n (229) |11111111|11111111|00111 1fffe7 [21]\n (230) |11111111|11111111|01000 1fffe8 [21]\n (231) |11111111|11111111|1110011 7ffff3 [23]\n (232) |11111111|11111111|101010 3fffea [22]\n (233) |11111111|11111111|101011 3fffeb [22]\n (234) |11111111|11111111|11110111|0 1ffffee [25]\n (235) |11111111|11111111|11110111|1 1ffffef [25]\n (236) |11111111|11111111|11110100 fffff4 [24]\n (237) |11111111|11111111|11110101 fffff5 [24]\n (238) |11111111|11111111|11111010|10 3ffffea [26]\n (239) |11111111|11111111|1110100 7ffff4 [23]\n (240) |11111111|11111111|11111010|11 3ffffeb [26]\n (241) |11111111|11111111|11111100|110 7ffffe6 [27]\n (242) |11111111|11111111|11111011|00 3ffffec [26]\n (243) |11111111|11111111|11111011|01 3ffffed [26]\n (244) |11111111|11111111|11111100|111 7ffffe7 [27]\n (245) |11111111|11111111|11111101|000 7ffffe8 [27]\n (246) |11111111|11111111|11111101|001 7ffffe9 [27]\n (247) |11111111|11111111|11111101|010 7ffffea [27]\n (248) |11111111|11111111|11111101|011 7ffffeb [27]\n (249) |11111111|11111111|11111111|1110 ffffffe [28]\n (250) |11111111|11111111|11111101|100 7ffffec [27]\n (251) |11111111|11111111|11111101|101 7ffffed [27]\n (252) |11111111|11111111|11111101|110 7ffffee [27]\n (253) |11111111|11111111|11111101|111 7ffffef [27]\n (254) |11111111|11111111|11111110|000 7fffff0 [27]\n (255) |11111111|11111111|11111011|10 3ffffee [26]\nEOS (256) |11111111|11111111|11111111|111111 3fffffff [30]\n```\n\n## Appendix C. Examples\n\nThis appendix contains examples covering integer encoding, header field representation, and the encoding of whole lists of header fields for both requests and responses, with and without Huffman coding.\n\n### C.1. Integer Representation Examples\n\nThis section shows the representation of integer values in detail (see Section 5.1).\n\n#### C.1.1. Example 1: Encoding 10 Using a 5-Bit Prefix\n\nThe value 10 is to be encoded with a 5-bit prefix.\n\n- 10 is less than 31 (2 5 - 1) and is represented using the 5-bit prefix.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| X | X | X | 0 | 1 | 0 | 1 | 0 | 10 stored on 5 bits\n+---+---+---+---+---+---+---+---+\n```\n\n#### C.1.2. Example 2: Encoding 1337 Using a 5-Bit Prefix\n\nThe value I=1337 is to be encoded with a 5-bit prefix.\n\n- 1337 is greater than 31 (2 5 - 1).\n-\n - The 5-bit prefix is filled with its max value (31).\n- I = 1337 - (2 5 - 1) = 1306.\n-\n - I (1306) is greater than or equal to 128, so the while loop body executes:\n -\n - I % 128 == 26\n - 26 + 128 == 154\n - 154 is encoded in 8 bits as: 10011010\n - I is set to 10 (1306 / 128 == 10)\n - I is no longer greater than or equal to 128, so the while loop terminates.\n - I, now 10, is encoded in 8 bits as: 00001010.\n- The process ends.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| X | X | X | 1 | 1 | 1 | 1 | 1 | Prefix = 31, I = 1306\n| 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1306>=128, encode(154), I=1306/128\n| 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 10<128, encode(10), done\n+---+---+---+---+---+---+---+---+\n```\n\n#### C.1.3. Example 3: Encoding 42 Starting at an Octet Boundary\n\nThe value 42 is to be encoded starting at an octet boundary. This implies that a 8-bit prefix is used.\n\n- 42 is less than 255 (2 8 - 1) and is represented using the 8-bit prefix.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 42 stored on 8 bits\n+---+---+---+---+---+---+---+---+\n```\n\n### C.2. Header Field Representation Examples\n\nThis section shows several independent representation examples.\n\n### C.3. Request Examples without Huffman Coding\n\nThis section shows several consecutive header lists, corresponding to HTTP requests, on the same connection.\n\n#### C.3.1. First Request\n\nHeader list to encode::method: GET\n:scheme: http\n:path: /\n:authority: www.example.com\n\nHex dump of encoded data:8286 8441 0f77 7777 2e65 7861 6d70 6c65 | ...A.www.example\n2e63 6f6d | .com\n\nDecoding process:82 | == Indexed - Add ==\n | idx = 2\n | -> :method: GET\n86 | == Indexed - Add ==\n | idx = 6\n | -> :scheme: http\n84 | == Indexed - Add ==\n | idx = 4\n | -> :path: /\n41 | == Literal indexed ==\n | Indexed name (idx = 1)\n | :authority\n0f | Literal value (len = 15)\n7777 772e 6578 616d 706c 652e 636f 6d | www.example.com\n | -> :authority: \n | www.example.com\n\nDynamic Table (after decoding):[ 1] (s = 57) :authority: www.example.com\n Table size: 57\n\nDecoded header list::method: GET\n:scheme: http\n:path: /\n:authority: www.example.com\n\n#### C.3.2. Second Request\n\nHeader list to encode::method: GET\n:scheme: http\n:path: /\n:authority: www.example.com\ncache-control: no-cache\n\nHex dump of encoded data:8286 84be 5808 6e6f 2d63 6163 6865 | ....X.no-cache\n\nDecoding process:82 | == Indexed - Add ==\n | idx = 2\n | -> :method: GET\n86 | == Indexed - Add ==\n | idx = 6\n | -> :scheme: http\n84 | == Indexed - Add ==\n | idx = 4\n | -> :path: /\nbe | == Indexed - Add ==\n | idx = 62\n | -> :authority:\n | www.example.com\n58 | == Literal indexed ==\n | Indexed name (idx = 24)\n | cache-control\n08 | Literal value (len = 8)\n6e6f 2d63 6163 6865 | no-cache\n | -> cache-control: no-cache\n\nDynamic Table (after decoding):[ 1] (s = 53) cache-control: no-cache\n[ 2] (s = 57) :authority: www.example.com\n Table size: 110\n\nDecoded header list::method: GET\n:scheme: http\n:path: /\n:authority: www.example.com\ncache-control: no-cache\n\n#### C.3.3. Third Request\n\nHeader list to encode::method: GET\n:scheme: https\n:path: /index.html\n:authority: www.example.com\ncustom-key: custom-value\n\nHex dump of encoded data:8287 85bf 400a 6375 7374 6f6d 2d6b 6579 | ....@.custom-key\n0c63 7573 746f 6d2d 7661 6c75 65 | .custom-value\n\nDecoding process:82 | == Indexed - Add ==\n | idx = 2\n | -> :method: GET\n87 | == Indexed - Add ==\n | idx = 7\n | -> :scheme: https\n85 | == Indexed - Add ==\n | idx = 5\n | -> :path: /index.html\nbf | == Indexed - Add ==\n | idx = 63\n | -> :authority:\n | www.example.com\n40 | == Literal indexed ==\n0a | Literal name (len = 10)\n6375 7374 6f6d 2d6b 6579 | custom-key\n0c | Literal value (len = 12)\n6375 7374 6f6d 2d76 616c 7565 | custom-value\n | -> custom-key:\n | custom-value\n\nDynamic Table (after decoding):[ 1] (s = 54) custom-key: custom-value\n[ 2] (s = 53) cache-control: no-cache\n[ 3] (s = 57) :authority: www.example.com\n Table size: 164\n\nDecoded header list::method: GET\n:scheme: https\n:path: /index.html\n:authority: www.example.com\ncustom-key: custom-value\n\n### C.4. Request Examples with Huffman Coding\n\nThis section shows the same examples as the previous section but uses Huffman encoding for the literal values.\n\n#### C.4.1. First Request\n\nHeader list to encode::method: GET\n:scheme: http\n:path: /\n:authority: www.example.com\n\nHex dump of encoded data:8286 8441 8cf1 e3c2 e5f2 3a6b a0ab 90f4 | ...A......:k....\nff | .\n\nDecoding process:82 | == Indexed - Add ==\n | idx = 2\n | -> :method: GET\n86 | == Indexed - Add ==\n | idx = 6\n | -> :scheme: http\n84 | == Indexed - Add ==\n | idx = 4\n | -> :path: /\n41 | == Literal indexed ==\n | Indexed name (idx = 1)\n | :authority\n8c | Literal value (len = 12)\n | Huffman encoded:\nf1e3 c2e5 f23a 6ba0 ab90 f4ff | .....:k.....\n | Decoded:\n | www.example.com\n | -> :authority:\n | www.example.com\n\nDynamic Table (after decoding):[ 1] (s = 57) :authority: www.example.com\n Table size: 57\n\nDecoded header list::method: GET\n:scheme: http\n:path: /\n:authority: www.example.com\n\n#### C.4.2. Second Request\n\nHeader list to encode::method: GET\n:scheme: http\n:path: /\n:authority: www.example.com\ncache-control: no-cache\n\nHex dump of encoded data:8286 84be 5886 a8eb 1064 9cbf | ....X....d..\n\nDecoding process:82 | == Indexed - Add ==\n | idx = 2\n | -> :method: GET\n86 | == Indexed - Add ==\n | idx = 6\n | -> :scheme: http\n84 | == Indexed - Add ==\n | idx = 4\n | -> :path: /\nbe | == Indexed - Add ==\n | idx = 62\n | -> :authority:\n | www.example.com\n58 | == Literal indexed ==\n | Indexed name (idx = 24)\n | cache-control\n86 | Literal value (len = 6)\n | Huffman encoded:\na8eb 1064 9cbf | ...d..\n | Decoded:\n | no-cache\n | -> cache-control: no-cache\n\nDynamic Table (after decoding):[ 1] (s = 53) cache-control: no-cache\n[ 2] (s = 57) :authority: www.example.com\n Table size: 110\n\nDecoded header list::method: GET\n:scheme: http\n:path: /\n:authority: www.example.com\ncache-control: no-cache\n\n#### C.4.3. Third Request\n\nHeader list to encode::method: GET\n:scheme: https\n:path: /index.html\n:authority: www.example.com\ncustom-key: custom-value\n\nHex dump of encoded data:8287 85bf 4088 25a8 49e9 5ba9 7d7f 8925 | ....@.%.I.[.}..%\na849 e95b b8e8 b4bf | .I.[....\n\nDecoding process:82 | == Indexed - Add ==\n | idx = 2\n | -> :method: GET\n87 | == Indexed - Add ==\n | idx = 7\n | -> :scheme: https\n85 | == Indexed - Add ==\n | idx = 5\n | -> :path: /index.html\nbf | == Indexed - Add ==\n | idx = 63\n | -> :authority:\n | www.example.com\n40 | == Literal indexed ==\n88 | Literal name (len = 8)\n | Huffman encoded:\n25a8 49e9 5ba9 7d7f | %.I.[.}.\n | Decoded:\n | custom-key\n89 | Literal value (len = 9)\n | Huffman encoded:\n25a8 49e9 5bb8 e8b4 bf | %.I.[....\n | Decoded:\n | custom-value\n | -> custom-key:\n | custom-value\n\nDynamic Table (after decoding):[ 1] (s = 54) custom-key: custom-value\n[ 2] (s = 53) cache-control: no-cache\n[ 3] (s = 57) :authority: www.example.com\n Table size: 164\n\nDecoded header list::method: GET\n:scheme: https\n:path: /index.html\n:authority: www.example.com\ncustom-key: custom-value\n\n### C.5. Response Examples without Huffman Coding\n\nThis section shows several consecutive header lists, corresponding to HTTP responses, on the same connection. The HTTP/2 setting parameter SETTINGS_HEADER_TABLE_SIZE is set to the value of 256 octets, causing some evictions to occur.\n\n#### C.5.1. First Response\n\nHeader list to encode::status: 302\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:21 GMT\nlocation: https://www.example.com\n\nHex dump of encoded data:4803 3330 3258 0770 7269 7661 7465 611d | H.302X.privatea.\n4d6f 6e2c 2032 3120 4f63 7420 3230 3133 | Mon, 21 Oct 2013\n2032 303a 3133 3a32 3120 474d 546e 1768 | 20:13:21 GMTn.h\n7474 7073 3a2f 2f77 7777 2e65 7861 6d70 | ttps://www.examp\n6c65 2e63 6f6d | le.com\n\nDecoding process:48 | == Literal indexed ==\n | Indexed name (idx = 8)\n | :status\n03 | Literal value (len = 3)\n3330 32 | 302\n | -> :status: 302\n58 | == Literal indexed ==\n | Indexed name (idx = 24)\n | cache-control\n07 | Literal value (len = 7)\n7072 6976 6174 65 | private\n | -> cache-control: private\n61 | == Literal indexed ==\n | Indexed name (idx = 33)\n | date\n1d | Literal value (len = 29)\n4d6f 6e2c 2032 3120 4f63 7420 3230 3133 | Mon, 21 Oct 2013\n2032 303a 3133 3a32 3120 474d 54 | 20:13:21 GMT\n | -> date: Mon, 21 Oct 2013\n | 20:13:21 GMT\n6e | == Literal indexed ==\n | Indexed name (idx = 46)\n | location\n17 | Literal value (len = 23)\n6874 7470 733a 2f2f 7777 772e 6578 616d | https://www.exam\n706c 652e 636f 6d | ple.com\n | -> location:\n | https://www.example.com\n\nDynamic Table (after decoding):[ 1] (s = 63) location: https://www.example.com\n[ 2] (s = 65) date: Mon, 21 Oct 2013 20:13:21 GMT\n[ 3] (s = 52) cache-control: private\n[ 4] (s = 42) :status: 302\n Table size: 222\n\nDecoded header list::status: 302\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:21 GMT\nlocation: https://www.example.com\n\n#### C.5.2. Second Response\n\nThe (\":status\", \"302\") header field is evicted from the dynamic table to free space to allow adding the (\":status\", \"307\") header field.\n\nHeader list to encode::status: 307\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:21 GMT\nlocation: https://www.example.com\n\nHex dump of encoded data:4803 3330 37c1 c0bf | H.307...\n\nDecoding process:48 | == Literal indexed ==\n | Indexed name (idx = 8)\n | :status\n03 | Literal value (len = 3)\n3330 37 | 307\n | - evict: :status: 302\n | -> :status: 307\nc1 | == Indexed - Add ==\n | idx = 65\n | -> cache-control: private\nc0 | == Indexed - Add ==\n | idx = 64\n | -> date: Mon, 21 Oct 2013\n | 20:13:21 GMT\nbf | == Indexed - Add ==\n | idx = 63\n | -> location:\n | https://www.example.com\n\nDynamic Table (after decoding):[ 1] (s = 42) :status: 307\n[ 2] (s = 63) location: https://www.example.com\n[ 3] (s = 65) date: Mon, 21 Oct 2013 20:13:21 GMT\n[ 4] (s = 52) cache-control: private\n Table size: 222\n\nDecoded header list::status: 307\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:21 GMT\nlocation: https://www.example.com\n\n#### C.5.3. Third Response\n\nSeveral header fields are evicted from the dynamic table during the processing of this header list.\n\nHeader list to encode::status: 200\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:22 GMT\nlocation: https://www.example.com\ncontent-encoding: gzip\nset-cookie: foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1\n\nHex dump of encoded data:88c1 611d 4d6f 6e2c 2032 3120 4f63 7420 | ..a.Mon, 21 Oct\n3230 3133 2032 303a 3133 3a32 3220 474d | 2013 20:13:22 GM\n54c0 5a04 677a 6970 7738 666f 6f3d 4153 | T.Z.gzipw8foo=AS\n444a 4b48 514b 425a 584f 5157 454f 5049 | DJKHQKBZXOQWEOPI\n5541 5851 5745 4f49 553b 206d 6178 2d61 | UAXQWEOIU; max-a\n6765 3d33 3630 303b 2076 6572 7369 6f6e | ge=3600; version\n3d31 | =1\n\nDecoding process:88 | == Indexed - Add ==\n | idx = 8\n | -> :status: 200\nc1 | == Indexed - Add ==\n | idx = 65\n | -> cache-control: private\n61 | == Literal indexed ==\n | Indexed name (idx = 33)\n | date\n1d | Literal value (len = 29)\n4d6f 6e2c 2032 3120 4f63 7420 3230 3133 | Mon, 21 Oct 2013\n2032 303a 3133 3a32 3220 474d 54 | 20:13:22 GMT\n | - evict: cache-control:\n | private\n | -> date: Mon, 21 Oct 2013\n | 20:13:22 GMT\nc0 | == Indexed - Add ==\n | idx = 64\n | -> location: \n | https://www.example.com\n5a | == Literal indexed ==\n | Indexed name (idx = 26)\n | content-encoding\n04 | Literal value (len = 4)\n677a 6970 | gzip\n | - evict: date: Mon, 21 Oct \n | 2013 20:13:21 GMT\n | -> content-encoding: gzip\n77 | == Literal indexed ==\n | Indexed name (idx = 55)\n | set-cookie\n38 | Literal value (len = 56)\n666f 6f3d 4153 444a 4b48 514b 425a 584f | foo=ASDJKHQKBZXO\n5157 454f 5049 5541 5851 5745 4f49 553b | QWEOPIUAXQWEOIU;\n206d 6178 2d61 6765 3d33 3630 303b 2076 | max-age=3600; v\n6572 7369 6f6e 3d31 | ersion=1\n | - evict: location:\n | https://www.example.com\n | - evict: :status: 307\n | -> set-cookie: foo=ASDJKHQ\n | KBZXOQWEOPIUAXQWEOIU; ma\n | x-age=3600; version=1\n\nDynamic Table (after decoding):[ 1] (s = 98) set-cookie: foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU;\n max-age=3600; version=1\n[ 2] (s = 52) content-encoding: gzip\n[ 3] (s = 65) date: Mon, 21 Oct 2013 20:13:22 GMT\n Table size: 215\n\nDecoded header list::status: 200\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:22 GMT\nlocation: https://www.example.com\ncontent-encoding: gzip\nset-cookie: foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1\n\n### C.6. Response Examples with Huffman Coding\n\nThis section shows the same examples as the previous section but uses Huffman encoding for the literal values. The HTTP/2 setting parameter SETTINGS_HEADER_TABLE_SIZE is set to the value of 256 octets, causing some evictions to occur. The eviction mechanism uses the length of the decoded literal values, so the same evictions occur as in the previous section.\n\n#### C.6.1. First Response\n\nHeader list to encode::status: 302\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:21 GMT\nlocation: https://www.example.com\n\nHex dump of encoded data:4882 6402 5885 aec3 771a 4b61 96d0 7abe | H.d.X...w.Ka..z.\n9410 54d4 44a8 2005 9504 0b81 66e0 82a6 | ..T.D. .....f...\n2d1b ff6e 919d 29ad 1718 63c7 8f0b 97c8 | -..n..)...c.....\ne9ae 82ae 43d3 | ....C.\n\nDecoding process:48 | == Literal indexed ==\n | Indexed name (idx = 8)\n | :status\n82 | Literal value (len = 2)\n | Huffman encoded:\n6402 | d.\n | Decoded:\n | 302\n | -> :status: 302\n58 | == Literal indexed ==\n | Indexed name (idx = 24)\n | cache-control\n85 | Literal value (len = 5)\n | Huffman encoded:\naec3 771a 4b | ..w.K\n | Decoded:\n | private\n | -> cache-control: private\n61 | == Literal indexed ==\n | Indexed name (idx = 33)\n | date\n96 | Literal value (len = 22)\n | Huffman encoded:\nd07a be94 1054 d444 a820 0595 040b 8166 | .z...T.D. .....f\ne082 a62d 1bff | ...-..\n | Decoded:\n | Mon, 21 Oct 2013 20:13:21\n | GMT\n | -> date: Mon, 21 Oct 2013\n | 20:13:21 GMT\n6e | == Literal indexed ==\n | Indexed name (idx = 46)\n | location\n91 | Literal value (len = 17)\n | Huffman encoded:\n9d29 ad17 1863 c78f 0b97 c8e9 ae82 ae43 | .)...c.........C\nd3 | .\n | Decoded:\n | https://www.example.com\n | -> location:\n | https://www.example.com\n\nDynamic Table (after decoding):[ 1] (s = 63) location: https://www.example.com\n[ 2] (s = 65) date: Mon, 21 Oct 2013 20:13:21 GMT\n[ 3] (s = 52) cache-control: private\n[ 4] (s = 42) :status: 302\n Table size: 222\n\nDecoded header list::status: 302\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:21 GMT\nlocation: https://www.example.com\n\n#### C.6.2. Second Response\n\nThe (\":status\", \"302\") header field is evicted from the dynamic table to free space to allow adding the (\":status\", \"307\") header field.\n\nHeader list to encode::status: 307\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:21 GMT\nlocation: https://www.example.com\n\nHex dump of encoded data:4883 640e ffc1 c0bf | H.d.....\n\nDecoding process:48 | == Literal indexed ==\n | Indexed name (idx = 8)\n | :status\n83 | Literal value (len = 3)\n | Huffman encoded:\n640e ff | d..\n | Decoded:\n | 307\n | - evict: :status: 302\n | -> :status: 307\nc1 | == Indexed - Add ==\n | idx = 65\n | -> cache-control: private\nc0 | == Indexed - Add ==\n | idx = 64\n | -> date: Mon, 21 Oct 2013\n | 20:13:21 GMT\nbf | == Indexed - Add ==\n | idx = 63\n | -> location:\n | https://www.example.com\n\nDynamic Table (after decoding):[ 1] (s = 42) :status: 307\n[ 2] (s = 63) location: https://www.example.com\n[ 3] (s = 65) date: Mon, 21 Oct 2013 20:13:21 GMT\n[ 4] (s = 52) cache-control: private\n Table size: 222\n\nDecoded header list::status: 307\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:21 GMT\nlocation: https://www.example.com\n\n#### C.6.3. Third Response\n\nSeveral header fields are evicted from the dynamic table during the processing of this header list.\n\nHeader list to encode::status: 200\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:22 GMT\nlocation: https://www.example.com\ncontent-encoding: gzip\nset-cookie: foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1\n\nHex dump of encoded data:88c1 6196 d07a be94 1054 d444 a820 0595 | ..a..z...T.D. ..\n040b 8166 e084 a62d 1bff c05a 839b d9ab | ...f...-...Z....\n77ad 94e7 821d d7f2 e6c7 b335 dfdf cd5b | w..........5...[\n3960 d5af 2708 7f36 72c1 ab27 0fb5 291f | 9`..'..6r..'..).\n9587 3160 65c0 03ed 4ee5 b106 3d50 07 | ..1`e...N...=P.\n\nDecoding process:88 | == Indexed - Add ==\n | idx = 8\n | -> :status: 200\nc1 | == Indexed - Add ==\n | idx = 65\n | -> cache-control: private\n61 | == Literal indexed ==\n | Indexed name (idx = 33)\n | date\n96 | Literal value (len = 22)\n | Huffman encoded:\nd07a be94 1054 d444 a820 0595 040b 8166 | .z...T.D. .....f\ne084 a62d 1bff | ...-..\n | Decoded:\n | Mon, 21 Oct 2013 20:13:22\n | GMT\n | - evict: cache-control:\n | private\n | -> date: Mon, 21 Oct 2013 \n | 20:13:22 GMT\nc0 | == Indexed - Add ==\n | idx = 64\n | -> location:\n | https://www.example.com\n5a | == Literal indexed ==\n | Indexed name (idx = 26)\n | content-encoding\n83 | Literal value (len = 3)\n | Huffman encoded:\n9bd9 ab | ...\n | Decoded:\n | gzip\n | - evict: date: Mon, 21 Oct\n | 2013 20:13:21 GMT\n | -> content-encoding: gzip\n77 | == Literal indexed ==\n | Indexed name (idx = 55)\n | set-cookie\nad | Literal value (len = 45)\n | Huffman encoded:\n94e7 821d d7f2 e6c7 b335 dfdf cd5b 3960 | .........5...[9`\nd5af 2708 7f36 72c1 ab27 0fb5 291f 9587 | ..'..6r..'..)...\n3160 65c0 03ed 4ee5 b106 3d50 07 | 1`e...N...=P.\n | Decoded:\n | foo=ASDJKHQKBZXOQWEOPIUAXQ\n | WEOIU; max-age=3600; versi\n | on=1\n | - evict: location:\n | https://www.example.com\n | - evict: :status: 307\n | -> set-cookie: foo=ASDJKHQ\n | KBZXOQWEOPIUAXQWEOIU; ma\n | x-age=3600; version=1\n\nDynamic Table (after decoding):[ 1] (s = 98) set-cookie: foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU;\n max-age=3600; version=1\n[ 2] (s = 52) content-encoding: gzip\n[ 3] (s = 65) date: Mon, 21 Oct 2013 20:13:22 GMT\n Table size: 215\n\nDecoded header list::status: 200\ncache-control: private\ndate: Mon, 21 Oct 2013 20:13:22 GMT\nlocation: https://www.example.com\ncontent-encoding: gzip\nset-cookie: foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1\n\n## Acknowledgments\n\nThis specification includes substantial input from the following individuals:\n\n- Mike Bishop, Jeff Pinner, Julian Reschke, and Martin Thomson (substantial editorial contributions).\n- Johnny Graettinger (Huffman code statistics).\n\n## Authors' Addresses\n\n**Roberto Peon**\nGoogle, Inc\nEmail: fenix@google.com\n\n**Hervé Ruellan**\nCanon CRF\nEmail: herve.ruellan@crf.canon.fr", "znaku_textu": 71310, "slov": 11670, "odkazu": 199, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:51", "sha256": "9a351afc0717e01ad6bfef030b55696fb23cd535f3ded0a4cd3689785f3ec44f", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7541", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc7540.html", "https://dx.doi.org/10.17487/RFC7540", "http://www.rfc-editor.org/info/rfc7540", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "http://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://dx.doi.org/10.17487/RFC7230", "http://www.rfc-editor.org/info/rfc7230", "https://dl.acm.org/citation.cfm?id=363991", "http://en.wikipedia.org/w/index.php?oldid=660948120&title=CRIME", "https://www.rfc-editor.org/rfc/rfc1951.html", "https://dx.doi.org/10.17487/RFC1951", "http://www.rfc-editor.org/info/rfc1951", "http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=4051119", "https://www.rfc-editor.org/rfc/rfc6454.html", "https://dx.doi.org/10.17487/RFC6454", "http://www.rfc-editor.org/info/rfc6454", "http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-13-106.pdf", "https://datatracker.ietf.org/doc/html/draft-mbelshe-httpbis-spdy-00", "https://datatracker.ietf.org/doc/draft-mbelshe-httpbis-spdy", "https://www.rfc-editor.org/rfc/rfc5246.html", "https://dx.doi.org/10.17487/RFC5246", "http://www.rfc-editor.org/info/rfc5246"]} {"url": "https://httpwg.org/specs/rfc7616.html", "titulek": "RFC 7616 - HTTP Digest Access Authentication", "h1": "HTTP Digest Access Authentication", "popis": "The Hypertext Transfer Protocol (HTTP) provides a simple challenge-response authentication mechanism that may be used by a server to challenge a client request and by a client to provide authentication information. This document defines the HTTP Digest Authentication scheme that can be used with the HTTP authentication mechanism.", "klicova_slova": "HTTP, authentication scheme", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7616", "og:description": "HTTP Digest Access Authentication", "og:url": "https://httpwg.org/specs/rfc7616.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of this Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Terminology"}, {"uroven": 2, "text": "2. Syntax Convention"}, {"uroven": 3, "text": "2.1. Examples"}, {"uroven": 3, "text": "2.2. ABNF"}, {"uroven": 2, "text": "3. Digest Access Authentication Scheme"}, {"uroven": 3, "text": "3.1. Overall Operation"}, {"uroven": 3, "text": "3.2. Representation of Digest Values"}, {"uroven": 3, "text": "3.3. The WWW-Authenticate Response Header Field"}, {"uroven": 3, "text": "3.4. The Authorization Header Field"}, {"uroven": 4, "text": "3.4.1. Response"}, {"uroven": 4, "text": "3.4.2. A1"}, {"uroven": 4, "text": "3.4.3. A2"}, {"uroven": 4, "text": "3.4.4. Username Hashing"}, {"uroven": 4, "text": "3.4.5. Parameter Values and Quoted-String"}, {"uroven": 4, "text": "3.4.6. Various Considerations"}, {"uroven": 3, "text": "3.5. The Authentication-Info and Proxy-Authentication-Info Header Fields"}, {"uroven": 3, "text": "3.6. Digest Operation"}, {"uroven": 3, "text": "3.7. Security Protocol Negotiation"}, {"uroven": 3, "text": "3.8. Proxy-Authenticate and Proxy-Authorization"}, {"uroven": 3, "text": "3.9. Examples"}, {"uroven": 4, "text": "3.9.1. Example with SHA-256 and MD5"}, {"uroven": 4, "text": "3.9.2. Example with SHA-512-256, Charset, and Userhash"}, {"uroven": 2, "text": "4. Internationalization Considerations"}, {"uroven": 2, "text": "5. Security Considerations"}, {"uroven": 3, "text": "5.1. Limitations"}, {"uroven": 3, "text": "5.2. Storing Passwords"}, {"uroven": 3, "text": "5.3. Authentication of Clients Using Digest Authentication"}, {"uroven": 3, "text": "5.4. Limited-Use Nonce Values"}, {"uroven": 3, "text": "5.5. Replay Attacks"}, {"uroven": 3, "text": "5.6. Weakness Created by Multiple Authentication Schemes"}, {"uroven": 3, "text": "5.7. Online Dictionary Attacks"}, {"uroven": 3, "text": "5.8. Man-in-the-Middle Attacks"}, {"uroven": 3, "text": "5.9. Chosen Plaintext Attacks"}, {"uroven": 3, "text": "5.10. Precomputed Dictionary Attacks"}, {"uroven": 3, "text": "5.11. Batch Brute-Force Attacks"}, {"uroven": 3, "text": "5.12. Parameter Randomness"}, {"uroven": 3, "text": "5.13. Summary"}, {"uroven": 2, "text": "6. IANA Considerations"}, {"uroven": 3, "text": "6.1. Hash Algorithms for HTTP Digest Authentication"}, {"uroven": 3, "text": "6.2. Digest Scheme Registration"}, {"uroven": 2, "text": "7. References"}, {"uroven": 3, "text": "7.1. Normative References"}, {"uroven": 3, "text": "7.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Changes from RFC 2617"}, {"uroven": 2, "text": "Appendix B. Acknowledgments"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThe Hypertext Transfer Protocol (HTTP) provides a simple challenge-response authentication mechanism that may be used by a server to challenge a client request and by a client to provide authentication information. This document defines the HTTP Digest Authentication scheme that can be used with the HTTP authentication mechanism.\n\n## Status of this Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7616](http://www.rfc-editor.org/info/rfc7616).\n\n## Copyright Notice\n\nCopyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Terminology\n- 2. Syntax Convention\n - 2.1. Examples\n - 2.2. ABNF\n- 3. Digest Access Authentication Scheme\n - 3.1. Overall Operation\n - 3.2. Representation of Digest Values\n - 3.3. The WWW-Authenticate Response Header Field\n - 3.4. The Authorization Header Field\n - 3.4.1. Response\n - 3.4.2. A1\n - 3.4.3. A2\n - 3.4.4. Username Hashing\n - 3.4.5. Parameter Values and Quoted-String\n - 3.4.6. Various Considerations\n - 3.5. The Authentication-Info and Proxy-Authentication-Info Header Fields\n - 3.6. Digest Operation\n - 3.7. Security Protocol Negotiation\n - 3.8. Proxy-Authenticate and Proxy-Authorization\n - 3.9. Examples\n - 3.9.1. Example with SHA-256 and MD5\n - 3.9.2. Example with SHA-512-256, Charset, and Userhash\n- 4. Internationalization Considerations\n- 5. Security Considerations\n - 5.1. Limitations\n - 5.2. Storing Passwords\n - 5.3. Authentication of Clients Using Digest Authentication\n - 5.4. Limited-Use Nonce Values\n - 5.5. Replay Attacks\n - 5.6. Weakness Created by Multiple Authentication Schemes\n - 5.7. Online Dictionary Attacks\n - 5.8. Man-in-the-Middle Attacks\n - 5.9. Chosen Plaintext Attacks\n - 5.10. Precomputed Dictionary Attacks\n - 5.11. Batch Brute-Force Attacks\n - 5.12. Parameter Randomness\n - 5.13. Summary\n- 6. IANA Considerations\n - 6.1. Hash Algorithms for HTTP Digest Authentication\n - 6.2. Digest Scheme Registration\n- 7. References\n - 7.1. Normative References\n - 7.2. Informative References\n- Appendix A. Changes from RFC 2617\n- Appendix B. Acknowledgments\n- Authors' Addresses\n\n## 1. Introduction\n\nHTTP provides a simple challenge-response authentication mechanism that may be used by a server to challenge a client request and by a client to provide authentication information. This document defines the HTTP Digest Authentication scheme that can be used with the HTTP authentication mechanism.\n\nThis document extends but is generally backward compatible with [RFC2617]. See Appendix A for the new capabilities introduced by this specification.\n\nThe details of the challenge-response authentication mechanism are specified in the \"Hypertext Transfer Protocol (HTTP/1.1): Authentication\" [RFC7235].\n\nThe combination of this document with the definition of the \"Basic\" authentication scheme [RFC7617], \"HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields\" [RFC7615], and \"Hypertext Transfer Protocol (HTTP/1.1): Authentication\" [RFC7235] obsolete [RFC2617].\n\n### 1.1. Terminology\n\nThe 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 [RFC2119].\n\n## 2. Syntax Convention\n\n### 2.1. Examples\n\nIn the interest of clarity and readability, the extended parameters or the header fields and parameters in the examples in this document might be broken into multiple lines. Any line that is indented in this document is a continuation of the preceding line.\n\n### 2.2. ABNF\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234] and the ABNF List Extension of [RFC7230].\n\n## 3. Digest Access Authentication Scheme\n\n### 3.1. Overall Operation\n\nThe Digest scheme is based on a simple challenge-response paradigm. The Digest scheme challenges using a nonce value and might indicate that username hashing is supported. A valid response contains an unkeyed digest of the username, the password, the given nonce value, the HTTP method, and the requested URI. In this way, the password is never sent in the clear, and the username can be hashed, depending on the indication received from the server. The username and password must be prearranged in some fashion not addressed by this document.\n\n### 3.2. Representation of Digest Values\n\nAn optional header field allows the server to specify the algorithm used to create the unkeyed digest or digest. This document adds SHA-256 and SHA-512/256 algorithms. To maintain backwards compatibility with [RFC2617], the MD5 algorithm is still supported but *NOT RECOMMENDED*.\n\nThe size of the digest depends on the algorithm used. The bits in the digest are converted from the most significant to the least significant bit, four bits at a time, to the ASCII representation as follows. Each sequence of four bits is represented by its familiar hexadecimal notation from the characters 0123456789abcdef; that is, binary 0000 is represented by the character '0', 0001 by '1' and so on up to the representation of 1111 as 'f'. If the MD5 algorithm is used to calculate the digest, then the MD5 digest will be represented as 32 hexadecimal characters, while SHA-256 and SHA-512/256 are represented as 64 hexadecimal characters.\n\n### 3.3. The WWW-Authenticate Response Header Field\n\nIf a server receives a request for an access-protected object, and an acceptable Authorization header field is not sent, the server responds with a \"401 Unauthorized\" status code and a WWW-Authenticate header field with Digest scheme as per the framework defined above. The value of the header field can include parameters from the following list:\n\nrealm\n\n- A string to be displayed to users so they know which username and password to use. This string should contain at least the name of the host performing the authentication and might additionally indicate the collection of users who might have access. An example is \"registered_users@example.com\". (See [Section 2.2](https://www.rfc-editor.org/rfc/rfc7235.html#section-2.2) of [RFC7235] for more details.)\n\ndomain\n\n- A quoted, space-separated list of URIs, as specified in [RFC3986] , that define the protection space. If a URI is a path-absolute, it is relative to the canonical root URL. (See [Section 2.2](https://www.rfc-editor.org/rfc/rfc7235.html#section-2.2) of [RFC7235] .) An absolute-URI in this list may refer to a different server than the web-origin [RFC6454] . The client can use this list to determine the set of URIs for which the same authentication information may be sent: any URI that has a URI in this list as a prefix (after both have been made absolute) *MAY* be assumed to be in the same protection space. If this parameter is omitted or its value is empty, the client *SHOULD* assume that the protection space consists of all URIs on the web-origin.\n- This parameter is not meaningful in Proxy-Authenticate header fields, for which the protection space is always the entire proxy; if present, it *MUST* be ignored.\n\nnonce\n\n- A server-specified string which should be uniquely generated each time a 401 response is made. It is advised that this string be Base64 or hexadecimal data. Specifically, since the string is passed in the header field lines as a quoted string, the double-quote character is not allowed, unless suitably escaped.\n- The contents of the nonce are implementation dependent. The quality of the implementation depends on a good choice. A nonce might, for example, be constructed as the Base64 encoding of timestamp H(timestamp \":\" ETag \":\" secret-data)\n- where timestamp is a server-generated time, which preferably includes micro- or nanoseconds, or other non-repeating values; ETag is the value of the HTTP ETag header field associated with the requested entity; and secret-data is data known only to the server. With a nonce of this form, a server would recalculate the hash portion after receiving the client authentication header field and reject the request if it did not match the nonce from that header field or if the timestamp value is not recent enough. In this way, the server can limit the time of the nonce's validity. The inclusion of the ETag prevents a replay request for an updated version of the resource. Including the IP address of the client in the nonce would appear to offer the server the ability to limit the reuse of the nonce to the same client that originally got it. However, that would break because requests from a single user often go through different proxies. Also, IP address spoofing is not that hard.\n- An implementation might choose not to accept a previously used nonce or a previously used digest, in order to protect against a replay attack. Or, an implementation might choose to use one-time nonces or digests for POST or PUT requests and a timestamp for GET requests. For more details on the issues involved, see Section 5 of this document.\n- The nonce is opaque to the client.\n\nopaque\n\n- A string of data, specified by the server, that *SHOULD* be returned by the client unchanged in the Authorization header field of subsequent requests with URIs in the same protection space. It is *RECOMMENDED* that this string be Base64 or hexadecimal data.\n\nstale\n\n- A case-insensitive flag indicating that the previous request from the client was rejected because the nonce value was stale. If stale is true, the client may wish to simply retry the request with a new encrypted response, without re-prompting the user for a new username and password. The server *SHOULD* only set stale to true if it receives a request for which the nonce is invalid. If stale is false, or anything other than true, or the stale parameter is not present, the username and/or password are invalid, and new values *MUST* be obtained.\n\nalgorithm\n\n- A string indicating an algorithm used to produce the digest and an unkeyed digest. If this is not present, it is assumed to be \"MD5\". If the algorithm is not understood, the challenge *SHOULD* be ignored (and a different one used, if there is more than one).\n- When used with the Digest mechanism, each one of the algorithms has two variants: Session variant and non-Session variant. The non-Session variant is denoted by \"\", e.g., \"SHA-256\", and the Session variant is denoted by \"-sess\", e.g., \"SHA-256-sess\".\n- In this document, the string obtained by applying the digest algorithm to the data \"data\" with secret \"secret\" will be denoted by KD(secret, data), and the string obtained by applying the unkeyed digest algorithm to the data \"data\" will be denoted H(data). KD stands for Keyed Digest, and the notation unq(X) means the value of the quoted-string X without the surrounding quotes and with quoting slashes removed. For \"\" and \"-sess\"\n\n H(data) = (data)\n\n and\n\n KD(secret, data) = H(concat(secret, \":\", data))\n- For example: For the \"SHA-256\" and \"SHA-256-sess\" algorithms\n\n H(data) = SHA-256(data)\n- i.e., the digest is the \"\" of the secret concatenated with a colon concatenated with the data. The \"-sess\" is intended to allow efficient third-party authentication servers; for the difference in usage, see the description in Section 3.4.2 .\n\nqop\n\n- This parameter *MUST* be used by all implementations. It is a quoted string of one or more tokens indicating the \"quality of protection\" values supported by the server. The value \"auth\" indicates authentication; the value \"auth-int\" indicates authentication with integrity protection. See the descriptions below for calculating the response parameter value for the application of this choice. Unrecognized options *MUST* be ignored.\n\ncharset\n\n- This is an *OPTIONAL* parameter that is used by the server to indicate the encoding scheme it supports. The only allowed value is \"UTF-8\".\n\nuserhash\n\n- This is an *OPTIONAL* parameter that is used by the server to indicate that it supports username hashing. Valid values are: \"true\" or \"false\". Default value is \"false\".\n\nFor historical reasons, a sender *MUST* only generate the quoted string syntax values for the following parameters: realm, domain, nonce, opaque, and qop.\n\nFor historical reasons, a sender *MUST NOT* generate the quoted string syntax values for the following parameters: stale and algorithm.\n\n### 3.4. The Authorization Header Field\n\nThe client is expected to retry the request, passing an Authorization header field line with Digest scheme, which is defined according to the framework above. The values of the opaque and algorithm fields must be those supplied in the WWW-Authenticate response header field for the entity being requested.\n\nThe request can include parameters from the following list:\n\nresponse\n\n- A string of the hex digits computed as defined below; it proves that the user knows a password.\n\nusername\n\n- The user's name in the specified realm. The quoted string contains the name in plaintext or the hash code in hexadecimal notation. If the username contains characters not allowed inside the ABNF quoted-string production, the username* parameter can be used. Sending both username and username* in the same header option *MUST* be treated as an error.\n\nusername*\n\n- If the userhash parameter value is set \"false\" and the username contains characters not allowed inside the ABNF quoted-string production, the user's name can be sent with this parameter, using the extended notation defined in [RFC5987] .\n\nrealm\n\n- See \"realm\" definition in Section 3.3 .\n\nuri\n\n- The Effective Request URI ( [Section 5.5](https://www.rfc-editor.org/rfc/rfc7230.html#section-5.5) of [RFC7230] ) of the HTTP request; duplicated here because proxies are allowed to change the request target (\"request-target\", [Section 3.1.1](https://www.rfc-editor.org/rfc/rfc7230.html#section-3.1.1) of [RFC7230] ) in transit.\n\nqop\n\n- Indicates what \"quality of protection\" the client has applied to the message. Its value *MUST* be one of the alternatives the server indicated it supports in the WWW-Authenticate header field. These values affect the computation of the response. Note that this is a single token, not a quoted list of alternatives as in WWW-Authenticate.\n\ncnonce\n\n- This parameter *MUST* be used by all implementations. The cnonce value is an opaque quoted ASCII-only string value provided by the client and used by both client and server to avoid chosen plaintext attacks, to provide mutual authentication, and to provide some message integrity protection. See the descriptions below of the calculation of the rspauth and response values.\n\nnc\n\n- This parameter *MUST* be used by all implementations. The nc parameter stands for \"nonce count\". The nc value is the hexadecimal count of the number of requests (including the current request) that the client has sent with the nonce value in this request. For example, in the first request sent in response to a given nonce value, the client sends \"nc=00000001\". The purpose of this parameter is to allow the server to detect request replays by maintaining its own copy of this count -- if the same nc value is seen twice, then the request is a replay. See the description below of the construction of the response value.\n\nuserhash\n\n- This *OPTIONAL* parameter is used by the client to indicate that the username has been hashed. Valid values are: \"true\" or \"false\". Default value is \"false\".\n\nFor historical reasons, a sender *MUST* only generate the quoted string syntax for the following parameters: username, realm, nonce, uri, response, cnonce, and opaque.\n\nFor historical reasons, a sender *MUST NOT* generate the quoted string syntax for the following parameters: algorithm, qop, and nc.\n\nIf a parameter or its value is improper, or required parameters are missing, the proper response is a 4xx error code. If the response is invalid, then a login failure *SHOULD* be logged, since repeated login failures from a single client may indicate an attacker attempting to guess passwords. The server implementation *SHOULD* be careful with the information being logged so that it won't put a cleartext password (e.g., entered into the username field) into the log.\n\nThe definition of the response above indicates the encoding for its value. The following definitions show how the value is computed.\n\n#### 3.4.1. Response\n\nIf the qop value is \"auth\" or \"auth-int\":\n\n```\n response = <\"> < KD ( H(A1), unq(nonce)\n \":\" nc\n \":\" unq(cnonce)\n \":\" unq(qop)\n \":\" H(A2)\n ) <\">\n```\n\nSee below for the definitions for A1 and A2.\n\n#### 3.4.2. A1\n\nIf the algorithm parameter's value is \"\", e.g., \"SHA-256\", then A1 is:\n\n```\n A1 = unq(username) \":\" unq(realm) \":\" passwd\n```\n\nwhere\n\n```\n passwd = < user's password >\n```\n\nIf the algorithm parameter's value is \"-sess\", e.g., \"SHA-256-sess\", then A1 is calculated using the nonce value provided in the challenge from the server, and cnonce value from the request by the client following receipt of a WWW-Authenticate challenge from the server. It uses the server nonce from that challenge, herein called nonce-prime, and the client nonce value from the response, herein called cnonce-prime, to construct A1 as follows:\n\n```\n A1 = H( unq(username) \":\" unq(realm) \":\" passwd )\n \":\" unq(nonce-prime) \":\" unq(cnonce-prime)\n```\n\nThis creates a \"session key\" for the authentication of subsequent requests and responses that is different for each \"authentication session\", thus limiting the amount of material hashed with any one key. (Note: see further discussion of the authentication session in Section 3.6.) Because the server needs only use the hash of the user credentials in order to create the A1 value, this construction could be used in conjunction with a third-party authentication service so that the web server would not need the actual password value. The specification of such a protocol is beyond the scope of this specification.\n\n#### 3.4.3. A2\n\nIf the qop parameter's value is \"auth\" or is unspecified, then A2 is:\n\n```\n A2 = Method \":\" request-uri\n```\n\nIf the qop value is \"auth-int\", then A2 is:\n\n```\n A2 = Method \":\" request-uri \":\" H(entity-body)\n```\n\n#### 3.4.4. Username Hashing\n\nTo protect the transport of the username from the client to the server, the server *SHOULD* set the userhash parameter with the value of \"true\" in the WWW-Authentication header field.\n\nIf the client supports the userhash parameter, and the userhash parameter value in the WWW-Authentication header field is set to \"true\", then the client *MUST* calculate a hash of the username after any other hash calculation and include the userhash parameter with the value of \"true\" in the Authorization header field. If the client does not provide the username as a hash value or the userhash parameter with the value of \"true\", the server *MAY* reject the request.\n\nThe following is the operation that the client will perform to hash the username, using the same algorithm used to hash the credentials:\n\n```\n username = H( unq(username) \":\" unq(realm) )\n```\n\n#### 3.4.5. Parameter Values and Quoted-String\n\nNote that the value of many of the parameters, such as username value, are defined as a \"quoted-string\". However, the \"unq\" notation indicates that surrounding quotation marks are removed in forming the string A1. Thus, if the Authorization header field includes the fields\n\n```\n username=\"Mufasa\", realm=\"myhost@example.com\"\n```\n\nand the user Mufasa has password \"Circle Of Life\", then H(A1) would be H(Mufasa:myhost@example.com:Circle Of Life) with no quotation marks in the digested string.\n\nNo white space is allowed in any of the strings to which the digest function H() is applied, unless that white space exists in the quoted strings or entity body whose contents make up the string to be digested. For example, the string A1 illustrated above must be\n\n```\n Mufasa:myhost@example.com:Circle Of Life\n```\n\nwith no white space on either side of the colons, but with the white space between the words used in the password value. Likewise, the other strings digested by H() must not have white space on either side of the colons that delimit their fields, unless that white space was in the quoted strings or entity body being digested.\n\nAlso, note that if integrity protection is applied (qop=auth-int), the H(entity-body) is the hash of the entity body, not the message body -- it is computed before any transfer encoding is applied by the sender and after it has been removed by the recipient. Note that this includes multipart boundaries and embedded header fields in each part of any multipart content-type.\n\n#### 3.4.6. Various Considerations\n\nThe \"Method\" value is the HTTP request method, in US-ASCII letters, as specified in [Section 3.1.1](https://www.rfc-editor.org/rfc/rfc7230.html#section-3.1.1) of [RFC7230]. The \"request-target\" value is the request-target from the request line as specified in [Section 3.1.1](https://www.rfc-editor.org/rfc/rfc7230.html#section-3.1.1) of [RFC7230]. This *MAY* be \"*\", an \"absolute-URI\", or an \"absolute-path\" as specified in [Section 2.7](https://www.rfc-editor.org/rfc/rfc7230.html#section-2.7) of [RFC7230], but it *MUST* agree with the request-target. In particular, it *MUST* be an \"absolute-URI\" if the request-target is an \"absolute-URI\". The cnonce value is a client-chosen value whose purpose is to foil chosen plaintext attacks.\n\nThe authenticating server *MUST* assure that the resource designated by the \"uri\" parameter is the same as the resource specified in the Request-Line; if they are not, the server *SHOULD* return a 400 Bad Request error. (Since this may be a symptom of an attack, server implementers may want to consider logging such errors.) The purpose of duplicating information from the request URL in this field is to deal with the possibility that an intermediate proxy may alter the client's Request-Line. This altered (but presumably semantically equivalent) request would not result in the same digest as that calculated by the client.\n\nImplementers should be aware of how authenticated transactions need to interact with shared caches (see [RFC7234]).\n\n### 3.5. The Authentication-Info and Proxy-Authentication-Info Header Fields\n\nThe Authentication-Info header field and the Proxy-Authentication-Info header field [RFC7615] are generic fields that *MAY* be used by a server to communicate some information regarding the successful authentication of a client response.\n\nThe Digest Authentication scheme *MAY* add the Authentication-Info header field in the confirmation request and include parameters from the following list:\n\nnextnonce\n\n- The value of the nextnonce parameter is the nonce the server wishes the client to use for a future authentication response. The server *MAY* send the Authentication-Info header field with a nextnonce field as a means of implementing one-time nonces or otherwise changing nonces. If the nextnonce field is present, the client *SHOULD* use it when constructing the Authorization header field for its next request. Failure of the client to do so *MAY* result in a request to re-authenticate from the server with the \"stale=true\".\n - Server implementations *SHOULD* carefully consider the performance implications of the use of this mechanism; pipelined requests will not be possible if every response includes a nextnonce parameter that *MUST* be used on the next request received by the server. Consideration *SHOULD* be given to the performance vs. security tradeoffs of allowing an old nonce value to be used for a limited time to permit request pipelining. Use of the nc parameter can retain most of the security advantages of a new server nonce without the deleterious effects on pipelining.\n\nqop\n\n- Indicates the \"quality of protection\" options applied to the response by the server. The value \"auth\" indicates authentication; the value \"auth-int\" indicates authentication with integrity protection. The server *SHOULD* use the same value for the qop parameter in the response as was sent by the client in the corresponding request.\n\nrspauth\n\n- The optional response digest in the rspauth parameter supports mutual authentication -- the server proves that it knows the user's secret, and with qop=auth-int also provides limited integrity protection of the response. The rspauth value is calculated as for the response in the Authorization header field, except that if qop is set to \"auth\" or is not specified in the Authorization header field for the request, A2 is\n- A2 = \":\" request-uri and if \"qop=auth-int\", then A2 is A2 = \":\" request-uri \":\" H(entity-body)\n\ncnonce and nc\n\n- The cnonce value and nc value *MUST* be the ones for the client request to which this message is the response. The rspauth, cnonce, and nc parameters *MUST* be present if \"qop=auth\" or \"qop=auth-int\" is specified.\n\nThe Authentication-Info header field is allowed in the trailer of an HTTP message transferred via chunked transfer coding.\n\nFor historical reasons, a sender *MUST* only generate the quoted string syntax for the following parameters: nextnonce, rspauth, and cnonce.\n\nFor historical reasons, a sender *MUST NOT* generate the quoted string syntax for the following parameters: qop and nc.\n\nFor historical reasons, the nc value *MUST* be exactly 8 hexadecimal digits.\n\n### 3.6. Digest Operation\n\nUpon receiving the Authorization header field, the server *MAY* check its validity by looking up the password that corresponds to the submitted username. Then, the server *MUST* perform the same digest operation (e.g., MD5, SHA-256) performed by the client and compare the result to the given response value.\n\nNote that the HTTP server does not actually need to know the user's cleartext password. As long as H(A1) is available to the server, the validity of an Authorization header field can be verified.\n\nThe client response to a WWW-Authenticate challenge for a protection space starts an authentication session with that protection space. The authentication session lasts until the client receives another WWW-Authenticate challenge from any server in the protection space. A client *SHOULD* remember the username, password, nonce, nonce count, and opaque values associated with an authentication session to use to construct the Authorization header field in future requests within that protection space. The Authorization header field *MAY* be included preemptively; doing so improves server efficiency and avoids extra round trips for authentication challenges. The server *MAY* choose to accept the old Authorization header field information, even though the nonce value included might not be fresh. Alternatively, the server *MAY* return a 401 response with a new nonce value in the WWW-Authenticate header field, causing the client to retry the request; by specifying \"stale=true\" with this response, the server tells the client to retry with the new nonce, but without prompting for a new username and password.\n\nBecause the client is required to return the value of the opaque parameter given to it by the server for the duration of a session, the opaque data can be used to transport authentication session state information. (Note that any such use can also be accomplished more easily and safely by including the state in the nonce.) For example, a server could be responsible for authenticating content that actually sits on another server. It would achieve this by having the first 401 response include a domain parameter whose value includes a URI on the second server, and an opaque parameter whose value contains the state information. The client will retry the request, at which time the server might respond with \"HTTP Redirection\" ([Section 6.4](https://www.rfc-editor.org/rfc/rfc7231.html#section-6.4) of [RFC7231]), pointing to the URI on the second server. The client will follow the redirection and pass an Authorization header field, including the data.\n\nProxies *MUST* be completely transparent in the Digest access authentication scheme. That is, they *MUST* forward the WWW-Authenticate, Authentication-Info, and Authorization header fields untouched. If a proxy wants to authenticate a client before a request is forwarded to the server, it can be done using the Proxy-Authenticate and Proxy-Authorization header fields described in Section 3.8 below.\n\n### 3.7. Security Protocol Negotiation\n\nIt is useful for a server to be able to know which security schemes a client is capable of handling.\n\nIt is possible that a server wants to require Digest as its authentication method, even if the server does not know that the client supports it. A client is encouraged to fail gracefully if the server specifies only authentication schemes it cannot handle.\n\nWhen a server receives a request to access a resource, the server might challenge the client by responding with \"401 Unauthorized\" response and include one or more WWW-Authenticate header fields. If the server responds with multiple challenges, then each one of these challenges *MUST* use a different digest algorithm. The server *MUST* add these challenges to the response in order of preference, starting with the most preferred algorithm, followed by the less preferred algorithm.\n\nThis specification defines the following algorithms:\n\n- SHA2-256 (mandatory to implement)\n- SHA2-512/256 (as a backup algorithm)\n- MD5 (for backward compatibility).\n\nWhen the client receives the first challenge, it *SHOULD* use the first challenge it supports, unless a local policy dictates otherwise.\n\n### 3.8. Proxy-Authenticate and Proxy-Authorization\n\nThe Digest Authentication scheme can also be used for authenticating users to proxies, proxies to proxies, or proxies to origin servers by use of the Proxy-Authenticate and Proxy-Authorization header fields. These header fields are instances of the Proxy-Authenticate and Proxy-Authorization header fields specified in Sections [4.3](https://www.rfc-editor.org/rfc/rfc7235.html#section-4.3) and [4.4](https://www.rfc-editor.org/rfc/rfc7235.html#section-4.4) of the HTTP/1.1 specification [RFC7235], and their behavior is subject to restrictions described there. The transactions for proxy authentication are very similar to those already described. Upon receiving a request that requires authentication, the proxy/server *MUST* issue the \"407 Proxy Authentication Required\" response with a \"Proxy-Authenticate\" header field. The digest-challenge used in the Proxy-Authenticate header field is the same as that for the WWW-Authenticate header field as defined above in Section 3.3.\n\nThe client/proxy *MUST* then reissue the request with a Proxy-Authorization header field, with parameters as specified for the Authorization header field in Section 3.4 above.\n\nOn subsequent responses, the server sends Proxy-Authentication-Info with parameters the same as those for the Authentication-Info header field.\n\nNote that, in principle, a client could be asked to authenticate itself to both a proxy and an end-server, but never in the same response.\n\n### 3.9. Examples\n\n#### 3.9.1. Example with SHA-256 and MD5\n\nThe following example assumes that an access-protected document is being requested from the server via a GET request. The URI of the document is \"http://www.example.org/dir/index.html\". Both client and server know that the username for this document is \"Mufasa\" and the password is \"Circle of Life\" (with one space between each of the three words).\n\nThe first time the client requests the document, no Authorization header field is sent, so the server responds with:\n\n```\nHTTP/1.1 401 Unauthorized\nWWW-Authenticate: Digest\n realm=\"http-auth@example.org\",\n qop=\"auth, auth-int\",\n algorithm=SHA-256,\n nonce=\"7ypf/xlj9XXwfDPEoM4URrv/xwf94BcCAzFZH4GiTo0v\",\n opaque=\"FQhe/qaU925kfnzjCev0ciny7QMkPqMAFRtzCUYo5tdS\"\nWWW-Authenticate: Digest\n realm=\"http-auth@example.org\",\n qop=\"auth, auth-int\",\n algorithm=MD5,\n nonce=\"7ypf/xlj9XXwfDPEoM4URrv/xwf94BcCAzFZH4GiTo0v\",\n opaque=\"FQhe/qaU925kfnzjCev0ciny7QMkPqMAFRtzCUYo5tdS\"\n```\n\nThe client can prompt the user for their username and password, after which it will respond with a new request, including the following Authorization header field if the client chooses MD5 digest:\n\n```\nAuthorization: Digest username=\"Mufasa\",\n realm=\"http-auth@example.org\",\n uri=\"/dir/index.html\",\n algorithm=MD5,\n nonce=\"7ypf/xlj9XXwfDPEoM4URrv/xwf94BcCAzFZH4GiTo0v\",\n nc=00000001,\n cnonce=\"f2/wE4q74E6zIJEtWaHKaf5wv/H5QzzpXusqGemxURZJ\",\n qop=auth,\n response=\"8ca523f5e9506fed4657c9700eebdbec\",\n opaque=\"FQhe/qaU925kfnzjCev0ciny7QMkPqMAFRtzCUYo5tdS\"\n```\n\nIf the client chooses to use the SHA-256 algorithm for calculating the response, the client responds with a new request including the following Authorization header field:\n\n```\nAuthorization: Digest username=\"Mufasa\",\n realm=\"http-auth@example.org\",\n uri=\"/dir/index.html\",\n algorithm=SHA-256,\n nonce=\"7ypf/xlj9XXwfDPEoM4URrv/xwf94BcCAzFZH4GiTo0v\",\n nc=00000001,\n cnonce=\"f2/wE4q74E6zIJEtWaHKaf5wv/H5QzzpXusqGemxURZJ\",\n qop=auth,\n response=\"753927fa0e85d155564e2e272a28d1802ca10daf449\n 6794697cf8db5856cb6c1\",\n opaque=\"FQhe/qaU925kfnzjCev0ciny7QMkPqMAFRtzCUYo5tdS\"\n```\n\n#### 3.9.2. Example with SHA-512-256, Charset, and Userhash\n\nThe following example assumes that an access-protected document is being requested from the server via a GET request. The URI for the request is \"http://api.example.org/doe.json\". Both client and server know the userhash of the username, support the UTF-8 character encoding scheme, and use the SHA-512-256 algorithm. The username for the request is a variation of \"Jason Doe\", where the 'a' actually is Unicode code point U+00E4 (\"LATIN SMALL LETTER A WITH DIAERESIS\"), and the first 'o' is Unicode code point U+00F8 (\"LATIN SMALL LETTER O WITH STROKE\"), leading to the octet sequence using the UTF-8 encoding scheme:\n\nJ U+00E4 s U+00F8 n D o e\n 4A C3A4 73 C3B8 6E 20 44 6F 65\n\nThe password is \"Secret, or not?\".\n\nThe first time the client requests the document, no Authorization header field is sent, so the server responds with:\n\n```\nHTTP/1.1 401 Unauthorized\nWWW-Authenticate: Digest\n realm=\"api@example.org\",\n qop=\"auth\",\n algorithm=SHA-512-256,\n nonce=\"5TsQWLVdgBdmrQ0XsxbDODV+57QdFR34I9HAbC/RVvkK\",\n opaque=\"HRPCssKJSGjCrkzDg8OhwpzCiGPChXYjwrI2QmXDnsOS\",\n charset=UTF-8,\n userhash=true\n```\n\nThe client can prompt the user for the required credentials and send a new request with following Authorization header field:\n\n```\nAuthorization: Digest\n username=\"488869477bf257147b804c45308cd62ac4e25eb717\n b12b298c79e62dcea254ec\",\n realm=\"api@example.org\",\n uri=\"/doe.json\",\n algorithm=SHA-512-256,\n nonce=\"5TsQWLVdgBdmrQ0XsxbDODV+57QdFR34I9HAbC/RVvkK\",\n nc=00000001,\n cnonce=\"NTg6RKcb9boFIAS3KrFK9BGeh+iDa/sm6jUMp2wds69v\",\n qop=auth,\n response=\"ae66e67d6b427bd3f120414a82e4acff38e8ecd9101d\n 6c861229025f607a79dd\",\n opaque=\"HRPCssKJSGjCrkzDg8OhwpzCiGPChXYjwrI2QmXDnsOS\",\n userhash=true\n```\n\nIf the client cannot provide a hashed username for any reason, the client can try a request with this Authorization header field:\n\n```\nAuthorization: Digest\n username*=UTF-8''J%C3%A4s%C3%B8n%20Doe,\n realm=\"api@example.org\",\n uri=\"/doe.json\",\n algorithm=SHA-512-256,\n nonce=\"5TsQWLVdgBdmrQ0XsxbDODV+57QdFR34I9HAbC/RVvkK\",\n nc=00000001,\n cnonce=\"NTg6RKcb9boFIAS3KrFK9BGeh+iDa/sm6jUMp2wds69v\",\n qop=auth,\n response=\"ae66e67d6b427bd3f120414a82e4acff38e8ecd9101d\n 6c861229025f607a79dd\",\n opaque=\"HRPCssKJSGjCrkzDg8OhwpzCiGPChXYjwrI2QmXDnsOS\",\n userhash=false\n```\n\n## 4. Internationalization Considerations\n\nIn challenges, servers *SHOULD* use the \"charset\" authentication parameter (case-insensitive) to express the character encoding they expect the user agent to use when generating A1 (see Section 3.4.2) and username hashing (see Section 3.4.4).\n\nThe only allowed value is \"UTF-8\", to be matched case-insensitively (see [Section 2.3](https://www.rfc-editor.org/rfc/rfc2978.html#section-2.3) in [RFC2978]). It indicates that the server expects the username and password to be converted to Unicode Normalization Form C (\"NFC\", see [Section 3](https://www.rfc-editor.org/rfc/rfc5198.html#section-3) of [RFC5198]) and to be encoded into octets using the UTF-8 character encoding scheme [RFC3629].\n\nFor the username, recipients *MUST* support all characters defined in the \"UsernameCasePreserved\" profile defined in [Section 3.3](https://www.rfc-editor.org/rfc/rfc7613.html#section-3.3) of [RFC7613], with the exception of the colon (\":\") character.\n\nFor the password, recipients *MUST* support all characters defined in the \"OpaqueString\" profile defined in [Section 4.2](https://www.rfc-editor.org/rfc/rfc7613.html#section-4.2) of [RFC7613].\n\nIf the user agent does not support the encoding indicated by the server, it can fail the request.\n\nWhen usernames cannot be sent hashed and include non-ASCII characters, clients can include the username* parameter instead (using the value encoding defined in [RFC5987]).\n\n## 5. Security Considerations\n\n### 5.1. Limitations\n\nHTTP Digest Authentication, when used with human-memorable passwords, is vulnerable to dictionary attacks. Such attacks are much easier than cryptographic attacks on any widely used algorithm, including those that are no longer considered secure. In other words, algorithm agility does not make this usage any more secure.\n\nAs a result, Digest Authentication *SHOULD* be used only with passwords that have a reasonable amount of entropy, e.g., 128-bit or more. Such passwords typically cannot be memorized by humans but can be used for automated web services.\n\nIf Digest Authentication is being used, it *SHOULD* be over a secure channel like HTTPS [RFC2818].\n\n### 5.2. Storing Passwords\n\nDigest Authentication requires that the authenticating agent (usually the server) store some data derived from the user's name and password in a \"password file\" associated with a given realm. Normally, this might contain pairs consisting of username and H(A1), where H(A1) is the digested value of the username, realm, and password as described above.\n\nThe security implications of this are that if this password file is compromised, then an attacker gains immediate access to documents on the server using this realm. Unlike, say, a standard UNIX password file, this information needs not be decrypted in order to access documents in the server realm associated with this file. On the other hand, decryption, or more likely a brute-force attack, would be necessary to obtain the user's password. This is the reason that the realm is part of the digested data stored in the password file. It means that if one Digest Authentication password file is compromised, it does not automatically compromise others with the same username and password (though it does expose them to brute-force attack).\n\nThere are two important security consequences of this. First, the password file must be protected as if it contained unencrypted passwords, because, for the purpose of accessing documents in its realm, it effectively does.\n\nA second consequence of this is that the realm string *SHOULD* be unique among all realms that any single user is likely to use. In particular, a realm string *SHOULD* include the name of the host doing the authentication. The inability of the client to authenticate the server is a weakness of Digest Authentication.\n\n### 5.3. Authentication of Clients Using Digest Authentication\n\nDigest Authentication does not provide a strong authentication mechanism, when compared to public-key-based mechanisms, for example.\n\nHowever, it is significantly stronger than, e.g., CRAM-MD5, which has been proposed for use with Lightweight Directory Access Protocol (LDAP) [RFC4513] and IMAP/POP (see [RFC2195]). It was intended to replace the much weaker and even more dangerous Basic mechanism.\n\nDigest Authentication offers no confidentiality protection beyond protecting the actual username and password. All of the rest of the request and response are available to an eavesdropper.\n\nDigest Authentication offers only limited integrity protection for the messages in either direction. If the \"qop=auth-int\" mechanism is used, those parts of the message used in the calculation of the WWW-Authenticate and Authorization header field response parameter values (see Section 3.2 above) are protected. Most header fields and their values could be modified as a part of a man-in-the-middle attack.\n\nMany needs for secure HTTP transactions cannot be met by Digest Authentication. For those needs, TLS is a more appropriate protocol. In particular, Digest Authentication cannot be used for any transaction requiring confidentiality protection. Nevertheless, many functions remain for which Digest Authentication is both useful and appropriate.\n\n### 5.4. Limited-Use Nonce Values\n\nThe Digest scheme uses a server-specified nonce to seed the generation of the response value (as specified in Section 3.4.1 above). As shown in the example nonce in Section 3.3, the server is free to construct the nonce such that it *MAY* only be used from a particular client, for a particular resource, for a limited period of time or number of uses, or any other restrictions. Doing so strengthens the protection provided against, for example, replay attacks (see Section 5.5). However, it should be noted that the method chosen for generating and checking the nonce also has performance and resource implications. For example, a server *MAY* choose to allow each nonce value to be used only once by maintaining a record of whether or not each recently issued nonce has been returned and sending a next-nonce parameter in the Authentication-Info header field of every response. This protects against even an immediate replay attack, but it has a high cost due to checking nonce values; perhaps more important, it will cause authentication failures for any pipelined requests (presumably returning a stale nonce indication). Similarly, incorporating a request-specific element such as the ETag value for a resource limits the use of the nonce to that version of the resource and also defeats pipelining. Thus, it *MAY* be useful to do so for methods with side effects but have unacceptable performance for those that do not.\n\n### 5.5. Replay Attacks\n\nA replay attack against Digest Authentication would usually be pointless for a simple GET request since an eavesdropper would already have seen the only document he could obtain with a replay. This is because the URI of the requested document is digested in the client request, and the server will only deliver that document. By contrast, under Basic Authentication, once the eavesdropper has the user's password, any document protected by that password is open to him.\n\nThus, for some purposes, it is necessary to protect against replay attacks. A good Digest implementation can do this in various ways. The server-created \"nonce\" value is implementation dependent, but if it contains a digest of the client IP, a timestamp, the resource ETag, and a private server key (as recommended above), then a replay attack is not simple. An attacker must convince the server that the request is coming from a false IP address and must cause the server to deliver the document to an IP address different from the address to which it believes it is sending the document. An attack can only succeed in the period before the timestamp expires. Digesting the client IP and timestamp in the nonce permits an implementation that does not maintain state between transactions.\n\nFor applications where no possibility of replay attack can be tolerated, the server can use one-time nonce values that will not be honored for a second use. This requires the overhead of the server remembering which nonce values have been used until the nonce timestamp (and hence the digest built with it) has expired, but it effectively protects against replay attacks.\n\nAn implementation must give special attention to the possibility of replay attacks with POST and PUT requests. Unless the server employs one-time or otherwise limited-use nonces and/or insists on the use of the integrity protection of \"qop=auth-int\", an attacker could replay valid credentials from a successful request with counterfeit data or other message body. Even with the use of integrity protection, most metadata in header fields is not protected. Proper nonce generation and checking provides some protection against replay of previously used valid credentials, but see Section 5.8.\n\n### 5.6. Weakness Created by Multiple Authentication Schemes\n\nAn HTTP/1.1 server *MAY* return multiple challenges with a 401 (Authenticate) response, and each challenge *MAY* use a different auth-scheme. A user agent *MUST* choose to use the strongest auth-scheme it understands and request credentials from the user based upon that challenge.\n\nWhen the server offers choices of authentication schemes using the WWW-Authenticate header field, the strength of the resulting authentication is only as good as that of the of the weakest of the authentication schemes. See Section 5.7 below for discussion of particular attack scenarios that exploit multiple authentication schemes.\n\n### 5.7. Online Dictionary Attacks\n\nIf the attacker can eavesdrop, then it can test any overheard nonce/response pairs against a list of common words. Such a list is usually much smaller than the total number of possible passwords. The cost of computing the response for each password on the list is paid once for each challenge.\n\nThe server can mitigate this attack by not allowing users to select passwords that are in a dictionary.\n\n### 5.8. Man-in-the-Middle Attacks\n\nDigest Authentication is vulnerable to man-in-the-middle (MITM) attacks, for example, from a hostile or compromised proxy. Clearly, this would present all the problems of eavesdropping. But, it also offers some additional opportunities to the attacker.\n\nA possible man-in-the-middle attack would be to add a weak authentication scheme to the set of choices, hoping that the client will use one that exposes the user's credentials (e.g., password). For this reason, the client *SHOULD* always use the strongest scheme that it understands from the choices offered.\n\nAn even better MITM attack would be to remove all offered choices, replacing them with a challenge that requests only Basic authentication, then uses the cleartext credentials from the Basic authentication to authenticate to the origin server using the stronger scheme it requested. A particularly insidious way to mount such a MITM attack would be to offer a \"free\" proxy caching service to gullible users.\n\nUser agents should consider measures such as presenting a visual indication at the time of the credentials request of what authentication scheme is to be used, or remembering the strongest authentication scheme ever requested by a server and producing a warning message before using a weaker one. It might also be a good idea for the user agent to be configured to demand Digest authentication in general or from specific sites.\n\nOr, a hostile proxy might spoof the client into making a request the attacker wanted rather than one the client wanted. Of course, this is still much harder than a comparable attack against Basic Authentication.\n\n### 5.9. Chosen Plaintext Attacks\n\nWith Digest Authentication, a MITM or a malicious server can arbitrarily choose the nonce that the client will use to compute the response. This is called a \"chosen plaintext\" attack. The ability to choose the nonce is known to make cryptanalysis much easier.\n\nHowever, a method to analyze the one-way functions used by Digest using chosen plaintext is not currently known.\n\nThe countermeasure against this attack is for clients to use the cnonce parameter; this allows the client to vary the input to the hash in a way not chosen by the attacker.\n\n### 5.10. Precomputed Dictionary Attacks\n\nWith Digest Authentication, if the attacker can execute a chosen plaintext attack, the attacker can precompute the response for many common words to a nonce of its choice and store a dictionary of response/password pairs. Such precomputation can often be done in parallel on many machines. It can then use the chosen plaintext attack to acquire a response corresponding to that challenge and just look up the password in the dictionary. Even if most passwords are not in the dictionary, some might be. Since the attacker gets to pick the challenge, the cost of computing the response for each password on the list can be amortized over finding many passwords. A dictionary with 100 million password/response pairs would take about 3.2 gigabytes of disk storage.\n\nThe countermeasure against this attack is for clients to use the cnonce parameter.\n\n### 5.11. Batch Brute-Force Attacks\n\nWith Digest Authentication, a MITM can execute a chosen plaintext attack and can gather responses from many users to the same nonce. It can then find all the passwords within any subset of password space that would generate one of the nonce/response pairs in a single pass over that space. It also reduces the time to find the first password by a factor equal to the number of nonce/response pairs gathered. This search of the password space can often be done in parallel on many machines, and even a single machine can search large subsets of the password space very quickly -- reports exist of searching all passwords with six or fewer letters in a few hours.\n\nThe countermeasure against this attack is for clients to use the cnonce parameter.\n\n### 5.12. Parameter Randomness\n\nThe security of this protocol is critically dependent on the randomness of the randomly chosen parameters, such as client and server nonces. These should be generated by a strong random or properly seeded pseudorandom source (see [RFC4086]).\n\n### 5.13. Summary\n\nBy modern cryptographic standards, Digest Authentication is weak. But, for a large range of purposes, it is valuable as a replacement for Basic Authentication. It remedies some, but not all, weaknesses of Basic Authentication. Its strength may vary depending on the implementation. In particular, the structure of the nonce (which is dependent on the server implementation) may affect the ease of mounting a replay attack. A range of server options is appropriate since, for example, some implementations may be willing to accept the server overhead of one-time nonces or digests to eliminate the possibility of replay. Others may be satisfied with a nonce like the one recommended above, i.e., restricted to a single IP address and a single ETag or with a limited lifetime.\n\nThe bottom line is that *any* compliant implementation will be relatively weak by cryptographic standards, but *any* compliant implementation will be far superior to Basic Authentication.\n\n## 6. IANA Considerations\n\n### 6.1. Hash Algorithms for HTTP Digest Authentication\n\nThis specification creates a new IANA registry named \"Hash Algorithms for HTTP Digest Authentication\" under the existing \"Hypertext Transfer Protocol (HTTP) Digest Algorithm Values\" category. This registry lists the hash algorithms that can be used in HTTP Digest Authentication.\n\nWhen registering a new hash algorithm, the following information *MUST* be provided:\n\nHash Algorithm\n\n- The textual name of the hash algorithm.\n\nDigest Size\n\n- The size of the algorithm's output in bits.\n\nReference\n\n- A reference to the specification adding the algorithm to this registry.\n\nThe update policy for this registry shall be Specification Required [RFC5226].\n\nThe initial registry contains the following entries:\n\n| Hash Algorithm | Digest Size | Reference |\n| --- | --- | --- |\n| \"MD5\" | 128 | RFC 7616 |\n| \"SHA-512-256\" | 256 | RFC 7616 |\n| \"SHA-256\" | 256 | RFC 7616 |\n\nEach one of the algorithms defined in the registry might have a \"-sess\" variant, e.g., MD5-sess, SHA-256-sess, etc.\n\nTo clarify the purpose of the existing \"HTTP Digest Algorithm Values\" registry and to avoid confusion between the two registries, IANA has added the following description to the existing \"HTTP Digest Algorithm Values\" registry:\n\n- This registry lists the algorithms that can be used when creating digests of an HTTP message body, as specified in RFC 3230.\n\n### 6.2. Digest Scheme Registration\n\nThis specification updates the existing entry of the Digest scheme in the \"Hypertext Transfer Protocol (HTTP) Authentication Scheme Registry\" and adds a new reference to this specification.\n\n- Authentication Scheme Name: Digest\n- Pointer to specification text: RFC 7616\n\n## 7. References\n\n### 7.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[http://www.rfc-editor.org/info/rfc2119](http://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC2978]\n\nFreed, N. and J. Postel, “[IANA Charset Registration Procedures](https://www.rfc-editor.org/rfc/rfc2978.html)”, [BCP 19](https://www.rfc-editor.org/info/bcp19), RFC 2978, [DOI 10.17487/RFC2978](https://dx.doi.org/10.17487/RFC2978), October 2000, <[http://www.rfc-editor.org/info/rfc2978](http://www.rfc-editor.org/info/rfc2978)>.\n\n[RFC3629]\n\nYergeau, F., “[UTF-8, a transformation format of ISO 10646](https://www.rfc-editor.org/rfc/rfc3629.html)”, [STD 63](https://www.rfc-editor.org/info/std63), RFC 3629, [DOI 10.17487/RFC3629](https://dx.doi.org/10.17487/RFC3629), November 2003, <[http://www.rfc-editor.org/info/rfc3629](http://www.rfc-editor.org/info/rfc3629)>.\n\n[RFC3986]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[http://www.rfc-editor.org/info/rfc3986](http://www.rfc-editor.org/info/rfc3986)>.\n\n[RFC4086]\n\nEastlake 3rd, D., Schiller, J., and S. Crocker, “[Randomness Requirements for Security](https://www.rfc-editor.org/rfc/rfc4086.html)”, [BCP 106](https://www.rfc-editor.org/info/bcp106), RFC 4086, [DOI 10.17487/RFC4086](https://dx.doi.org/10.17487/RFC4086), June 2005, <[http://www.rfc-editor.org/info/rfc4086](http://www.rfc-editor.org/info/rfc4086)>.\n\n[RFC5198]\n\nKlensin, J. and M. Padlipsky, “[Unicode Format for Network Interchange](https://www.rfc-editor.org/rfc/rfc5198.html)”, RFC 5198, [DOI 10.17487/RFC5198](https://dx.doi.org/10.17487/RFC5198), March 2008, <[http://www.rfc-editor.org/info/rfc5198](http://www.rfc-editor.org/info/rfc5198)>.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[http://www.rfc-editor.org/info/rfc5234](http://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC5987]\n\nReschke, J., “[Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters](https://www.rfc-editor.org/rfc/rfc5987.html)”, RFC 5987, [DOI 10.17487/RFC5987](https://dx.doi.org/10.17487/RFC5987), August 2010, <[http://www.rfc-editor.org/info/rfc5987](http://www.rfc-editor.org/info/rfc5987)>.\n\n[RFC6454]\n\nBarth, A., “[The Web Origin Concept](https://www.rfc-editor.org/rfc/rfc6454.html)”, RFC 6454, [DOI 10.17487/RFC6454](https://dx.doi.org/10.17487/RFC6454), December 2011, <[http://www.rfc-editor.org/info/rfc6454](http://www.rfc-editor.org/info/rfc6454)>.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[http://www.rfc-editor.org/info/rfc7230](http://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, [DOI 10.17487/RFC7231](https://dx.doi.org/10.17487/RFC7231), June 2014, <[http://www.rfc-editor.org/info/rfc7231](http://www.rfc-editor.org/info/rfc7231)>.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, [DOI 10.17487/RFC7234](https://dx.doi.org/10.17487/RFC7234), June 2014, <[http://www.rfc-editor.org/info/rfc7234](http://www.rfc-editor.org/info/rfc7234)>.\n\n[RFC7235]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Authentication](https://www.rfc-editor.org/rfc/rfc7235.html)”, RFC 7235, [DOI 10.17487/RFC7235](https://dx.doi.org/10.17487/RFC7235), June 2014, <[http://www.rfc-editor.org/info/rfc7235](http://www.rfc-editor.org/info/rfc7235)>.\n\n[RFC7613]\n\nSaint-Andre, P. and A. Melnikov, “[Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords](https://www.rfc-editor.org/rfc/rfc7613.html)”, RFC 7613, [DOI 10.17487/RFC7613](https://dx.doi.org/10.17487/RFC7613), August 2015, <[http://www.rfc-editor.org/info/rfc7613](http://www.rfc-editor.org/info/rfc7613)>.\n\n[RFC7615]\n\nReschke, J., “[HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields](https://www.rfc-editor.org/rfc/rfc7615.html)”, RFC 7615, [DOI 10.17487/RFC7615](https://dx.doi.org/10.17487/RFC7615), September 2015, <[http://www.rfc-editor.org/info/rfc7615](http://www.rfc-editor.org/info/rfc7615)>.\n\n### 7.2. Informative References\n\n[RFC2195]\n\nKlensin, J., Catoe, R., and P. Krumviede, “[IMAP/POP AUTHorize Extension for Simple Challenge/Response](https://www.rfc-editor.org/rfc/rfc2195.html)”, RFC 2195, [DOI 10.17487/RFC2195](https://dx.doi.org/10.17487/RFC2195), September 1997, <[http://www.rfc-editor.org/info/rfc2195](http://www.rfc-editor.org/info/rfc2195)>.\n\n[RFC2617]\n\nFranks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A., and L. Stewart, “[HTTP Authentication: Basic and Digest Access Authentication](https://www.rfc-editor.org/rfc/rfc2617.html)”, RFC 2617, [DOI 10.17487/RFC2617](https://dx.doi.org/10.17487/RFC2617), June 1999, <[http://www.rfc-editor.org/info/rfc2617](http://www.rfc-editor.org/info/rfc2617)>.\n\n[RFC2818]\n\nRescorla, E., “[HTTP Over TLS](https://www.rfc-editor.org/rfc/rfc2818.html)”, RFC 2818, [DOI 10.17487/RFC2818](https://dx.doi.org/10.17487/RFC2818), May 2000, <[http://www.rfc-editor.org/info/rfc2818](http://www.rfc-editor.org/info/rfc2818)>.\n\n[RFC4513]\n\nHarrison, R., Ed., “[Lightweight Directory Access Protocol (LDAP): Authentication Methods and Security Mechanisms](https://www.rfc-editor.org/rfc/rfc4513.html)”, RFC 4513, [DOI 10.17487/RFC4513](https://dx.doi.org/10.17487/RFC4513), June 2006, <[http://www.rfc-editor.org/info/rfc4513](http://www.rfc-editor.org/info/rfc4513)>.\n\n[RFC5226]\n\nNarten, T. and H. Alvestrand, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc5226.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 5226, [DOI 10.17487/RFC5226](https://dx.doi.org/10.17487/RFC5226), May 2008, <[http://www.rfc-editor.org/info/rfc5226](http://www.rfc-editor.org/info/rfc5226)>.\n\n[RFC7617]\n\nReschke, J., “[The 'Basic' HTTP Authentication Scheme](https://www.rfc-editor.org/rfc/rfc7617.html)”, RFC 7617, [DOI 10.17487/RFC7617](https://dx.doi.org/10.17487/RFC7617), September 2015, <[http://www.rfc-editor.org/info/rfc7617](http://www.rfc-editor.org/info/rfc7617)>.\n\n## Appendix A. Changes from RFC 2617\n\nThis document introduces the following changes:\n\n- Adds support for two new algorithms, SHA2-256 as mandatory and SHA2-512/256 as a backup, and defines the proper algorithm negotiation. The document keeps the MD5 algorithm support but only for backward compatibility.\n- Introduces the username hashing capability and the parameter associated with that, mainly for privacy reasons.\n- Adds various internationalization considerations that impact the A1 calculation and username and password encoding.\n- Introduces a new IANA registry, \"Hash Algorithms for HTTP Digest Authentication\", that lists the hash algorithms that can be used in HTTP Digest Authentication.\n- Deprecates backward compatibility with RFC 2069.\n\n## Appendix B. Acknowledgments\n\nTo provide a complete description for the Digest mechanism and its operation, this document borrows text heavily from [RFC2617]. The authors of this document would like to thank John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. Lawrence, Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for their work on that specification.\n\nSpecial thanks to Julian Reschke for his many reviews, comments, suggestions, and text provided to various areas in this document.\n\nThe authors would like to thank Stephen Farrell, Yoav Nir, Phillip Hallam-Baker, Manu Sporny, Paul Hoffman, Yaron Sheffer, Sean Turner, Geoff Baskwill, Eric Cooper, Bjoern Hoehrmann, Martin Durst, Peter Saint-Andre, Michael Sweet, Daniel Stenberg, Brett Tate, Paul Leach, Ilari Liusvaara, Gary Mort, Alexey Melnikov, Benjamin Kaduk, Kathleen Moriarty, Francis Dupont, Hilarie Orman, and Ben Campbell for their careful review and comments.\n\nThe authors would like to thank Jonathan Stoke, Nico Williams, Harry Halpin, and Phil Hunt for their comments on the mailing list when discussing various aspects of this document.\n\nThe authors would like to thank Paul Kyzivat and Dale Worley for their careful review and feedback on some aspects of this document.\n\nThe authors would like to thank Barry Leiba for his help with the registry.\n\n## Authors' Addresses\n\n**Rifaat Shekh-Yusef** (editor)\nAvaya\n250 Sidney Street\nBelleville, Ontario\nCanada\nPhone: [+1-613-967-5267](tel:+1-613-967-5267)\nEMail: [rifaat.ietf@gmail.com](mailto:rifaat.ietf@gmail.com)\n\n**David Ahrens**\nIndependent\nCalifornia\nUnited States\nEMail: [ahrensdc@gmail.com](mailto:ahrensdc@gmail.com)\n\n**Sophie Bremer**\nNetzkonform\nGermany\nEMail: [sophie.bremer@netzkonform.de](mailto:sophie.bremer@netzkonform.de)", "znaku_textu": 62964, "slov": 9030, "odkazu": 217, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:22", "sha256": "5fc69df73881ff5a453fdfc61aad0e5d950b5c29db8012f6f48ce472c9d8c5c9", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7616", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc7235.html", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc2978.html", "https://www.rfc-editor.org/rfc/rfc5198.html", "https://www.rfc-editor.org/rfc/rfc7613.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "http://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/info/bcp19", "https://dx.doi.org/10.17487/RFC2978", "http://www.rfc-editor.org/info/rfc2978", "https://www.rfc-editor.org/rfc/rfc3629.html", "https://www.rfc-editor.org/info/std63", "https://dx.doi.org/10.17487/RFC3629", "http://www.rfc-editor.org/info/rfc3629", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "http://www.rfc-editor.org/info/rfc3986", "https://www.rfc-editor.org/rfc/rfc4086.html", "https://www.rfc-editor.org/info/bcp106", "https://dx.doi.org/10.17487/RFC4086", "http://www.rfc-editor.org/info/rfc4086", "https://dx.doi.org/10.17487/RFC5198", "http://www.rfc-editor.org/info/rfc5198", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "http://www.rfc-editor.org/info/rfc5234", "https://www.rfc-editor.org/rfc/rfc5987.html", "https://dx.doi.org/10.17487/RFC5987", "http://www.rfc-editor.org/info/rfc5987", "https://www.rfc-editor.org/rfc/rfc6454.html", "https://dx.doi.org/10.17487/RFC6454", "http://www.rfc-editor.org/info/rfc6454", "https://dx.doi.org/10.17487/RFC7230", "http://www.rfc-editor.org/info/rfc7230", "https://dx.doi.org/10.17487/RFC7231", "http://www.rfc-editor.org/info/rfc7231", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://dx.doi.org/10.17487/RFC7234", "http://www.rfc-editor.org/info/rfc7234", "https://dx.doi.org/10.17487/RFC7235", "http://www.rfc-editor.org/info/rfc7235", "https://dx.doi.org/10.17487/RFC7613", "http://www.rfc-editor.org/info/rfc7613", "https://www.rfc-editor.org/rfc/rfc7615.html", "https://dx.doi.org/10.17487/RFC7615", "http://www.rfc-editor.org/info/rfc7615", "https://www.rfc-editor.org/rfc/rfc2195.html", "https://dx.doi.org/10.17487/RFC2195", "http://www.rfc-editor.org/info/rfc2195", "https://www.rfc-editor.org/rfc/rfc2617.html", "https://dx.doi.org/10.17487/RFC2617", "http://www.rfc-editor.org/info/rfc2617", "https://www.rfc-editor.org/rfc/rfc2818.html", "https://dx.doi.org/10.17487/RFC2818", "http://www.rfc-editor.org/info/rfc2818", "https://www.rfc-editor.org/rfc/rfc4513.html", "https://dx.doi.org/10.17487/RFC4513", "http://www.rfc-editor.org/info/rfc4513", "https://www.rfc-editor.org/rfc/rfc5226.html", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC5226", "http://www.rfc-editor.org/info/rfc5226", "https://www.rfc-editor.org/rfc/rfc7617.html", "https://dx.doi.org/10.17487/RFC7617", "http://www.rfc-editor.org/info/rfc7617"]} {"url": "https://httpwg.org/specs/rfc7617.html", "titulek": "RFC 7617 - The 'Basic' HTTP Authentication Scheme", "h1": "The 'Basic' HTTP Authentication Scheme", "popis": "This document defines the \"Basic\" Hypertext Transfer Protocol (HTTP) authentication scheme, which transmits credentials as user-id/password pairs, encoded using Base64.", "klicova_slova": "HTTP, authentication scheme, basic authentication scheme", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7617", "og:description": "The 'Basic' HTTP Authentication Scheme", "og:url": "https://httpwg.org/specs/rfc7617.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Terminology and Notation"}, {"uroven": 2, "text": "2. The 'Basic' Authentication Scheme"}, {"uroven": 3, "text": "2.1. The 'charset' auth-param"}, {"uroven": 3, "text": "2.2. Reusing Credentials"}, {"uroven": 2, "text": "3. Internationalization Considerations"}, {"uroven": 2, "text": "4. Security Considerations"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 2, "text": "6. References"}, {"uroven": 3, "text": "6.1. Normative References"}, {"uroven": 3, "text": "6.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Changes from RFC 2617"}, {"uroven": 2, "text": "Appendix B. Deployment Considerations for the 'charset' Parameter"}, {"uroven": 3, "text": "B.1. User Agents"}, {"uroven": 3, "text": "B.2. Servers"}, {"uroven": 3, "text": "B.3. Why not simply switch the default encoding to UTF-8?"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThis document defines the \"Basic\" Hypertext Transfer Protocol (HTTP) authentication scheme, which transmits credentials as user-id/password pairs, encoded using Base64.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7617](http://www.rfc-editor.org/info/rfc7617).\n\n## Copyright Notice\n\nCopyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Terminology and Notation\n- 2. The 'Basic' Authentication Scheme\n - 2.1. The 'charset' auth-param\n - 2.2. Reusing Credentials\n- 3. Internationalization Considerations\n- 4. Security Considerations\n- 5. IANA Considerations\n- 6. References\n - 6.1. Normative References\n - 6.2. Informative References\n- Appendix A. Changes from RFC 2617\n- Appendix B. Deployment Considerations for the 'charset' Parameter\n - B.1. User Agents\n - B.2. Servers\n - B.3. Why not simply switch the default encoding to UTF-8?\n- Acknowledgements\n- Author's Address\n\n## 1. Introduction\n\nThis document defines the \"Basic\" Hypertext Transfer Protocol (HTTP) authentication scheme, which transmits credentials as user-id/password pairs, encoded using Base64 (HTTP authentication schemes are defined in [RFC7235]).\n\nThis scheme is not considered to be a secure method of user authentication unless used in conjunction with some external secure system such as TLS (Transport Layer Security, [RFC5246]), as the user-id and password are passed over the network as cleartext.\n\nThe \"Basic\" scheme previously was defined in [Section 2](https://www.rfc-editor.org/rfc/rfc2617.html#section-2) of [RFC2617]. This document updates the definition, and also addresses internationalization issues by introducing the 'charset' authentication parameter (Section 2.1).\n\nOther documents updating RFC 2617 are \"Hypertext Transfer Protocol (HTTP/1.1): Authentication\" ([RFC7235], defining the authentication framework), \"HTTP Digest Access Authentication\" ([RFC7616], updating the definition of the \"Digest\" authentication scheme), and \"HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields\" ([RFC7615]). Taken together, these four documents obsolete RFC 2617.\n\n### 1.1. Terminology and Notation\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nThe terms \"protection space\" and \"realm\" are defined in [Section 2.2](https://www.rfc-editor.org/rfc/rfc7235.html#section-2.2) of [RFC7235].\n\nThe terms \"(character) repertoire\" and \"character encoding scheme\" are defined in [Section 2](https://www.rfc-editor.org/rfc/rfc6365.html#section-2) of [RFC6365].\n\n## 2. The 'Basic' Authentication Scheme\n\nThe Basic authentication scheme is based on the model that the client needs to authenticate itself with a user-id and a password for each protection space (\"realm\"). The realm value is a free-form string that can only be compared for equality with other realms on that server. The server will service the request only if it can validate the user-id and password for the protection space applying to the requested resource.\n\nThe Basic authentication scheme utilizes the Authentication Framework as follows.\n\nIn challenges:\n\n- The scheme name is \"Basic\".\n- The authentication parameter 'realm' is *REQUIRED* ( [RFC7235] , [Section 2.2](https://www.rfc-editor.org/rfc/rfc7235.html#section-2.2) ).\n- The authentication parameter 'charset' is *OPTIONAL* (see Section 2.1 ).\n- No other authentication parameters are defined — unknown parameters *MUST* be ignored by recipients, and new parameters can only be defined by revising this specification.\n\nSee also [Section 4.1](https://www.rfc-editor.org/rfc/rfc7235.html#section-4.1) of [RFC7235], which discusses the complexity of parsing challenges properly.\n\nNote that both scheme and parameter names are matched case-insensitively.\n\nFor credentials, the \"token68\" syntax defined in [Section 2.1](https://www.rfc-editor.org/rfc/rfc7235.html#section-2.1) of [RFC7235] is used. The value is computed based on user-id and password as defined below.\n\nUpon receipt of a request for a URI within the protection space that lacks credentials, the server can reply with a challenge using the 401 (Unauthorized) status code ([RFC7235], [Section 3.1](https://www.rfc-editor.org/rfc/rfc7235.html#section-3.1)) and the WWW-Authenticate header field ([RFC7235], [Section 4.1](https://www.rfc-editor.org/rfc/rfc7235.html#section-4.1)).\n\nFor instance:\n\n```\nHTTP/1.1 401 Unauthorized\nDate: Mon, 04 Feb 2014 16:50:53 GMT\nWWW-Authenticate: Basic realm=\"WallyWorld\"\n```\n\nwhere \"WallyWorld\" is the string assigned by the server to identify the protection space.\n\nA proxy can respond with a similar challenge using the 407 (Proxy Authentication Required) status code ([RFC7235], [Section 3.2](https://www.rfc-editor.org/rfc/rfc7235.html#section-3.2)) and the Proxy-Authenticate header field ([RFC7235], [Section 4.3](https://www.rfc-editor.org/rfc/rfc7235.html#section-4.3)).\n\nTo receive authorization, the client\n\n1. obtains the user-id and password from the user,\n2. constructs the user-pass by concatenating the user-id, a single colon (\":\") character, and the password,\n3. encodes the user-pass into an octet sequence (see below for a discussion of character encoding schemes),\n4. and obtains the basic-credentials by encoding this octet sequence using Base64 ( [RFC4648] , [Section 4](https://www.rfc-editor.org/rfc/rfc4648.html#section-4) ) into a sequence of US-ASCII characters ( [RFC0020] ).\n\nThe original definition of this authentication scheme failed to specify the character encoding scheme used to convert the user-pass into an octet sequence. In practice, most implementations chose either a locale-specific encoding such as ISO-8859-1 ([ISO-8859-1]), or UTF-8 ([RFC3629]). For backwards compatibility reasons, this specification continues to leave the default encoding undefined, as long as it is compatible with US-ASCII (mapping any US-ASCII character to a single octet matching the US-ASCII character code).\n\nThe user-id and password *MUST NOT* contain any control characters (see \"CTL\" in [Appendix B.1](https://www.rfc-editor.org/rfc/rfc5234.html#appendix-B.1) of [RFC5234]).\n\nFurthermore, a user-id containing a colon character is invalid, as the first colon in a user-pass string separates user-id and password from one another; text after the first colon is part of the password. User-ids containing colons cannot be encoded in user-pass strings.\n\nNote that many user agents produce user-pass strings without checking that user-ids supplied by users do not contain colons; recipients will then treat part of the username input as part of the password.\n\nIf the user agent wishes to send the user-id \"Aladdin\" and password \"open sesame\", it would use the following header field:\n\n```\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\n```\n\n### 2.1. The 'charset' auth-param\n\nIn challenges, servers can use the 'charset' authentication parameter to indicate the character encoding scheme they expect the user agent to use when generating \"user-pass\" (a sequence of octets). This information is purely advisory.\n\nThe only allowed value is \"UTF-8\"; it is to be matched case-insensitively (see [RFC2978], [Section 2.3](https://www.rfc-editor.org/rfc/rfc2978.html#section-2.3)). It indicates that the server expects character data to be converted to Unicode Normalization Form C (\"NFC\"; see [Section 3](https://www.rfc-editor.org/rfc/rfc5198.html#section-3) of [RFC5198]) and to be encoded into octets using the UTF-8 character encoding scheme ([RFC3629]).\n\nFor the user-id, recipients *MUST* support all characters defined in the \"UsernameCasePreserved\" profile defined in [Section 3.3](https://www.rfc-editor.org/rfc/rfc7613.html#section-3.3) of [RFC7613], with the exception of the colon (\":\") character.\n\nFor the password, recipients *MUST* support all characters defined in the \"OpaqueString\" profile defined in [Section 4.2](https://www.rfc-editor.org/rfc/rfc7613.html#section-4.2) of [RFC7613].\n\nOther values are reserved for future use.\n\nIn the example below, the server prompts for authentication in the \"foo\" realm, using Basic authentication, with a preference for the UTF-8 character encoding scheme:\n\n```\nWWW-Authenticate: Basic realm=\"foo\", charset=\"UTF-8\"\n```\n\nNote that the parameter value can be either a token or a quoted string; in this case, the server chose to use the quoted-string notation.\n\nThe user's name is \"test\", and the password is the string \"123\" followed by the Unicode character U+00A3 (POUND SIGN). Using the character encoding scheme UTF-8, the user-pass becomes:\n\n```\n't' 'e' 's' 't' ':' '1' '2' '3' pound\n74 65 73 74 3A 31 32 33 C2 A3 \n```\n\nEncoding this octet sequence in Base64 ([RFC4648], [Section 4](https://www.rfc-editor.org/rfc/rfc4648.html#section-4)) yields:\n\n```\ndGVzdDoxMjPCow==\n```\n\nThus, the Authorization header field would be:\n\n```\nAuthorization: Basic dGVzdDoxMjPCow==\n```\n\nOr, for proxy authentication:\n\n```\nProxy-Authorization: Basic dGVzdDoxMjPCow==\n```\n\n### 2.2. Reusing Credentials\n\nGiven the absolute URI ([RFC3986], [Section 4.3](https://www.rfc-editor.org/rfc/rfc3986.html#section-4.3)) of an authenticated request, the authentication scope of that request is obtained by removing all characters after the last slash (\"/\") character of the path component (\"hier_part\"; see [RFC3986], [Section 3](https://www.rfc-editor.org/rfc/rfc3986.html#section-3)). A client *SHOULD* assume that resources identified by URIs with a prefix-match of the authentication scope are also within the protection space specified by the realm value of that authenticated request.\n\nA client *MAY* preemptively send the corresponding Authorization header field with requests for resources in that space without receipt of another challenge from the server. Similarly, when a client sends a request to a proxy, it *MAY* reuse a user-id and password in the Proxy-Authorization header field without receiving another challenge from the proxy server.\n\nFor example, given an authenticated request to:\n\n```\nhttp://example.com/docs/index.html\n```\n\nrequests to the URIs below could use the known credentials:\n\n```\nhttp://example.com/docs/\nhttp://example.com/docs/test.doc\nhttp://example.com/docs/?page=1\n```\n\nwhile the URIs\n\n```\nhttp://example.com/other/\nhttps://example.com/docs/\n```\n\nwould be considered to be outside the authentication scope.\n\nNote that a URI can be part of multiple authentication scopes (such as \"http://example.com/\" and \"http://example.com/docs/\"). This specification does not define which of these should be treated with higher priority.\n\n## 3. Internationalization Considerations\n\nUser-ids or passwords containing characters outside the US-ASCII character repertoire will cause interoperability issues, unless both communication partners agree on what character encoding scheme is to be used. Servers can use the new 'charset' parameter (Section 2.1) to indicate a preference of \"UTF-8\", increasing the probability that clients will switch to that encoding.\n\nThe 'realm' parameter carries data that can be considered textual; however, [RFC7235] does not define a way to reliably transport non-US-ASCII characters. This is a known issue that would need to be addressed in a revision to that specification.\n\n## 4. Security Considerations\n\nThe Basic authentication scheme is not a secure method of user authentication, nor does it in any way protect the entity, which is transmitted in cleartext across the physical network used as the carrier. HTTP does not prevent the addition of enhancements (such as schemes to use one-time passwords) to Basic authentication.\n\nThe most serious flaw of Basic authentication is that it results in the cleartext transmission of the user's password over the physical network. Many other authentication schemes address this problem.\n\nBecause Basic authentication involves the cleartext transmission of passwords, it *SHOULD NOT* be used (without enhancements such as HTTPS [RFC2818]) to protect sensitive or valuable information.\n\nA common use of Basic authentication is for identification purposes — requiring the user to provide a user-id and password as a means of identification, for example, for purposes of gathering accurate usage statistics on a server. When used in this way it is tempting to think that there is no danger in its use if illicit access to the protected documents is not a major concern. This is only correct if the server issues both user-id and password to the users and, in particular, does not allow the user to choose his or her own password. The danger arises because naive users frequently reuse a single password to avoid the task of maintaining multiple passwords.\n\nIf a server permits users to select their own passwords, then the threat is not only unauthorized access to documents on the server but also unauthorized access to any other resources on other systems that the user protects with the same password. Furthermore, in the server's password database, many of the passwords may also be users' passwords for other sites. The owner or administrator of such a system could therefore expose all users of the system to the risk of unauthorized access to all those other sites if this information is not maintained in a secure fashion. This raises both security and privacy concerns ([RFC6973]). If the same user-id and password combination is in use to access other accounts, such as an email or health portal account, personal information could be exposed.\n\nBasic authentication is also vulnerable to spoofing by counterfeit servers. If a user can be led to believe that she is connecting to a host containing information protected by Basic authentication when, in fact, she is connecting to a hostile server or gateway, then the attacker can request a password, store it for later use, and feign an error. Server implementers ought to guard against this sort of counterfeiting; in particular, software components that can take over control over the message framing on an existing connection need to be used carefully or not at all (for instance: NPH (\"Non-Parsed Header\") scripts as described in [Section 5](https://www.rfc-editor.org/rfc/rfc3875.html#section-5) of [RFC3875]).\n\nServers and proxies implementing Basic authentication need to store user passwords in some form in order to authenticate a request. These passwords ought to be stored in such a way that a leak of the password data doesn't make them trivially recoverable. This is especially important when users are allowed to set their own passwords, since users are known to choose weak passwords and to reuse them across authentication realms. While a full discussion of good password hashing techniques is beyond the scope of this document, server operators ought to make an effort to minimize risks to their users in the event of a password data leak. For example, servers ought to avoid storing user passwords in plaintext or as unsalted digests. For more discussion about modern password hashing techniques, see the \"Password Hashing Competition\" (<[https://password-hashing.net](https://password-hashing.net)>).\n\nThe use of the UTF-8 character encoding scheme and of normalization introduces additional security considerations; see [Section 10](https://www.rfc-editor.org/rfc/rfc3629.html#section-10) of [RFC3629] and [Section 6](https://www.rfc-editor.org/rfc/rfc5198.html#section-6) of [RFC5198] for more information.\n\n## 5. IANA Considerations\n\nIANA maintains the \"Hypertext Transfer Protocol (HTTP) Authentication Scheme Registry\" ([RFC7235]) at <[http://www.iana.org/assignments/http-authschemes](http://www.iana.org/assignments/http-authschemes)>.\n\nThe entry for the \"Basic\" authentication scheme has been updated to reference this specification.\n\n## 6. References\n\n### 6.1. Normative References\n\n[RFC0020]\n\nCerf, V., “[ASCII format for network interchange](https://www.rfc-editor.org/rfc/rfc20.html)”, [STD 80](https://www.rfc-editor.org/info/std80), RFC 20, [DOI 10.17487/RFC0020](https://dx.doi.org/10.17487/RFC0020), October 1969, <[http://www.rfc-editor.org/info/rfc20](http://www.rfc-editor.org/info/rfc20)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[http://www.rfc-editor.org/info/rfc2119](http://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC2978]\n\nFreed, N. and J. Postel, “[IANA Charset Registration Procedures](https://www.rfc-editor.org/rfc/rfc2978.html)”, [BCP 19](https://www.rfc-editor.org/info/bcp19), RFC 2978, [DOI 10.17487/RFC2978](https://dx.doi.org/10.17487/RFC2978), October 2000, <[http://www.rfc-editor.org/info/rfc2978](http://www.rfc-editor.org/info/rfc2978)>.\n\n[RFC3629]\n\n[Yergeau, F.](mailto:fyergeau@alis.com), “[UTF-8, a transformation format of ISO 10646](https://www.rfc-editor.org/rfc/rfc3629.html)”, [STD 63](https://www.rfc-editor.org/info/std63), RFC 3629, [DOI 10.17487/RFC3629](https://dx.doi.org/10.17487/RFC3629), November 2003, <[http://www.rfc-editor.org/info/rfc3629](http://www.rfc-editor.org/info/rfc3629)>.\n\n[RFC3986]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[http://www.rfc-editor.org/info/rfc3986](http://www.rfc-editor.org/info/rfc3986)>.\n\n[RFC4648]\n\nJosefsson, S., “[The Base16, Base32, and Base64 Data Encodings](https://www.rfc-editor.org/rfc/rfc4648.html)”, RFC 4648, [DOI 10.17487/RFC4648](https://dx.doi.org/10.17487/RFC4648), October 2006, <[http://www.rfc-editor.org/info/rfc4648](http://www.rfc-editor.org/info/rfc4648)>.\n\n[RFC5198]\n\nKlensin, J. and M. Padlipsky, “[Unicode Format for Network Interchange](https://www.rfc-editor.org/rfc/rfc5198.html)”, RFC 5198, [DOI 10.17487/RFC5198](https://dx.doi.org/10.17487/RFC5198), March 2008, <[http://www.rfc-editor.org/info/rfc5198](http://www.rfc-editor.org/info/rfc5198)>.\n\n[RFC5234]\n\n[Crocker, D., Ed.](mailto:dcrocker@bbiw.net) and [P. Overell](mailto:paul.overell@thus.net), “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[http://www.rfc-editor.org/info/rfc5234](http://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC6365]\n\nHoffman, P. and J. Klensin, “[Terminology Used in Internationalization in the IETF](https://www.rfc-editor.org/rfc/rfc6365.html)”, [BCP 166](https://www.rfc-editor.org/info/bcp166), RFC 6365, [DOI 10.17487/RFC6365](https://dx.doi.org/10.17487/RFC6365), September 2011, <[http://www.rfc-editor.org/info/rfc6365](http://www.rfc-editor.org/info/rfc6365)>.\n\n[RFC7235]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Authentication](https://www.rfc-editor.org/rfc/rfc7235.html)”, RFC 7235, [DOI 10.17487/RFC7235](https://dx.doi.org/10.17487/RFC7235), June 2014, <[http://www.rfc-editor.org/info/rfc7235](http://www.rfc-editor.org/info/rfc7235)>.\n\n[RFC7613]\n\nSaint-Andre, P. and A. Melnikov, “[Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords](https://www.rfc-editor.org/rfc/rfc7613.html)”, RFC 7613, [DOI 10.17487/RFC7613](https://dx.doi.org/10.17487/RFC7613), August 2015, <[http://www.rfc-editor.org/info/rfc7613](http://www.rfc-editor.org/info/rfc7613)>.\n\n### 6.2. Informative References\n\n[ISO-8859-1]\n\nInternational Organization for Standardization, “Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1”, ISO/IEC 8859-1:1998, 1998.\n\n[RFC2617]\n\nFranks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A., and L. Stewart, “[HTTP Authentication: Basic and Digest Access Authentication](https://www.rfc-editor.org/rfc/rfc2617.html)”, RFC 2617, [DOI 10.17487/RFC2617](https://dx.doi.org/10.17487/RFC2617), June 1999, <[http://www.rfc-editor.org/info/rfc2617](http://www.rfc-editor.org/info/rfc2617)>.\n\n[RFC2818]\n\n[Rescorla, E.](mailto:ekr@rtfm.com), “[HTTP Over TLS](https://www.rfc-editor.org/rfc/rfc2818.html)”, RFC 2818, [DOI 10.17487/RFC2818](https://dx.doi.org/10.17487/RFC2818), May 2000, <[http://www.rfc-editor.org/info/rfc2818](http://www.rfc-editor.org/info/rfc2818)>.\n\n[RFC2831]\n\nLeach, P. and C. Newman, “[Using Digest Authentication as a SASL Mechanism](https://www.rfc-editor.org/rfc/rfc2831.html)”, RFC 2831, [DOI 10.17487/RFC2831](https://dx.doi.org/10.17487/RFC2831), May 2000, <[http://www.rfc-editor.org/info/rfc2831](http://www.rfc-editor.org/info/rfc2831)>.\n\n[RFC3875]\n\nRobinson, D. and K. Coar, “[The Common Gateway Interface (CGI) Version 1.1](https://www.rfc-editor.org/rfc/rfc3875.html)”, RFC 3875, October 2004, <[http://www.rfc-editor.org/info/rfc3875](http://www.rfc-editor.org/info/rfc3875)>.\n\n[RFC5246]\n\nDierks, T. and E. Rescorla, “[The Transport Layer Security (TLS) Protocol Version 1.2](https://www.rfc-editor.org/rfc/rfc5246.html)”, RFC 5246, [DOI 10.17487/RFC5246](https://dx.doi.org/10.17487/RFC5246), August 2008, <[http://www.rfc-editor.org/info/rfc5246](http://www.rfc-editor.org/info/rfc5246)>.\n\n[RFC6973]\n\nCooper, A., Tschofenig, H., Aboba, B., Peterson, J., Morris, J., Hansen, M., and R. Smith, “[Privacy Considerations for Internet Protocols](https://www.rfc-editor.org/rfc/rfc6973.html)”, RFC 6973, [DOI 10.17487/RFC6973](https://dx.doi.org/10.17487/RFC6973), July 2013, <[http://www.rfc-editor.org/info/rfc6973](http://www.rfc-editor.org/info/rfc6973)>.\n\n[RFC7231]\n\n[Fielding, R., Ed.](mailto:fielding@gbiv.com) and [J. Reschke, Ed.](mailto:julian.reschke@greenbytes.de), “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, [DOI 10.17487/RFC7231](https://dx.doi.org/10.17487/RFC7231), June 2014, <[http://www.rfc-editor.org/info/rfc7231](http://www.rfc-editor.org/info/rfc7231)>.\n\n[RFC7615]\n\nReschke, J., “[HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields](https://www.rfc-editor.org/rfc/rfc7615.html)”, RFC 7615, [DOI 10.17487/RFC7615](https://dx.doi.org/10.17487/RFC7615), September 2015, <[http://www.rfc-editor.org/info/rfc7615](http://www.rfc-editor.org/info/rfc7615)>.\n\n[RFC7616]\n\nShekh-Yusef, R., Ed., Ahrens, D., and S. Bremer, “[HTTP Digest Access Authentication](https://www.rfc-editor.org/rfc/rfc7616.html)”, RFC 7616, [DOI 10.17487/RFC7616](https://dx.doi.org/10.17487/RFC7616), September 2015, <[http://www.rfc-editor.org/info/rfc7616](http://www.rfc-editor.org/info/rfc7616)>.\n\n## Appendix A. Changes from RFC 2617\n\nThe scheme definition has been rewritten to be consistent with newer specifications such as [RFC7235].\n\nThe new authentication parameter 'charset' has been added. It is purely advisory, so existing implementations do not need to change, unless they want to take advantage of the additional information that previously wasn't available.\n\n## Appendix B. Deployment Considerations for the 'charset' Parameter\n\n### B.1. User Agents\n\nUser agents not implementing 'charset' will continue to work as before, ignoring the new parameter.\n\nUser agents that already default to the UTF-8 encoding implement 'charset' by definition.\n\nOther user agents can keep their default behavior and switch to UTF-8 when seeing the new parameter.\n\n### B.2. Servers\n\nServers that do not support non-US-ASCII characters in credentials do not require any changes to support 'charset'.\n\nServers that need to support non-US-ASCII characters, but cannot use the UTF-8 character encoding scheme will not be affected; they will continue to function as well or as badly as before.\n\nFinally, servers that need to support non-US-ASCII characters and can use the UTF-8 character encoding scheme can opt in by specifying the 'charset' parameter in the authentication challenge. Clients that do understand the 'charset' parameter will then start to use UTF-8, while other clients will continue to send credentials in their default encoding, broken credentials, or no credentials at all. Until all clients are upgraded to support UTF-8, servers are likely to see both UTF-8 and \"legacy\" encodings in requests. When processing as UTF-8 fails (due to a failure to decode as UTF-8 or a mismatch of user-id/password), a server might try a fallback to the previously supported legacy encoding in order to accommodate these legacy clients. Note that implicit retries need to be done carefully; for instance, some subsystems might detect repeated login failures and treat them as a potential credentials-guessing attack.\n\n### B.3. Why not simply switch the default encoding to UTF-8?\n\nThere are sites in use today that default to a local character encoding scheme, such as ISO-8859-1 ([ISO-8859-1]), and expect user agents to use that encoding. Authentication on these sites will stop working if the user agent switches to a different encoding, such as UTF-8.\n\nNote that sites might even inspect the User-Agent header field ([RFC7231], [Section 5.5.3](https://www.rfc-editor.org/rfc/rfc7231.html#section-5.5.3)) to decide which character encoding scheme to expect from the client. Therefore, they might support UTF-8 for some user agents, but default to something else for others. User agents in the latter group will have to continue to do what they do today until the majority of these servers have been upgraded to always use UTF-8.\n\n## Acknowledgements\n\nThis specification takes over the definition of the \"Basic\" HTTP Authentication Scheme, previously defined in RFC 2617. We thank John Franks, Phillip M. Hallam-Baker, Jeffery L. Hostetler, Scott D. Lawrence, Paul J. Leach, Ari Luotonen, and Lawrence C. Stewart for their work on that specification, from which significant amounts of text were borrowed. See [Section 6](https://www.rfc-editor.org/rfc/rfc2617.html#section-6) of [RFC2617] for further acknowledgements.\n\nThe internationalization problem with respect to the character encoding scheme used for user-pass was reported as a Mozilla bug back in the year 2000 (see <[https://bugzilla.mozilla.org/show_bug.cgi?id=41489](https://bugzilla.mozilla.org/show_bug.cgi?id=41489)> and also the more recent <[https://bugzilla.mozilla.org/show_bug.cgi?id=656213](https://bugzilla.mozilla.org/show_bug.cgi?id=656213)>). It was Andrew Clover's idea to address it using a new auth-param.\n\nWe also thank the members of the HTTPAUTH Working Group and other reviewers, namely, Stephen Farrell, Roy Fielding, Daniel Kahn Gillmor, Tony Hansen, Bjoern Hoehrmann, Kari Hurtta, Amos Jeffries, Benjamin Kaduk, Michael Koeller, Eric Lawrence, Barry Leiba, James Manger, Alexey Melnikov, Kathleen Moriarty, Juergen Schoenwaelder, Yaron Sheffer, Meral Shirazipour, Michael Sweet, and Martin Thomson for feedback on this revision.\n\n## Author's Address\n\n**Julian F. Reschke**\ngreenbytes GmbH\nHafenweg 16\nMuenster, NW 48155\nGermany\nEmail: [julian.reschke@greenbytes.de](mailto:julian.reschke@greenbytes.de)\nURI: [http://greenbytes.de/tech/webdav/](http://greenbytes.de/tech/webdav/)", "znaku_textu": 28917, "slov": 3684, "odkazu": 172, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:23", "sha256": "bc47bd78f08294cf2073984f78fa3545d6b51074ff07cae39a47c032f906a8c5", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7617", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2617.html", "https://www.rfc-editor.org/rfc/rfc7235.html", "https://www.rfc-editor.org/rfc/rfc6365.html", "https://www.rfc-editor.org/rfc/rfc4648.html", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/rfc/rfc2978.html", "https://www.rfc-editor.org/rfc/rfc5198.html", "https://www.rfc-editor.org/rfc/rfc7613.html", "https://www.rfc-editor.org/rfc/rfc2831.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/rfc/rfc3875.html", "https://password-hashing.net/", "https://www.rfc-editor.org/rfc/rfc3629.html", "http://www.iana.org/assignments/http-authschemes", "https://www.rfc-editor.org/rfc/rfc20.html", "https://www.rfc-editor.org/info/std80", "https://dx.doi.org/10.17487/RFC0020", "http://www.rfc-editor.org/info/rfc20", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "http://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/info/bcp19", "https://dx.doi.org/10.17487/RFC2978", "http://www.rfc-editor.org/info/rfc2978", "https://www.rfc-editor.org/info/std63", "https://dx.doi.org/10.17487/RFC3629", "http://www.rfc-editor.org/info/rfc3629", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "http://www.rfc-editor.org/info/rfc3986", "https://dx.doi.org/10.17487/RFC4648", "http://www.rfc-editor.org/info/rfc4648", "https://dx.doi.org/10.17487/RFC5198", "http://www.rfc-editor.org/info/rfc5198", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "http://www.rfc-editor.org/info/rfc5234", "https://www.rfc-editor.org/info/bcp166", "https://dx.doi.org/10.17487/RFC6365", "http://www.rfc-editor.org/info/rfc6365", "https://dx.doi.org/10.17487/RFC7235", "http://www.rfc-editor.org/info/rfc7235", "https://dx.doi.org/10.17487/RFC7613", "http://www.rfc-editor.org/info/rfc7613", "https://dx.doi.org/10.17487/RFC2617", "http://www.rfc-editor.org/info/rfc2617", "https://www.rfc-editor.org/rfc/rfc2818.html", "https://dx.doi.org/10.17487/RFC2818", "http://www.rfc-editor.org/info/rfc2818", "https://dx.doi.org/10.17487/RFC2831", "http://www.rfc-editor.org/info/rfc2831", "http://www.rfc-editor.org/info/rfc3875", "https://www.rfc-editor.org/rfc/rfc5246.html", "https://dx.doi.org/10.17487/RFC5246", "http://www.rfc-editor.org/info/rfc5246", "https://www.rfc-editor.org/rfc/rfc6973.html", "https://dx.doi.org/10.17487/RFC6973", "http://www.rfc-editor.org/info/rfc6973", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://dx.doi.org/10.17487/RFC7231", "http://www.rfc-editor.org/info/rfc7231", "https://www.rfc-editor.org/rfc/rfc7615.html", "https://dx.doi.org/10.17487/RFC7615", "http://www.rfc-editor.org/info/rfc7615", "https://www.rfc-editor.org/rfc/rfc7616.html", "https://dx.doi.org/10.17487/RFC7616", "http://www.rfc-editor.org/info/rfc7616", "https://bugzilla.mozilla.org/show_bug.cgi?id=41489", "https://bugzilla.mozilla.org/show_bug.cgi?id=656213", "http://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc7639.html", "titulek": "RFC 7639 - The ALPN HTTP Header Field", "h1": "The ALPN HTTP Header Field", "popis": "This specification allows HTTP CONNECT requests to indicate what protocol is intended to be used within the tunnel once established, using the ALPN header field.", "klicova_slova": "HTTP CONNECT, Firewall, HTTP proxy", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7639", "og:description": "The ALPN HTTP Header Field", "og:url": "https://httpwg.org/specs/rfc7639.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of this Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Requirements Language"}, {"uroven": 2, "text": "2. The ALPN HTTP Header Field"}, {"uroven": 3, "text": "2.2. Syntax"}, {"uroven": 3, "text": "2.3. Usage"}, {"uroven": 2, "text": "3. IANA Considerations"}, {"uroven": 2, "text": "4. Security Considerations"}, {"uroven": 2, "text": "5. References"}, {"uroven": 3, "text": "5.1. Normative References"}, {"uroven": 3, "text": "5.2. Informative References"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis specification allows HTTP CONNECT requests to indicate what protocol is intended to be used within the tunnel once established, using the ALPN header field.\n\n## Status of this Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7639](http://www.rfc-editor.org/info/rfc7639).\n\n## Copyright Notice\n\nCopyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n - 1.1. Requirements Language\n- 2. The ALPN HTTP Header Field\n - 2.1. Header Field Values\n - 2.2. Syntax\n - 2.3. Usage\n- 3. IANA Considerations\n- 4. Security Considerations\n- 5. References\n - 5.1. Normative References\n - 5.2. Informative References\n- Authors' Addresses\n\n## 1. Introduction\n\nThe HTTP CONNECT method ([Section 4.3.6](https://www.rfc-editor.org/rfc/rfc7231.html#section-4.3.6) of [RFC7231]) requests that the recipient establish a tunnel to the identified origin server and thereafter forward packets, in both directions, until the tunnel is closed. Such tunnels are commonly used to create end-to-end virtual connections through one or more proxies.\n\nThe ALPN HTTP header field identifies the protocol or protocols that the client intends to use within a tunnel that is established using CONNECT. This uses the Application-Layer Protocol Negotiation (ALPN) identifier [RFC7301].\n\nFor a tunnel that is then secured using Transport Layer Security (TLS) [RFC5246], the header field carries the same application protocol label as will be carried within the TLS handshake [RFC7301]. If there are multiple possible application protocols, all of those application protocols are indicated.\n\nThe ALPN header field carries an indication of client intent only. An ALPN identifier is used here only to identify the application protocol or suite of protocols that the client intends to use in the tunnel. No negotiation takes place using this header field. In TLS, the final choice of application protocol is made by the server from the set of choices presented by the client. Other substrates could negotiate the application protocol differently.\n\nProxies do not implement the tunneled protocol, though they might choose to make policy decisions based on the value of the header field. For example, a proxy could use the application protocol to select appropriate traffic prioritization.\n\n### 1.1. Requirements Language\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in RFC 2119 [RFC2119].\n\n## 2. The ALPN HTTP Header Field\n\nClients include the ALPN header field in an HTTP CONNECT request to indicate the application-layer protocol that a client intends to use within the tunnel, or a set of protocols that might be used within the tunnel.\n\n### 2.2. Syntax\n\nThe ABNF (Augmented Backus-Naur Form) syntax for the ALPN header field value is given below. It uses the syntax defined in [Section 1.2](https://www.rfc-editor.org/rfc/rfc7230.html#section-1.2) of [RFC7230].\n\n```\nALPN = 1#protocol-id\nprotocol-id = token ; percent-encoded ALPN protocol identifier\n```\n\nALPN protocol names are octet sequences with no additional constraints on format. Octets not allowed in tokens ([RFC7230], [Section 3.2.6](https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.6)) MUST be percent-encoded as per [Section 2.1](https://www.rfc-editor.org/rfc/rfc3986.html#section-2.1) of [RFC3986]. Consequently, the octet representing the percent character \"%\" (hex 25) MUST be percent-encoded as well.\n\nIn order to have precisely one way to represent any ALPN protocol name, the following additional constraints apply:\n\n- Octets in the ALPN protocol MUST NOT be percent-encoded if they are valid token characters except \"%\".\n- When using percent-encoding, uppercase hex digits MUST be used.\n\nWith these constraints, recipients can apply simple string comparison to match protocol identifiers.\n\nFor example:\n\n```\n \n CONNECT www.example.com HTTP/1.1\n Host: www.example.com\n ALPN: h2, http%2F1.1\n \n```\n\n### 2.3. Usage\n\nWhen used in the ALPN header field, an ALPN identifier is used to identify an entire application protocol stack, not a single protocol layer or component.\n\nFor a CONNECT tunnel that conveys a protocol secured with TLS, the value of the ALPN header field contains the same list of ALPN identifiers that will be sent in the TLS ClientHello message [RFC7301].\n\nWhere no protocol negotiation is expected to occur, such as in protocols that do not use TLS, the ALPN header field contains a single ALPN protocol identifier corresponding to the application protocol that is intended to be used. If an alternative form of protocol negotiation is possible, the ALPN header field contains the set of protocols that might be negotiated.\n\nA proxy can use the value of the ALPN header field to more cleanly and efficiently reject requests for a CONNECT tunnel. Exposing protocol information at the HTTP layer allows a proxy to deny requests earlier, with better error reporting (such as a 403 status code). The ALPN header field can be falsified and therefore is not a sufficient basis for authorizing a request.\n\nA proxy could attempt to inspect packets to determine the protocol in use. This requires that the proxy understand each ALPN identifier. Protocols like TLS could hide negotiated protocols, or protocol negotiation details could change over time. Proxies SHOULD NOT break a CONNECT tunnel solely on the basis of a failure to recognize the protocol.\n\nA proxy can use the ALPN header field value to change how it manages or prioritizes connections.\n\n## 3. IANA Considerations\n\nHTTP header fields are registered within the \"Permanent Message Header Field Names\" registry maintained by IANA [MSG-HDRS]. This document defines and registers the ALPN header field, according to [RFC3864] as follows:\n\nHeader Field Name:\n\nALPN\n\nProtocol:\n\nhttp\n\nStatus:\n\nStandard\n\nReference:\n\nSection 2 of this document (RFC 7639)\n\nChange Controller:\n\nIETF (iesg@ietf.org) - Internet Engineering Task Force\n\n## 4. Security Considerations\n\nIn case of using HTTP CONNECT to a TURN (Traversal Using Relays around NAT, [RFC5766]) server, the security considerations of [Section 4.3.6](https://www.rfc-editor.org/rfc/rfc7231.html#section-4.3.6) of [RFC7231] apply. It states that there \"are significant risks in establishing a tunnel to arbitrary servers, particularly when the destination is a well-known or reserved TCP port that is not intended for Web traffic. ... Proxies that support CONNECT SHOULD restrict its use to a limited set of known ports or a configurable whitelist of safe request targets.\"\n\nThe ALPN header field described in this document is OPTIONAL. Clients and HTTP proxies could choose not to support it and therefore either fail to provide it or ignore it when present. If the header field is not available or is ignored, a proxy cannot identify the purpose of the tunnel and use this as input to any authorization decision regarding the tunnel. This is indistinguishable from the case where either client or proxy does not support the ALPN header field.\n\nThere is no confidentiality protection for the ALPN header field. ALPN identifiers that might expose confidential or sensitive information SHOULD NOT be sent, as described in [Section 5](https://www.rfc-editor.org/rfc/rfc7301.html#section-5) of [RFC7301].\n\nThe value of the ALPN header field could be falsified by a client. If the data being sent through the tunnel is encrypted (for example, with TLS [RFC5246]), then the proxy might not be able to directly inspect the data to verify that the claimed protocol is the one which is actually being used, though a proxy might be able to perform traffic analysis [TRAFFIC]. Therefore, a proxy cannot rely on the value of the ALPN header field as a policy input in all cases.\n\n## 5. References\n\n### 5.1. Normative References\n\n[RFC2119]\n\n[Bradner, S.](mailto:sob@harvard.edu), “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[http://www.rfc-editor.org/info/rfc2119](http://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC3864]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, [DOI 10.17487/RFC3864](https://dx.doi.org/10.17487/RFC3864), September 2004, <[http://www.rfc-editor.org/info/rfc3864](http://www.rfc-editor.org/info/rfc3864)>.\n\n[RFC3986]\n\n[Berners-Lee, T.](mailto:timbl@w3.org), [Fielding, R.](mailto:fielding@gbiv.com), and [L. Masinter](mailto:LMM@acm.org), “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[http://www.rfc-editor.org/info/rfc3986](http://www.rfc-editor.org/info/rfc3986)>.\n\n[RFC7230]\n\nFielding, R. and J. Reschke, “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[http://www.rfc-editor.org/info/rfc7230](http://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC7231]\n\nFielding, R. and J. Reschke, “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, [DOI 10.17487/RFC7231](https://dx.doi.org/10.17487/RFC7231), June 2014, <[http://www.rfc-editor.org/info/rfc7231](http://www.rfc-editor.org/info/rfc7231)>.\n\n[RFC7301]\n\nFriedl, S., Popov, A., Langley, A., and E. Stephan, “[Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension](https://www.rfc-editor.org/rfc/rfc7301.html)”, RFC 7301, [DOI 10.17487/RFC7301](https://dx.doi.org/10.17487/RFC7301), July 2014, <[http://www.rfc-editor.org/info/rfc7301](http://www.rfc-editor.org/info/rfc7301)>.\n\n### 5.2. Informative References\n\n[ALPN-IDS]\n\nIANA, “[Application-Layer Protocol Negotiation (ALPN) Protocol ID](http://www.iana.org/assignments/tls-extensiontype-values)”, <[http://www.iana.org/assignments/tls-extensiontype-values](http://www.iana.org/assignments/tls-extensiontype-values)>.\n\n[MSG-HDRS]\n\nIANA, “[Permanent Message Header Field Names>](https://www.iana.org/assignments/message-headers)”, <[https://www.iana.org/assignments/message-headers](https://www.iana.org/assignments/message-headers)>.\n\n[RFC5246]\n\nDierks, T. and E. Rescorla, “[The Transport Layer Security (TLS) Protocol Version 1.2](https://www.rfc-editor.org/rfc/rfc5246.html)”, RFC 5246, [DOI 10.17487/RFC5246](https://dx.doi.org/10.17487/RFC5246), August 2008, <[http://www.rfc-editor.org/info/rfc5246](http://www.rfc-editor.org/info/rfc5246)>.\n\n[RFC5766]\n\nMahy, R., Matthews, P., and J. Rosenberg, “[Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)](https://www.rfc-editor.org/rfc/rfc5766.html)”, RFC 5766, [DOI 10.17487/RFC5766](https://dx.doi.org/10.17487/RFC5766), April 2010, <[http://www.rfc-editor.org/info/rfc5766](http://www.rfc-editor.org/info/rfc5766)>.\n\n[TRAFFIC]\n\nPironti, A., Strub, P-Y., and K. Bhargavan, “[Identifying Website Users by TLS Traffic Analysis: New Attacks and Effective Countermeasures, Revision 1](https://alfredo.pironti.eu/research/publications/full/identifying-website-users-tls-traffic-analysis-new-attacks-and-effective-counterme)”, 2012, <[https://alfredo.pironti.eu/research/publications/full/identifying-website-users-tls-traffic-analysis-new-attacks-and-effective-counterme](https://alfredo.pironti.eu/research/publications/full/identifying-website-users-tls-traffic-analysis-new-attacks-and-effective-counterme)>.\n\n## Authors' Addresses\n\n**Andrew Hutton**\nUnify\nTechnology Drive\nNottingham, NG9 1LA\nUnited Kingdom\nEMail: [andrew.hutton@unify.com](mailto:andrew.hutton@unify.com)\n\n**Justin Uberti**\nGoogle\n747 6th Street South\nKirkland, WA 98033\nUnited States\nEMail: [justin@uberti.name](mailto:justin@uberti.name)\n\n**Martin Thomson**\nMozilla\n331 East Evelyn Avenue\nMountain View, CA 94041\nUnited States\nEMail: [martin.thomson@gmail.com](mailto:martin.thomson@gmail.com)", "znaku_textu": 13298, "slov": 1703, "odkazu": 94, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:12", "sha256": "8e9dbe18ace85ea511b623d8b56da36bcf21b23300ee8131d73b0decb8969f43", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7639", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/rfc/rfc7301.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "http://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://dx.doi.org/10.17487/RFC3864", "http://www.rfc-editor.org/info/rfc3864", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "http://www.rfc-editor.org/info/rfc3986", "https://dx.doi.org/10.17487/RFC7230", "http://www.rfc-editor.org/info/rfc7230", "https://dx.doi.org/10.17487/RFC7231", "http://www.rfc-editor.org/info/rfc7231", "https://dx.doi.org/10.17487/RFC7301", "http://www.rfc-editor.org/info/rfc7301", "http://www.iana.org/assignments/tls-extensiontype-values", "https://www.iana.org/assignments/message-headers", "https://www.rfc-editor.org/rfc/rfc5246.html", "https://dx.doi.org/10.17487/RFC5246", "http://www.rfc-editor.org/info/rfc5246", "https://www.rfc-editor.org/rfc/rfc5766.html", "https://dx.doi.org/10.17487/RFC5766", "http://www.rfc-editor.org/info/rfc5766", "https://alfredo.pironti.eu/research/publications/full/identifying-website-users-tls-traffic-analysis-new-attacks-and-effective-counterme"]} {"url": "https://httpwg.org/specs/rfc7694.html", "titulek": "RFC 7694 - Hypertext Transfer Protocol (HTTP) Client-Initiated Content-Encoding", "h1": "Hypertext Transfer Protocol (HTTP) Client-Initiated Content-Encoding", "popis": "In HTTP, content codings allow for payload encodings such as for compression or integrity checks. In particular, the \"gzip\" content coding is widely used for payload data sent in response messages. Content codings can be used in request messages as well; however, discoverability is not on par with response messages. This document extends the HTTP \"Accept-Encoding\" header field for use in responses, to indicate the content codings that are supported in requests.", "klicova_slova": "HTTP, content-encoding", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7694", "og:description": "Hypertext Transfer Protocol (HTTP) Client-Initiated Content-Encoding", "og:url": "https://httpwg.org/specs/rfc7694.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. Notational Conventions"}, {"uroven": 2, "text": "3. Using the 'Accept-Encoding' Header Field in Responses"}, {"uroven": 2, "text": "4. Example"}, {"uroven": 2, "text": "5. Deployment Considerations"}, {"uroven": 2, "text": "6. Security Considerations"}, {"uroven": 2, "text": "7. IANA Considerations"}, {"uroven": 3, "text": "7.2. Status Code Registry"}, {"uroven": 2, "text": "8. References"}, {"uroven": 3, "text": "8.1. Normative References"}, {"uroven": 3, "text": "8.2. Informative References"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nIn HTTP, content codings allow for payload encodings such as for compression or integrity checks. In particular, the \"gzip\" content coding is widely used for payload data sent in response messages.\n\nContent codings can be used in request messages as well; however, discoverability is not on par with response messages. This document extends the HTTP \"Accept-Encoding\" header field for use in responses, to indicate the content codings that are supported in requests.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7694](http://www.rfc-editor.org/info/rfc7694).\n\n## Copyright Notice\n\nCopyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n- 2. Notational Conventions\n- 3. Using the 'Accept-Encoding' Header Field in Responses\n- 4. Example\n- 5. Deployment Considerations\n- 6. Security Considerations\n- 7. IANA Considerations\n - 7.1. Header Field Registry\n - 7.2. Status Code Registry\n- 8. References\n - 8.1. Normative References\n - 8.2. Informative References\n- Acknowledgements\n- Author's Address\n\n## 1. Introduction\n\nIn HTTP, content codings allow for payload encodings such as for compression or integrity checks ([RFC7231], [Section 3.1.2](rfc7231.html#data.encoding)). In particular, the \"gzip\" content coding ([RFC7230], [Section 4.2](rfc7230.html#compression.codings)) is widely used for payload data sent in response messages.\n\nContent codings can be used in request messages as well; however, discoverability is not on par with response messages. This document extends the HTTP \"Accept-Encoding\" header field ([RFC7231], [Section 5.3.4](rfc7231.html#header.accept-encoding)) for use in responses, to indicate the content codings that are supported in requests. It furthermore updates the definition of status code 415 (Unsupported Media Type) ([RFC7231], [Section 6.5.13](rfc7231.html#status.415)), recommending that the \"Accept-Encoding\" header field be included when appropriate.\n\n## 2. Notational Conventions\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nThis document reuses terminology defined in the base HTTP specifications, namely [Section 2](rfc7230.html#architecture) of [RFC7230] and [Section 3.1.2](rfc7231.html#data.encoding) of [RFC7231].\n\n## 3. Using the 'Accept-Encoding' Header Field in Responses\n\n[Section 5.3.4](rfc7231.html#header.accept-encoding) of [RFC7231] defines \"Accept-Encoding\" as a request header field only.\n\nThis specification expands that definition to allow \"Accept-Encoding\" as a response header field as well. When present in a response, it indicates what content codings the resource was willing to accept in the associated request. A field value that only contains \"identity\" implies that no content codings were supported.\n\nNote that this information is specific to the associated request; the set of supported encodings might be different for other resources on the same server and could change over time or depend on other aspects of the request (such as the request method).\n\n[Section 6.5.13](rfc7231.html#status.415) of [RFC7231] defines status code 415 (Unsupported Media Type) to apply to problems related to both media types and content codings.\n\nServers that fail a request due to an unsupported content coding ought to respond with a 415 status and ought to include an \"Accept-Encoding\" header field in that response, allowing clients to distinguish between issues related to content codings and media types. In order to avoid confusion with issues related to media types, servers that fail a request with a 415 status for reasons unrelated to content codings *MUST NOT* include the \"Accept-Encoding\" header field.\n\nIt is expected that the most common use of \"Accept-Encoding\" in responses will have the 415 (Unsupported Media Type) status code, in response to optimistic use of a content coding by clients. However, the header field can also be used to indicate to clients that content codings are supported, to optimize future interactions. For example, a resource might include it in a 2xx response when the request payload was big enough to justify use of a compression coding but the client failed do so.\n\n## 4. Example\n\nA client submits a POST request using the \"compress\" content coding ([RFC7231], [Section 3.1.2.1](rfc7231.html#content.codings)):\n\n```\nPOST /edit/ HTTP/1.1\nHost: example.org\nContent-Type: application/atom+xml;type=entry\nContent-Encoding: compress\n\n...compressed payload...\n```\n\nThe server rejects the request because it only allows the \"gzip\" content coding:\n\n```\nHTTP/1.1 415 Unsupported Media Type\nDate: Fri, 09 May 2014 11:43:53 GMT\nAccept-Encoding: gzip\nContent-Length: 68\nContent-Type: text/plain\n\nThis resource only supports the \"gzip\" content coding in requests.\n```\n\nAt this point, the client can retry the request with the supported \"gzip\" content coding.\n\nAlternatively, a server that does not support any content codings in requests could answer with:\n\n```\nHTTP/1.1 415 Unsupported Media Type\nDate: Fri, 09 May 2014 11:43:53 GMT\nAccept-Encoding: identity\nContent-Length: 61\nContent-Type: text/plain\n\nThis resource does not support content codings in requests.\n```\n\n## 5. Deployment Considerations\n\nServers that do not support content codings in requests already are required to fail a request that uses a content coding. [Section 6.5.13](rfc7231.html#status.415) of [RFC7231] defines the status code 415 (Unsupported Media Type) for this purpose, so the only change needed is to include the \"Accept-Encoding\" header field with the value \"identity\" in that response.\n\nServers that do support some content codings are required to fail requests with unsupported content codings as well. To be compliant with this specification, servers will need to use the status code 415 (Unsupported Media Type) to signal the problem and will have to include an \"Accept-Encoding\" header field that enumerates the content codings that are supported. As the set of supported content codings is usually static and small, adding the header field ought to be trivial.\n\n## 6. Security Considerations\n\nThis specification only adds discovery of supported content codings and diagnostics for requests failing due to unsupported content codings. As such, it doesn't introduce any new security considerations over those already present in HTTP/1.1 ([Section 9](rfc7231.html#security.considerations) of [RFC7231]) and HTTP/2 ([Section 10](https://www.rfc-editor.org/rfc/rfc7540.html#section-10) of [RFC7540]).\n\nHowever, the point of better discoverability and diagnostics is to make it easier to use content codings in requests. This might lead to increased usage of compression codings such as gzip ([Section 4.2](rfc7230.html#compression.codings) of [RFC7230]), which, when used over a secure channel, can enable side-channel attacks such as BREACH (see [Section 10.6](https://www.rfc-editor.org/rfc/rfc7540.html#section-10.6) of [RFC7540] and [BREACH]). At the time of publication, it was unclear how BREACH-like attacks can be applied to compression in HTTP requests.\n\n## 7. IANA Considerations\n\n### 7.2. Status Code Registry\n\nHTTP status codes are registered within the \"HTTP Status Codes\" registry located at <[http://www.iana.org/assignments/http-status-codes](http://www.iana.org/assignments/http-status-codes)>.\n\nThis document updates the definition of the status code 415 (Unsupported Media Type). The \"HTTP Status Codes\" registry has been updated as follows:\n\n| Value | Description | Reference |\n| --- | --- | --- |\n| 415 | Unsupported Media Type | [Section 6.5.13](rfc7231.html#status.415) of [RFC7231] and Section 3 of this document |\n\n## 8. References\n\n### 8.1. Normative References\n\n[RFC2119]\n\n[Bradner, S.](mailto:sob@harvard.edu), “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[http://www.rfc-editor.org/info/rfc2119](http://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC7230]\n\n[Fielding, R., Ed.](mailto:fielding@gbiv.com) and [J. Reschke, Ed.](mailto:julian.reschke@greenbytes.de), “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[http://www.rfc-editor.org/info/rfc7230](http://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC7231]\n\n[Fielding, R., Ed.](mailto:fielding@gbiv.com) and [J. Reschke, Ed.](mailto:julian.reschke@greenbytes.de), “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, [DOI 10.17487/RFC7231](https://dx.doi.org/10.17487/RFC7231), June 2014, <[http://www.rfc-editor.org/info/rfc7231](http://www.rfc-editor.org/info/rfc7231)>.\n\n### 8.2. Informative References\n\n[BCP90]\n\n[Klyne, G.](mailto:GK-IETF@ninebynine.org), [Nottingham, M.](mailto:mnot@pobox.com), and [J. Mogul](mailto:JeffMogul@acm.org), “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004, <[http://www.rfc-editor.org/info/bcp90](http://www.rfc-editor.org/info/bcp90)>.\n\n[BREACH]\n\nGluck, Y., Harris, N., and A. Prado, “[BREACH: Reviving the CRIME Attack](http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf)”, July 2013, <[http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf](http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf)>.\n\n[RFC7540]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol Version 2 (HTTP/2)](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[http://www.rfc-editor.org/info/rfc7540](http://www.rfc-editor.org/info/rfc7540)>.\n\n## Acknowledgements\n\nThanks go to the Hypertext Transfer Protocol Working Group participants, namely Amos Jeffries, Ben Campbell, Mark Nottingham, Pete Resnick, Stephen Farrell, and Ted Hardie.\n\n## Author's Address\n\n**Julian F. Reschke**\ngreenbytes GmbH\nHafenweg 16\nMuenster, NW 48155\nGermany\nEmail: [julian.reschke@greenbytes.de](mailto:julian.reschke@greenbytes.de)\nURI: [http://greenbytes.de/tech/webdav/](http://greenbytes.de/tech/webdav/)", "znaku_textu": 11476, "slov": 1451, "odkazu": 86, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:06", "sha256": "47dfa1534b35699aa7ff50656eeec855b5e4be601b35f2bf0afa5e166386a368", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7694", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc7540.html", "http://www.iana.org/assignments/message-headers", "http://www.iana.org/assignments/http-status-codes", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "http://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://dx.doi.org/10.17487/RFC7230", "http://www.rfc-editor.org/info/rfc7230", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://dx.doi.org/10.17487/RFC7231", "http://www.rfc-editor.org/info/rfc7231", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "http://www.rfc-editor.org/info/bcp90", "http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf", "https://dx.doi.org/10.17487/RFC7540", "http://www.rfc-editor.org/info/rfc7540", "http://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc7725.html", "titulek": "RFC 7725 - An HTTP Status Code to Report Legal Obstacles", "h1": "An HTTP Status Code to Report Legal Obstacles", "popis": "This document specifies a Hypertext Transfer Protocol (HTTP) status code for use when resource access is denied as a consequence of legal demands.", "klicova_slova": "HTTP", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7725", "og:description": "An HTTP Status Code to Report Legal Obstacles", "og:url": "https://httpwg.org/specs/rfc7725.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of this Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. Requirements"}, {"uroven": 2, "text": "3. 451 Unavailable For Legal Reasons"}, {"uroven": 2, "text": "4. Identifying Blocking Entities"}, {"uroven": 2, "text": "5. Security Considerations"}, {"uroven": 2, "text": "6. IANA Considerations"}, {"uroven": 2, "text": "7. References"}, {"uroven": 3, "text": "7.1. Normative References"}, {"uroven": 3, "text": "7.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Acknowledgements"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThis document specifies a Hypertext Transfer Protocol (HTTP) status code for use when resource access is denied as a consequence of legal demands.\n\n## Status of this Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7725](http://www.rfc-editor.org/info/rfc7725).\n\n## Copyright Notice\n\nCopyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n- 2. Requirements\n- 3. 451 Unavailable For Legal Reasons\n- 4. Identifying Blocking Entities\n- 5. Security Considerations\n- 6. IANA Considerations\n- 7. References\n - 7.1. Normative References\n - 7.2. Informative References\n- Appendix A. Acknowledgements\n- Author's Address\n\n## 1. Introduction\n\nThis document specifies a Hypertext Transfer Protocol (HTTP) status code for use when a server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.\n\nThis status code can be used to provide transparency in circumstances where issues of law or public policy affect server operations. This transparency may be beneficial both to these operators and to end users.\n\n[RFC4924] discusses the forces working against transparent operation of the Internet; these clearly include legal interventions to restrict access to content. As that document notes, and as [Section 4](https://www.rfc-editor.org/rfc/rfc4084.html#section-4) of [RFC4084] states, such restrictions should be made explicit.\n\n## 2. Requirements\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\n## 3. 451 Unavailable For Legal Reasons\n\nThis status code indicates that the server is denying access to the resource as a consequence of a legal demand.\n\nThe server in question might not be an origin server. This type of legal demand typically most directly affects the operations of ISPs and search engines.\n\nResponses using this status code *SHOULD* include an explanation, in the response body, of the details of the legal demand: the party making it, the applicable legislation or regulation, and what classes of person and resource it applies to. For example:\n\n```\nHTTP/1.1 451 Unavailable For Legal Reasons\nLink: ; rel=\"blocked-by\"\nContent-Type: text/html\n\n\n Unavailable For Legal Reasons\n \n

Unavailable For Legal Reasons

\n

This request may not be serviced in the Roman Province \n of Judea due to the Lex Julia Majestatis, which disallows \n access to resources hosted on servers deemed to be \n operated by the People's Front of Judea.

\n \n\n```\n\nThe use of the 451 status code implies neither the existence nor nonexistence of the resource named in the request. That is to say, it is possible that if the legal demands were removed, a request for the resource still might not succeed.\n\nNote that in many cases clients can still access the denied resource by using technical countermeasures such as a VPN or the Tor network.\n\nA 451 response is cacheable by default, i.e., unless otherwise indicated by the method definition or explicit cache controls; see [RFC7234].\n\n## 4. Identifying Blocking Entities\n\nAs noted above, when an attempt to access a resource fails with status 451, the entity blocking access might or might not be the origin server. There are a variety of entities in the resource-access path that could choose to deny access — for example, ISPs, cache providers, and DNS servers.\n\nIt is useful, when legal blockages occur, to be able to identify the entities actually implementing the blocking.\n\nWhen an entity blocks access to a resource and returns status 451, it *SHOULD* include a \"Link\" HTTP header field [RFC5988] whose value is a URI reference [RFC3986] identifying itself. When used for this purpose, the \"Link\" header field *MUST* have a \"rel\" parameter whose value is \"blocked-by\".\n\nThe intent is that the header be used to identify the entity actually implementing blockage, not any other entity mandating it. A human-readable response body, as discussed above, is the appropriate location for discussion of administrative and policy issues.\n\n## 5. Security Considerations\n\nClients cannot rely upon the use of the 451 status code. It is possible that certain legal authorities might wish to avoid transparency, and not only demand the restriction of access to certain resources, but also avoid disclosing that the demand was made.\n\n## 6. IANA Considerations\n\nThe HTTP Status Codes Registry has been updated with the following entry:\n\n- Code: 451\n- Description: Unavailable For Legal Reasons\n- Specification: RFC 7725\n\nThe Link Relation Type Registry has been updated with the following entry:\n\n- Relation Name: blocked-by\n- Description: Identifies the entity that blocks access to a resource following receipt of a legal demand.\n- Reference: RFC 7725\n\n## 7. References\n\n### 7.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC3986]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[https://www.rfc-editor.org/info/rfc3986](https://www.rfc-editor.org/info/rfc3986)>.\n\n[RFC5988]\n\nNottingham, M., “[Web Linking](https://www.rfc-editor.org/rfc/rfc5988.html)”, RFC 5988, [DOI 10.17487/RFC5988](https://dx.doi.org/10.17487/RFC5988), October 2010, <[https://www.rfc-editor.org/info/rfc5988](https://www.rfc-editor.org/info/rfc5988)>.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, [DOI 10.17487/RFC7234](https://dx.doi.org/10.17487/RFC7234), June 2014, <[https://www.rfc-editor.org/info/rfc7234](https://www.rfc-editor.org/info/rfc7234)>.\n\n### 7.2. Informative References\n\n[RFC4084]\n\nKlensin, J., “[Terminology for Describing Internet Connectivity](https://www.rfc-editor.org/rfc/rfc4084.html)”, [BCP 104](https://www.rfc-editor.org/info/bcp104), RFC 4084, [DOI 10.17487/RFC4084](https://dx.doi.org/10.17487/RFC4084), May 2005, <[https://www.rfc-editor.org/info/rfc4084](https://www.rfc-editor.org/info/rfc4084)>.\n\n[RFC4924]\n\nAboba, B., Ed. and E. Davies, “[Reflections on Internet Transparency](https://www.rfc-editor.org/rfc/rfc4924.html)”, RFC 4924, [DOI 10.17487/RFC4924](https://dx.doi.org/10.17487/RFC4924), July 2007, <[https://www.rfc-editor.org/info/rfc4924](https://www.rfc-editor.org/info/rfc4924)>.\n\n## Appendix A. Acknowledgements\n\nThanks to Terence Eden, who observed that the existing status code 403 was not really suitable for this situation, and suggested the creation of a new status code.\n\nThanks also to Ray Bradbury.\n\n## Author's Address\n\n**Tim Bray**\nTextuality\nEMail: [tbray@textuality.com](mailto:tbray@textuality.com)\nURI: [http://www.tbray.org/ongoing/](http://www.tbray.org/ongoing/)", "znaku_textu": 8427, "slov": 1103, "odkazu": 69, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:57", "sha256": "bd7d76d5d7ae9e1cecb01ee35d6c336751decb558f1e49a83e0548b6eb5711cd", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7725", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc4084.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "https://www.rfc-editor.org/info/rfc3986", "https://www.rfc-editor.org/rfc/rfc5988.html", "https://dx.doi.org/10.17487/RFC5988", "https://www.rfc-editor.org/info/rfc5988", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://dx.doi.org/10.17487/RFC7234", "https://www.rfc-editor.org/info/rfc7234", "https://www.rfc-editor.org/info/bcp104", "https://dx.doi.org/10.17487/RFC4084", "https://www.rfc-editor.org/info/rfc4084", "https://www.rfc-editor.org/rfc/rfc4924.html", "https://dx.doi.org/10.17487/RFC4924", "https://www.rfc-editor.org/info/rfc4924", "http://www.tbray.org/ongoing/"]} {"url": "https://httpwg.org/specs/rfc7838.html", "titulek": "RFC 7838 - HTTP Alternative Services", "h1": "HTTP Alternative Services", "popis": "This document specifies \"Alternative Services\" for HTTP, which allow an origin's resources to be authoritatively available at a separate network location, possibly accessed with a different protocol configuration.", "klicova_slova": "HTTP, ALPN, Alternative Services", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC7838", "og:description": "HTTP Alternative Services", "og:url": "https://httpwg.org/specs/rfc7838.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "2. Alternative Services Concepts"}, {"uroven": 3, "text": "2.1. Host Authentication"}, {"uroven": 3, "text": "2.2. Alternative Service Caching"}, {"uroven": 3, "text": "2.3. Requiring Server Name Indication"}, {"uroven": 3, "text": "2.4. Using Alternative Services"}, {"uroven": 2, "text": "3. The Alt-Svc HTTP Header Field"}, {"uroven": 2, "text": "4. The ALTSVC HTTP/2 Frame"}, {"uroven": 2, "text": "5. The Alt-Used HTTP Header Field"}, {"uroven": 2, "text": "6. The 421 (Misdirected Request) HTTP Status Code"}, {"uroven": 2, "text": "7. IANA Considerations"}, {"uroven": 3, "text": "7.2. The ALTSVC HTTP/2 Frame Type"}, {"uroven": 3, "text": "7.3. Alt-Svc Parameter Registry"}, {"uroven": 4, "text": "7.3.1. Procedure"}, {"uroven": 4, "text": "7.3.2. Registrations"}, {"uroven": 2, "text": "8. Internationalization Considerations"}, {"uroven": 2, "text": "9. Security Considerations"}, {"uroven": 3, "text": "9.1. Changing Ports"}, {"uroven": 3, "text": "9.2. Changing Hosts"}, {"uroven": 3, "text": "9.3. Changing Protocols"}, {"uroven": 3, "text": "9.4. Tracking Clients Using Alternative Services"}, {"uroven": 3, "text": "9.5. Confusion regarding Request Scheme"}, {"uroven": 2, "text": "10. References"}, {"uroven": 3, "text": "10.1. Normative References"}, {"uroven": 3, "text": "10.2. Informative References"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document specifies \"Alternative Services\" for HTTP, which allow an origin's resources to be authoritatively available at a separate network location, possibly accessed with a different protocol configuration.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 5741](https://www.rfc-editor.org/rfc/rfc5741.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc7838](http://www.rfc-editor.org/info/rfc7838).\n\n## Copyright Notice\n\nCopyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. Alternative Services Concepts\n - 2.1. Host Authentication\n - 2.2. Alternative Service Caching\n - 2.3. Requiring Server Name Indication\n - 2.4. Using Alternative Services\n- 3. The Alt-Svc HTTP Header Field\n - 3.1. Caching Alt-Svc Header Field Values\n- 4. The ALTSVC HTTP/2 Frame\n- 5. The Alt-Used HTTP Header Field\n- 6. The 421 (Misdirected Request) HTTP Status Code\n- 7. IANA Considerations\n - 7.1. Header Field Registrations\n - 7.2. The ALTSVC HTTP/2 Frame Type\n - 7.3. Alt-Svc Parameter Registry\n - 7.3.1. Procedure\n - 7.3.2. Registrations\n- 8. Internationalization Considerations\n- 9. Security Considerations\n - 9.1. Changing Ports\n - 9.2. Changing Hosts\n - 9.3. Changing Protocols\n - 9.4. Tracking Clients Using Alternative Services\n - 9.5. Confusion regarding Request Scheme\n- 10. References\n - 10.1. Normative References\n - 10.2. Informative References\n- Acknowledgements\n- Authors' Addresses\n\n## 1. Introduction\n\nHTTP [RFC7230] conflates the identification of resources with their location. In other words, \"http://\" and \"https://\" URIs are used to both name and find things to interact with.\n\nIn some cases, it is desirable to separate identification and location in HTTP; keeping the same identifier for a resource, but interacting with it at a different location on the network.\n\nFor example:\n\n- An origin server might wish to redirect a client to a different server when it is under load, or it has found a server in a location that is more local to the client.\n- An origin server might wish to offer access to its resources using a new protocol, such as HTTP/2 [RFC7540] , or one using improved security, such as Transport Layer Security (TLS) [RFC5246] .\n- An origin server might wish to segment its clients into groups of capabilities, such as those supporting Server Name Indication (SNI) ( [Section 3](https://www.rfc-editor.org/rfc/rfc6066.html#section-3) of [RFC6066] ), for operational purposes.\n\nThis specification defines a new concept in HTTP, \"Alternative Services\", that allows an origin server to nominate additional means of interacting with it on the network. It defines a general framework for this in Section 2, along with specific mechanisms for advertising their existence using HTTP header fields (Section 3) or HTTP/2 frames (Section 4), plus a way to indicate that an alternative service was used (Section 5).\n\nIt also endorses the status code 421 (Misdirected Request) (Section 6) that origin servers or their nominated alternatives can use to indicate that they are not authoritative for a given origin, in cases where the wrong location is used.\n\n### 1.1. Notational Conventions\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC2119].\n\nThis document uses the Augmented BNF defined in [RFC5234] and updated by [RFC7405] along with the \"#rule\" extension defined in [Section 7](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230.html#abnf.extension) of [RFC7230]. The rules below are defined in [RFC5234], [RFC7230], and [RFC7234]:\n\n```\nOWS = \ndelta-seconds = \nport = \nquoted-string = \ntoken = \nuri-host = \n```\n\n## 2. Alternative Services Concepts\n\nThis specification defines a new concept in HTTP, the \"Alternative Service\". When an origin [RFC6454] has resources that are accessible through a different protocol/host/port combination, it is said to have an alternative service available.\n\nAn alternative service can be used to interact with the resources on an origin server at a separate location on the network, possibly using a different protocol configuration. Alternative services are considered authoritative for an origin's resources, in the sense of [RFC7230], [Section 9.1](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230.html#establishing.authority).\n\nFor example, an origin:\n\n```\n(\"http\", \"www.example.com\", \"80\")\n```\n\nmight declare that its resources are also accessible at the alternative service:\n\n```\n(\"h2\", \"new.example.com\", \"81\")\n```\n\nBy their nature, alternative services are explicitly at the granularity of an origin; they cannot be selectively applied to resources within an origin.\n\nAlternative services do not replace or change the origin for any given resource; in general, they are not visible to the software \"above\" the access mechanism. The alternative service is essentially alternative routing information that can also be used to reach the origin in the same way that DNS CNAME or SRV records define routing information at the name resolution level. Each origin maps to a set of these routes — the default route is derived from the origin itself and the other routes are introduced based on alternative-service information.\n\nFurthermore, it is important to note that the first member of an alternative service tuple is different from the \"scheme\" component of an origin; it is more specific, identifying not only the major version of the protocol being used, but potentially the communication options for that protocol as well.\n\nThis means that clients using an alternative service can change the host, port, and protocol that they are using to fetch resources, but these changes *MUST NOT* be propagated to the application that is using HTTP; from that standpoint, the URI being accessed and all information derived from it (scheme, host, and port) are the same as before.\n\nImportantly, this includes its security context; in particular, when TLS [RFC5246] is used to authenticate, the alternative service will need to present a certificate for the origin's host name, not that of the alternative. Likewise, the Host header field ([RFC7230], [Section 5.4](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230.html#header.host)) is still derived from the origin, not the alternative service (just as it would if a CNAME were being used).\n\nThe changes *MAY*, however, be made visible in debugging tools, consoles, etc.\n\nFormally, an alternative service is identified by the combination of:\n\n- An Application Layer Protocol Negotiation (ALPN) protocol name, as per [RFC7301]\n- A host, as per [RFC3986] , [Section 3.2.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2)\n- A port, as per [RFC3986] , [Section 3.2.3](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.3)\n\nThe ALPN protocol name is used to identify the application protocol or suite of protocols used by the alternative service. Note that for the purpose of this specification, an ALPN protocol name implicitly includes TLS in the suite of protocols it identifies, unless specified otherwise in its definition. In particular, the ALPN name \"http/1.1\", registered by [Section 6](https://www.rfc-editor.org/rfc/rfc7301.html#section-6) of [RFC7301], identifies HTTP/1.1 over TLS.\n\nAdditionally, each alternative service *MUST* have a freshness lifetime, expressed in seconds (see Section 2.2).\n\nThere are many ways that a client could discover the alternative service(s) associated with an origin. This document describes two such mechanisms: the \"Alt-Svc\" HTTP header field (Section 3) and the \"ALTSVC\" HTTP/2 frame type (Section 4).\n\nThe remainder of this section describes requirements that are common to alternative services, regardless of how they are discovered.\n\n### 2.1. Host Authentication\n\nClients *MUST* have reasonable assurances that the alternative service is under control of and valid for the whole origin. This mitigates the attack described in Section 9.2.\n\nFor the purposes of this document, \"reasonable assurances\" can be established through use of a TLS-based protocol with the certificate checks defined in [RFC2818]. Clients *MAY* impose additional criteria for establishing reasonable assurances.\n\nFor example, if the origin's host is \"www.example.com\" and an alternative is offered on \"other.example.com\" with the \"h2\" protocol, and the certificate offered is valid for \"www.example.com\", the client can use the alternative. However, if either is offered with the \"h2c\" protocol, the client cannot use it, because there is no mechanism (at the time of the publication of this specification) in that protocol to establish the relationship between the origin and the alternative.\n\n### 2.2. Alternative Service Caching\n\nMechanisms for discovering alternative services also associate a freshness lifetime with them; for example, the Alt-Svc header field uses the \"ma\" parameter.\n\nClients can choose to use an alternative service instead of the origin at any time when it is considered fresh; see Section 2.4 for specific recommendations.\n\nClients with existing connections to an alternative service do not need to stop using it when its freshness lifetime ends; the caching mechanism is intended for limiting how long an alternative service can be used for establishing new connections, not limiting the use of existing ones.\n\nAlternative services are fully authoritative for the origin in question, including the ability to clear or update cached alternative service entries, extend freshness lifetimes, and any other authority the origin server would have.\n\nWhen alternative services are used to send a client to the most optimal server, a change in network configuration can result in cached values becoming suboptimal. Therefore, clients *SHOULD* remove from cache all alternative services that lack the \"persist\" flag with the value \"1\" when they detect such a change, when information about network state is available.\n\n### 2.3. Requiring Server Name Indication\n\nA client *MUST NOT* use a TLS-based alternative service unless the client supports TLS Server Name Indication (SNI). This supports the conservation of IP addresses on the alternative service host.\n\nNote that the SNI information provided in TLS by the client will be that of the origin, not the alternative (as will the Host HTTP header field value).\n\n### 2.4. Using Alternative Services\n\nBy their nature, alternative services are *OPTIONAL*: clients do not need to use them. However, it is advantageous for clients to behave in a predictable way when alternative services are used by servers, to aid in purposes like load balancing.\n\nTherefore, if a client supporting this specification becomes aware of an alternative service, the client *SHOULD* use that alternative service for all requests to the associated origin as soon as it is available, provided the alternative service information is fresh (Section 2.2) and the security properties of the alternative service protocol are desirable, as compared to the existing connection. A viable alternative service is then treated in every way as the origin; this includes the ability to advertise alternative services.\n\nIf a client becomes aware of multiple alternative services, it chooses the most suitable according to its own criteria, keeping security properties in mind. For example, an origin might advertise multiple alternative services to notify clients of support for multiple versions of HTTP.\n\nA client configured to use a proxy for a given request *SHOULD NOT* directly connect to an alternative service for this request, but instead route it through that proxy.\n\nWhen a client uses an alternative service for a request, it can indicate this to the server using the Alt-Used header field (Section 5).\n\nThe client does not need to block requests on any existing connection; it can be used until the alternative connection is established. However, if the security properties of the existing connection are weak (for example, cleartext HTTP/1.1), then it might make sense to block until the new connection is fully available in order to avoid information leakage.\n\nFurthermore, if the connection to the alternative service fails or is unresponsive, the client *MAY* fall back to using the origin or another alternative service. Note, however, that this could be the basis of a downgrade attack, thus losing any enhanced security properties of the alternative service. If the connection to the alternative service does not negotiate the expected protocol (for example, ALPN fails to negotiate h2, or an Upgrade request to h2c is not accepted), the connection to the alternative service *MUST* be considered to have failed.\n\n## 3. The Alt-Svc HTTP Header Field\n\nAn HTTP(S) origin server can advertise the availability of alternative services to clients by adding an Alt-Svc header field to responses.\n\n```\nAlt-Svc = clear / 1#alt-value\nclear = %s\"clear\"; \"clear\", case-sensitive\nalt-value = alternative *( OWS \";\" OWS parameter )\nalternative = protocol-id \"=\" alt-authority\nprotocol-id = token ; percent-encoded ALPN protocol name\nalt-authority = quoted-string ; containing [ uri-host ] \":\" port\nparameter = token \"=\" ( token / quoted-string )\n```\n\nThe field value consists either of a list of values, each of which indicates one alternative service, or the keyword \"clear\".\n\nA field value containing the special value \"clear\" indicates that the origin requests all alternatives for that origin to be invalidated (including those specified in the same response, in case of an invalid reply containing both \"clear\" and alternative services).\n\nALPN protocol names are octet sequences with no additional constraints on format. Octets not allowed in tokens ([RFC7230], [Section 3.2.6](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230.html#field.components)) *MUST* be percent-encoded as per [Section 2.1](https://www.rfc-editor.org/rfc/rfc3986.html#section-2.1) of [RFC3986]. Consequently, the octet representing the percent character \"%\" (hex 25) *MUST* be percent-encoded as well.\n\nIn order to have precisely one way to represent any ALPN protocol name, the following additional constraints apply:\n\n1. Octets in the ALPN protocol name *MUST NOT* be percent-encoded if they are valid token characters except \"%\", and\n2. When using percent-encoding, uppercase hex digits *MUST* be used.\n\nWith these constraints, recipients can apply simple string comparison to match protocol identifiers.\n\nThe \"alt-authority\" component consists of an *OPTIONAL* uri-host (\"host\" in [Section 3.2.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2) of [RFC3986]), a colon (\":\"), and a port number.\n\nFor example:\n\n```\nAlt-Svc: h2=\":8000\"\n```\n\nThis indicates the \"h2\" protocol ([RFC7540]) on the same host using the indicated port 8000.\n\nAn example involving a change of host:\n\n```\nAlt-Svc: h2=\"new.example.org:80\"\n```\n\nThis indicates the \"h2\" protocol on the host \"new.example.org\", running on port 80. Note that the \"quoted-string\" syntax needs to be used because \":\" is not an allowed character in \"token\".\n\nExamples for protocol name escaping:\n\n| ALPN protocol name | protocol-id | Note |\n| --- | --- | --- |\n| h2 | h2 | No escaping needed |\n| w=x:y#z | w%3Dx%3Ay#z | \"=\" and \":\" escaped |\n| x%y | x%25y | \"%\" needs escaping |\n\nAlt-Svc *MAY* occur in any HTTP response message, regardless of the status code. Note that recipients of Alt-Svc can ignore the header field (and are required to in some situations; see Sections 2.1 and 6).\n\nThe Alt-Svc field value can have multiple values:\n\n```\nAlt-Svc: h2=\"alt.example.com:8000\", h2=\":443\"\n```\n\nWhen multiple values are present, the order of the values reflects the server's preference (with the first value being the most preferred alternative).\n\nThe value(s) advertised by Alt-Svc can be used by clients to open a new connection to an alternative service. Subsequent requests can start using this new connection immediately or can continue using the existing connection while the new connection is created.\n\nWhen using HTTP/2 ([RFC7540]), servers *SHOULD* instead send an ALTSVC frame (Section 4). A single ALTSVC frame can be sent for a connection; a new frame is not needed for every request. Note that, despite this recommendation, Alt-Svc header fields remain valid in responses delivered over HTTP/2.\n\nEach \"alt-value\" is followed by an *OPTIONAL* semicolon-separated list of additional parameters, each such \"parameter\" comprising a name and a value.\n\nThis specification defines two parameters: \"ma\" and \"persist\", defined in Section 3.1. Unknown parameters *MUST* be ignored. That is, the values (alt-value) they appear in *MUST* be processed as if the unknown parameter was not present.\n\nNew parameters can be defined in extension specifications (see Section 7.3 for registration details).\n\nNote that all field elements that allow \"quoted-string\" syntax *MUST* be processed as per [Section 3.2.6](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230.html#field.components) of [RFC7230].\n\n## 4. The ALTSVC HTTP/2 Frame\n\nThe ALTSVC HTTP/2 frame ([RFC7540], [Section 4](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7540.html#FramingLayer)) advertises the availability of an alternative service to an HTTP/2 client.\n\nThe ALTSVC frame is a non-critical extension to HTTP/2. Endpoints that do not support this frame will ignore it (as per the extensibility rules defined in [Section 4.1](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7540.html#rfc.section.4.1) of [RFC7540]).\n\nAn ALTSVC frame from a server to a client on a stream other than stream 0 indicates that the conveyed alternative service is associated with the origin of that stream.\n\nAn ALTSVC frame from a server to a client on stream 0 indicates that the conveyed alternative service is associated with the origin contained in the Origin field of the frame. An association with an origin that the client does not consider authoritative for the current connection *MUST* be ignored.\n\nThe ALTSVC frame type is 0xa (decimal 10).\n\n```\n +-------------------------------+-------------------------------+\n | Origin-Len (16) | Origin? (*) ...\n +-------------------------------+-------------------------------+\n | Alt-Svc-Field-Value (*) ...\n +---------------------------------------------------------------+\n```\n\nFigure 1: ALTSVC Frame Payload\n\nThe ALTSVC frame contains the following fields:\n\nOrigin-Len:\n\nAn unsigned, 16-bit integer indicating the length, in octets, of the Origin field.\n\nOrigin:\n\nAn *OPTIONAL* sequence of characters containing the ASCII serialization of an origin ([RFC6454], [Section 6.2](https://www.rfc-editor.org/rfc/rfc6454.html#section-6.2)) to which the alternative service is applicable.\n\nAlt-Svc-Field-Value:\n\nA sequence of octets (length determined by subtracting the length of all preceding fields from the frame length) containing a value identical to the Alt-Svc field value defined in Section 3 (ABNF production \"Alt-Svc\").\n\nThe ALTSVC frame does not define any flags.\n\nThe ALTSVC frame is intended for receipt by clients. A device acting as a server *MUST* ignore it.\n\nAn ALTSVC frame on stream 0 with empty (length 0) \"Origin\" information is invalid and *MUST* be ignored. An ALTSVC frame on a stream other than stream 0 containing non-empty \"Origin\" information is invalid and *MUST* be ignored.\n\nThe ALTSVC frame is processed hop-by-hop. An intermediary *MUST NOT* forward ALTSVC frames, though it can use the information contained in ALTSVC frames in forming new ALTSVC frames to send to its own clients.\n\nReceiving an ALTSVC frame is semantically equivalent to receiving an Alt-Svc header field. As a result, the ALTSVC frame causes alternative services for the corresponding origin to be replaced. Note that it would be unwise to mix the use of Alt-Svc header fields with the use of ALTSVC frames, as the sequence of receipt might be hard to predict.\n\n## 5. The Alt-Used HTTP Header Field\n\nThe Alt-Used header field is used in requests to identify the alternative service in use, just as the Host header field ([Section 5.4](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230.html#header.host) of [RFC7230]) identifies the host and port of the origin.\n\n```\nAlt-Used = uri-host [ \":\" port ]\n```\n\nAlt-Used is intended to allow alternative services to detect loops, differentiate traffic for purposes of load balancing, and generally to ensure that it is possible to identify the intended destination of traffic, since introducing this information after a protocol is in use has proven to be problematic.\n\nWhen using an alternative service, clients *SHOULD* include an Alt-Used header field in all requests.\n\nFor example:\n\n```\nGET /thing HTTP/1.1\nHost: origin.example.com\nAlt-Used: alternate.example.net\n```\n\n## 6. The 421 (Misdirected Request) HTTP Status Code\n\nThe 421 (Misdirected Request) status code is defined in [Section 9.1.2](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7540.html#MisdirectedRequest) of [RFC7540] to indicate that the current server instance is not authoritative for the requested resource. This can be used to indicate that an alternative service is not authoritative; see Section 2).\n\nClients receiving 421 (Misdirected Request) from an alternative service *MUST* remove the corresponding entry from its alternative service cache (see Section 2.2) for that origin. Regardless of the idempotency of the request method, they *MAY* retry the request, either at another alternative server, or at the origin.\n\nAn Alt-Svc header field in a 421 (Misdirected Request) response *MUST* be ignored.\n\n## 7. IANA Considerations\n\n### 7.2. The ALTSVC HTTP/2 Frame Type\n\nThis document registers the ALTSVC frame type in the \"HTTP/2 Frame Type\" registry ([RFC7540], [Section 11.2](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7540.html#iana-frames)).\n\n- Frame Type: ALTSVC\n- Code: 0xa\n- Specification: Section 4 of this document\n\n### 7.3. Alt-Svc Parameter Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Alt-Svc Parameter Registry\" defines the name space for parameters. It has been created and will be maintained at <[http://www.iana.org/assignments/http-alt-svc-parameters](http://www.iana.org/assignments/http-alt-svc-parameters)>.\n\n#### 7.3.1. Procedure\n\nA registration *MUST* include the following fields:\n\n- Parameter Name\n- Pointer to specification text\n\nValues to be added to this name space require Expert Review (see [RFC5226], [Section 4.1](https://www.rfc-editor.org/rfc/rfc5226.html#section-4.1)).\n\n#### 7.3.2. Registrations\n\nThe \"Hypertext Transfer Protocol (HTTP) Alt-Svc Parameter Registry\" has been populated with the registrations below:\n\n| Alt-Svc Parameter | Reference |\n| --- | --- |\n| ma | Section 3.1 |\n| persist | Section 3.1 |\n\n## 8. Internationalization Considerations\n\nAn internationalized domain name that appears in either the header field (Section 3) or the HTTP/2 frame (Section 4) *MUST* be expressed using A-labels ([RFC5890], [Section 2.3.2.1](https://www.rfc-editor.org/rfc/rfc5890.html#section-2.3.2.1)).\n\n## 9. Security Considerations\n\n### 9.1. Changing Ports\n\nUsing an alternative service implies accessing an origin's resources on an alternative port, at a minimum. Therefore, an attacker that can inject alternative services and listen at the advertised port is able to hijack an origin. On certain servers, it is normal for users to be able to control some personal pages available on a shared port and also to accept requests on less-privileged ports.\n\nFor example, an attacker that can add HTTP response header fields to some pages can redirect traffic for an entire origin to a different port on the same host using the Alt-Svc header field; if that port is under the attacker's control, they can thus masquerade as the HTTP server.\n\nThis risk is mitigated by the requirements in Section 2.1.\n\nOn servers, this risk can also be reduced by restricting the ability to advertise alternative services, and restricting who can open a port for listening on that host.\n\n### 9.2. Changing Hosts\n\nWhen the host is changed due to the use of an alternative service, this presents an opportunity for attackers to hijack communication to an origin.\n\nFor example, if an attacker can convince a user agent to send all traffic for \"innocent.example.org\" to \"evil.example.com\" by successfully associating it as an alternative service, they can masquerade as that origin. This can be done locally (see mitigations in Section 9.1) or remotely (e.g., by an intermediary as a man-in-the-middle attack).\n\nThis is the reason for the requirement in Section 2.1 that clients have reasonable assurances that the alternative service is under control of and valid for the whole origin; for example, presenting a certificate for the origin proves that the alternative service is authorized to serve traffic for the origin.\n\nNote that this assurance is only as strong as the method used to authenticate the alternative service. In particular, when TLS authentication is used to do so, there are well-known exploits to make an attacker's certificate appear as legitimate.\n\nAlternative services could be used to persist such an attack. For example, an intermediary could man-in-the-middle TLS-protected communication to a target and then direct all traffic to an alternative service with a large freshness lifetime so that the user agent still directs traffic to the attacker even when not using the intermediary.\n\nImplementations *MUST* perform any certificate-pinning validation (such as [RFC7469]) on alternative services just as they would on direct connections to the origin. Implementations might also choose to add other requirements around which certificates are acceptable for alternative services.\n\n### 9.3. Changing Protocols\n\nWhen the ALPN protocol is changed due to the use of an alternative service, the security properties of the new connection to the origin can be different from that of the \"normal\" connection to the origin, because the protocol identifier itself implies this.\n\nFor example, if an \"https://\" URI has a protocol advertised that does not use some form of end-to-end encryption (most likely, TLS), this violates the expectations for security that the URI scheme implies. Therefore, clients cannot use alternative services blindly, but instead evaluate the option(s) presented to ensure that security requirements and expectations of specifications, implementations, and end users are met.\n\n### 9.4. Tracking Clients Using Alternative Services\n\nChoosing an alternative service implies connecting to a new, server-supplied host name. By using unique names, servers could conceivably track client requests. Such tracking could follow users across multiple networks, when the \"persist\" flag is used.\n\nClients that wish to prevent requests from being correlated can decide not to use alternative services for multiple requests that would not otherwise be allowed to be correlated.\n\nIn a user agent, any alternative service information *MUST* be removed when origin-specific data is cleared (typically, when cookies [RFC6265] are cleared).\n\n### 9.5. Confusion regarding Request Scheme\n\nSome server-side HTTP applications make assumptions about security based upon connection context; for example, equating being served upon port 443 with the use of an \"https://\" URI and the various security properties that implies.\n\nThis affects not only the security properties of the connection itself, but also the state of the client at the other end of it; for example, a Web browser treats \"https://\" URIs differently than \"http://\" URIs in many ways, not just for purposes of protocol handling.\n\nSince one of the uses of Alternative Services is to allow a connection to be migrated to a different protocol and port, these applications can become confused about the security properties of a given connection, sending information (for example, cookies and content) that is intended for a secure context (such as an \"https://\" URI) to a client that is not treating it as one.\n\nThis risk can be mitigated in servers by using the URI scheme explicitly carried by the protocol (such as \":scheme\" in HTTP/2 or the \"absolute form\" of the request target in HTTP/1.1) as an indication of security context, instead of other connection properties ([RFC7540], [Section 8.1.2.3](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7540.html#HttpRequest) and [RFC7230], [Section 5.3.2](https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230.html#absolute-form)).\n\nWhen the protocol does not explicitly carry the scheme (as is usually the case for HTTP/1.1 over TLS), servers can mitigate this risk by either assuming that all requests have an insecure context, or by refraining from advertising alternative services for insecure schemes (for example, HTTP).\n\n## 10. References\n\n### 10.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[http://www.rfc-editor.org/info/rfc2119](http://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC2818]\n\nRescorla, E., “[HTTP Over TLS](https://www.rfc-editor.org/rfc/rfc2818.html)”, RFC 2818, [DOI 10.17487/RFC2818](https://dx.doi.org/10.17487/RFC2818), May 2000, <[http://www.rfc-editor.org/info/rfc2818](http://www.rfc-editor.org/info/rfc2818)>.\n\n[RFC3986]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[http://www.rfc-editor.org/info/rfc3986](http://www.rfc-editor.org/info/rfc3986)>.\n\n[RFC5226]\n\nNarten, T. and H. Alvestrand, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc5226.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 5226, [DOI 10.17487/RFC5226](https://dx.doi.org/10.17487/RFC5226), May 2008, <[http://www.rfc-editor.org/info/rfc5226](http://www.rfc-editor.org/info/rfc5226)>.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[http://www.rfc-editor.org/info/rfc5234](http://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC5890]\n\nKlensin, J., “[Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework](https://www.rfc-editor.org/rfc/rfc5890.html)”, RFC 5890, [DOI 10.17487/RFC5890](https://dx.doi.org/10.17487/RFC5890), August 2010, <[http://www.rfc-editor.org/info/rfc5890](http://www.rfc-editor.org/info/rfc5890)>.\n\n[RFC6066]\n\nEastlake, D., “[Transport Layer Security (TLS) Extensions: Extension Definitions](https://www.rfc-editor.org/rfc/rfc6066.html)”, RFC 6066, [DOI 10.17487/RFC6066](https://dx.doi.org/10.17487/RFC6066), January 2011, <[http://www.rfc-editor.org/info/rfc6066](http://www.rfc-editor.org/info/rfc6066)>.\n\n[RFC6454]\n\nBarth, A., “[The Web Origin Concept](https://www.rfc-editor.org/rfc/rfc6454.html)”, RFC 6454, [DOI 10.17487/RFC6454](https://dx.doi.org/10.17487/RFC6454), December 2011, <[http://www.rfc-editor.org/info/rfc6454](http://www.rfc-editor.org/info/rfc6454)>.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[http://www.rfc-editor.org/info/rfc7230](http://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, [DOI 10.17487/RFC7234](https://dx.doi.org/10.17487/RFC7234), June 2014, <[http://www.rfc-editor.org/info/rfc7234](http://www.rfc-editor.org/info/rfc7234)>.\n\n[RFC7301]\n\nFriedl, S., Popov, A., Langley, A., and S. Emile, “[Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension](https://www.rfc-editor.org/rfc/rfc7301.html)”, RFC 7301, [DOI 10.17487/RFC7301](https://dx.doi.org/10.17487/RFC7301), July 2014, <[http://www.rfc-editor.org/info/rfc7301](http://www.rfc-editor.org/info/rfc7301)>.\n\n[RFC7405]\n\nKyzivat, P., “[Case-Sensitive String Support in ABNF](https://www.rfc-editor.org/rfc/rfc7405.html)”, RFC 7405, [DOI 10.17487/RFC7405](https://dx.doi.org/10.17487/RFC7405), December 2014, <[http://www.rfc-editor.org/info/rfc7405](http://www.rfc-editor.org/info/rfc7405)>.\n\n[RFC7540]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol version 2](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[http://www.rfc-editor.org/info/rfc7540](http://www.rfc-editor.org/info/rfc7540)>.\n\n### 10.2. Informative References\n\n[BCP90]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, September 2004, <[http://www.rfc-editor.org/info/bcp90](http://www.rfc-editor.org/info/bcp90)>.\n\n[RFC5246]\n\nDierks, T. and E. Rescorla, “[The Transport Layer Security (TLS) Protocol Version 1.2](https://www.rfc-editor.org/rfc/rfc5246.html)”, RFC 5246, [DOI 10.17487/RFC5246](https://dx.doi.org/10.17487/RFC5246), August 2008, <[http://www.rfc-editor.org/info/rfc5246](http://www.rfc-editor.org/info/rfc5246)>.\n\n[RFC6265]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, [DOI 10.17487/RFC6265](https://dx.doi.org/10.17487/RFC6265), April 2011, <[http://www.rfc-editor.org/info/rfc6265](http://www.rfc-editor.org/info/rfc6265)>.\n\n[RFC7469]\n\nEvans, C., Palmer, C., and R. Sleevi, “[Public Key Pinning Extension for HTTP](https://www.rfc-editor.org/rfc/rfc7469.html)”, RFC 7469, [DOI 10.17487/RFC7469](https://dx.doi.org/10.17487/RFC7469), April 2015, <[http://www.rfc-editor.org/info/rfc7469](http://www.rfc-editor.org/info/rfc7469)>.\n\n## Acknowledgements\n\nThanks to Adam Langley, Bence Beky, Chris Lonvick, Eliot Lear, Erik Nygren, Guy Podjarny, Herve Ruellan, Lucas Pardue, Martin Thomson, Matthew Kerwin, Mike Bishop, Paul Hoffman, Richard Barnes, Richard Bradbury, Stephen Farrell, Stephen Ludin, and Will Chan for their feedback and suggestions.\n\nThe Alt-Svc header field was influenced by the design of the Alternate-Protocol header field in SPDY.\n\n## Authors' Addresses\n\n**Mark Nottingham**\nAkamai\nEmail: mnot@mnot.net\nURI: [https://www.mnot.net/](https://www.mnot.net/)\n\n**Patrick McManus**\nMozilla\nEmail: mcmanus@ducksong.com\nURI: [https://mozillians.org/u/pmcmanus/](https://mozillians.org/u/pmcmanus/)\n\n**Julian F. Reschke**\ngreenbytes GmbH\nEmail: julian.reschke@greenbytes.de\nURI: [https://greenbytes.de/tech/webdav/](https://greenbytes.de/tech/webdav/)", "znaku_textu": 35782, "slov": 4923, "odkazu": 176, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:13", "sha256": "fe86749d64c67fddc396612d8726469b013e153c67f6759f1ee61f41e818dbb0", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5741.html", "http://www.rfc-editor.org/info/rfc7838", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc6066.html", "https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230.html", "https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7234.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/rfc/rfc7301.html", "https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7540.html", "https://www.rfc-editor.org/rfc/rfc6454.html", "https://www.iana.org/assignments/message-headers/", "http://www.iana.org/assignments/http-alt-svc-parameters", "https://www.rfc-editor.org/rfc/rfc5226.html", "https://www.rfc-editor.org/rfc/rfc5890.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "http://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc2818.html", "https://dx.doi.org/10.17487/RFC2818", "http://www.rfc-editor.org/info/rfc2818", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "http://www.rfc-editor.org/info/rfc3986", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC5226", "http://www.rfc-editor.org/info/rfc5226", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "http://www.rfc-editor.org/info/rfc5234", "https://dx.doi.org/10.17487/RFC5890", "http://www.rfc-editor.org/info/rfc5890", "https://dx.doi.org/10.17487/RFC6066", "http://www.rfc-editor.org/info/rfc6066", "https://dx.doi.org/10.17487/RFC6454", "http://www.rfc-editor.org/info/rfc6454", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://dx.doi.org/10.17487/RFC7230", "http://www.rfc-editor.org/info/rfc7230", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://dx.doi.org/10.17487/RFC7234", "http://www.rfc-editor.org/info/rfc7234", "https://dx.doi.org/10.17487/RFC7301", "http://www.rfc-editor.org/info/rfc7301", "https://www.rfc-editor.org/rfc/rfc7405.html", "https://dx.doi.org/10.17487/RFC7405", "http://www.rfc-editor.org/info/rfc7405", "https://www.rfc-editor.org/rfc/rfc7540.html", "https://dx.doi.org/10.17487/RFC7540", "http://www.rfc-editor.org/info/rfc7540", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "http://www.rfc-editor.org/info/bcp90", "https://www.rfc-editor.org/rfc/rfc5246.html", "https://dx.doi.org/10.17487/RFC5246", "http://www.rfc-editor.org/info/rfc5246", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://dx.doi.org/10.17487/RFC6265", "http://www.rfc-editor.org/info/rfc6265", "https://www.rfc-editor.org/rfc/rfc7469.html", "https://dx.doi.org/10.17487/RFC7469", "http://www.rfc-editor.org/info/rfc7469", "https://www.mnot.net/", "https://mozillians.org/u/pmcmanus/", "https://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc8188.html", "titulek": "RFC 8188 - Encrypted Content-Encoding for HTTP", "h1": "Encrypted Content-Encoding for HTTP", "popis": "This memo introduces a content coding for HTTP that allows message payloads to be encrypted.", "klicova_slova": "", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC8188", "og:description": "Encrypted Content-Encoding for HTTP", "og:url": "https://httpwg.org/specs/rfc8188.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of this Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Requirements Language"}, {"uroven": 2, "text": "2. The \"aes128gcm\" HTTP Content Coding"}, {"uroven": 3, "text": "2.2. Content-Encryption Key Derivation"}, {"uroven": 3, "text": "2.3. Nonce Derivation"}, {"uroven": 2, "text": "3. Examples"}, {"uroven": 3, "text": "3.1. Encryption of a Response"}, {"uroven": 3, "text": "3.2. Encryption with Multiple Records"}, {"uroven": 2, "text": "4. Security Considerations"}, {"uroven": 3, "text": "4.1. Automatic Decryption"}, {"uroven": 3, "text": "4.2. Message Truncation"}, {"uroven": 3, "text": "4.3. Key and Nonce Reuse"}, {"uroven": 3, "text": "4.4. Data Encryption Limits"}, {"uroven": 3, "text": "4.5. Content Integrity"}, {"uroven": 3, "text": "4.7. Poisoning Storage"}, {"uroven": 3, "text": "4.8. Sizing and Timing Attacks"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 3, "text": "5.1. The \"aes128gcm\" HTTP Content Coding"}, {"uroven": 2, "text": "6. References"}, {"uroven": 3, "text": "6.1. Normative References"}, {"uroven": 3, "text": "6.2. Informative References"}, {"uroven": 2, "text": "Appendix A. JWE Mapping"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThis memo introduces a content coding for HTTP that allows message payloads to be encrypted.\n\n## Status of this Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation about the current status of this document, any errata, and how to provide feedback on it may be obtained at [http://www.rfc-editor.org/info/rfc8188](http://www.rfc-editor.org/info/rfc8188).\n\n## Copyright Notice\n\nCopyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([http://trustee.ietf.org/license-info](http://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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n - 1.1. Requirements Language\n- 2. The \"aes128gcm\" HTTP Content Coding\n - 2.1. Encryption Content-Coding Header\n - 2.2. Content-Encryption Key Derivation\n - 2.3. Nonce Derivation\n- 3. Examples\n - 3.1. Encryption of a Response\n - 3.2. Encryption with Multiple Records\n- 4. Security Considerations\n - 4.1. Automatic Decryption\n - 4.2. Message Truncation\n - 4.3. Key and Nonce Reuse\n - 4.4. Data Encryption Limits\n - 4.5. Content Integrity\n - 4.6. Leaking Information in Header Fields\n - 4.7. Poisoning Storage\n - 4.8. Sizing and Timing Attacks\n- 5. IANA Considerations\n - 5.1. The \"aes128gcm\" HTTP Content Coding\n- 6. References\n - 6.1. Normative References\n - 6.2. Informative References\n- Appendix A. JWE Mapping\n- Acknowledgements\n- Author's Address\n\n## 1. Introduction\n\nIt is sometimes desirable to encrypt the contents of an HTTP message (request or response) so that when the payload is stored (e.g., with an HTTP PUT), only someone with the appropriate key can read it.\n\nFor example, it might be necessary to store a file on a server without exposing its contents to that server. Furthermore, that same file could be replicated to other servers (to make it more resistant to server or network failure), downloaded by clients (to make it available offline), etc., without exposing its contents.\n\nThese uses are not met by the use of Transport Layer Security (TLS) [RFC5246], since it only encrypts the channel between the client and server.\n\nThis document specifies a content coding (see [Section 3.1.2](https://www.rfc-editor.org/rfc/rfc7231.html#section-3.1.2) of [RFC7231]) for HTTP to serve these and other use cases.\n\nThis content coding is not a direct adaptation of message-based encryption formats -- such as those that are described by [RFC4880], [RFC5652], [RFC7516], and [XMLENC]. Those formats are not suited to stream processing, which is necessary for HTTP. The format described here follows more closely to the lower-level constructs described in [RFC5116].\n\nTo the extent that message-based encryption formats use the same primitives, the format can be considered to be a sequence of encrypted messages with a particular profile. For instance, Appendix A explains how the format is congruent with a sequence of JSON Web Encryption [RFC7516] values with a fixed header.\n\nThis mechanism is likely only a small part of a larger design that uses content encryption. How clients and servers acquire and identify keys will depend on the use case. In particular, a key management system is not described.\n\n### 1.1. Requirements Language\n\nThe 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.\n\n## 2. The \"aes128gcm\" HTTP Content Coding\n\nThe \"aes128gcm\" HTTP content coding indicates that a payload has been encrypted using Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM) as identified as AEAD_AES_128_GCM in [RFC5116], [Section 5.1](https://www.rfc-editor.org/rfc/rfc5116.html#section-5.1). The AEAD_AES_128_GCM algorithm uses a 128-bit content-encryption key.\n\nUsing this content coding requires knowledge of a key. How this key is acquired is not defined in this document.\n\nThe \"aes128gcm\" content coding uses a single fixed set of encryption primitives. Cipher agility is achieved by defining a new content-coding scheme. This ensures that only the HTTP Accept-Encoding header field is necessary to negotiate the use of encryption.\n\nThe \"aes128gcm\" content coding uses a fixed record size. The final encoding consists of a header (see Section 2.1) and zero or more fixed-size encrypted records; the final record can be smaller than the record size.\n\nThe record size determines the length of each portion of plaintext that is enciphered. The record size (\"rs\") is included in the content-coding header (see Section 2.1).\n\n```\n+-----------+ content\n| data | any length up to rs-17 octets\n+-----------+\n |\n v\n+-----------+-----+ add a delimiter octet (0x01 or 0x02)\n| data | pad | then 0x00-valued octets to rs-16\n+-----------+-----+ (or less on the last record)\n |\n v\n+--------------------+ encrypt with AEAD_AES_128_GCM;\n| ciphertext | final size is rs;\n+--------------------+ the last record can be smaller\n```\n\nAEAD_AES_128_GCM produces ciphertext 16 octets longer than its input plaintext. Therefore, the unencrypted content of each record is shorter than the record size by 16 octets. Valid records always contain at least a padding delimiter octet and a 16-octet authentication tag.\n\nEach record contains a single padding delimiter octet followed by any number of zero octets. The last record uses a padding delimiter octet set to the value 2, all other records have a padding delimiter octet value of 1.\n\nOn decryption, the padding delimiter is the last non-zero-valued octet of the record. A decrypter MUST fail if the record contains no non-zero octet. A decrypter MUST fail if the last record contains a padding delimiter with a value other than 2 or if any record other than the last contains a padding delimiter with a value other than 1.\n\nThe nonce for each record is a 96-bit value constructed from the record sequence number and the input-keying material. Nonce derivation is covered in Section 2.3.\n\nThe additional data passed to each invocation of AEAD_AES_128_GCM is a zero-length octet sequence.\n\nA consequence of this record structure is that range requests [RFC7233] and random access to encrypted payload bodies are possible at the granularity of the record size. Partial records at the ends of a range cannot be decrypted. Thus, it is best if range requests start and end on record boundaries. However, note that random access to specific parts of encrypted data could be confounded by the presence of padding.\n\nSelecting the record size most appropriate for a given situation requires a trade-off. A smaller record size allows decrypted octets to be released more rapidly, which can be appropriate for applications that depend on responsiveness. Smaller records also reduce the additional data required if random access into the ciphertext is needed.\n\nApplications that don't depend on streaming, random access, or arbitrary padding can use larger records, or even a single record. A larger record size reduces processing and data overheads.\n\n### 2.2. Content-Encryption Key Derivation\n\nIn order to allow the reuse of keying material for multiple different HTTP messages, a content-encryption key is derived for each message. The content-encryption key is derived from the \"salt\" parameter using the HMAC-based key derivation function (HKDF) described in [RFC5869] using the SHA-256 hash algorithm [FIPS180-4].\n\nThe value of the \"salt\" parameter is the salt input to the HKDF. The keying material identified by the \"keyid\" parameter is the input-keying material (IKM) to HKDF. Input-keying material is expected to be provided to recipients separately. The extract phase of HKDF, therefore, produces a pseudorandom key (PRK) as follows:\n\n```\n PRK = HMAC-SHA-256 (salt, IKM)\n```\n\nThe info parameter to HKDF is set to the ASCII-encoded string \"Content-Encoding: aes128gcm\" and a single zero octet:\n\n```\n cek_info = \"Content-Encoding: aes128gcm\" || 0x00\n```\n\nNote(1):\n\nConcatenation of octet sequences is represented by the || operator.\n\nNote(2):\n\nThe strings used here and in Section 2.3 do not include a terminating 0x00 octet, as is used in some programming languages.\n\nAEAD_AES_128_GCM requires a 16-octet (128-bit) content-encryption key (CEK), so the length (L) parameter to HKDF is 16. The second step of HKDF can, therefore, be simplified to the first 16 octets of a single HMAC:\n\n```\n CEK = HMAC-SHA-256(PRK, cek_info || 0x01)\n```\n\n### 2.3. Nonce Derivation\n\nThe nonce input to AEAD_AES_128_GCM is constructed for each record. The nonce for each record is a 12-octet (96-bit) value that is derived from the record sequence number, input-keying material, and \"salt\" parameter.\n\nThe input-keying material and \"salt\" parameter are input to HKDF with different info and length (L) parameters.\n\nThe length (L) parameter is 12 octets. The info parameter for the nonce is the ASCII-encoded string \"Content-Encoding: nonce\", terminated by a single zero octet:\n\n```\n nonce_info = \"Content-Encoding: nonce\" || 0x00\n```\n\nThe result is combined with the record sequence number -- using exclusive or -- to produce the nonce. The record sequence number (SEQ) is a 96-bit unsigned integer in network byte order that starts at zero.\n\nThus, the final nonce for each record is a 12-octet value:\n\n```\n NONCE = HMAC-SHA-256(PRK, nonce_info || 0x01) XOR SEQ\n```\n\nThis nonce construction prevents removal or reordering of records.\n\n## 3. Examples\n\nThis section shows a few examples of the encrypted-content coding.\n\nNote: All binary values in the examples in this section use base64 encoding with URL and filename safe alphabet [RFC4648]. This includes the bodies of requests. Whitespace and line wrapping is added to fit formatting constraints.\n\n### 3.1. Encryption of a Response\n\nHere, a successful HTTP GET response has been encrypted. This uses a record size of 4096 octets and no padding (just the single-octet padding delimiter), so only a partial record is present. The input-keying material is identified by an empty string (that is, the \"keyid\" field in the header is zero octets in length).\n\nThe encrypted data in this example is the UTF-8-encoded string \"I am the walrus\". The input-keying material is the value \"yqdlZ-tYemfogSmv7Ws5PQ\" (in base64url). The 54-octet content body contains a single record and is shown here using 71 base64url characters for presentation reasons.\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/octet-stream\nContent-Length: 54\nContent-Encoding: aes128gcm\n\nI1BsxtFttlv3u_Oo94xnmwAAEAAA-NAVub2qFgBEuQKRapoZu-IxkIva3MEB1PD-\nly8Thjg\n```\n\nNote that the media type has been changed to \"application/octet-stream\" to avoid exposing information about the content. Alternatively (and equivalently), the Content-Type header field can be omitted.\n\nIntermediate values for this example (all shown using base64url):\n\n```\nsalt (from header) = I1BsxtFttlv3u_Oo94xnmw\nPRK = zyeH5phsIsgUyd4oiSEIy35x-gIi4aM7y0hCF8mwn9g\nCEK = _wniytB-ofscZDh4tbSjHw\nNONCE = Bcs8gkIRKLI8GeI8\nunencrypted data = SSBhbSB0aGUgd2FscnVzAg\n```\n\n### 3.2. Encryption with Multiple Records\n\nThis example shows the same message with input-keying material of \"BO3ZVPxUlnLORbVGMpbT1Q\". In this example, the plaintext is split into records of 25 octets each (that is, the \"rs\" field in the header is 25). The first record includes one 0x00 padding octet. This means that there are 7 octets of message in the first record and 8 in the second. A key identifier of the UTF-8-encoded string \"a1\" is also included in the header.\n\n```\nHTTP/1.1 200 OK\nContent-Length: 73\nContent-Encoding: aes128gcm\n\nuNCkWiNYzKTnBN9ji3-qWAAAABkCYTHOG8chz_gnvgOqdGYovxyjuqRyJFjEDyoF\n1Fvkj6hQPdPHI51OEUKEpgz3SsLWIqS_uA\n```\n\n## 4. Security Considerations\n\nThis mechanism assumes the presence of a key management framework that is used to manage the distribution of keys between valid senders and receivers. Defining key management is part of composing this mechanism into a larger application, protocol, or framework.\n\nImplementation of cryptography -- and key management in particular -- can be difficult. For instance, implementations need to account for the potential for exposing keying material on side channels, such as might be exposed by the time it takes to perform a given operation. The requirements for a good implementation of cryptographic algorithms can change over time.\n\n### 4.1. Automatic Decryption\n\nAs a content coding, a \"aes128gcm\" content coding might be automatically removed by a receiver in a way that is not obvious to the ultimate consumer of a message. Recipients that depend on content-origin authentication using this mechanism MUST reject messages that don't include the \"aes128gcm\" content coding.\n\n### 4.2. Message Truncation\n\nThis content encoding is designed to permit the incremental processing of large messages. It also permits random access to plaintext in a limited fashion. The content encoding permits a receiver to detect when a message is truncated.\n\nA partially delivered message MUST NOT be processed as though the entire message was successfully delivered. For instance, a partially delivered message cannot be cached as though it were complete.\n\nAn attacker might exploit willingness to process partial messages to cause a receiver to remain in a specific intermediate state. Implementations performing processing on partial messages need to ensure that any intermediate processing states don't advantage an attacker.\n\n### 4.3. Key and Nonce Reuse\n\nEncrypting different plaintext with the same content-encryption key and nonce in AES-GCM is not safe [RFC5116]. The scheme defined here uses a fixed progression of nonce values. Thus, a new content-encryption key is needed for every application of the content coding. Since input-keying material can be reused, a unique \"salt\" parameter is needed to ensure that a content-encryption key is not reused.\n\nIf a content-encryption key is reused -- that is, if input-keying material and \"salt\" parameter are reused -- this could expose the plaintext and the authentication key, nullifying the protection offered by encryption. Thus, if the same input-keying material is reused, then the \"salt\" parameter MUST be unique each time. This ensures that the content-encryption key is not reused. An implementation SHOULD generate a random \"salt\" parameter for every message.\n\n### 4.4. Data Encryption Limits\n\nThere are limits to the data that AEAD_AES_128_GCM can encipher. The maximum value for the record size is limited by the size of the \"rs\" field in the header (see Section 2.1), which ensures that the 2^36-31 limit for a single application of AEAD_AES_128_GCM is not reached [RFC5116]. In order to preserve a 2^-40 probability of indistinguishability under chosen plaintext attack (IND-CPA), the total amount of plaintext that can be enciphered with the key derived from the same input-keying material and salt MUST be less than 2^44.5 blocks of 16 octets [AEBounds].\n\nIf the record size is a multiple of 16 octets, this means that 398 terabytes can be encrypted safely, including padding and overhead. However, if the record size is not a multiple of 16 octets, the total amount of data that can be safely encrypted is reduced because partial AES blocks are encrypted. The worst case is a record size of 18 octets, for which at most 74 terabytes of plaintext can be encrypted, of which at least half is padding.\n\n### 4.5. Content Integrity\n\nThis mechanism only provides content-origin authentication. The authentication tag only ensures that an entity with access to the content-encryption key produced the encrypted data.\n\nAny entity with the content-encryption key can, therefore, produce content that will be accepted as valid. This includes all recipients of the same HTTP message.\n\nFurthermore, any entity that is able to modify both the Content-Encoding header field and the HTTP message body can replace the contents. Without the content-encryption key or the input-keying material, modifications to, or replacement of, parts of a payload body are not possible.\n\n### 4.7. Poisoning Storage\n\nThis mechanism only offers data-origin authentication; it does not perform authentication or authorization of the message creator, which could still need to be performed (e.g., by HTTP authentication [RFC7235]).\n\nThis is especially relevant when an HTTP PUT request is accepted by a server without decrypting the payload; if the request is unauthenticated, it becomes possible for a third party to deny service and/or poison the store.\n\n### 4.8. Sizing and Timing Attacks\n\nApplications using this mechanism need to be aware that the size of encrypted messages, as well as their timing, HTTP methods, URIs and so on, may leak sensitive information. See, for example, [NETFLIX] or [CLINIC].\n\nThis risk can be mitigated through the use of the padding that this mechanism provides. Alternatively, splitting up content into segments and storing them separately might reduce exposure. HTTP/2 [RFC7540] combined with TLS [RFC5246] might be used to hide the size of individual messages.\n\nDeveloping a padding strategy is difficult. A good padding strategy can depend on context. Common strategies include padding to a small set of fixed lengths, padding to multiples of a value, or padding to powers of 2. Even a good strategy can still cause size information to leak if processing activity of a recipient can be observed. This is especially true if the trailing records of a message contain only padding. Distributing non-padding data across records is recommended to avoid leaking size information.\n\n## 5. IANA Considerations\n\n### 5.1. The \"aes128gcm\" HTTP Content Coding\n\nThis memo registers the \"aes128gcm\" HTTP content coding in the \"HTTP Content Coding Registry\", as detailed in Section 2.\n\n- Name: aes128gcm\n- Description: AES-GCM encryption with a 128-bit content-encryption key\n- Reference: this specification\n\n## 6. References\n\n### 6.1. Normative References\n\n[FIPS180-4]\n\nNational Institute of Standards and Technology, “[Secure Hash Standard (SHS)](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf)”, FIPS PUB 180-4, [DOI 10.6028/NIST.FIPS180-4](https://dx.doi.org/10.6028/NIST.FIPS180-4), August 2015, <[http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC3629]\n\nYergeau, F., “[UTF-8, a transformation format of ISO 10646](https://www.rfc-editor.org/rfc/rfc3629.html)”, [STD 63](https://www.rfc-editor.org/info/std63), RFC 3629, [DOI 10.17487/RFC3629](https://dx.doi.org/10.17487/RFC3629), November 2003, <[https://www.rfc-editor.org/info/rfc3629](https://www.rfc-editor.org/info/rfc3629)>.\n\n[RFC5116]\n\nMcGrew, D., “[An Interface and Algorithms for Authenticated Encryption](https://www.rfc-editor.org/rfc/rfc5116.html)”, RFC 5116, [DOI 10.17487/RFC5116](https://dx.doi.org/10.17487/RFC5116), January 2008, <[https://www.rfc-editor.org/info/rfc5116](https://www.rfc-editor.org/info/rfc5116)>.\n\n[RFC5869]\n\nKrawczyk, H. and P. Eronen, “[HMAC-based Extract-and-Expand Key Derivation Function (HKDF)](https://www.rfc-editor.org/rfc/rfc5869.html)”, RFC 5869, [DOI 10.17487/RFC5869](https://dx.doi.org/10.17487/RFC5869), May 2010, <[https://www.rfc-editor.org/info/rfc5869](https://www.rfc-editor.org/info/rfc5869)>.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[https://www.rfc-editor.org/info/rfc7230](https://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, [DOI 10.17487/RFC7231](https://dx.doi.org/10.17487/RFC7231), June 2014, <[https://www.rfc-editor.org/info/rfc7231](https://www.rfc-editor.org/info/rfc7231)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n### 6.2. Informative References\n\n[AEBounds]\n\nLuykx, A. and K. Paterson, “[Limits on Authenticated Encryption Use in TLS](http://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf)”, March 2016, <[http://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf](http://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf)>.\n\n[CLINIC]\n\nMiller, B., Huang, L., Joseph, A., and J. Tygar, “[I Know Why You Went to the Clinic: Risks and Realization of HTTPS Traffic Analysis](https://arxiv.org/abs/1403.0297)”, [DOI 10.1007/978-3-319-08506-7_8](https://dx.doi.org/10.1007/978-3-319-08506-7_8), March 2014, <[https://arxiv.org/abs/1403.0297](https://arxiv.org/abs/1403.0297)>.\n\n[NETFLIX]\n\nReed, A. and M. Kranch, “Identifying HTTPS-Protected Netflix Videos in Real-Time”, Proceedings of the Seventh ACM on Conference on Data and Application Security and Privacy CODASPY '17, [DOI 10.1145/3029806.3029821](https://dx.doi.org/10.1145/3029806.3029821), 2017.\n\n[RFC4648]\n\nJosefsson, S., “[The Base16, Base32, and Base64 Data Encodings](https://www.rfc-editor.org/rfc/rfc4648.html)”, RFC 4648, [DOI 10.17487/RFC4648](https://dx.doi.org/10.17487/RFC4648), October 2006, <[https://www.rfc-editor.org/info/rfc4648](https://www.rfc-editor.org/info/rfc4648)>.\n\n[RFC4880]\n\nCallas, J., Donnerhacke, L., Finney, H., Shaw, D., and R. Thayer, “[OpenPGP Message Format](https://www.rfc-editor.org/rfc/rfc4880.html)”, RFC 4880, [DOI 10.17487/RFC4880](https://dx.doi.org/10.17487/RFC4880), November 2007, <[https://www.rfc-editor.org/info/rfc4880](https://www.rfc-editor.org/info/rfc4880)>.\n\n[RFC5246]\n\nDierks, T. and E. Rescorla, “[The Transport Layer Security (TLS) Protocol Version 1.2](https://www.rfc-editor.org/rfc/rfc5246.html)”, RFC 5246, [DOI 10.17487/RFC5246](https://dx.doi.org/10.17487/RFC5246), August 2008, <[https://www.rfc-editor.org/info/rfc5246](https://www.rfc-editor.org/info/rfc5246)>.\n\n[RFC5652]\n\nHousley, R., “[Cryptographic Message Syntax (CMS)](https://www.rfc-editor.org/rfc/rfc5652.html)”, [STD 70](https://www.rfc-editor.org/info/std70), RFC 5652, [DOI 10.17487/RFC5652](https://dx.doi.org/10.17487/RFC5652), September 2009, <[https://www.rfc-editor.org/info/rfc5652](https://www.rfc-editor.org/info/rfc5652)>.\n\n[RFC7233]\n\nFielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Range Requests](https://www.rfc-editor.org/rfc/rfc7233.html)”, RFC 7233, [DOI 10.17487/RFC7233](https://dx.doi.org/10.17487/RFC7233), June 2014, <[https://www.rfc-editor.org/info/rfc7233](https://www.rfc-editor.org/info/rfc7233)>.\n\n[RFC7235]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Authentication](https://www.rfc-editor.org/rfc/rfc7235.html)”, RFC 7235, [DOI 10.17487/RFC7235](https://dx.doi.org/10.17487/RFC7235), June 2014, <[https://www.rfc-editor.org/info/rfc7235](https://www.rfc-editor.org/info/rfc7235)>.\n\n[RFC7516]\n\nJones, M. and J. Hildebrand, “[JSON Web Encryption (JWE)](https://www.rfc-editor.org/rfc/rfc7516.html)”, RFC 7516, [DOI 10.17487/RFC7516](https://dx.doi.org/10.17487/RFC7516), May 2015, <[https://www.rfc-editor.org/info/rfc7516](https://www.rfc-editor.org/info/rfc7516)>.\n\n[RFC7540]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol Version 2 (HTTP/2)](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[https://www.rfc-editor.org/info/rfc7540](https://www.rfc-editor.org/info/rfc7540)>.\n\n[XMLENC]\n\nEastlake, D., Reagle, J., Hirsch, F., and T. Roessler, “[XML Encryption Syntax and Processing Version 1.1](http://www.w3.org/TR/2013/REC-xmlenc-core1-20130411)”, World Wide Web Consortium Recommendation REC-xmlenc-core1-20130411, April 2013, <[http://www.w3.org/TR/2013/REC-xmlenc-core1-20130411](http://www.w3.org/TR/2013/REC-xmlenc-core1-20130411)>.\n\n## Appendix A. JWE Mapping\n\nThe \"aes128gcm\" content coding can be considered as a sequence of JSON Web Encryption (JWE) [RFC7516] objects, each corresponding to a single fixed-size record that includes trailing padding. The following transformations are applied to a JWE object that might be expressed using the JWE Compact Serialization:\n\n- The JWE Protected Header is fixed to the value { \"alg\": \"dir\", \"enc\": \"A128GCM\" }, describing direct encryption using AES-GCM with a 128-bit content-encryption key. This header is not transmitted, it is instead implied by the value of the Content-Encoding header field.\n- The JWE Encrypted Key is empty, as stipulated by the direct encryption algorithm.\n- The JWE Initialization Vector (\"iv\") for each record is set to the exclusive-or of the 96-bit record sequence number, starting at zero, and a value derived from the input-keying material (see Section 2.3 ). This value is also not transmitted.\n- The final value is the concatenated header, JWE Ciphertext, and JWE Authentication Tag, all expressed without base64url encoding. The \".\" separator is omitted, since the length of these fields is known.\n\nThus, the example in Section 3.1 can be rendered using the JWE Compact Serialization as:\n\n```\neyAiYWxnIjogImRpciIsICJlbmMiOiAiQTEyOEdDTSIgfQ..Bcs8gkIRKLI8GeI8.\n-NAVub2qFgBEuQKRapoZuw.4jGQi9rcwQHU8P6XLxOGOA\n```\n\nWhere the first line represents the fixed JWE Protected Header, an empty JWE Encrypted Key, and the algorithmically determined JWE Initialization Vector. The second line contains the encoded body, split into JWE Ciphertext and JWE Authentication Tag.\n\n## Acknowledgements\n\nMark Nottingham was an original author of this document.\n\nThe following people provided valuable input: Richard Barnes, David Benjamin, Peter Beverloo, JR Conlin, Mike Jones, Stephen Farrell, Adam Langley, James Manger, John Mattsson, Julian Reschke, Eric Rescorla, Jim Schaad, and Magnus Westerlund.\n\n## Author's Address\n\n**Martin Thomson**\nMozilla\nEMail: [martin.thomson@gmail.com](mailto:martin.thomson@gmail.com)", "znaku_textu": 26960, "slov": 3695, "odkazu": 147, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:23", "sha256": "787c1d6e9d8eda146ce6a06fbf2d0d52262d5aec2b55463f743250497784283e", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "http://www.rfc-editor.org/info/rfc8188", "http://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc5116.html", "https://www.rfc-editor.org/rfc/rfc7230.html", "http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf", "https://dx.doi.org/10.6028/NIST.FIPS180-4", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc3629.html", "https://www.rfc-editor.org/info/std63", "https://dx.doi.org/10.17487/RFC3629", "https://www.rfc-editor.org/info/rfc3629", "https://dx.doi.org/10.17487/RFC5116", "https://www.rfc-editor.org/info/rfc5116", "https://www.rfc-editor.org/rfc/rfc5869.html", "https://dx.doi.org/10.17487/RFC5869", "https://www.rfc-editor.org/info/rfc5869", "https://dx.doi.org/10.17487/RFC7230", "https://www.rfc-editor.org/info/rfc7230", "https://dx.doi.org/10.17487/RFC7231", "https://www.rfc-editor.org/info/rfc7231", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "http://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf", "https://arxiv.org/abs/1403.0297", "https://dx.doi.org/10.1007/978-3-319-08506-7_8", "https://dx.doi.org/10.1145/3029806.3029821", "https://www.rfc-editor.org/rfc/rfc4648.html", "https://dx.doi.org/10.17487/RFC4648", "https://www.rfc-editor.org/info/rfc4648", "https://www.rfc-editor.org/rfc/rfc4880.html", "https://dx.doi.org/10.17487/RFC4880", "https://www.rfc-editor.org/info/rfc4880", "https://www.rfc-editor.org/rfc/rfc5246.html", "https://dx.doi.org/10.17487/RFC5246", "https://www.rfc-editor.org/info/rfc5246", "https://www.rfc-editor.org/rfc/rfc5652.html", "https://www.rfc-editor.org/info/std70", "https://dx.doi.org/10.17487/RFC5652", "https://www.rfc-editor.org/info/rfc5652", "https://www.rfc-editor.org/rfc/rfc7233.html", "https://dx.doi.org/10.17487/RFC7233", "https://www.rfc-editor.org/info/rfc7233", "https://www.rfc-editor.org/rfc/rfc7235.html", "https://dx.doi.org/10.17487/RFC7235", "https://www.rfc-editor.org/info/rfc7235", "https://www.rfc-editor.org/rfc/rfc7516.html", "https://dx.doi.org/10.17487/RFC7516", "https://www.rfc-editor.org/info/rfc7516", "https://www.rfc-editor.org/rfc/rfc7540.html", "https://dx.doi.org/10.17487/RFC7540", "https://www.rfc-editor.org/info/rfc7540", "http://www.w3.org/TR/2013/REC-xmlenc-core1-20130411"]} {"url": "https://httpwg.org/specs/rfc8246.html", "titulek": "RFC 8246 - HTTP Immutable Responses", "h1": "HTTP Immutable Responses", "popis": "The immutable HTTP response Cache-Control extension allows servers to identify resources that will not be updated during their freshness lifetime. This ensures that a client never needs to revalidate a cached fresh resource to be certain it has not been modified.", "klicova_slova": "", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC8246", "og:description": "HTTP Immutable Responses", "og:url": "https://httpwg.org/specs/rfc8246.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of this Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "2. The Immutable Cache-Control Extension"}, {"uroven": 3, "text": "2.1. About Intermediaries"}, {"uroven": 3, "text": "2.2. Example"}, {"uroven": 2, "text": "3. Security Considerations"}, {"uroven": 2, "text": "4. IANA Considerations"}, {"uroven": 2, "text": "5. References"}, {"uroven": 3, "text": "5.1. Normative References"}, {"uroven": 3, "text": "5.2. Informative References"}, {"uroven": 2, "text": "Acknowledgments"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThe immutable HTTP response Cache-Control extension allows servers to identify resources that will not be updated during their freshness lifetime. This ensures that a client never needs to revalidate a cached fresh resource to be certain it has not been modified.\n\n## Status of this Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc8246](https://www.rfc-editor.org/info/rfc8246).\n\n## Copyright Notice\n\nCopyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. The Immutable Cache-Control Extension\n - 2.1. About Intermediaries\n - 2.2. Example\n- 3. Security Considerations\n- 4. IANA Considerations\n- 5. References\n - 5.1. Normative References\n - 5.2. Informative References\n- Acknowledgments\n- Author's Address\n\n---\n\n## 1. Introduction\n\nHTTP’s freshness lifetime mechanism [RFC7234] allows a client to safely reuse a stored response to satisfy future requests for a specified period of time. However, it is still possible that the resource will be modified during that period.\n\nFor instance, a front-page newspaper photo with a freshness lifetime of one hour would mean that no user would see a cached photo more than one hour old. However, the photo could be updated at any time, resulting in different users seeing different photos depending on the contents of their caches for up to one hour. This is compliant with the caching mechanism defined in [RFC7234].\n\nUsers that need to confirm there have been no updates to their cached responses typically use the reload (or refresh) mechanism in their user agents. This in turn generates a conditional request [RFC7232], and either a new representation or, if unmodified, a 304 (Not Modified) response [RFC7232] is returned. A user agent that understands HTML and fetches its dependent sub-resources might issue hundreds of conditional requests to refresh all portions of a common page [REQPERPAGE].\n\nHowever, some content providers never create more than one variant of a sub-resource, because they use “versioned” URLs. When these resources need an update, they are simply published under a new URL, typically embedding an identifier unique to that version of the resource in the path, and references to the sub-resource are updated with the new path information.\n\nFor example, https://www.example.com/101016/main.css might be updated and republished as https://www.example.com/102026/main.css, with any links that reference it being changed at the same time. This design pattern allows a very large freshness lifetime to be used for the sub-resource without guessing when it will be updated in the future.\n\nUnfortunately, the user agent does not know when this versioned URL design pattern is used. As a result, user-driven refreshes still translate into wasted conditional requests for each sub-resource as each will return 304 responses.\n\nThe immutable HTTP response Cache-Control extension allows servers to identify responses that will not be updated during their freshness lifetimes.\n\nThis effectively informs clients that any conditional request for that response can be safely skipped without worrying that it has been updated.\n\n### 1.1. Notational Conventions\n\nThe 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.\n\n---\n\n## 2. The Immutable Cache-Control Extension\n\nWhen present in an HTTP response, the immutable Cache-Control extension indicates that the origin server will not update the representation of that resource during the freshness lifetime of the response.\n\nClients SHOULD NOT issue a conditional request during the response’s freshness lifetime (e.g., upon a reload) unless explicitly overridden by the user (e.g., a force reload).\n\nThe immutable extension only applies during the freshness lifetime of the stored response. Stale responses SHOULD be revalidated as they normally would be in the absence of the immutable extension.\n\nThe immutable extension takes no arguments. If any arguments are present, they have no meaning and MUST be ignored. Multiple instances of the immutable extension are equivalent to one instance. The presence of an immutable Cache-Control extension in a request has no effect.\n\n### 2.1. About Intermediaries\n\nAn immutable response has the same semantic meaning when received by proxy clients as it does when received by user-agent-based clients. Therefore, proxies SHOULD skip conditionally revalidating fresh responses containing the immutable extension unless there is a signal from the client that a validation is necessary (e.g., a no-cache Cache-Control request directive defined in [Section 5.2.1.4](https://www.rfc-editor.org/rfc/rfc7234.html#section-5.2.1.4) of [RFC7234]).\n\nA proxy that uses the immutable extension to bypass a conditional revalidation can choose whether to reply with a 304 or 200 response to its requesting client based on the request headers the proxy received.\n\n### 2.2. Example\n\n```\nCache-Control: max-age=31536000, immutable\n```\n\n---\n\n## 3. Security Considerations\n\nThe immutable mechanism acts as form of soft pinning and, as with all pinning mechanisms, creates a vector for amplification of cache corruption incidents. These incidents include cache-poisoning attacks. Three mechanisms are suggested for mitigation of this risk:\n\n- Clients SHOULD ignore the immutable extension from resources that are not part of an authenticated context such as HTTPS. Authenticated resources are less vulnerable to cache poisoning.\n- User agents often provide two different refresh mechanisms: reload and some form of force-reload. The latter is used to rectify interrupted loads and other corruption. These reloads, typically indicated through no-cache request attributes, SHOULD ignore the immutable extension as well.\n- Clients SHOULD ignore the immutable extension for resources that do not provide a strong indication that the stored response size is the correct response size such as responses delimited by connection close.\n\n---\n\n## 4. IANA Considerations\n\nThe immutable extension has been registered in the “Hypertext Transfer Protocol (HTTP) Cache Directive Registry” per the guidelines described in [Section 7.1](https://www.rfc-editor.org/rfc/rfc7234.html#section-7.1) of [RFC7234].\n\n- Cache Directive: immutable\n- Reference: RFC 8246\n\n---\n\n## 5. References\n\n### 5.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC7232]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests](https://www.rfc-editor.org/rfc/rfc7232.html)”, RFC 7232, [DOI 10.17487/RFC7232](https://dx.doi.org/10.17487/RFC7232), June 2014, <[https://www.rfc-editor.org/info/rfc7232](https://www.rfc-editor.org/info/rfc7232)>.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, [DOI 10.17487/RFC7234](https://dx.doi.org/10.17487/RFC7234), June 2014, <[https://www.rfc-editor.org/info/rfc7234](https://www.rfc-editor.org/info/rfc7234)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n### 5.2. Informative References\n\n[REQPERPAGE]\n\nHTTP Archive, “[Total Requests per Page](http://httparchive.org/interesting.php#reqTotal)”, <[http://httparchive.org/interesting.php#reqTotal](http://httparchive.org/interesting.php#reqTotal)>.\n\n---\n\n## Acknowledgments\n\nThank you to Ben Maurer for partnership in developing and testing this idea. Thank you to Amos Jeffries for help with proxy interactions and to Mark Nottingham for help with the documentation.\n\n---\n\n## Author's Address\n\n**Patrick McManus**\nMozilla\nEMail: [mcmanus@ducksong.com](mailto:mcmanus@ducksong.com)", "znaku_textu": 9575, "slov": 1275, "odkazu": 62, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:01", "sha256": "b5e1be3d0028fbd9d8ad0e87f76f3ad8143a255cbc4e7bf349544dfa499a446d", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc8246", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc7232.html", "https://dx.doi.org/10.17487/RFC7232", "https://www.rfc-editor.org/info/rfc7232", "https://dx.doi.org/10.17487/RFC7234", "https://www.rfc-editor.org/info/rfc7234", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "http://httparchive.org/interesting.php"]} {"url": "https://httpwg.org/specs/rfc8288.html", "titulek": "RFC 8288 - Web Linking", "h1": "Web Linking", "popis": "This specification defines a model for the relationships between resources on the Web (“links”) and the type of those relationships (“link relation types”).It also defines the serialisation of such links in HTTP headers with the Link header field.", "klicova_slova": "link relation", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC8288", "og:description": "Web Linking", "og:url": "https://httpwg.org/specs/rfc8288.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 3, "text": "1.2. Conformance and Error Handling"}, {"uroven": 2, "text": "2. Links"}, {"uroven": 3, "text": "2.1. Link Relation Types"}, {"uroven": 4, "text": "2.1.1. Registered Relation Types"}, {"uroven": 5, "text": "2.1.1.1. Registering Link Relation Types"}, {"uroven": 5, "text": "2.1.1.2. Registration Request Processing"}, {"uroven": 4, "text": "2.1.2. Extension Relation Types"}, {"uroven": 3, "text": "2.2. Target Attributes"}, {"uroven": 2, "text": "4. IANA Considerations"}, {"uroven": 3, "text": "4.2. Link Relation Type Registry"}, {"uroven": 3, "text": "4.3. Link Relation Application Data Registry"}, {"uroven": 2, "text": "5. Security Considerations"}, {"uroven": 2, "text": "6. Internationalisation Considerations"}, {"uroven": 2, "text": "7. References"}, {"uroven": 3, "text": "7.1. Normative References"}, {"uroven": 3, "text": "7.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Notes on Other Link Serialisations"}, {"uroven": 3, "text": "A.1. Link Serialisation in HTML"}, {"uroven": 3, "text": "A.2. Link Serialisation in Atom"}, {"uroven": 2, "text": "Appendix B. Algorithms for Parsing Link Header Fields"}, {"uroven": 3, "text": "B.1. Parsing a Header Set for Links"}, {"uroven": 3, "text": "B.2. Parsing a Link Field Value"}, {"uroven": 3, "text": "B.3. Parsing Parameters"}, {"uroven": 3, "text": "B.4. Parsing a Quoted String"}, {"uroven": 2, "text": "Appendix C. Changes from RFC 5988"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThis specification defines a model for the relationships between resources on the Web (“links”) and the type of those relationships (“link relation types”).\n\nIt also defines the serialisation of such links in HTTP headers with the Link header field.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc8288](https://www.rfc-editor.org/info/rfc8288).\n\n## Copyright Notice\n\nCopyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n - 1.2. Conformance and Error Handling\n- 2. Links\n - 2.1. Link Relation Types\n - 2.1.1. Registered Relation Types\n - 2.1.2. Extension Relation Types\n - 2.2. Target Attributes\n- 3. Link Serialisation in HTTP Headers\n - 3.1. Link Target\n - 3.2. Link Context\n - 3.3. Relation Type\n - 3.4. Target Attributes\n - 3.4.1. Serialisation-Defined Attributes\n - 3.4.2. Extension Attributes\n - 3.5. Link Header Field Examples\n- 4. IANA Considerations\n - 4.1. Link HTTP Header Field Registration\n - 4.2. Link Relation Type Registry\n - 4.3. Link Relation Application Data Registry\n- 5. Security Considerations\n- 6. Internationalisation Considerations\n- 7. References\n - 7.1. Normative References\n - 7.2. Informative References\n- Appendix A. Notes on Other Link Serialisations\n - A.1. Link Serialisation in HTML\n - A.2. Link Serialisation in Atom\n- Appendix B. Algorithms for Parsing Link Header Fields\n - B.1. Parsing a Header Set for Links\n - B.2. Parsing a Link Field Value\n - B.3. Parsing Parameters\n - B.4. Parsing a Quoted String\n- Appendix C. Changes from RFC 5988\n- Author's Address\n\n## 1. Introduction\n\nThis specification defines a model for the relationships between resources on the Web (“links”) and the type of those relationships (“link relation types”).\n\nHTML [W3C.REC-html5-20141028] and Atom [RFC4287] both have well-defined concepts of linking; Section 2 generalises this into a framework that encompasses linking in these formats and (potentially) elsewhere.\n\nFurthermore, Section 3 defines an HTTP header field for conveying such links.\n\n### 1.1. Notational Conventions\n\nThe 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.\n\nThis document uses the Augmented Backus-Naur Form (ABNF) [RFC5234] notation of [RFC7230], including the #rule, and explicitly includes the following rules from it: quoted-string, token, SP (space), BWS (bad whitespace), OWS (optional whitespace), RWS (required whitespace), LOALPHA, DIGIT.\n\nAdditionally, the following rules are included:\n\n- URI and URI-Reference from [RFC3986] ,\n- type-name and subtype-name from [RFC6838] ,\n- media-query-list from [W3C.REC-css3-mediaqueries-20120619] , and\n- Language-Tag from [RFC5646] .\n\n### 1.2. Conformance and Error Handling\n\nThe requirements regarding conformance and error handling highlighted in [RFC7230], Section 2.5 apply to this document.\n\n## 2. Links\n\nIn this specification, a link is a typed connection between two resources and is comprised of:\n\n- A link context,\n- a link relation type ( Section 2.1 ),\n- a link target, and\n- optionally, target attributes ( Section 2.2 ).\n\nA link can be viewed as a statement of the form “link context has a link relation type resource at link target, which has target attributes”.\n\nFor example, “https://www.example.com/” has a “canonical” resource at “https://example.com”, which has a “type” of “text/html”.\n\nLink contexts and link targets are both Internationalized Resource Identifiers (IRIs) [RFC3987]. However, in the common case, the link context will also be a URI [RFC3986], because many protocols (such as HTTP) do not support dereferencing IRIs. Likewise, the link target will sometimes be converted to a URI (see [RFC3987], Section 3.1) in serialisations that do not support IRIs (such as the Link header field defined in Section 3).\n\nThis specification does not place restrictions on the cardinality of links; there can be multiple links to and from a particular target and multiple links of the same or different types between a given context and target. Likewise, the relative ordering of links in any particular serialisation, or between serialisations (e.g., the Link header field and in-content links), is not specified or significant in this specification; applications that wish to consider ordering significant can do so.\n\nLinks are conveyed in link serialisations; they are the “bytes on the wire”, and can occur in various forms. For example, Atom [RFC4287] and HTML [W3C.REC-html5-20141028] both defined serialisations of links into their respective formats, and Section 3 defines how to serialise links in HTTP header fields.\n\nThis specification does not define a general syntax for links across different serialisations, nor does it mandate a specific context for any given link; it is expected that serialisations of links will specify both aspects.\n\nFinally, links are used by link applications. Generally, an application will define the link relation type(s) it uses, along with the serialisation(s) that they might occur within. For example, the application “Web browsing” looks for the “stylesheet” link relation type in the HTML link serialisation (and optionally in the Link header field), whereas the application “AtomPub” uses the “edit” and “edit-media” link relations in the Atom serialisation.\n\n### 2.1. Link Relation Types\n\nIn the simplest case, a link relation type identifies the semantics of a link. For example, a link with the relation type “copyright” indicates that the current link context has a copyright resource at the link target.\n\nLink relation types can also be used to indicate that the target resource has particular attributes, or exhibits particular behaviours; for example, a “service” link implies that the link target can be used as part of a defined protocol (in this case, a service description).\n\nRelation types are not to be confused with media types [RFC2046]; they do not identify the format of the representation that results when the link is dereferenced. Rather, they only describe how the current context is related to another resource.\n\nRelation types SHOULD NOT infer any additional semantics based upon the presence or absence of another link relation type, or its own cardinality of occurrence. An exception to this is the combination of the “alternate” and “stylesheet” registered relation types, which has special meaning in HTML for historical reasons.\n\nThere are two kinds of relation types: registered and extension.\n\n#### 2.1.1. Registered Relation Types\n\nWell-defined relation types can be registered as tokens for convenience and/or to promote reuse by other applications, using the procedure in Section 2.1.1.1.\n\nRegistered relation type names MUST conform to the reg-rel-type rule (see Section 3.3) and MUST be compared character by character in a case-insensitive fashion. They SHOULD be appropriate to the specificity of the relation type; that is, if the semantics are highly specific to a particular application, the name should reflect that, so that more general names are available for less-specific use.\n\nRegistered relation types MUST NOT constrain the media type of the link context and MUST NOT constrain the available representation media types of the link target. However, they can specify the behaviours and properties of the target resource (e.g., allowable HTTP methods, and request and response media types that are required be supported).\n\nHistorically, registered relation types have been identified with a URI [RFC3986] by prefixing their names with an application-defined base URI (e.g., see Appendix A.2). This practice is NOT RECOMMENDED, because the resulting strings will not be considered equivalent to the registered relation types by other applications. Applications that do use such URIs internally MUST NOT use them in link serialisations that do not explicitly accommodate them.\n\n##### 2.1.1.1. Registering Link Relation Types\n\nThe “Link Relations” registry is located at “https://www.iana.org/assignments/link-relations/”. Registration requests can be made by following the instructions located there or by sending an email to the “link-relations@ietf.org” mailing list.\n\nRegistration requests consist of at least the following information:\n\n- **Relation Name** : The name of the relation type\n- **Description** : A short English description of the type’s semantics. It SHOULD be stated in terms of the relationship between the link context and link target.\n- **Reference** : Reference to the document that specifies the link relation type, preferably including a URI that can be used to retrieve a copy of the document. An indication of the relevant section(s) can also be included but is not required.\n\nThe expert(s) can define additional fields to be collected in the registry.\n\nGeneral requirements for registered relation types are described in Section 2.1.1.\n\nRegistrations MUST reference a freely available, stable specification.\n\nNote that relation types can be registered by third parties (including the expert(s)), if the expert(s) determines that an unregistered relation type is widely deployed and not likely to be registered in a timely manner otherwise. Such registrations still are subject to the requirements defined, including the need to reference a specification.\n\n##### 2.1.1.2. Registration Request Processing\n\nRelation types are registered using the Specification Required policy (see Section 4.6 of [RFC8126]), which implies review and approval by a designated expert.\n\nThe goal of the registry is to reflect common use of links on the Internet. Therefore, the expert(s) should be strongly biased towards approving registrations, unless they are abusive, frivolous, not likely to be used on the Internet, or actively harmful to the Internet and/or the Web (not merely aesthetically displeasing or architecturally dubious). As stated in Section 2.1.1, the expert(s) can withhold registration of names that are too general for the proposed application.\n\nThe expert(s) will clearly identify any issues that cause a registration to be refused. Advice about the semantics of a proposed link relation type can be given, but if it does not block registration, this should be explicitly stated.\n\nWhen a request is approved, the expert(s) will inform IANA, and the registration will be processed. The IESG is the final arbiter of any objection.\n\n#### 2.1.2. Extension Relation Types\n\nApplications that don’t wish to register a relation type can use an extension relation type, which is a URI [RFC3986] that uniquely identifies the relation type. Although the URI can point to a resource that contains a definition of the semantics of the relation type, clients SHOULD NOT automatically access that resource to avoid overburdening its server.\n\nThe URI used for an extension relation type SHOULD be under the control of the person or party defining it or be delegated to them.\n\nWhen extension relation types are compared, they MUST be compared as strings (after converting to URIs if serialised in a different format) in a case-insensitive fashion, character by character. Because of this, all-lowercase URIs SHOULD be used for extension relations.\n\nNote that while extension relation types are required to be URIs, a serialisation of links can specify that they are expressed in another form, as long as they can be converted to URIs.\n\n### 2.2. Target Attributes\n\nTarget attributes are a list of key/value pairs that describe the link or its target; for example, a media type hint.\n\nThey can be defined both by individual link relation types and by link serialisations.\n\nThis specification does not attempt to coordinate the name of target attributes, their cardinality, or use. Those creating and maintaining serialisations SHOULD coordinate their target attributes to avoid conflicts in semantics or syntax and MAY define their own registries of target attributes.\n\nThe names of target attributes SHOULD conform to the token rule, but SHOULD NOT include any of the characters “%”, “’”, or “*”, for portability across serialisations and MUST be compared in a case-insensitive fashion.\n\nTarget attribute definitions SHOULD specify:\n\n- The serialisation of their values into Unicode or a subset thereof, to maximise their chances of portability across link serialisations.\n- The semantics and error handling of multiple occurrences of the target attribute on a given link.\n\nThis specification does define target attributes for use in the Link HTTP header field in Section 3.4.\n\n## 4. IANA Considerations\n\n### 4.2. Link Relation Type Registry\n\nThis specification updates the registration procedures for the “Link Relation Types” registry; see Section 2.1.1.1. Also, all references to RFC 5988 in that registry have been replaced with references to this document.\n\nIANA will direct any incoming requests regarding the registry to this document and, if defined, the processes established by the expert(s); typically, this will mean referring them to the registry Web page.\n\nNote that the expert(s) is allowed (as per Section 2.1.1.1) to define additional fields to be collected in the registry.\n\n### 4.3. Link Relation Application Data Registry\n\nPer this specification, IANA has removed the “Link Relation Application Data” registry, as it has not been used, and future use is not anticipated.\n\n## 5. Security Considerations\n\nThe content of the Link header field is not secure, private, or integrity-guaranteed. Use of Transport Layer Security (TLS) with HTTP [RFC2818] is currently the only end-to-end way to provide these properties.\n\nLink applications ought to consider the attack vectors opened by automatically following, trusting, or otherwise using links gathered from HTTP header fields.\n\nFor example, Link header fields that use the “anchor” parameter to associate a link’s context with another resource cannot be trusted since they are effectively assertions by a third party that could be incorrect or malicious. Applications can mitigate this risk by specifying that such links should be discarded unless some relationship between the resources is established (e.g., they share the same authority).\n\nDereferencing links has a number of risks, depending on the application in use. For example, the Referer header [RFC7231] can expose information about the application’s state (including private information) in its value. Likewise, cookies [RFC6265] are another mechanism that, if used, can become an attack vector. Applications can mitigate these risks by carefully specifying how such mechanisms should operate.\n\nThe Link header field makes extensive use of IRIs and URIs. See [RFC3987], Section 8 for security considerations relating to IRIs. See [RFC3986], Section 7 for security considerations relating to URIs. See [RFC7230], Section 9 for security considerations relating to HTTP header fields.\n\n## 6. Internationalisation Considerations\n\nLink targets may need to be converted to URIs in order to express them in serialisations that do not support IRIs. This includes the Link HTTP header field.\n\nSimilarly, the anchor parameter of the Link header field does not support IRIs; therefore, IRIs must be converted to URIs before inclusion there.\n\nRelation types are defined as URIs, not IRIs, to aid in their comparison. It is not expected that they will be displayed to end users.\n\nNote that registered Relation Names are required to be lowercase ASCII letters.\n\n## 7. References\n\n### 7.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC3864]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, [DOI 10.17487/RFC3864](https://dx.doi.org/10.17487/RFC3864), September 2004, <[https://www.rfc-editor.org/info/rfc3864](https://www.rfc-editor.org/info/rfc3864)>.\n\n[RFC3986]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[https://www.rfc-editor.org/info/rfc3986](https://www.rfc-editor.org/info/rfc3986)>.\n\n[RFC3987]\n\nDuerst, M. and M. Suignard, “[Internationalized Resource Identifiers (IRIs)](https://www.rfc-editor.org/rfc/rfc3987.html)”, RFC 3987, [DOI 10.17487/RFC3987](https://dx.doi.org/10.17487/RFC3987), January 2005, <[https://www.rfc-editor.org/info/rfc3987](https://www.rfc-editor.org/info/rfc3987)>.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC5646]\n\nPhillips, A., Ed. and M. Davis, Ed., “[Tags for Identifying Languages](https://www.rfc-editor.org/rfc/rfc5646.html)”, [BCP 47](https://www.rfc-editor.org/info/bcp47), RFC 5646, [DOI 10.17487/RFC5646](https://dx.doi.org/10.17487/RFC5646), September 2009, <[https://www.rfc-editor.org/info/rfc5646](https://www.rfc-editor.org/info/rfc5646)>.\n\n[RFC6838]\n\nFreed, N., Klensin, J., and T. Hansen, “[Media Type Specifications and Registration Procedures](https://www.rfc-editor.org/rfc/rfc6838.html)”, [BCP 13](https://www.rfc-editor.org/info/bcp13), RFC 6838, [DOI 10.17487/RFC6838](https://dx.doi.org/10.17487/RFC6838), January 2013, <[https://www.rfc-editor.org/info/rfc6838](https://www.rfc-editor.org/info/rfc6838)>.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[https://www.rfc-editor.org/info/rfc7230](https://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, [DOI 10.17487/RFC7231](https://dx.doi.org/10.17487/RFC7231), June 2014, <[https://www.rfc-editor.org/info/rfc7231](https://www.rfc-editor.org/info/rfc7231)>.\n\n[RFC8126]\n\nCotton, M., Leiba, B., and T. Narten, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc8126.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 8126, [DOI 10.17487/RFC8126](https://dx.doi.org/10.17487/RFC8126), June 2017, <[https://www.rfc-editor.org/info/rfc8126](https://www.rfc-editor.org/info/rfc8126)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[RFC8187]\n\nReschke, J., “[Indicating Character Encoding and Language for HTTP Header Field Parameters](https://www.rfc-editor.org/rfc/rfc8187.html)”, RFC 8187, [DOI 10.17487/RFC8187](https://dx.doi.org/10.17487/RFC8187), September 2017, <[https://www.rfc-editor.org/info/rfc8187](https://www.rfc-editor.org/info/rfc8187)>.\n\n[W3C.REC-css3-mediaqueries-20120619]\n\nRivoal, F., “[Media Queries](http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619)”, World Wide Web Consortium Recommendation REC-css3-mediaqueries-20120619, June 2012, <[http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619](http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619)>.\n\n### 7.2. Informative References\n\n[RFC2046]\n\nFreed, N. and N. Borenstein, “[Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types](https://www.rfc-editor.org/rfc/rfc2046.html)”, RFC 2046, [DOI 10.17487/RFC2046](https://dx.doi.org/10.17487/RFC2046), November 1996, <[https://www.rfc-editor.org/info/rfc2046](https://www.rfc-editor.org/info/rfc2046)>.\n\n[RFC2818]\n\nRescorla, E., “[HTTP Over TLS](https://www.rfc-editor.org/rfc/rfc2818.html)”, RFC 2818, [DOI 10.17487/RFC2818](https://dx.doi.org/10.17487/RFC2818), May 2000, <[https://www.rfc-editor.org/info/rfc2818](https://www.rfc-editor.org/info/rfc2818)>.\n\n[RFC4287]\n\nNottingham, M., Ed. and R. Sayre, Ed., “[The Atom Syndication Format](https://www.rfc-editor.org/rfc/rfc4287.html)”, RFC 4287, [DOI 10.17487/RFC4287](https://dx.doi.org/10.17487/RFC4287), December 2005, <[https://www.rfc-editor.org/info/rfc4287](https://www.rfc-editor.org/info/rfc4287)>.\n\n[RFC6265]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, [DOI 10.17487/RFC6265](https://dx.doi.org/10.17487/RFC6265), April 2011, <[https://www.rfc-editor.org/info/rfc6265](https://www.rfc-editor.org/info/rfc6265)>.\n\n[W3C.REC-html5-20141028]\n\nHickson, I., Berjon, R., Faulkner, S., Leithead, T., Navara, E., O'Connor, T., and S. Pfeiffer, “[HTML5](http://www.w3.org/TR/2014/REC-html5-20141028)”, World Wide Web Consortium Recommendation REC-html5-20141028, October 2014, <[http://www.w3.org/TR/2014/REC-html5-20141028](http://www.w3.org/TR/2014/REC-html5-20141028)>.\n\n## Appendix A. Notes on Other Link Serialisations\n\nHeader fields (Section 3) are only one serialisation of links; other specifications have defined alternative serialisations.\n\n### A.1. Link Serialisation in HTML\n\nHTML motivated the original syntax of the Link header field, and many of the design decisions in this document are driven by a desire to stay compatible with it.\n\nIn HTML, the link element can be mapped to links as specified here by using the “href” attribute for the target URI, and “rel” to convey the relation type, as in the Link header field. The context of the link is the URI associated with the entire HTML document. HTML also defines several attributes on links that can be seen as target attributes, including “media”, “hreflang”, “type”, and “sizes”.\n\nSection 4.8 of HTML5 [W3C.REC-html5-20141028] defines modern HTML links. That document links to the Microformats Wiki as a registry; over time, the IANA registry ought to mirror its contents and, ideally, eventually replace it (although that depends on the HTML community).\n\nSurveys of existing HTML content have shown that unregistered link relation types that are not URIs are (perhaps inevitably) common. Consuming HTML implementations ought not consider such unregistered short links to be errors, but rather relation types with a local scope (i.e., their meaning is specific and perhaps private to that document).\n\nFinally, the HTML specification gives a special meaning when the “alternate” relation types coincide with other relation types in the same link. Such links ought to be serialised in the Link header field using a single list of relation-types (e.g., rel=”alternate stylesheet”) to preserve this relationship.\n\n### A.2. Link Serialisation in Atom\n\nAtom [RFC4287] is a link serialisation that conveys links in the atom:link element, with the “href” attribute indicating the link target and the “rel” attribute containing the relation type. The context of the link is either a feed locator or an entry ID, depending on where it appears; generally, feed-level links are obvious candidates for transmission as a Link header field.\n\nWhen serialising an atom:link into a Link header field, it is necessary to convert link targets (if used) to URIs.\n\nAtom defines extension relation types in terms of IRIs. This specification redefines them as URIs, to simplify and reduce errors in their comparison.\n\nAtom allows registered link relation types to be serialised as absolute URIs using a prefix, “http://www.iana.org/assignments/relation/”. This prefix is specific to the Atom serialisation.\n\nFurthermore, link relation types are always compared in a case-sensitive fashion; therefore, registered link relation types SHOULD be converted to their registered form (usually, lowercase) when serialised in an Atom document.\n\nNote also that while the Link header field allows multiple relations to be serialised in a single link, atom:link does not. In this case, a single link-value may map to several atom:link elements.\n\nAs with HTML, atom:link defines some attributes that are not explicitly mirrored in the Link header field syntax, but they can also be used as link-extensions to maintain fidelity.\n\n## Appendix B. Algorithms for Parsing Link Header Fields\n\nThis appendix outlines a set of non-normative algorithms: for parsing the Link header(s) out of a header set, for parsing a Link header field value, and algorithms for parsing generic parts of the field value.\n\nThese algorithms are more permissive than the ABNF defining the syntax might suggest; the error handling embodied in them is a reasonable approach, but not one that is required. As such they are advisory only, and in cases where there is disagreement, the correct behaviour is defined by the body of this specification.\n\n### B.1. Parsing a Header Set for Links\n\nThis algorithm can be used to parse the Link header fields that a HTTP header set contains. Given a header_set of (string field_name, string field_value) pairs, assuming ASCII encoding, it returns a list of link objects.\n\n1. Let field_values be a list containing the members of header_set whose field_name is a case-insensitive match for “link”.\n2. Let links be an empty list.\n3. For each field_value in field_values:\n 1. Let value_links be the result of Parsing A Link Field Value ( Appendix B.2 ) from field_value.\n 2. Append each member of value_links to links.\n4. Return links.\n\n### B.2. Parsing a Link Field Value\n\nThis algorithm parses zero or more comma-separated link-values from a Link header field. Given a string field_value, assuming ASCII encoding, it returns a list of link objects.\n\n1. Let links be an empty list.\n2. While field_value has content:\n 1. Consume any leading OWS.\n 2. If the first character is not “<”, return links.\n 3. Discard the first character (“<”).\n 4. Consume up to but not including the first “>” character or end of field_value and let the result be target_string.\n 5. If the next character is not “>”, return links.\n 6. Discard the leading “>” character.\n 7. Let link_parameters be the result of Parsing Parameters ( Appendix B.3 ) from field_value (consuming zero or more characters of it).\n 8. Let target_uri be the result of relatively resolving (as per [RFC3986] , Section 5.2) target_string. Note that any base URI carried in the payload body is NOT used.\n 9. Let relations_string be the second item of the first tuple of link_parameters whose first item matches the string “rel” or the empty string (“”) if it is not present.\n 10. Split relations_string on RWS (removing it in the process) into a list of string relation_types.\n 11. Let context_string be the second item of the first tuple of link_parameters whose first item matches the string “anchor”. If it is not present, context_string is the URL of the representation carrying the Link header [RFC7231] , Section 3.1.4.1, serialised as a URI. Where the URL is anonymous, context_string is null.\n 12. Let context_uri be the result of relatively resolving (as per [RFC3986] , Section 5.2) context_string, unless context_string is null, in which case context is null. Note that any base URI carried in the payload body is NOT used.\n 13. Let target_attributes be an empty list.\n 14. For each tuple (param_name, param_value) of link_parameters:\n 1. If param_name matches “rel” or “anchor”, skip this tuple.\n 2. If param_name matches “media”, “title”, “title*” or “type” and target_attributes already contains a tuple whose first element matches the value of param_name, skip this tuple.\n 3. Append (param_name, param_value) to target_attributes.\n 15. Let star_param_names be the set of param_names in the (param_name, param_value) tuples of link_parameters where the last character of param_name is an asterisk (“*”).\n 16. For each star_param_name in star_param_names:\n 1. Let base_param_name be star_param_name with the last character removed.\n 2. If the implementation does not choose to support an internationalised form of a parameter named base_param_name for any reason (including, but not limited to, it being prohibited by the parameter’s specification), remove all tuples from link_parameters whose first member is star_param_name, and skip to the next star_param_name.\n 3. Remove all tuples from link_parameters whose first member is base_param_name.\n 4. Change the first member of all tuples in link_parameters whose first member is star_param_name to base_param_name.\n 17. For each relation_type in relation_types:\n 1. Case-normalise relation_type to lowercase.\n 2. Append a link object to links with the target target_uri, relation type of relation_type, context of context_uri, and target attributes target_attributes.\n3. Return links.\n\n### B.3. Parsing Parameters\n\nThis algorithm parses the parameters from a header field value. Given input, an ASCII string, it returns a list of (string parameter_name, string parameter_value) tuples that it contains. input is modified to remove the parsed parameters.\n\n1. Let parameters be an empty list.\n2. While input has content:\n 1. Consume any leading OWS.\n 2. If the first character is not “;”, return parameters.\n 3. Discard the leading “;” character.\n 4. Consume any leading OWS.\n 5. Consume up to but not including the first BWS, “=”, “;”, “,” character or end of input and let the result be parameter_name.\n 6. Consume any leading BWS.\n 7. If the next character is “=”:\n 1. Discard the leading “=” character.\n 2. Consume any leading BWS.\n 3. If the next character is DQUOTE, let parameter_value be the result of Parsing a Quoted String ( Appendix B.4 ) from input (consuming zero or more characters of it).\n 4. Else, consume the contents up to but not including the first “;” or “,” character, or up to the end of input, and let the results be parameter_value.\n 5. If the last character of parameter_name is an asterisk (“*”), decode parameter_value according to [RFC8187] . Continue processing input if an unrecoverable error is encountered.\n 8. Else:\n 1. Let parameter_value be an empty string.\n 9. Case-normalise parameter_name to lowercase.\n 10. Append (parameter_name, parameter_value) to parameters.\n 11. Consume any leading OWS.\n 12. If the next character is “,” or the end of input, stop processing input and return parameters.\n\n### B.4. Parsing a Quoted String\n\nThis algorithm parses a quoted string, as per [RFC7230], Section 3.2.6. Given input, an ASCII string, it returns an unquoted string. input is modified to remove the parsed string.\n\n1. Let output be an empty string.\n2. If the first character of input is not DQUOTE, return output.\n3. Discard the first character.\n4. While input has content:\n 1. If the first character is a backslash (“\\”):\n 1. Discard the first character.\n 2. If there is no more input, return output.\n 3. Else, consume the first character and append it to output.\n 2. Else, if the first character is DQUOTE, discard it and return output.\n 3. Else, consume the first character and append it to output.\n5. Return output.\n\n## Appendix C. Changes from RFC 5988\n\nThis specification has the following differences from its predecessor, RFC 5988:\n\n- The initial relation type registrations were removed, since they’ve already been registered by RFC 5988.\n- The introduction has been shortened.\n- The “Link Relation Application Data” registry has been removed.\n- Incorporated errata.\n- Updated references.\n- Link cardinality was clarified.\n- Terminology was changed from “target IRI” and “context IRI” to “link target” and “link context”, respectively.\n- Made assigning a URI to registered relation types serialisation specific.\n- Removed misleading statement that the Link header field is semantically equivalent to HTML and Atom links.\n- More carefully defined and used “link serialisations” and “link applications.”\n- Clarified the cardinality of target attributes (generically and for “type”).\n- Corrected the default link context for the Link header field, to be dependent upon the identity of the representation (as per RFC 7231).\n- Defined a suggested parsing algorithm for the Link header.\n- The value space of target attributes and their definition has been specified.\n- The ABNF has been updated to be compatible with [RFC7230] . In particular, whitespace is now explicit.\n- Some parameters on the HTTP header field can now appear as a token.\n- Parameters on the HTTP header can now be valueless.\n- Handling of quoted strings is now defined by [RFC7230] .\n- The type header field parameter now needs to be quoted (as token does not allow “/”).\n\n## Author's Address\n\n**Mark Nottingham**\nEmail: [mnot@mnot.net](mailto:mnot@mnot.net)\nURI: [https://www.mnot.net/](https://www.mnot.net/)", "znaku_textu": 35249, "slov": 4914, "odkazu": 169, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:09", "sha256": "b1d8a32291d9cf6698dad45d2e2049ae6541fd8a5d4e8990aabef66d0f3c12d1", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc5988.html", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc8288", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://dx.doi.org/10.17487/RFC3864", "https://www.rfc-editor.org/info/rfc3864", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "https://www.rfc-editor.org/info/rfc3986", "https://www.rfc-editor.org/rfc/rfc3987.html", "https://dx.doi.org/10.17487/RFC3987", "https://www.rfc-editor.org/info/rfc3987", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "https://www.rfc-editor.org/info/rfc5234", "https://www.rfc-editor.org/rfc/rfc5646.html", "https://www.rfc-editor.org/info/bcp47", "https://dx.doi.org/10.17487/RFC5646", "https://www.rfc-editor.org/info/rfc5646", "https://www.rfc-editor.org/rfc/rfc6838.html", "https://www.rfc-editor.org/info/bcp13", "https://dx.doi.org/10.17487/RFC6838", "https://www.rfc-editor.org/info/rfc6838", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://dx.doi.org/10.17487/RFC7230", "https://www.rfc-editor.org/info/rfc7230", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://dx.doi.org/10.17487/RFC7231", "https://www.rfc-editor.org/info/rfc7231", "https://www.rfc-editor.org/rfc/rfc8126.html", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC8126", "https://www.rfc-editor.org/info/rfc8126", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/rfc/rfc8187.html", "https://dx.doi.org/10.17487/RFC8187", "https://www.rfc-editor.org/info/rfc8187", "http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619", "https://www.rfc-editor.org/rfc/rfc2046.html", "https://dx.doi.org/10.17487/RFC2046", "https://www.rfc-editor.org/info/rfc2046", "https://www.rfc-editor.org/rfc/rfc2818.html", "https://dx.doi.org/10.17487/RFC2818", "https://www.rfc-editor.org/info/rfc2818", "https://www.rfc-editor.org/rfc/rfc4287.html", "https://dx.doi.org/10.17487/RFC4287", "https://www.rfc-editor.org/info/rfc4287", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://dx.doi.org/10.17487/RFC6265", "https://www.rfc-editor.org/info/rfc6265", "http://www.w3.org/TR/2014/REC-html5-20141028", "https://www.mnot.net/"]} {"url": "https://httpwg.org/specs/rfc8297.html", "titulek": "RFC 8297 - An HTTP Status Code for Indicating Hints", "h1": "An HTTP Status Code for Indicating Hints", "popis": "This memo introduces an informational HTTP status code that can be used to convey hints that help a client make preparations for processing the final response.", "klicova_slova": "push, preload", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC8297", "og:description": "An HTTP Status Code for Indicating Hints", "og:url": "https://httpwg.org/specs/rfc8297.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of this Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "2. HTTP Status Code 103: Early Hints"}, {"uroven": 2, "text": "3. Security Considerations"}, {"uroven": 2, "text": "4. IANA Considerations"}, {"uroven": 2, "text": "5. References"}, {"uroven": 3, "text": "5.1. Normative References"}, {"uroven": 3, "text": "5.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Acknowledgements"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThis memo introduces an informational HTTP status code that can be used to convey hints that help a client make preparations for processing the final response.\n\n## Status of this Memo\n\nThis document is not an Internet Standards Track specification; it is published for examination, experimental implementation, and evaluation.\n\nThis document defines an Experimental Protocol for the Internet community. This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc8297](https://www.rfc-editor.org/info/rfc8297).\n\n## Copyright Notice\n\nCopyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. HTTP Status Code 103: Early Hints\n- 3. Security Considerations\n- 4. IANA Considerations\n- 5. References\n - 5.1. Normative References\n - 5.2. Informative References\n- Appendix A. Acknowledgements\n- Author's Address\n\n## 1. Introduction\n\nIt is common for HTTP responses to contain links to external resources that need to be fetched prior to their use, for example, rendering HTML by a web browser. Having such links available to the client as early as possible helps to minimize perceived latency.\n\nThe \"preload\" [Preload] link relation can be used to convey such links in the Link header field of an HTTP response. However, it is not always possible for an origin server to generate the header block of a final response immediately after receiving a request. For example, the origin server might delegate a request to an upstream HTTP server running at a distant location, or the status code might depend on the result of a database query.\n\nThe dilemma here is that even though it is preferable for an origin server to send some header fields as soon as it receives a request, it cannot do so until the status code and the full header fields of the final HTTP response are determined.\n\nHTTP/2 [RFC7540] server push can accelerate the delivery of resources, but only resources for which the server is authoritative. The other limitation of server push is that the response will be transmitted regardless of whether the client has the response cached. At the cost of spending one extra round trip compared to server push in the worst case, delivering Link header fields in a timely fashion is more flexible and might consume less bandwidth.\n\nThis memo defines a status code for sending an informational response ([RFC7231], [Section 6.2](https://www.rfc-editor.org/rfc/rfc7231.html#section-6.2)) that contains header fields that are likely to be included in the final response. A server can send the informational response containing some of the header fields to help the client start making preparations for processing the final response, and then run time-consuming operations to generate the final response. The informational response can also be used by an origin server to trigger HTTP/2 server push at a caching intermediary.\n\n### 1.1. Notational Conventions\n\nThe 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.\n\n## 2. HTTP Status Code 103: Early Hints\n\nThe 103 (Early Hints) informational status code indicates to the client that the server is likely to send a final response with the header fields included in the informational response.\n\nTypically, a server will include the header fields sent in a 103 (Early Hints) response in the final response as well. However, there might be cases when this is not desirable, such as when the server learns that the header fields in the 103 (Early Hints) response are not correct before the final response is sent.\n\nA client can speculatively evaluate the header fields included in a 103 (Early Hints) response while waiting for the final response. For example, a client might recognize a Link header field value containing the relation type \"preload\" and start fetching the target resource. However, these header fields only provide hints to the client; they do not replace the header fields on the final response.\n\nAside from performance optimizations, such evaluation of the 103 (Early Hints) response's header fields MUST NOT affect how the final response is processed. A client MUST NOT interpret the 103 (Early Hints) response header fields as if they applied to the informational response itself (e.g., as metadata about the 103 (Early Hints) response).\n\nA server MAY use a 103 (Early Hints) response to indicate only some of the header fields that are expected to be found in the final response. A client SHOULD NOT interpret the nonexistence of a header field in a 103 (Early Hints) response as a speculation that the header field is unlikely to be part of the final response.\n\nThe following example illustrates a typical message exchange that involves a 103 (Early Hints) response.\n\nClient request:\n\n```\n GET / HTTP/1.1\n Host: example.com\n```\n\nServer response:\n\n```\n HTTP/1.1 103 Early Hints\n Link: ; rel=preload; as=style\n Link: ; rel=preload; as=script\n\n HTTP/1.1 200 OK\n Date: Fri, 26 May 2017 10:02:11 GMT\n Content-Length: 1234\n Content-Type: text/html; charset=utf-8\n Link: ; rel=preload; as=style\n Link: ; rel=preload; as=script\n\n \n [... rest of the response body is omitted from the example ...]\n```\n\nAs is the case with any informational response, a server might emit more than one 103 (Early Hints) response prior to sending a final response. This can happen, for example, when a caching intermediary generates a 103 (Early Hints) response based on the header fields of a stale-cached response, and then forwards a 103 (Early Hints) response and a final response that were sent from the origin server in response to a revalidation request.\n\nA server MAY emit multiple 103 (Early Hints) responses with additional header fields as new information becomes available while the request is being processed. It does not need to repeat the fields that were already emitted, though it doesn't have to exclude them either. The client can consider any combination of header fields received in multiple 103 (Early Hints) responses when anticipating the list of header fields expected in the final response.\n\nThe following example illustrates a series of responses that a server might emit. In the example, the server uses two 103 (Early Hints) responses to notify the client that it is likely to send three Link header fields in the final response. Two of the three expected header fields are found in the final response. The other header field is replaced by another Link header field that contains a different value.\n\n```\n HTTP/1.1 103 Early Hints\n Link: ; rel=preload; as=style\n\n HTTP/1.1 103 Early Hints\n Link: ; rel=preload; as=style\n Link: ; rel=preload; as=script\n\n HTTP/1.1 200 OK\n Date: Fri, 26 May 2017 10:02:11 GMT\n Content-Length: 1234\n Content-Type: text/html; charset=utf-8\n Link: ; rel=preload; as=style\n Link: ; rel=preload; as=style\n Link: ; rel=preload; as=script\n\n \n [... rest of the response body is omitted from the example ...]\n```\n\n## 3. Security Considerations\n\nSome clients might have issues handling a 103 (Early Hints) response, because informational responses are rarely used in reply to requests not including an Expect header field ([RFC7231], [Section 5.1.1](https://www.rfc-editor.org/rfc/rfc7231.html#section-5.1.1)).\n\nIn particular, an HTTP/1.1 client that mishandles an informational response as a final response is likely to consider all responses to the succeeding requests sent over the same connection to be part of the final response. Such behavior might constitute a cross-origin information disclosure vulnerability in case the client multiplexes requests to different origins onto a single persistent connection.\n\nTherefore, a server might refrain from sending 103 (Early Hints) responses over HTTP/1.1 unless the client is known to handle informational responses correctly.\n\nHTTP/2 clients are less likely to suffer from incorrect framing since handling of the response header fields does not affect how the end of the response body is determined.\n\n## 4. IANA Considerations\n\nThe following entry has been registered in the \"HTTP Status Codes\" registry:\n\n- Code: 103\n- Description: Early Hints\n- Specification: RFC 8297 (this document)\n\n## 5. References\n\n### 5.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, [DOI 10.17487/RFC7231](https://dx.doi.org/10.17487/RFC7231), June 2014, <[https://www.rfc-editor.org/info/rfc7231](https://www.rfc-editor.org/info/rfc7231)>.\n\n[RFC7540]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol Version 2 (HTTP/2)](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[https://www.rfc-editor.org/info/rfc7540](https://www.rfc-editor.org/info/rfc7540)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n### 5.2. Informative References\n\n[Preload]\n\nGrigorik, I., Ed. and Y. Weiss, Ed., “[Preload](https://www.w3.org/TR/preload/)”, W3C Candidate Recommendation, October 2017, <[https://www.w3.org/TR/preload/](https://www.w3.org/TR/preload/)>.\n\n## Appendix A. Acknowledgements\n\nThanks to Tatsuhiro Tsujikawa for coming up with the idea of sending the Link header fields using an informational response.\n\nMark Nottingham and Willy Tarreau provided substantial help in clarifying the semantics of the status code.\n\nEarly stages of the author's work on this document was supported by DeNA Co., Ltd. during his employment there.\n\n## Author's Address\n\n**Kazuho Oku**\nFastly\nEMail: [kazuhooku@gmail.com](mailto:kazuhooku@gmail.com)", "znaku_textu": 11614, "slov": 1661, "odkazu": 59, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:59", "sha256": "bfe351e6dc5fd0561a1e78b8527a7c89a9ac90292ffc70534a09178502f3fcbf", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc8297", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://dx.doi.org/10.17487/RFC7231", "https://www.rfc-editor.org/info/rfc7231", "https://www.rfc-editor.org/rfc/rfc7540.html", "https://dx.doi.org/10.17487/RFC7540", "https://www.rfc-editor.org/info/rfc7540", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.w3.org/TR/preload/"]} {"url": "https://httpwg.org/specs/rfc8336.html", "titulek": "RFC 8336 - The ORIGIN HTTP/2 Frame", "h1": "The ORIGIN HTTP/2 Frame", "popis": "This document specifies the ORIGIN frame for HTTP/2, to indicate what origins are available on a given connection.", "klicova_slova": "", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC8336", "og:description": "The ORIGIN HTTP/2 Frame", "og:url": "https://httpwg.org/specs/rfc8336.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of this Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "2. The ORIGIN HTTP/2 Frame"}, {"uroven": 3, "text": "2.1. Syntax"}, {"uroven": 3, "text": "2.2. Processing ORIGIN Frames"}, {"uroven": 3, "text": "2.3. The Origin Set"}, {"uroven": 3, "text": "2.4. Authority, Push, and Coalescing with ORIGIN"}, {"uroven": 2, "text": "3. IANA Considerations"}, {"uroven": 2, "text": "4. Security Considerations"}, {"uroven": 2, "text": "5. References"}, {"uroven": 3, "text": "5.1. Normative References"}, {"uroven": 3, "text": "5.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Non-Normative Processing Algorithm"}, {"uroven": 2, "text": "Appendix B. Operational Considerations for Servers"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document specifies the ORIGIN frame for HTTP/2, to indicate what origins are available on a given connection.\n\n## Status of this Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc8336](https://www.rfc-editor.org/info/rfc8336).\n\n## Copyright Notice\n\nCopyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. The ORIGIN HTTP/2 Frame\n - 2.1. Syntax\n - 2.2. Processing ORIGIN Frames\n - 2.3. The Origin Set\n - 2.4. Authority, Push, and Coalescing with ORIGIN\n- 3. IANA Considerations\n- 4. Security Considerations\n- 5. References\n - 5.1. Normative References\n - 5.2. Informative References\n- Appendix A. Non-Normative Processing Algorithm\n- Appendix B. Operational Considerations for Servers\n- Authors' Addresses\n\n## 1. Introduction\n\nHTTP/2 [RFC7540] allows clients to coalesce different origins [RFC6454] onto the same connection when certain conditions are met. However, in some cases, a connection is not usable for a coalesced origin, so the 421 (Misdirected Request) status code ([RFC7540], Section 9.1.2) was defined.\n\nUsing a status code in this manner allows clients to recover from misdirected requests, but at the penalty of adding latency. To address that, this specification defines a new HTTP/2 frame type, \"ORIGIN\", to allow servers to indicate for which origins a connection is usable.\n\nAdditionally, experience has shown that HTTP/2's requirement to establish server authority using both DNS and the server's certificate is onerous. This specification relaxes the requirement to check DNS when the ORIGIN frame is in use. Doing so has additional benefits, such as removing the latency associated with some DNS lookups.\n\n### 1.1. Notational Conventions\n\nThe 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.\n\n## 2. The ORIGIN HTTP/2 Frame\n\nThis document defines a new HTTP/2 frame type ([RFC7540], Section 4) called ORIGIN, that allows a server to indicate what origin(s) [RFC6454] the server would like the client to consider as members of the Origin Set (Section 2.3) for the connection within which it occurs.\n\n### 2.1. Syntax\n\nThe ORIGIN frame type is 0xc (decimal 12) and contains zero or more instances of the Origin-Entry field.\n\n```\n+-------------------------------+-------------------------------+\n| Origin-Entry (*) ...\n+-------------------------------+-------------------------------+\n```\n\nAn Origin-Entry is a length-delimited string:\n\n```\n+-------------------------------+-------------------------------+\n| Origin-Len (16) | ASCII-Origin? ...\n+-------------------------------+-------------------------------+\n```\n\nSpecifically:\n\nOrigin-Len:\n\nAn unsigned, 16-bit integer indicating the length, in octets, of the ASCII-Origin field.\n\nOrigin:\n\nAn OPTIONAL sequence of characters containing the ASCII serialization of an origin ([RFC6454], Section 6.2) that the sender asserts this connection is or could be authoritative for.\n\nThe ORIGIN frame does not define any flags. However, future updates to this specification MAY define flags. See Section 2.2.\n\n### 2.2. Processing ORIGIN Frames\n\nThe ORIGIN frame is a non-critical extension to HTTP/2. Endpoints that do not support this frame can safely ignore it upon receipt.\n\nWhen received by an implementing client, it is used to initialize and manipulate the Origin Set (see Section 2.3), thereby changing how the client establishes authority for origin servers (see Section 2.4).\n\nThe ORIGIN frame MUST be sent on stream 0; an ORIGIN frame on any other stream is invalid and MUST be ignored.\n\nLikewise, the ORIGIN frame is only valid on connections with the \"h2\" protocol identifier or when specifically nominated by the protocol's definition; it MUST be ignored when received on a connection with the \"h2c\" protocol identifier.\n\nThis specification does not define any flags for the ORIGIN frame, but future updates to this specification (through IETF consensus) might use them to change its semantics. The first four flags (0x1, 0x2, 0x4, and 0x8) are reserved for backwards-incompatible changes; therefore, when any of them are set, the ORIGIN frame containing them MUST be ignored by clients conforming to this specification, unless the flag's semantics are understood. The remaining flags are reserved for backwards-compatible changes and do not affect processing by clients conformant to this specification.\n\nThe ORIGIN frame describes a property of the connection and therefore is processed hop by hop. An intermediary MUST NOT forward ORIGIN frames. Clients configured to use a proxy MUST ignore any ORIGIN frames received from it.\n\nEach ASCII-Origin field in the frame's payload MUST be parsed as an ASCII serialization of an origin ([RFC6454], Section 6.2). If parsing fails, the field MUST be ignored.\n\nNote that the ORIGIN frame does not support wildcard names (e.g., \"*.example.com\") in Origin-Entry. As a result, sending ORIGIN when a wildcard certificate is in use effectively disables any origins that are not explicitly listed in the ORIGIN frame(s) (when the client understands ORIGIN).\n\nSee Appendix A for an illustrative algorithm for processing ORIGIN frames.\n\n### 2.3. The Origin Set\n\nThe set of origins (as per [RFC6454]) that a given connection might be used for is known in this specification as the Origin Set.\n\nBy default, the Origin Set for a connection is uninitialized. An uninitialized Origin Set means that clients apply the coalescing rules from Section 9.1.1 of [RFC7540].\n\nWhen an ORIGIN frame is first received and successfully processed by a client, the connection's Origin Set is defined to contain an initial origin. The initial origin is composed from:\n\n- Scheme: \"https\"\n- Host: the value sent in Server Name Indication (SNI) ( [RFC6066] , Section 3) converted to lower case; if SNI is not present, the remote address of the connection (i.e., the server's IP address)\n- Port: the remote port of the connection (i.e., the server's port)\n\nThe contents of that ORIGIN frame (and subsequent ones) allow the server to incrementally add new origins to the Origin Set, as described in Section 2.2.\n\nThe Origin Set is also affected by the 421 (Misdirected Request) response status code, as defined in [RFC7540], Section 9.1.2. Upon receipt of a response with this status code, implementing clients MUST create the ASCII serialization of the corresponding request's origin (as per [RFC6454], Section 6.2) and remove it from the connection's Origin Set, if present.\n\nNote:\n\nWhen sending an ORIGIN frame to a connection that is initialized as an alternative service [RFC7838], the initial Origin Set (Section 2.3) will contain an origin with the appropriate scheme and hostname (since RFC 7838 specifies that the origin's hostname be sent in SNI). However, it is possible that the port will be different than that of the intended origin, since the initial Origin Set is calculated using the actual port in use, which can be different for the alternative service. In this case, the intended origin needs to be sent in the ORIGIN frame explicitly.\n\nFor example, a client making requests for \"https://example.com\" is directed to an alternative service at (\"h2\", \"x.example.net\", \"8443\"). If this alternative service sends an ORIGIN frame, the initial origin will be \"https://example.com:8443\". The client will not be able to use the alternative service to make requests for \"https://example.com\" unless that origin is explicitly included in the ORIGIN frame.\n\n### 2.4. Authority, Push, and Coalescing with ORIGIN\n\nSection 10.1 of [RFC7540] uses both DNS and the presented Transport Layer Security (TLS) certificate to establish the origin server(s) that a connection is authoritative for, just as HTTP/1.1 does in [RFC7230].\n\nFurthermore, Section 9.1.1 of [RFC7540] explicitly allows a connection to be used for more than one origin server, if it is authoritative. This affects what responses can be considered authoritative, both for direct responses to requests and for server push (see [RFC7540], Section 8.2.2). Indirectly, it also affects what requests will be sent on a connection, since clients will generally only send requests on connections that they believe to be authoritative for the origin in question.\n\nOnce an Origin Set has been initialized for a connection, clients that implement this specification use it to help determine what the connection is authoritative for. Specifically, such clients MUST NOT consider a connection to be authoritative for an origin not present in the Origin Set, and they SHOULD use the connection for all requests to origins in the Origin Set for which the connection is authoritative, unless there are operational reasons for opening a new connection.\n\nNote that for a connection to be considered authoritative for a given origin, the server is still required to authenticate with a certificate that passes suitable checks; see Section 9.1.1 of [RFC7540] for more information. This includes verifying that the host matches a dNSName value from the certificate subjectAltName field (using the rules defined in [RFC2818]; see also [RFC5280], Section 4.2.1.6).\n\nAdditionally, clients MAY avoid consulting DNS to establish the connection's authority for new requests to origins in the Origin Set; however, those that do so face new risks, as explained in Section 4.\n\nBecause ORIGIN can change the set of origins a connection is used for over time, it is possible that a client might have more than one viable connection to an origin open at any time. When this occurs, clients SHOULD NOT emit new requests on any connection whose Origin Set is a proper subset of another connection's Origin Set, and they SHOULD close it once all outstanding requests are satisfied.\n\nThe Origin Set is unaffected by any alternative services [RFC7838] advertisements made by the server. Advertising an alternative service does not affect whether a server is authoritative.\n\n## 3. IANA Considerations\n\nThis specification adds an entry to the \"HTTP/2 Frame Type\" registry.\n\n- Frame Type: ORIGIN\n- Code: 0xc\n- Specification: RFC 8336\n\n## 4. Security Considerations\n\nClients that blindly trust the ORIGIN frame's contents will be vulnerable to a large number of attacks. See Section 2.4 for mitigations.\n\nRelaxing the requirement to consult DNS when determining authority for an origin means that an attacker who possesses a valid certificate no longer needs to be on path to redirect traffic to them; instead of modifying DNS, they need only convince the user to visit another website in order to coalesce connections to the target onto their existing connection.\n\nAs a result, clients opting not to consult DNS ought to employ some alternative means to establish a high degree of confidence that the certificate is legitimate. For example, clients might skip consulting DNS only if they receive proof of inclusion in a Certificate Transparency log [RFC6962] or if they have a recent Online Certificate Status Protocol (OCSP) response [RFC6960] (possibly using the \"status_request\" TLS extension [RFC6066]) showing that the certificate was not revoked.\n\nThe Origin Set's size is unbounded by this specification and thus could be used by attackers to exhaust client resources. To mitigate this risk, clients can monitor their state commitment and close the connection if it is too high.\n\n## 5. References\n\n### 5.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[http://www.rfc-editor.org/info/rfc2119](http://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC2818]\n\nRescorla, E., “[HTTP Over TLS](https://www.rfc-editor.org/rfc/rfc2818.html)”, RFC 2818, [DOI 10.17487/RFC2818](https://dx.doi.org/10.17487/RFC2818), May 2000, <[http://www.rfc-editor.org/info/rfc2818](http://www.rfc-editor.org/info/rfc2818)>.\n\n[RFC5280]\n\nCooper, 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](https://www.rfc-editor.org/rfc/rfc5280.html)”, RFC 5280, [DOI 10.17487/RFC5280](https://dx.doi.org/10.17487/RFC5280), May 2008, <[https://www.rfc-editor.org/info/rfc5280](https://www.rfc-editor.org/info/rfc5280)>.\n\n[RFC6066]\n\nEastlake 3rd, D., “[Transport Layer Security (TLS) Extensions: Extension Definitions](https://www.rfc-editor.org/rfc/rfc6066.html)”, RFC 6066, [DOI 10.17487/RFC6066](https://dx.doi.org/10.17487/RFC6066), January 2011, <[https://www.rfc-editor.org/info/rfc6066](https://www.rfc-editor.org/info/rfc6066)>.\n\n[RFC6454]\n\nBarth, A., “[The Web Origin Concept](https://www.rfc-editor.org/rfc/rfc6454.html)”, RFC 6454, [DOI 10.17487/RFC6454](https://dx.doi.org/10.17487/RFC6454), December 2011, <[http://www.rfc-editor.org/info/rfc6454](http://www.rfc-editor.org/info/rfc6454)>.\n\n[RFC7540]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol Version 2 (HTTP/2)](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[http://www.rfc-editor.org/info/rfc7540](http://www.rfc-editor.org/info/rfc7540)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n### 5.2. Informative References\n\n[RFC6960]\n\nSantesson, S., Myers, M., Ankney, R., Malpani, A., Galperin, S., and C. Adams, “[X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP](https://www.rfc-editor.org/rfc/rfc6960.html)”, RFC 6960, [DOI 10.17487/RFC6960](https://dx.doi.org/10.17487/RFC6960), June 2013, <[https://www.rfc-editor.org/info/rfc6960](https://www.rfc-editor.org/info/rfc6960)>.\n\n[RFC6962]\n\nLaurie, B., Langley, A., and E. Kasper, “[Certificate Transparency](https://www.rfc-editor.org/rfc/rfc6962.html)”, RFC 6962, [DOI 10.17487/RFC6962](https://dx.doi.org/10.17487/RFC6962), June 2013, <[https://www.rfc-editor.org/info/rfc6962](https://www.rfc-editor.org/info/rfc6962)>.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[http://www.rfc-editor.org/info/rfc7230](http://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC7838]\n\nNottingham, M., McManus, P., and J. Reschke, “[HTTP Alternative Services](https://www.rfc-editor.org/rfc/rfc7838.html)”, RFC 7838, [DOI 10.17487/RFC7838](https://dx.doi.org/10.17487/RFC7838), April 2016, <[http://www.rfc-editor.org/info/rfc7838](http://www.rfc-editor.org/info/rfc7838)>.\n\n[RFC8288]\n\nNottingham, M., “[Web Linking](https://www.rfc-editor.org/rfc/rfc8288.html)”, RFC 8288, [DOI 10.17487/RFC8288](https://dx.doi.org/10.17487/RFC8288), October 2017, <[https://www.rfc-editor.org/info/rfc8288](https://www.rfc-editor.org/info/rfc8288)>.\n\n## Appendix A. Non-Normative Processing Algorithm\n\nThe following algorithm illustrates how a client could handle received ORIGIN frames:\n\n1. If the client is configured to use a proxy for the connection, ignore the frame and stop processing.\n2. If the connection is not identified with the \"h2\" protocol identifier or another protocol that has explicitly opted into this specification, ignore the frame and stop processing.\n3. If the frame occurs upon any stream except stream 0, ignore the frame and stop processing.\n4. If any of the flags 0x1, 0x2, 0x4, or 0x8 are set, ignore the frame and stop processing.\n5. If no previous ORIGIN frame on the connection has reached this step, initialize the Origin Set as per Section 2.3 .\n6. For each Origin-Entry in the frame payload:\n 1. Parse ASCII-Origin as an ASCII serialization of an origin ( [RFC6454] , Section 6.2), and let the result be parsed_origin . If parsing fails, skip to the next Origin-Entry .\n 2. Add parsed_origin to the Origin Set.\n\n## Appendix B. Operational Considerations for Servers\n\nThe ORIGIN frame allows a server to indicate for which origins a given connection ought be used. The set of origins advertised using this mechanism is under control of the server; servers are not obligated to use it or to advertise all origins that they might be able to answer a request for.\n\nFor example, it can be used to inform the client that the connection is to only be used for the SNI-based origin, by sending an empty ORIGIN frame. Or, a larger number of origins can be indicated by including a payload.\n\nGenerally, this information is most useful to send before sending any part of a response that might initiate a new connection; for example, \"Link\" response header fields [RFC8288], or links in the response body.\n\nTherefore, the ORIGIN frame ought be sent as soon as possible on a connection, ideally before any HEADERS or PUSH_PROMISE frames.\n\nHowever, if it's desirable to associate a large number of origins with a connection, doing so might introduce end-user-perceived latency, due to their size. As a result, it might be necessary to select a \"core\" set of origins to send initially, and expand the set of origins the connection is used for with subsequent ORIGIN frames later (e.g., when the connection is idle).\n\nThat said, senders are encouraged to include as many origins as practical within a single ORIGIN frame; clients need to make decisions about creating connections on the fly, and if the Origin Set is split across many frames, their behavior might be suboptimal.\n\nSenders take note that, as per Section 4, Step 5, of [RFC6454], the values in an ORIGIN header need to be case-normalized before serialization.\n\nFinally, servers that host alternative services [RFC7838] will need to explicitly advertise their origins when sending ORIGIN, because the default contents of the Origin Set (as per Section 2.3) do not contain any alternative services' origins, even if they have been used previously on the connection.\n\n## Authors' Addresses\n\n**Mark Nottingham**\nEMail: [mnot@mnot.net](mailto:mnot@mnot.net)\nURI: [https://www.mnot.net/](https://www.mnot.net/)\n\n**Erik Nygren**\nAkamai\nEMail: [nygren@akamai.com](mailto:nygren@akamai.com)", "znaku_textu": 19376, "slov": 2740, "odkazu": 99, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:14", "sha256": "9371a4380211da3270924e8c5815997e4a4fe280d44399d2ee71a5cd9471180f", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc8336", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "http://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc2818.html", "https://dx.doi.org/10.17487/RFC2818", "http://www.rfc-editor.org/info/rfc2818", "https://www.rfc-editor.org/rfc/rfc5280.html", "https://dx.doi.org/10.17487/RFC5280", "https://www.rfc-editor.org/info/rfc5280", "https://www.rfc-editor.org/rfc/rfc6066.html", "https://dx.doi.org/10.17487/RFC6066", "https://www.rfc-editor.org/info/rfc6066", "https://www.rfc-editor.org/rfc/rfc6454.html", "https://dx.doi.org/10.17487/RFC6454", "http://www.rfc-editor.org/info/rfc6454", "https://www.rfc-editor.org/rfc/rfc7540.html", "https://dx.doi.org/10.17487/RFC7540", "http://www.rfc-editor.org/info/rfc7540", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/rfc/rfc6960.html", "https://dx.doi.org/10.17487/RFC6960", "https://www.rfc-editor.org/info/rfc6960", "https://www.rfc-editor.org/rfc/rfc6962.html", "https://dx.doi.org/10.17487/RFC6962", "https://www.rfc-editor.org/info/rfc6962", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://dx.doi.org/10.17487/RFC7230", "http://www.rfc-editor.org/info/rfc7230", "https://www.rfc-editor.org/rfc/rfc7838.html", "https://dx.doi.org/10.17487/RFC7838", "http://www.rfc-editor.org/info/rfc7838", "https://www.rfc-editor.org/rfc/rfc8288.html", "https://dx.doi.org/10.17487/RFC8288", "https://www.rfc-editor.org/info/rfc8288", "https://www.mnot.net/"]} {"url": "https://httpwg.org/specs/rfc8441.html", "titulek": "RFC 8441 - Bootstrapping WebSockets with HTTP/2", "h1": "Bootstrapping WebSockets with HTTP/2", "popis": "This document defines a mechanism for running the WebSocket Protocol (RFC 6455) over a single stream of an HTTP/2 connection.", "klicova_slova": "Internet-Draft", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC8441", "og:description": "Bootstrapping WebSockets with HTTP/2", "og:url": "https://httpwg.org/specs/rfc8441.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of this Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. Terminology"}, {"uroven": 2, "text": "3. The SETTINGS_ENABLE_CONNECT_PROTOCOL SETTINGS Parameter"}, {"uroven": 2, "text": "4. The Extended CONNECT Method"}, {"uroven": 2, "text": "5. Using Extended CONNECT to Bootstrap the WebSocket Protocol"}, {"uroven": 3, "text": "5.1. Example"}, {"uroven": 2, "text": "6. Design Considerations"}, {"uroven": 2, "text": "7. About Intermediaries"}, {"uroven": 2, "text": "8. Security Considerations"}, {"uroven": 2, "text": "9. IANA Considerations"}, {"uroven": 3, "text": "9.1. A New HTTP/2 Setting"}, {"uroven": 3, "text": "9.2. A New HTTP Upgrade Token"}, {"uroven": 2, "text": "10. Normative References"}, {"uroven": 2, "text": "Acknowledgments"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThis document defines a mechanism for running the WebSocket Protocol (RFC 6455) over a single stream of an HTTP/2 connection.\n\n## Status of this Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc8441](https://www.rfc-editor.org/info/rfc8441).\n\n## Copyright Notice\n\nCopyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n- 2. Terminology\n- 3. The SETTINGS_ENABLE_CONNECT_PROTOCOL SETTINGS Parameter\n- 4. The Extended CONNECT Method\n- 5. Using Extended CONNECT to Bootstrap the WebSocket Protocol\n - 5.1. Example\n- 6. Design Considerations\n- 7. About Intermediaries\n- 8. Security Considerations\n- 9. IANA Considerations\n - 9.1. A New HTTP/2 Setting\n - 9.2. A New HTTP Upgrade Token\n- 10. Normative References\n- Acknowledgments\n- Author's Address\n\n## 1. Introduction\n\nThe Hypertext Transfer Protocol (HTTP) [RFC7230] provides compatible resource-level semantics across different versions, but it does not offer compatibility at the connection-management level. Other protocols that rely on connection-management details of HTTP, such as WebSockets, must be updated for new versions of HTTP.\n\nThe WebSocket Protocol [RFC6455] uses the HTTP/1.1 Upgrade mechanism ([Section 6.7](https://www.rfc-editor.org/rfc/rfc7230.html#section-6.7) of [RFC7230]) to transition a TCP connection from HTTP into a WebSocket connection. A different approach must be taken with HTTP/2 [RFC7540]. Due to its multiplexing nature, HTTP/2 does not allow connection-wide header fields or status codes, such as the Upgrade and Connection request-header fields or the 101 (Switching Protocols) response code. These are all required by the [RFC6455] opening handshake.\n\nBeing able to bootstrap WebSockets from HTTP/2 allows one TCP connection to be shared by both protocols and extends HTTP/2’s more efficient use of the network to WebSockets.\n\nThis document extends the HTTP CONNECT method, as specified for HTTP/2 in [Section 8.3](https://www.rfc-editor.org/rfc/rfc7540.html#section-8.3) of [RFC7540]. The extension allows the substitution of a new protocol name to connect to rather than the external host normally used by CONNECT. The result is a tunnel on a single HTTP/2 stream that can carry data for WebSockets (or any other protocol). The other streams on the connection may carry more extended CONNECT tunnels, traditional HTTP/2 data, or a mixture of both.\n\nThis tunneled stream will be multiplexed with other regular streams on the connection and enjoys the normal priority, cancellation, and flow-control features of HTTP/2.\n\nStreams that successfully establish a WebSocket connection using a tunneled stream and the modifications to the opening handshake defined in this document then use the traditional WebSocket Protocol, treating the stream as if it were the TCP connection in that specification.\n\n## 2. Terminology\n\nThe 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.\n\n## 3. The SETTINGS_ENABLE_CONNECT_PROTOCOL SETTINGS Parameter\n\nThis document adds a new SETTINGS parameter to those defined by [RFC7540], [Section 6.5.2](https://www.rfc-editor.org/rfc/rfc7540.html#section-6.5.2).\n\nThe new parameter name is SETTINGS_ENABLE_CONNECT_PROTOCOL. The value of the parameter MUST be 0 or 1.\n\nUpon receipt of SETTINGS_ENABLE_CONNECT_PROTOCOL with a value of 1, a client MAY use the Extended CONNECT as defined in this document when creating new streams. Receipt of this parameter by a server does not have any impact.\n\nA sender MUST NOT send a SETTINGS_ENABLE_CONNECT_PROTOCOL parameter with the value of 0 after previously sending a value of 1.\n\nUsing a SETTINGS parameter to opt into an otherwise incompatible protocol change is a use of “Extending HTTP/2” defined by [Section 5.5](https://www.rfc-editor.org/rfc/rfc7540.html#section-5.5) of [RFC7540]. Specifically, the addition a new pseudo-header field, “:protocol”, and the change in meaning of the :authority pseudo-header field in Section 4 require opt-in negotiation. If a client were to use the provisions of the extended CONNECT method defined in this document without first receiving a SETTINGS_ENABLE_CONNECT_PROTOCOL parameter, a non-supporting peer would detect a malformed request and generate a stream error ([Section 8.1.2.6](https://www.rfc-editor.org/rfc/rfc7540.html#section-8.1.2.6) of [RFC7540]).\n\n## 4. The Extended CONNECT Method\n\nUsage of the CONNECT method in HTTP/2 is defined by [Section 8.3](https://www.rfc-editor.org/rfc/rfc7540.html#section-8.3) of [RFC7540]. This extension modifies the method in the following ways:\n\n- A new pseudo-header field :protocol MAY be included on request HEADERS indicating the desired protocol to be spoken on the tunnel created by CONNECT. The pseudo-header field is single valued and contains a value from the “Hypertext Transfer Protocol (HTTP) Upgrade Token Registry” located at < [https://www.iana.org/assignments/http-upgrade-tokens/](https://www.iana.org/assignments/http-upgrade-tokens/) >\n- On requests that contain the :protocol pseudo-header field, the :scheme and :path pseudo-header fields of the target URI (see Section 5 ) MUST also be included.\n- On requests bearing the :protocol pseudo-header field, the :authority pseudo-header field is interpreted according to [Section 8.1.2.3](https://www.rfc-editor.org/rfc/rfc7540.html#section-8.1.2.3) of [RFC7540] instead of [Section 8.3](https://www.rfc-editor.org/rfc/rfc7540.html#section-8.3) of that document. In particular, the server MUST NOT create a tunnel to the host indicated by the :authority as it would with a CONNECT method request that was not modified by this extension.\n\nUpon receiving a CONNECT request bearing the :protocol pseudo-header field, the server establishes a tunnel to another service of the protocol type indicated by the pseudo-header field. This service may or may not be co-located with the server.\n\n## 5. Using Extended CONNECT to Bootstrap the WebSocket Protocol\n\nThe :protocol pseudo-header field MUST be included in the CONNECT request, and it MUST have a value of websocket to initiate a WebSocket connection on an HTTP/2 stream. Other HTTP request and response-header fields, such as those for manipulating cookies, may be included in the HEADERS with the CONNECT method as usual. This request replaces the GET-based request in [RFC6455] and is used to process the WebSockets opening handshake.\n\nThe scheme of the target URI ([Section 5.1](https://www.rfc-editor.org/rfc/rfc7230.html#section-5.1) of [RFC7230]) MUST be “https” for “wss”-schemed WebSockets and “http” for “ws”-schemed WebSockets. The remainder of the target URI is the same as the WebSocket URI. The WebSocket URI is still used for proxy autoconfiguration. The security requirements for the HTTP/2 connection used by this specification are established by [RFC7540] for https requests and [RFC8164] for http requests.\n\n[RFC6455] requires the use of Connection and Upgrade header fields that are not part of HTTP/2. They MUST NOT be included in the CONNECT request defined here.\n\n[RFC6455] requires the use of a Host header field that is also not part of HTTP/2. The Host information is conveyed as part of the :authority pseudo-header field, which is required on every HTTP/2 transaction.\n\nImplementations using this extended CONNECT to bootstrap WebSockets do not do the processing of the Sec-WebSocket-Key and Sec-WebSocket-Accept header fields of [RFC6455] as that functionality has been superseded by the :protocol pseudo-header field.\n\nThe Origin [RFC6454], Sec-WebSocket-Version, Sec-WebSocket-Protocol, and Sec-WebSocket-Extensions header fields are used in the CONNECT request and response-header fields as defined in [RFC6455]. Note that HTTP/1 header field names were case insensitive, whereas HTTP/2 requires they be encoded as lowercase.\n\nAfter successfully processing the opening handshake, the peers should proceed with the WebSocket Protocol [RFC6455] using the HTTP/2 stream from the CONNECT transaction as if it were the TCP connection referred to in [RFC6455]. The state of the WebSocket connection at this point is OPEN, as defined by [RFC6455], [Section 4.1](https://www.rfc-editor.org/rfc/rfc6455.html#section-4.1).\n\nThe HTTP/2 stream closure is also analogous to the TCP connection closure of [RFC6455]. Orderly TCP-level closures are represented as END_STREAM flags ([RFC7540], [Section 6.1](https://www.rfc-editor.org/rfc/rfc7540.html#section-6.1)). RST exceptions are represented with the RST_STREAM frame ([RFC7540], [Section 6.4](https://www.rfc-editor.org/rfc/rfc7540.html#section-6.4)) with the CANCEL error code ([RFC7540], [Section 7](https://www.rfc-editor.org/rfc/rfc7540.html#section-7)).\n\n### 5.1. Example\n\n```\n[[ From Client ]] [[ From Server ]]\n\n SETTINGS\n SETTINGS_ENABLE_CONNECT_[..] = 1\n\nHEADERS + END_HEADERS\n:method = CONNECT\n:protocol = websocket\n:scheme = https\n:path = /chat\n:authority = server.example.com\nsec-websocket-protocol = chat, superchat\nsec-websocket-extensions = permessage-deflate\nsec-websocket-version = 13\norigin = http://www.example.com\n\n HEADERS + END_HEADERS\n :status = 200\n sec-websocket-protocol = chat\n\nDATA\nWebSocket Data\n\n DATA + END_STREAM\n WebSocket Data\n\nDATA + END_STREAM\nWebSocket Data\n```\n\n## 6. Design Considerations\n\nA more native integration with HTTP/2 is certainly possible with larger additions to HTTP/2. This design was selected to minimize the solution complexity while still addressing the primary concern of running HTTP/2 and WebSockets concurrently.\n\n## 7. About Intermediaries\n\nThis document does not change how WebSockets interacts with HTTP forward proxies. If a client wishing to speak WebSockets connects via HTTP/2 to an HTTP proxy, it should continue to use a traditional CONNECT (i.e., not with a :protocol pseudo-header field) to tunnel through that proxy to the WebSocket server via HTTP.\n\nThe resulting version of HTTP on that tunnel determines whether WebSockets is initiated directly or via a modified CONNECT request described in this document.\n\n## 8. Security Considerations\n\n[RFC6455] ensures that non-WebSockets clients, especially XMLHttpRequest-based clients, cannot make a WebSocket connection. Its primary mechanism for doing that is the use of Sec-prefixed request-header fields that cannot be created by XMLHttpRequest-based clients. This specification addresses that concern in two ways:\n\n- XMLHttpRequest also prohibits use of the CONNECT method in addition to Sec-prefixed request-header fields.\n- The use of a pseudo-header field is something that is connection specific, and HTTP/2 never allows a pseudo-header to be created outside of the protocol stack.\n\nThe security considerations of [RFC6455], [Section 10](https://www.rfc-editor.org/rfc/rfc6455.html#section-10) continue to apply to the use of the WebSocket Protocol when using this specification, with the exception of [10.8](https://www.rfc-editor.org/rfc/rfc6455.html#section-10.8). That section is not relevant, because it is specific to the bootstrapping handshake that is changed in this document.\n\n## 9. IANA Considerations\n\n### 9.1. A New HTTP/2 Setting\n\nThis document registers an entry in the “HTTP/2 Settings” registry that was established by [Section 11.3](https://www.rfc-editor.org/rfc/rfc7540.html#section-11.3) of [RFC7540].\n\nCode:\n\n0x8\n\nName:\n\nSETTINGS_ENABLE_CONNECT_PROTOCOL\n\nInitial Value:\n\n0\n\nSpecification:\n\nThis document\n\n### 9.2. A New HTTP Upgrade Token\n\nThis document registers an entry in the “HTTP Upgrade Tokens” registry that was established by [RFC7230].\n\nValue:\n\nwebsocket\n\nDescription:\n\nThe Web Socket Protocol\n\nExpected Version Tokens:\n\nReferences:\n\n[RFC6455] [RFC8441]\n\n## 10. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC6454]\n\nBarth, A., “[The Web Origin Concept](https://www.rfc-editor.org/rfc/rfc6454.html)”, RFC 6454, [DOI 10.17487/RFC6454](https://dx.doi.org/10.17487/RFC6454), December 2011, <[https://www.rfc-editor.org/info/rfc6454](https://www.rfc-editor.org/info/rfc6454)>.\n\n[RFC6455]\n\nFette, I. and A. Melnikov, “[The WebSocket Protocol](https://www.rfc-editor.org/rfc/rfc6455.html)”, RFC 6455, [DOI 10.17487/RFC6455](https://dx.doi.org/10.17487/RFC6455), December 2011, <[https://www.rfc-editor.org/info/rfc6455](https://www.rfc-editor.org/info/rfc6455)>.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[https://www.rfc-editor.org/info/rfc7230](https://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC7540]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol Version 2 (HTTP/2)](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[https://www.rfc-editor.org/info/rfc7540](https://www.rfc-editor.org/info/rfc7540)>.\n\n[RFC8164]\n\nNottingham, M. and M. Thomson, “[Opportunistic Security for HTTP/2](https://www.rfc-editor.org/rfc/rfc8164.html)”, RFC 8164, [DOI 10.17487/RFC8164](https://dx.doi.org/10.17487/RFC8164), May 2017, <[https://www.rfc-editor.org/info/rfc8164](https://www.rfc-editor.org/info/rfc8164)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n## Acknowledgments\n\nThe 2017 HTTP Workshop had a very productive discussion that helped determine the key problem and acceptable level of solution complexity.\n\n## Author's Address\n\n**Patrick McManus**\nMozilla\nEMail: [mcmanus@ducksong.com](mailto:mcmanus@ducksong.com)", "znaku_textu": 15419, "slov": 2038, "odkazu": 91, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:15", "sha256": "38e686c279803a16a07069c00e6a7a50154572c9a95318fcc0d26b1b70da52dc", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc8441", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://www.rfc-editor.org/rfc/rfc7540.html", "https://www.iana.org/assignments/http-upgrade-tokens/", "https://www.rfc-editor.org/rfc/rfc6455.html", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc6454.html", "https://dx.doi.org/10.17487/RFC6454", "https://www.rfc-editor.org/info/rfc6454", "https://dx.doi.org/10.17487/RFC6455", "https://www.rfc-editor.org/info/rfc6455", "https://dx.doi.org/10.17487/RFC7230", "https://www.rfc-editor.org/info/rfc7230", "https://dx.doi.org/10.17487/RFC7540", "https://www.rfc-editor.org/info/rfc7540", "https://www.rfc-editor.org/rfc/rfc8164.html", "https://dx.doi.org/10.17487/RFC8164", "https://www.rfc-editor.org/info/rfc8164", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174"]} {"url": "https://httpwg.org/specs/rfc8470.html", "titulek": "RFC 8470 - Using Early Data in HTTP", "h1": "Using Early Data in HTTP", "popis": "Using TLS early data creates an exposure to the possibility of a replay attack. This document defines mechanisms that allow clients to communicate with servers about HTTP requests that are sent in early data. Techniques are described that use these mechanisms to mitigate the risk of replay.", "klicova_slova": "Internet-Draft", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC8470", "og:description": "Using Early Data in HTTP", "og:url": "https://httpwg.org/specs/rfc8470.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of this Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Conventions and Definitions"}, {"uroven": 2, "text": "2. Early Data in HTTP"}, {"uroven": 2, "text": "3. Supporting Early Data in HTTP Servers"}, {"uroven": 2, "text": "4. Using Early Data in HTTP Clients"}, {"uroven": 2, "text": "5. Extensions for Early Data in HTTP"}, {"uroven": 3, "text": "5.2. The 425 (Too Early) Status Code"}, {"uroven": 2, "text": "6. Security Considerations"}, {"uroven": 3, "text": "6.1. Gateways and Early Data"}, {"uroven": 3, "text": "6.2. Consistent Handling of Early Data"}, {"uroven": 3, "text": "6.3. Denial of Service"}, {"uroven": 3, "text": "6.4. Out-of-Order Delivery"}, {"uroven": 2, "text": "7. IANA Considerations"}, {"uroven": 2, "text": "8. References"}, {"uroven": 3, "text": "8.1. Normative References"}, {"uroven": 3, "text": "8.2. Informative References"}, {"uroven": 2, "text": "Acknowledgments"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nUsing TLS early data creates an exposure to the possibility of a replay attack. This document defines mechanisms that allow clients to communicate with servers about HTTP requests that are sent in early data. Techniques are described that use these mechanisms to mitigate the risk of replay.\n\n## Status of this Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc8470](https://www.rfc-editor.org/info/rfc8470).\n\n## Copyright Notice\n\nCopyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n - 1.1. Conventions and Definitions\n- 2. Early Data in HTTP\n- 3. Supporting Early Data in HTTP Servers\n- 4. Using Early Data in HTTP Clients\n- 5. Extensions for Early Data in HTTP\n - 5.1. The Early-Data Header Field\n - 5.2. The 425 (Too Early) Status Code\n- 6. Security Considerations\n - 6.1. Gateways and Early Data\n - 6.2. Consistent Handling of Early Data\n - 6.3. Denial of Service\n - 6.4. Out-of-Order Delivery\n- 7. IANA Considerations\n- 8. References\n - 8.1. Normative References\n - 8.2. Informative References\n- Acknowledgments\n- Authors' Addresses\n\n## 1. Introduction\n\nTLS 1.3 [TLS13] introduces the concept of early data (also known as zero round-trip time (0-RTT) data). If the client has spoken to the same server recently, early data allows a client to send data to a server in the first round trip of a connection, without waiting for the TLS handshake to complete.\n\nWhen used with HTTP [HTTP], early data allows clients to send requests immediately, thus avoiding the one or two round-trip delays needed for the TLS handshake. This is a significant performance enhancement; however, it has significant limitations.\n\nThe primary risk of using early data is that an attacker might capture and replay the request(s) it contains. TLS [TLS13] describes techniques that can be used to reduce the likelihood that an attacker can successfully replay a request, but these techniques can be difficult to deploy and still leave some possibility of a successful attack.\n\nNote that this is different from automated or user-initiated retries; replays are initiated by an attacker without the awareness of the client.\n\nTo help mitigate the risk of replays in HTTP, this document gives an overview of techniques for controlling these risks in servers and defines requirements for clients when sending requests in early data.\n\nThe advice in this document also applies to use of 0-RTT in HTTP over QUIC [HQ].\n\n### 1.1. Conventions and Definitions\n\nThe 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.\n\n## 2. Early Data in HTTP\n\nConceptually, early data is concatenated with other application data to form a single stream. This can mean that requests are entirely contained within early data or that only part of a request is early. In a multiplexed protocol, like HTTP/2 [RFC7540] or HTTP/QUIC [HQ], multiple requests might be partially delivered in early data.\n\nThe model that this document assumes is that once the TLS handshake completes, the early data received on that TLS connection is known to not be a replayed copy of that data. However, it is important to note that this does not mean that early data will not be or has not been replayed on another connection.\n\n## 3. Supporting Early Data in HTTP Servers\n\nA server decides whether or not to offer a client the ability to send early data on future connections when sending the TLS session ticket.\n\nTLS [TLS13] mandates the use of replay detection strategies that reduce the ability of an attacker to successfully replay early data. These anti-replay techniques reduce but don’t completely eliminate the chance of data being replayed and ensure a fixed upper limit to the number of replays.\n\nWhen a server enables early data, there are a number of techniques it can use to mitigate the risks of replay:\n\n1. The server can reject early data at the TLS layer. A server cannot selectively reject early data, so this results in all requests sent in early data being discarded.\n2. The server can choose to delay processing of early data until after the TLS handshake completes. By deferring processing, it can ensure that only a successfully completed connection is used for the request(s) therein. This provides the server with some assurance that the early data was not replayed. If the server receives multiple requests in early data, it can determine whether to defer HTTP processing on a per-request basis.\n3. The server can cause a client to retry individual requests and not use early data by responding with the 425 (Too Early) status code ( Section 5.2 ) in cases where the risk of replay is judged too great.\n\nAll of these techniques are equally effective; a server can use the method that best suits it.\n\nFor a given request, the level of tolerance to replay risk is specific to the resource it operates upon (and therefore only known to the origin server). The primary risk associated with using early data is in the actions a server takes when processing a request; processing a duplicated request might result in duplicated effects and side effects. [Appendix E.5](https://www.rfc-editor.org/rfc/rfc8446.html#appendix-E.5) of [TLS13] also describes other effects produced by processing duplicated requests.\n\nThe request method’s safety ([RFC7231], [Section 4.2.1](https://www.rfc-editor.org/rfc/rfc7231.html#section-4.2.1)) is one way to determine this. However, some resources produce side effects with safe methods, so this cannot be universally relied upon.\n\nIt is RECOMMENDED that origin servers allow resources to explicitly configure whether early data is appropriate in requests. Absent such explicit information, origin servers MUST either reject early data or implement the techniques described in this document for ensuring that requests are not processed prior to TLS handshake completion.\n\nA request might be sent partially in early data with the remainder of the request being sent after the handshake completes. This does not necessarily affect handling of that request; what matters is when the server starts acting upon the contents of a request. Any time any server instance might initiate processing prior to completion of the handshake, all server instances need to account for the possibility of replay of early data and how that could affect that processing (see also Section 6.2).\n\nA server can partially process requests that are incomplete. Parsing header fields -- without acting on the values -- and determining request routing is likely to be safe from side effects but other actions might not be.\n\nIntermediary servers do not have sufficient information to decide whether early data can be processed, so Section 5.2 describes a way for the origin to signal to them that a particular request isn’t appropriate for early data. Intermediaries that accept early data MUST implement that mechanism.\n\nNote that a server cannot choose to selectively reject early data at the TLS layer. TLS only permits a server to either accept all early data or none of it. Once a server has decided to accept early data, it MUST process all requests in early data, even if the server rejects the request by sending a 425 (Too Early) response.\n\nA server can limit the amount of early data with the max_early_data_size field of the early_data TLS extension. This can be used to avoid committing an arbitrary amount of memory for requests that it might defer until the handshake completes.\n\n## 4. Using Early Data in HTTP Clients\n\nA client that wishes to use early data commences by sending HTTP requests immediately after sending the TLS ClientHello.\n\nBy their nature, clients have control over whether a given request is sent in early data, thereby giving the client control over risk of replay. Absent other information, clients MAY send requests with safe HTTP methods ([RFC7231], [Section 4.2.1](https://www.rfc-editor.org/rfc/rfc7231.html#section-4.2.1)) in early data when it is available and MUST NOT send unsafe methods (or methods whose safety is not known) in early data.\n\nIf the server rejects early data at the TLS layer, a client MUST start sending again as though the connection were new. This could entail using a different negotiated protocol [ALPN] than the one optimistically used for the early data. Any requests sent in early data will need to be sent again, unless the client decides to abandon those requests.\n\nAutomatic retry creates the potential for a replay attack. An attacker intercepts a connection that uses early data and copies the early data to another server instance. The second server instance accepts and processes the early data, even though it will not complete the TLS handshake. The attacker then allows the original connection to complete. Even if the early data is detected as a duplicate and rejected, the first server instance might allow the connection to complete. If the client then retries requests that were sent in early data, the request will be processed twice.\n\nReplays are also possible if there are multiple server instances that will accept early data or if the same server accepts early data multiple times (though the latter would be in violation of requirements in [Section 8](https://www.rfc-editor.org/rfc/rfc8446.html#section-8) of [TLS13]).\n\nClients that use early data MUST retry requests upon receipt of a 425 (Too Early) status code; see Section 5.2.\n\nAn intermediary MUST NOT use early data when forwarding a request unless early data was used on a previous hop, or it knows that the request can be retried safely without consequences (typically, using out-of-band configuration). Absent better information, that means that an intermediary can only use early data if the request either arrived in early data or arrived with the Early-Data header field set to “1” (see Section 5.1).\n\n## 5. Extensions for Early Data in HTTP\n\nBecause HTTP requests can span multiple “hops”, it is necessary to explicitly communicate whether a request has been sent in early data on a previous hop. Likewise, it is necessary to have some means of explicitly triggering a retry when early data is not desired. Finally, it is necessary to know whether the client will actually perform such a retry.\n\nTo meet these needs, two signaling mechanisms are defined:\n\n- The Early-Data header field is included in requests that might have been forwarded by an intermediary prior to the completion of the TLS handshake with its client.\n- The 425 (Too Early) status code is defined for a server to indicate that a request could not be processed due to the consequences of a possible replay attack.\n\nThey are designed to enable better coordination of the use of early data between the user agent and origin server, and also when a gateway (also “reverse proxy”, “Content Delivery Network”, or “surrogate”) is present.\n\nGateways typically don’t have specific information about whether a given request can be processed safely when it is sent in early data. In many cases, only the origin server has the necessary information to decide whether the risk of replay is acceptable. These extensions allow coordination between a gateway and its origin server.\n\n### 5.2. The 425 (Too Early) Status Code\n\nA 425 (Too Early) status code indicates that the server is unwilling to risk processing a request that might be replayed.\n\nUser agents that send a request in early data are expected to retry the request when receiving a 425 (Too Early) response status code. A user agent SHOULD retry automatically, but any retries MUST NOT be sent in early data.\n\nIn all cases, an intermediary can forward a 425 (Too Early) status code. Intermediaries MUST forward a 425 (Too Early) status code if the request that it received and forwarded contained an Early-Data header field. Otherwise, an intermediary that receives a request in early data MAY automatically retry that request in response to a 425 (Too Early) status code, but it MUST wait for the TLS handshake to complete on the connection where it received the request.\n\nThe server cannot assume that a client is able to retry a request unless the request is received in early data or the Early-Data header field is set to “1”. A server SHOULD NOT emit the 425 status code unless one of these conditions is met.\n\nThe 425 (Too Early) status code is not cacheable by default. Its payload is not the representation of any identified resource.\n\n## 6. Security Considerations\n\nUsing early data exposes a client to the risk that their request is replayed. A retried or replayed request can produce different side effects on the server. In addition to those side effects, replays and retries might be used for traffic analysis to recover information about requests or the resources those requests target. In particular, a request that is replayed might result in a different response, which might be observable from the length of protected data even if the content remains confidential.\n\n### 6.1. Gateways and Early Data\n\nA gateway MUST NOT forward requests that were received in early data unless it knows that the origin server it will forward to understands the Early-Data header field and will correctly generate a 425 (Too Early) status code. A gateway that is uncertain about origin server support for a given request SHOULD either delay forwarding the request until the TLS handshake with its client completes or send a 425 (Too Early) status code in response.\n\nA gateway without at least one potential origin server that supports the Early-Data header field expends significant effort for what can at best be a modest performance benefit from enabling early data. If no origin server supports early data, it is more efficient to disable early data entirely.\n\n### 6.2. Consistent Handling of Early Data\n\nConsistent treatment of a request that arrives in, or partially in, early data is critical to avoiding inappropriate processing of replayed requests. If a request is not safe to process before the TLS handshake completes, then all instances of the server (including gateways) need to agree and either reject the request or delay processing.\n\nDisabling early data, delaying requests, or rejecting requests with the 425 (Too Early) status code are all equally good measures for mitigating replay attacks on requests that might be vulnerable to replay. Server instances can implement any of these measures and be considered consistent, even if different instances use different methods. Critically, this means that it is possible to employ different mitigations in reaction to other conditions, such as server load.\n\nA server MUST NOT act on early data before the handshake completes if it and any other server instance could make a different decision about how to handle the same data.\n\n### 6.3. Denial of Service\n\nAccepting early data exposes a server to potential denial of service through the replay of requests that are expensive to handle. A server that is under load SHOULD prefer rejecting TLS early data as a whole rather than accepting early data and selectively processing requests. Generating a 503 (Service Unavailable) or 425 (Too Early) status code often leads to clients retrying requests, which could result in increased load.\n\n### 6.4. Out-of-Order Delivery\n\nIn protocols that deliver data out of order (such as QUIC [HQ]), early data can arrive after the handshake completes. A server MAY process requests received in early data after handshake completion only if it can rely on other instances correctly handling replays of the same requests.\n\n## 7. IANA Considerations\n\nThis document registers the Early-Data header field in the “Permanent Message Header Field Names” registry located at <[https://www.iana.org/assignments/message-headers](https://www.iana.org/assignments/message-headers)>.\n\nHeader field name:\n\nEarly-Data\n\nApplicable protocol:\n\nhttp\n\nStatus:\n\nstandard\n\nAuthor/Change controller:\n\nIETF\n\nSpecification document(s):\n\nThis document\n\nRelated information:\n\n(empty)\n\nThis document registers the 425 (Too Early) status code in the “HTTP Status Codes” registry located at <[https://www.iana.org/assignments/http-status-codes](https://www.iana.org/assignments/http-status-codes)>.\n\nValue:\n\n425\n\nDescription:\n\nToo Early\n\nReference:\n\nThis document\n\n## 8. References\n\n### 8.1. Normative References\n\n[ABNF]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[HTTP]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[https://www.rfc-editor.org/info/rfc7230](https://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, [DOI 10.17487/RFC7231](https://dx.doi.org/10.17487/RFC7231), June 2014, <[https://www.rfc-editor.org/info/rfc7231](https://www.rfc-editor.org/info/rfc7231)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[TLS13]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n### 8.2. Informative References\n\n[ALPN]\n\nFriedl, S., Popov, A., Langley, A., and E. Stephan, “[Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension](https://www.rfc-editor.org/rfc/rfc7301.html)”, RFC 7301, [DOI 10.17487/RFC7301](https://dx.doi.org/10.17487/RFC7301), July 2014, <[https://www.rfc-editor.org/info/rfc7301](https://www.rfc-editor.org/info/rfc7301)>.\n\n[HQ]\n\nBishop, M., “[Hypertext Transfer Protocol (HTTP) over QUIC](https://datatracker.ietf.org/doc/html/draft-ietf-quic-http-14)”, [Work in Progress](https://datatracker.ietf.org/doc/draft-ietf-quic-http), draft-ietf-quic-http-14, August 2018.\n\n[RFC7540]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol Version 2 (HTTP/2)](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[https://www.rfc-editor.org/info/rfc7540](https://www.rfc-editor.org/info/rfc7540)>.\n\n## Acknowledgments\n\nThis document was not easy to produce. The following people made substantial contributions to the quality and completeness of the document: David Benjamin, Subodh Iyengar, Benjamin Kaduk, Ilari Liusavaara, Kazuho Oku, Eric Rescorla, Kyle Rose, and Victor Vasiliev.\n\n## Authors' Addresses\n\n**Martin Thomson**\nMozilla\nEMail: [martin.thomson@gmail.com](mailto:martin.thomson@gmail.com)\n\n**Mark Nottingham**\nFastly\nEMail: [mnot@mnot.net](mailto:mnot@mnot.net)\n\n**Willy Tarreau**\nHAProxy Technologies\nEMail: [willy@haproxy.org](mailto:willy@haproxy.org)", "znaku_textu": 21046, "slov": 3081, "odkazu": 99, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:24", "sha256": "4eac3f3ba0316f6f256cdb13f640f65a7ec7e4b266b385d6527eba8d4d12f7b8", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc8470", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc8446.html", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.iana.org/assignments/message-headers", "https://www.iana.org/assignments/http-status-codes", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "https://www.rfc-editor.org/info/rfc5234", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://dx.doi.org/10.17487/RFC7230", "https://www.rfc-editor.org/info/rfc7230", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://dx.doi.org/10.17487/RFC7231", "https://www.rfc-editor.org/info/rfc7231", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC8446", "https://www.rfc-editor.org/info/rfc8446", "https://www.rfc-editor.org/rfc/rfc7301.html", "https://dx.doi.org/10.17487/RFC7301", "https://www.rfc-editor.org/info/rfc7301", "https://datatracker.ietf.org/doc/html/draft-ietf-quic-http-14", "https://datatracker.ietf.org/doc/draft-ietf-quic-http", "https://www.rfc-editor.org/rfc/rfc7540.html", "https://dx.doi.org/10.17487/RFC7540", "https://www.rfc-editor.org/info/rfc7540"]} {"url": "https://httpwg.org/specs/rfc8942.html", "titulek": "RFC 8942 - HTTP Client Hints", "h1": "HTTP Client Hints", "popis": "HTTP defines proactive content negotiation to allow servers to select the appropriate response for a given request, based upon the user agent's characteristics, as expressed in request headers. In practice, user agents are often unwilling to send those request headers, because it is not clear whether they will be used, and sending them impacts both performance and privacy.This document defines an Accept-CH response header that servers can use to advertise their use of request headers for proactive content negotiation, along with a set of guidelines for the creation of such headers, colloquially known as \"Client Hints.\"", "klicova_slova": "Content Negotiation", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC8942", "og:description": "HTTP Client Hints", "og:url": "https://httpwg.org/specs/rfc8942.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "3. Advertising Server Support"}, {"uroven": 3, "text": "3.1. The Accept-CH Response Header Field"}, {"uroven": 3, "text": "3.2. Interaction with Caches"}, {"uroven": 2, "text": "4. Security Considerations"}, {"uroven": 3, "text": "4.1. Information Exposure"}, {"uroven": 3, "text": "4.2. Deployment and Security Risks"}, {"uroven": 3, "text": "4.3. Abuse Detection"}, {"uroven": 2, "text": "5. Cost of Sending Hints"}, {"uroven": 2, "text": "6. IANA Considerations"}, {"uroven": 3, "text": "6.1. Accept-CH"}, {"uroven": 2, "text": "7. References"}, {"uroven": 3, "text": "7.1. Normative References"}, {"uroven": 3, "text": "7.2. Informative References"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nHTTP defines proactive content negotiation to allow servers to select the appropriate response for a given request, based upon the user agent's characteristics, as expressed in request headers. In practice, user agents are often unwilling to send those request headers, because it is not clear whether they will be used, and sending them impacts both performance and privacy.\n\nThis document defines an Accept-CH response header that servers can use to advertise their use of request headers for proactive content negotiation, along with a set of guidelines for the creation of such headers, colloquially known as \"Client Hints.\"\n\n## Status of This Memo\n\nThis document is not an Internet Standards Track specification; it is published for examination, experimental implementation, and evaluation.\n\nThis document defines an Experimental Protocol for the Internet community. This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are candidates for any level of Internet Standard; see [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc8942](https://www.rfc-editor.org/info/rfc8942).\n\n## Copyright Notice\n\nCopyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. Client Hints Request Header Fields\n - 2.1. Sending Client Hints\n - 2.2. Server Processing of Client Hints\n- 3. Advertising Server Support\n - 3.1. The Accept-CH Response Header Field\n - 3.2. Interaction with Caches\n- 4. Security Considerations\n - 4.1. Information Exposure\n - 4.2. Deployment and Security Risks\n - 4.3. Abuse Detection\n- 5. Cost of Sending Hints\n- 6. IANA Considerations\n - 6.1. Accept-CH\n- 7. References\n - 7.1. Normative References\n - 7.2. Informative References\n- Acknowledgements\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nThere are thousands of different devices accessing the web, each with different device capabilities and preference information. These device capabilities include hardware and software characteristics, as well as dynamic user and user agent preferences. Historically, applications that wanted the server to optimize content delivery and user experience based on such capabilities had to rely on passive identification (e.g., by matching the User-Agent header field ([Section 5.5.3](https://www.rfc-editor.org/rfc/rfc7231.html#section-5.5.3) of [RFC7231]) against an established database of user agent signatures), use HTTP cookies [RFC6265] and URL parameters, or use some combination of these and similar mechanisms to enable ad hoc content negotiation.\n\nSuch techniques are expensive to set up and maintain and are not portable across both applications and servers. They also make it hard for both user agent and server to understand which data are required and are in use during the negotiation:\n\n- User agent detection cannot reliably identify all static variables, cannot infer dynamic user agent preferences, requires an external device database, is not cache friendly, and is reliant on a passive fingerprinting surface.\n- Cookie-based approaches are not portable across applications and servers, impose additional client-side latency by requiring JavaScript execution, and are not cache friendly.\n- URL parameters, similar to cookie-based approaches, suffer from lack of portability and are hard to deploy due to a requirement to encode content negotiation data inside of the URL of each resource.\n\nProactive content negotiation ([Section 3.4.1](https://www.rfc-editor.org/rfc/rfc7231.html#section-3.4.1) of [RFC7231]) offers an alternative approach; user agents use specified, well-defined request headers to advertise their capabilities and characteristics, so that servers can select (or formulate) an appropriate response based on those request headers (or on other, implicit characteristics).\n\nHowever, traditional proactive content negotiation techniques often mean that user agents send these request headers prolifically. This causes performance concerns (because it creates \"bloat\" in requests), as well as privacy issues; passively providing such information allows servers to silently fingerprint the user.\n\nThis document defines Client Hints, a framework that enables servers to opt-in to specific proactive content negotiation features, adapting their content accordingly, as well as guidelines for content negotiation mechanisms that use the framework. This document also defines a new response header, Accept-CH, that allows an origin server to explicitly ask that user agents send these headers in requests.\n\nClient Hints mitigate performance concerns by assuring that user agents will only send the request headers when they're actually going to be used, and they mitigate privacy concerns of passive fingerprinting by requiring explicit opt-in and disclosure of required headers by the server through the use of the Accept-CH response header, turning passive fingerprinting vectors into active ones.\n\nThe document does not define specific usages of Client Hints. Such usages need to be defined in their respective specifications.\n\nOne example of such usage is the User-Agent Client Hints [UA-CH].\n\n### 1.1. Notational Conventions\n\nThe 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.\n\nThis document uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234].\n\n---\n\n---\n\n## 3. Advertising Server Support\n\nServers can advertise support for Client Hints using the mechanism described below.\n\n### 3.1. The Accept-CH Response Header Field\n\nThe Accept-CH response header field indicates server support for the hints indicated in its value. Servers wishing to receive user agent information through Client Hints *SHOULD* add the Accept-CH response header to their responses as early as possible.\n\nAccept-CH is a Structured Header [RFC8941]. Its value *MUST* be an sf-list ([Section 3.1](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.1) of [RFC8941]) whose members are Tokens ([Section 3.3.4](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.4) of [RFC8941]). Its ABNF is:\n\n```\n Accept-CH = sf-list\n```\n\nFor example:\n\n```\nAccept-CH: Sec-CH-Example, Sec-CH-Example-2\n```\n\nWhen a user agent receives an HTTP response containing Accept-CH, it indicates that the origin opts-in to receive the indicated request header fields for subsequent same-origin requests. The opt-in *MUST* be ignored if delivered over non-secure transport (using a scheme different from HTTPS). It *SHOULD* be persisted and bound to the origin to enable delivery of Client Hints on subsequent requests to the server's origin, for the duration of the user's session (as defined by the user agent). An opt-in overrides previous persisted opt-in values and *SHOULD* be persisted in its stead.\n\nBased on the Accept-CH example above, which is received in response to a user agent navigating to \"https://site.example\", and delivered over a secure transport, persisted Accept-CH preferences will be bound to \"https://site.example\". It will then use it for navigations to for example, \"https://site.example/foobar.html\", but not to, for example, \"https://foobar.site.example/\". It will similarly use the preference for any same-origin resource requests (e.g., to \"https://site.example/image.jpg\") initiated by the page constructed from the navigation's response, but not to cross-origin resource requests (e.g., \"https://thirdparty.example/resource.js\"). This preference will not extend to resource requests initiated to \"https://site.example\" from other origins (e.g., from navigations to \"https://other.example/\").\n\n### 3.2. Interaction with Caches\n\nWhen selecting a response based on one or more Client Hints, and if the resource is cacheable, the server needs to generate a Vary response header field [RFC7234] to indicate which hints can affect the selected response and whether the selected response is appropriate for a later request.\n\n```\nVary: Sec-CH-Example\n```\n\nThe above example indicates that the cache key needs to include the Sec-CH-Example header field.\n\n```\nVary: Sec-CH-Example, Sec-CH-Example-2\n```\n\nThe above example indicates that the cache key needs to include the Sec-CH-Example and Sec-CH-Example-2 header fields.\n\n---\n\n## 4. Security Considerations\n\n### 4.1. Information Exposure\n\nRequest header fields used in features relying on this document expose information about the user's environment to enable privacy-preserving proactive content negotiation and avoid exposing passive fingerprinting vectors. However, implementers need to bear in mind that in the worst case, uncontrolled and unmonitored active fingerprinting is not better than passive fingerprinting. In order to provide user privacy benefits, user agents need to apply further policies that prevent abuse of the information exposed by features using Client Hints.\n\nThe information exposed by features might reveal new information about the user, and implementers ought to consider the following considerations, recommendations, and best practices.\n\nThe underlying assumption is that exposing information about the user as a request header is equivalent (from a security perspective) to exposing this information by other means. (For example, if the request's origin can access that information using JavaScript APIs and transmit it to its servers.)\n\nBecause Client Hints is an explicit opt-in mechanism, it means that servers wanting access to information about the user's environment need to actively ask for it, enabling clients and privacy researchers to keep track of which origins collect that data, and potentially act upon it. The header-based opt-in means that removal of passive fingerprinting vectors is possible. As an example, the user agent can reduce the information exposed by the User-Agent string, while enabling active access to that information through User-Agent Client Hints [UA-CH]. Otherwise, the user agent can expose information already available through script (e.g., the Save-Data Client Hints <[https://wicg.github.io/savedata/#save-data-request-header-field](https://wicg.github.io/savedata/#save-data-request-header-field)>), without increasing the passive fingerprinting surface. User agents supporting Client Hints features which send certain information to opted-in servers *SHOULD* avoid sending the equivalent information passively.\n\nTherefore, features relying on this document to define Client Hint headers *MUST NOT* provide new information that is otherwise not made available to the application by the user agent, such as existing request headers, HTML, CSS, or JavaScript.\n\nSuch features need to take into account the following aspects of the exposed information:\n\nEntropy:\n\nExposing highly granular data can be used to help identify users across multiple requests to different origins. Reducing the set of header field values that can be expressed, or restricting them to an enumerated range where the advertised value is close to but is not an exact representation of the current value, can improve privacy and reduce risk of linkability by ensuring that the same value is sent by multiple users.\n\nSensitivity:\n\nThe feature *SHOULD NOT* expose user-sensitive information. To that end, information available to the application, but gated behind specific user actions (e.g., a permission prompt or user activation), *SHOULD NOT* be exposed as a Client Hint.\n\nChange over time:\n\nThe feature *SHOULD NOT* expose user information that changes over time, unless the state change itself is also exposed (e.g., through JavaScript callbacks).\n\nDifferent features will be positioned in different points in the space between low-entropy, non-sensitive, and static information (e.g., user agent information) and high-entropy, sensitive, and dynamic information (e.g., geolocation). User agents need to consider the value provided by a particular feature vs. these considerations and may wish to have different policies regarding that tradeoff on a per-feature or other fine-grained basis.\n\nImplementers ought to consider both user- and server-controlled mechanisms and policies to control which Client Hints header fields are advertised:\n\n- Implementers *SHOULD* restrict delivery of some or all Client Hints header fields to the opt-in origin only, unless the opt-in origin has explicitly delegated permission to another origin to request Client Hints header fields.\n- Implementers that consider providing user-choice mechanisms that allow users to balance privacy concerns against bandwidth limitations need to also consider that explaining the privacy implications involved to users, such as the risks of passive fingerprinting, may be challenging or even impractical.\n- Implementations specific to certain use cases or threat models *MAY* avoid transmitting some or all of the Client Hints header fields. For example, avoid transmission of header fields that can carry higher risks of linkability.\n\nUser agents *MUST* clear persisted opt-in preferences when any one of site data, browsing cache, cookies, or similar are cleared.\n\n### 4.2. Deployment and Security Risks\n\nDeployment of new request headers requires several considerations:\n\n- Potential conflicts due to existing use of a header field name\n- Properties of the data communicated in a header field value\n\nAuthors of new Client Hints are advised to carefully consider whether they need to be able to be added by client-side content (e.g., scripts) or whether the Client Hints need to be exclusively set by the user agent. In the latter case, the Sec- prefix on the header field name has the effect of preventing scripts and other application content from setting them in user agents. Using the \"Sec-\" prefix signals to servers that the user agent -- and not application content -- generated the values. See [FETCH] for more information.\n\nBy convention, request headers that are Client Hints are encouraged to use a CH- prefix, to make them easier to identify as using this framework; for example, CH-Foo or, with a \"Sec-\" prefix, Sec-CH-Foo. Doing so makes them easier to identify programmatically (e.g., for stripping unrecognized hints from requests by privacy filters).\n\nA Client Hints request header negotiated using the Accept-CH opt-in mechanism *MUST* have a field name that matches sf-token ([Section 3.3.4](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.4) of [RFC8941]).\n\n### 4.3. Abuse Detection\n\nA user agent that tracks access to active fingerprinting information *SHOULD* consider emission of Client Hints headers similar to the way it would consider access to the equivalent API.\n\nResearch into abuse of Client Hints might look at how HTTP responses to requests that contain Client Hints differ from those with different values and from those without values. This might be used to reveal which Client Hints are in use, allowing researchers to further analyze that use.\n\n---\n\n## 5. Cost of Sending Hints\n\nSending Client Hints to the server incurs an increase in request byte size. Some of this increase can be mitigated by HTTP header compression schemes, but each new hint sent will still lead to some increased bandwidth usage. Servers *SHOULD* take that into account when opting in to receive Client Hints and *SHOULD NOT* opt-in to receive hints unless they are to be used for content adaptation purposes.\n\nDue to request byte size increase, features relying on this document to define Client Hints *MAY* consider restricting sending those hints to certain request destinations [FETCH], where they are more likely to be useful.\n\n---\n\n## 6. IANA Considerations\n\nFeatures relying on this document are expected to register added request header fields in the \"Permanent Message Header Field Names\" registry [RFC3864].\n\nThis document defines the \"Accept-CH\" HTTP response header field; IANA has registered it in the same registry.\n\n### 6.1. Accept-CH\n\nHeader field name:\n\nAccept-CH\n\nApplicable protocol:\n\nHTTP\n\nStatus:\n\nexperimental\n\nAuthor/Change controller:\n\nIETF\n\nSpecification document(s):\n\nSection 3.1 of this RFC\n\nRelated information:\n\nfor Client Hints\n\n## 7. References\n\n### 7.1. Normative References\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC3864]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, [DOI 10.17487/RFC3864](https://dx.doi.org/10.17487/RFC3864), September 2004, <[https://www.rfc-editor.org/info/rfc3864](https://www.rfc-editor.org/info/rfc3864)>.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, [DOI 10.17487/RFC7231](https://dx.doi.org/10.17487/RFC7231), June 2014, <[https://www.rfc-editor.org/info/rfc7231](https://www.rfc-editor.org/info/rfc7231)>.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, [DOI 10.17487/RFC7234](https://dx.doi.org/10.17487/RFC7234), June 2014, <[https://www.rfc-editor.org/info/rfc7234](https://www.rfc-editor.org/info/rfc7234)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[RFC8941]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc8941.html)”, RFC 8941, [DOI 10.17487/RFC8941](https://dx.doi.org/10.17487/RFC8941), February 2021, <[https://www.rfc-editor.org/info/rfc8941](https://www.rfc-editor.org/info/rfc8941)>.\n\n### 7.2. Informative References\n\n[CLIENT-HINTS-INFRASTRUCTURE]\n\nWeiss, Y., “[Client Hints Infrastructure](https://wicg.github.io/client-hints-infrastructure/)”, July 2020, <[https://wicg.github.io/client-hints-infrastructure/](https://wicg.github.io/client-hints-infrastructure/)>.\n\n[FETCH]\n\nWHATWG, “[Fetch - Living Standard](https://fetch.spec.whatwg.org/)”, <[https://fetch.spec.whatwg.org/](https://fetch.spec.whatwg.org/)>.\n\n[RFC6265]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, [DOI 10.17487/RFC6265](https://dx.doi.org/10.17487/RFC6265), April 2011, <[https://www.rfc-editor.org/info/rfc6265](https://www.rfc-editor.org/info/rfc6265)>.\n\n[UA-CH]\n\nWest, M. and Y. Weiss, “[User-Agent Client Hints](https://wicg.github.io/ua-client-hints/)”, August 2020, <[https://wicg.github.io/ua-client-hints/](https://wicg.github.io/ua-client-hints/)>.\n\n---\n\n## Acknowledgements\n\nThanks to Mark Nottingham, Julian Reschke, Chris Bentzel, Ben Greenstein, Tarun Bansal, Roy Fielding, Vasiliy Faronov, Ted Hardie, Jonas Sicking, Martin Thomson, and numerous other members of the IETF HTTP Working Group for invaluable help and feedback.\n\n---\n\n## Authors' Addresses\n\n**Ilya Grigorik**\nGoogle\nEMail: [ilya@igvita.com](mailto:ilya@igvita.com)\nURI: [https://www.igvita.com/](https://www.igvita.com/)\n\n**Yoav Weiss**\nGoogle\nEMail: [yoav@yoav.ws](mailto:yoav@yoav.ws)\nURI: [https://blog.yoav.ws/](https://blog.yoav.ws/)", "znaku_textu": 20857, "slov": 2857, "odkazu": 107, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:10", "sha256": "09dc2ab9775330bfefc863b188ba8aa29f0389f73a7c185d6397e67b517823e1", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc8942", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc8941.html", "https://wicg.github.io/savedata/", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc3864.html", "https://www.rfc-editor.org/info/bcp90", "https://dx.doi.org/10.17487/RFC3864", "https://www.rfc-editor.org/info/rfc3864", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "https://www.rfc-editor.org/info/rfc5234", "https://dx.doi.org/10.17487/RFC7231", "https://www.rfc-editor.org/info/rfc7231", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://dx.doi.org/10.17487/RFC7234", "https://www.rfc-editor.org/info/rfc7234", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC8941", "https://www.rfc-editor.org/info/rfc8941", "https://wicg.github.io/client-hints-infrastructure/", "https://fetch.spec.whatwg.org/", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://dx.doi.org/10.17487/RFC6265", "https://www.rfc-editor.org/info/rfc6265", "https://wicg.github.io/ua-client-hints/", "https://www.igvita.com/", "https://blog.yoav.ws/"]} {"url": "https://httpwg.org/specs/rfc9110.html", "titulek": "RFC 9110 - HTTP Semantics", "h1": "HTTP Semantics", "popis": "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. This document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.", "klicova_slova": "Hypertext Transfer Protocol, HTTP, HTTP semantics, HTTP content, HTTP method, HTTP status code", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9110", "og:description": "HTTP Semantics", "og:url": "https://httpwg.org/specs/rfc9110.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Purpose"}, {"uroven": 3, "text": "1.2. History and Evolution"}, {"uroven": 3, "text": "1.3. Core Semantics"}, {"uroven": 3, "text": "1.4. Specifications Obsoleted by This Document"}, {"uroven": 2, "text": "2. Conformance"}, {"uroven": 3, "text": "2.1. Syntax Notation"}, {"uroven": 3, "text": "2.2. Requirements Notation"}, {"uroven": 3, "text": "2.3. Length Requirements"}, {"uroven": 3, "text": "2.4. Error Handling"}, {"uroven": 3, "text": "2.5. Protocol Version"}, {"uroven": 2, "text": "3. Terminology and Core Concepts"}, {"uroven": 3, "text": "3.1. Resources"}, {"uroven": 3, "text": "3.2. Representations"}, {"uroven": 3, "text": "3.3. Connections, Clients, and Servers"}, {"uroven": 3, "text": "3.4. Messages"}, {"uroven": 3, "text": "3.5. User Agents"}, {"uroven": 3, "text": "3.6. Origin Server"}, {"uroven": 3, "text": "3.7. Intermediaries"}, {"uroven": 3, "text": "3.8. Caches"}, {"uroven": 3, "text": "3.9. Example Message Exchange"}, {"uroven": 2, "text": "4. Identifiers in HTTP"}, {"uroven": 3, "text": "4.1. URI References"}, {"uroven": 3, "text": "4.2. HTTP-Related URI Schemes"}, {"uroven": 4, "text": "4.2.1. http URI Scheme"}, {"uroven": 4, "text": "4.2.2. https URI Scheme"}, {"uroven": 4, "text": "4.2.3. http(s) Normalization and Comparison"}, {"uroven": 4, "text": "4.2.4. Deprecation of userinfo in http(s) URIs"}, {"uroven": 4, "text": "4.2.5. http(s) References with Fragment Identifiers"}, {"uroven": 3, "text": "4.3. Authoritative Access"}, {"uroven": 4, "text": "4.3.1. URI Origin"}, {"uroven": 4, "text": "4.3.2. http Origins"}, {"uroven": 4, "text": "4.3.3. https Origins"}, {"uroven": 4, "text": "4.3.4. https Certificate Verification"}, {"uroven": 4, "text": "4.3.5. IP-ID Reference Identity"}, {"uroven": 2, "text": "5. Fields"}, {"uroven": 3, "text": "5.1. Field Names"}, {"uroven": 3, "text": "5.2. Field Lines and Combined Field Value"}, {"uroven": 3, "text": "5.3. Field Order"}, {"uroven": 3, "text": "5.4. Field Limits"}, {"uroven": 3, "text": "5.5. Field Values"}, {"uroven": 3, "text": "5.6. Common Rules for Defining Field Values"}, {"uroven": 4, "text": "5.6.1. Lists (#rule ABNF Extension)"}, {"uroven": 5, "text": "5.6.1.1. Sender Requirements"}, {"uroven": 5, "text": "5.6.1.2. Recipient Requirements"}, {"uroven": 4, "text": "5.6.2. Tokens"}, {"uroven": 4, "text": "5.6.3. Whitespace"}, {"uroven": 4, "text": "5.6.4. Quoted Strings"}, {"uroven": 4, "text": "5.6.5. Comments"}, {"uroven": 4, "text": "5.6.6. Parameters"}, {"uroven": 4, "text": "5.6.7. Date/Time Formats"}, {"uroven": 2, "text": "6. Message Abstraction"}, {"uroven": 3, "text": "6.1. Framing and Completeness"}, {"uroven": 3, "text": "6.2. Control Data"}, {"uroven": 3, "text": "6.3. Header Fields"}, {"uroven": 3, "text": "6.4. Content"}, {"uroven": 4, "text": "6.4.1. Content Semantics"}, {"uroven": 4, "text": "6.4.2. Identifying Content"}, {"uroven": 3, "text": "6.5. Trailer Fields"}, {"uroven": 4, "text": "6.5.1. Limitations on Use of Trailers"}, {"uroven": 4, "text": "6.5.2. Processing Trailer Fields"}, {"uroven": 3, "text": "6.6. Message Metadata"}, {"uroven": 4, "text": "6.6.1. Date"}, {"uroven": 4, "text": "6.6.2. Trailer"}, {"uroven": 2, "text": "7. Routing HTTP Messages"}, {"uroven": 3, "text": "7.1. Determining the Target Resource"}, {"uroven": 3, "text": "7.2. Host and :authority"}, {"uroven": 3, "text": "7.3. Routing Inbound Requests"}, {"uroven": 4, "text": "7.3.1. To a Cache"}, {"uroven": 4, "text": "7.3.2. To a Proxy"}, {"uroven": 4, "text": "7.3.3. To the Origin"}, {"uroven": 3, "text": "7.4. Rejecting Misdirected Requests"}, {"uroven": 3, "text": "7.5. Response Correlation"}, {"uroven": 3, "text": "7.6. Message Forwarding"}, {"uroven": 4, "text": "7.6.1. Connection"}, {"uroven": 4, "text": "7.6.2. Max-Forwards"}, {"uroven": 4, "text": "7.6.3. Via"}, {"uroven": 3, "text": "7.7. Message Transformations"}, {"uroven": 3, "text": "7.8. Upgrade"}, {"uroven": 2, "text": "8. Representation Data and Metadata"}, {"uroven": 3, "text": "8.1. Representation Data"}, {"uroven": 3, "text": "8.2. Representation Metadata"}, {"uroven": 3, "text": "8.3. Content-Type"}, {"uroven": 4, "text": "8.3.1. Media Type"}, {"uroven": 4, "text": "8.3.2. Charset"}, {"uroven": 4, "text": "8.3.3. Multipart Types"}, {"uroven": 3, "text": "8.4. Content-Encoding"}, {"uroven": 4, "text": "8.4.1. Content Codings"}, {"uroven": 5, "text": "8.4.1.1. Compress Coding"}, {"uroven": 5, "text": "8.4.1.2. Deflate Coding"}, {"uroven": 5, "text": "8.4.1.3. Gzip Coding"}, {"uroven": 3, "text": "8.5. Content-Language"}, {"uroven": 4, "text": "8.5.1. Language Tags"}, {"uroven": 3, "text": "8.6. Content-Length"}, {"uroven": 3, "text": "8.7. Content-Location"}, {"uroven": 3, "text": "8.8. Validator Fields"}, {"uroven": 4, "text": "8.8.1. Weak versus Strong"}, {"uroven": 4, "text": "8.8.2. Last-Modified"}, {"uroven": 5, "text": "8.8.2.1. Generation"}, {"uroven": 5, "text": "8.8.2.2. Comparison"}, {"uroven": 4, "text": "8.8.3. ETag"}, {"uroven": 5, "text": "8.8.3.1. Generation"}, {"uroven": 5, "text": "8.8.3.2. Comparison"}, {"uroven": 5, "text": "8.8.3.3. Example: Entity Tags Varying on Content-Negotiated Resources"}, {"uroven": 2, "text": "9. Methods"}, {"uroven": 3, "text": "9.1. Overview"}, {"uroven": 3, "text": "9.2. Common Method Properties"}, {"uroven": 4, "text": "9.2.1. Safe Methods"}, {"uroven": 4, "text": "9.2.2. Idempotent Methods"}, {"uroven": 4, "text": "9.2.3. Methods and Caching"}, {"uroven": 3, "text": "9.3. Method Definitions"}, {"uroven": 4, "text": "9.3.1. GET"}, {"uroven": 4, "text": "9.3.2. HEAD"}, {"uroven": 4, "text": "9.3.3. POST"}, {"uroven": 4, "text": "9.3.4. PUT"}, {"uroven": 4, "text": "9.3.5. DELETE"}, {"uroven": 4, "text": "9.3.6. CONNECT"}, {"uroven": 4, "text": "9.3.7. OPTIONS"}, {"uroven": 4, "text": "9.3.8. TRACE"}, {"uroven": 2, "text": "10. Message Context"}, {"uroven": 3, "text": "10.1. Request Context Fields"}, {"uroven": 4, "text": "10.1.1. Expect"}, {"uroven": 4, "text": "10.1.2. From"}, {"uroven": 4, "text": "10.1.3. Referer"}, {"uroven": 4, "text": "10.1.4. TE"}, {"uroven": 4, "text": "10.1.5. User-Agent"}, {"uroven": 3, "text": "10.2. Response Context Fields"}, {"uroven": 4, "text": "10.2.1. Allow"}, {"uroven": 4, "text": "10.2.2. Location"}, {"uroven": 4, "text": "10.2.3. Retry-After"}, {"uroven": 4, "text": "10.2.4. Server"}, {"uroven": 2, "text": "11. HTTP Authentication"}, {"uroven": 3, "text": "11.1. Authentication Scheme"}, {"uroven": 3, "text": "11.2. Authentication Parameters"}, {"uroven": 3, "text": "11.3. Challenge and Response"}, {"uroven": 3, "text": "11.4. Credentials"}, {"uroven": 3, "text": "11.5. Establishing a Protection Space (Realm)"}, {"uroven": 3, "text": "11.6. Authenticating Users to Origin Servers"}, {"uroven": 4, "text": "11.6.1. WWW-Authenticate"}, {"uroven": 4, "text": "11.6.2. Authorization"}, {"uroven": 4, "text": "11.6.3. Authentication-Info"}, {"uroven": 3, "text": "11.7. Authenticating Clients to Proxies"}, {"uroven": 4, "text": "11.7.1. Proxy-Authenticate"}, {"uroven": 4, "text": "11.7.2. Proxy-Authorization"}, {"uroven": 4, "text": "11.7.3. Proxy-Authentication-Info"}, {"uroven": 2, "text": "12. Content Negotiation"}, {"uroven": 3, "text": "12.1. Proactive Negotiation"}, {"uroven": 3, "text": "12.2. Reactive Negotiation"}, {"uroven": 3, "text": "12.3. Request Content Negotiation"}, {"uroven": 3, "text": "12.4. Content Negotiation Field Features"}, {"uroven": 4, "text": "12.4.1. Absence"}, {"uroven": 4, "text": "12.4.2. Quality Values"}, {"uroven": 4, "text": "12.4.3. Wildcard Values"}, {"uroven": 3, "text": "12.5. Content Negotiation Fields"}, {"uroven": 4, "text": "12.5.1. Accept"}, {"uroven": 4, "text": "12.5.2. Accept-Charset"}, {"uroven": 4, "text": "12.5.3. Accept-Encoding"}, {"uroven": 4, "text": "12.5.4. Accept-Language"}, {"uroven": 4, "text": "12.5.5. Vary"}, {"uroven": 2, "text": "13. Conditional Requests"}, {"uroven": 3, "text": "13.1. Preconditions"}, {"uroven": 4, "text": "13.1.1. If-Match"}, {"uroven": 4, "text": "13.1.2. If-None-Match"}, {"uroven": 4, "text": "13.1.3. If-Modified-Since"}, {"uroven": 4, "text": "13.1.4. If-Unmodified-Since"}, {"uroven": 4, "text": "13.1.5. If-Range"}, {"uroven": 3, "text": "13.2. Evaluation of Preconditions"}, {"uroven": 4, "text": "13.2.1. When to Evaluate"}, {"uroven": 4, "text": "13.2.2. Precedence of Preconditions"}, {"uroven": 2, "text": "14. Range Requests"}, {"uroven": 3, "text": "14.1. Range Units"}, {"uroven": 4, "text": "14.1.1. Range Specifiers"}, {"uroven": 4, "text": "14.1.2. Byte Ranges"}, {"uroven": 3, "text": "14.2. Range"}, {"uroven": 3, "text": "14.3. Accept-Ranges"}, {"uroven": 3, "text": "14.4. Content-Range"}, {"uroven": 3, "text": "14.5. Partial PUT"}, {"uroven": 3, "text": "14.6. Media Type multipart/byteranges"}, {"uroven": 2, "text": "15. Status Codes"}, {"uroven": 3, "text": "15.1. Overview of Status Codes"}, {"uroven": 3, "text": "15.2. Informational 1xx"}, {"uroven": 4, "text": "15.2.1. 100 Continue"}, {"uroven": 4, "text": "15.2.2. 101 Switching Protocols"}, {"uroven": 3, "text": "15.3. Successful 2xx"}, {"uroven": 4, "text": "15.3.1. 200 OK"}, {"uroven": 4, "text": "15.3.2. 201 Created"}, {"uroven": 4, "text": "15.3.3. 202 Accepted"}, {"uroven": 4, "text": "15.3.4. 203 Non-Authoritative Information"}, {"uroven": 4, "text": "15.3.5. 204 No Content"}, {"uroven": 4, "text": "15.3.6. 205 Reset Content"}, {"uroven": 4, "text": "15.3.7. 206 Partial Content"}, {"uroven": 5, "text": "15.3.7.1. Single Part"}, {"uroven": 5, "text": "15.3.7.2. Multiple Parts"}, {"uroven": 5, "text": "15.3.7.3. Combining Parts"}, {"uroven": 3, "text": "15.4. Redirection 3xx"}, {"uroven": 4, "text": "15.4.1. 300 Multiple Choices"}, {"uroven": 4, "text": "15.4.2. 301 Moved Permanently"}, {"uroven": 4, "text": "15.4.3. 302 Found"}, {"uroven": 4, "text": "15.4.4. 303 See Other"}, {"uroven": 4, "text": "15.4.5. 304 Not Modified"}, {"uroven": 4, "text": "15.4.6. 305 Use Proxy"}, {"uroven": 4, "text": "15.4.7. 306 (Unused)"}, {"uroven": 4, "text": "15.4.8. 307 Temporary Redirect"}, {"uroven": 4, "text": "15.4.9. 308 Permanent Redirect"}, {"uroven": 3, "text": "15.5. Client Error 4xx"}, {"uroven": 4, "text": "15.5.1. 400 Bad Request"}, {"uroven": 4, "text": "15.5.2. 401 Unauthorized"}, {"uroven": 4, "text": "15.5.3. 402 Payment Required"}, {"uroven": 4, "text": "15.5.4. 403 Forbidden"}, {"uroven": 4, "text": "15.5.5. 404 Not Found"}, {"uroven": 4, "text": "15.5.6. 405 Method Not Allowed"}, {"uroven": 4, "text": "15.5.7. 406 Not Acceptable"}, {"uroven": 4, "text": "15.5.8. 407 Proxy Authentication Required"}, {"uroven": 4, "text": "15.5.9. 408 Request Timeout"}, {"uroven": 4, "text": "15.5.10. 409 Conflict"}, {"uroven": 4, "text": "15.5.11. 410 Gone"}, {"uroven": 4, "text": "15.5.12. 411 Length Required"}, {"uroven": 4, "text": "15.5.13. 412 Precondition Failed"}, {"uroven": 4, "text": "15.5.14. 413 Content Too Large"}, {"uroven": 4, "text": "15.5.15. 414 URI Too Long"}, {"uroven": 4, "text": "15.5.16. 415 Unsupported Media Type"}, {"uroven": 4, "text": "15.5.17. 416 Range Not Satisfiable"}, {"uroven": 4, "text": "15.5.18. 417 Expectation Failed"}, {"uroven": 4, "text": "15.5.19. 418 (Unused)"}, {"uroven": 4, "text": "15.5.20. 421 Misdirected Request"}, {"uroven": 4, "text": "15.5.21. 422 Unprocessable Content"}, {"uroven": 4, "text": "15.5.22. 426 Upgrade Required"}, {"uroven": 3, "text": "15.6. Server Error 5xx"}, {"uroven": 4, "text": "15.6.1. 500 Internal Server Error"}, {"uroven": 4, "text": "15.6.2. 501 Not Implemented"}, {"uroven": 4, "text": "15.6.3. 502 Bad Gateway"}, {"uroven": 4, "text": "15.6.4. 503 Service Unavailable"}, {"uroven": 4, "text": "15.6.5. 504 Gateway Timeout"}, {"uroven": 4, "text": "15.6.6. 505 HTTP Version Not Supported"}, {"uroven": 2, "text": "16. Extending HTTP"}, {"uroven": 3, "text": "16.1. Method Extensibility"}, {"uroven": 4, "text": "16.1.1. Method Registry"}, {"uroven": 4, "text": "16.1.2. Considerations for New Methods"}, {"uroven": 3, "text": "16.2. Status Code Extensibility"}, {"uroven": 4, "text": "16.2.1. Status Code Registry"}, {"uroven": 4, "text": "16.2.2. Considerations for New Status Codes"}, {"uroven": 3, "text": "16.3. Field Extensibility"}, {"uroven": 4, "text": "16.3.1. Field Name Registry"}, {"uroven": 4, "text": "16.3.2. Considerations for New Fields"}, {"uroven": 5, "text": "16.3.2.1. Considerations for New Field Names"}, {"uroven": 5, "text": "16.3.2.2. Considerations for New Field Values"}, {"uroven": 3, "text": "16.4. Authentication Scheme Extensibility"}, {"uroven": 4, "text": "16.4.1. Authentication Scheme Registry"}, {"uroven": 4, "text": "16.4.2. Considerations for New Authentication Schemes"}, {"uroven": 3, "text": "16.5. Range Unit Extensibility"}, {"uroven": 4, "text": "16.5.1. Range Unit Registry"}, {"uroven": 4, "text": "16.5.2. Considerations for New Range Units"}, {"uroven": 3, "text": "16.6. Content Coding Extensibility"}, {"uroven": 4, "text": "16.6.1. Content Coding Registry"}, {"uroven": 4, "text": "16.6.2. Considerations for New Content Codings"}, {"uroven": 3, "text": "16.7. Upgrade Token Registry"}, {"uroven": 2, "text": "17. Security Considerations"}, {"uroven": 3, "text": "17.1. Establishing Authority"}, {"uroven": 3, "text": "17.2. Risks of Intermediaries"}, {"uroven": 3, "text": "17.3. Attacks Based on File and Path Names"}, {"uroven": 3, "text": "17.4. Attacks Based on Command, Code, or Query Injection"}, {"uroven": 3, "text": "17.5. Attacks via Protocol Element Length"}, {"uroven": 3, "text": "17.6. Attacks Using Shared-Dictionary Compression"}, {"uroven": 3, "text": "17.7. Disclosure of Personal Information"}, {"uroven": 3, "text": "17.8. Privacy of Server Log Information"}, {"uroven": 3, "text": "17.9. Disclosure of Sensitive Information in URIs"}, {"uroven": 3, "text": "17.10. Application Handling of Field Names"}, {"uroven": 3, "text": "17.11. Disclosure of Fragment after Redirects"}, {"uroven": 3, "text": "17.12. Disclosure of Product Information"}, {"uroven": 3, "text": "17.13. Browser Fingerprinting"}, {"uroven": 3, "text": "17.14. Validator Retention"}, {"uroven": 3, "text": "17.15. Denial-of-Service Attacks Using Range"}, {"uroven": 3, "text": "17.16. Authentication Considerations"}, {"uroven": 4, "text": "17.16.1. Confidentiality of Credentials"}, {"uroven": 4, "text": "17.16.2. Credentials and Idle Clients"}, {"uroven": 4, "text": "17.16.3. Protection Spaces"}, {"uroven": 4, "text": "17.16.4. Additional Response Fields"}, {"uroven": 2, "text": "18. IANA Considerations"}, {"uroven": 3, "text": "18.1. URI Scheme Registration"}, {"uroven": 3, "text": "18.2. Method Registration"}, {"uroven": 3, "text": "18.3. Status Code Registration"}, {"uroven": 3, "text": "18.4. Field Name Registration"}, {"uroven": 3, "text": "18.5. Authentication Scheme Registration"}, {"uroven": 3, "text": "18.6. Content Coding Registration"}, {"uroven": 3, "text": "18.7. Range Unit Registration"}, {"uroven": 3, "text": "18.8. Media Type Registration"}, {"uroven": 3, "text": "18.9. Port Registration"}, {"uroven": 3, "text": "18.10. Upgrade Token Registration"}, {"uroven": 2, "text": "19. References"}, {"uroven": 3, "text": "19.1. Normative References"}, {"uroven": 3, "text": "19.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Collected ABNF"}, {"uroven": 2, "text": "Appendix B. Changes from Previous RFCs"}, {"uroven": 3, "text": "B.1. Changes from RFC 2818"}, {"uroven": 3, "text": "B.2. Changes from RFC 7230"}, {"uroven": 3, "text": "B.3. Changes from RFC 7231"}, {"uroven": 3, "text": "B.4. Changes from RFC 7232"}, {"uroven": 3, "text": "B.5. Changes from RFC 7233"}, {"uroven": 3, "text": "B.6. Changes from RFC 7235"}, {"uroven": 3, "text": "B.7. Changes from RFC 7538"}, {"uroven": 3, "text": "B.8. Changes from RFC 7615"}, {"uroven": 3, "text": "B.9. Changes from RFC 7694"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Index"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThe 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.\n\nThis document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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](https://www.rfc-editor.org/info/rfc9110).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Purpose\n - 1.2. History and Evolution\n - 1.3. Core Semantics\n - 1.4. Specifications Obsoleted by This Document\n- 2. Conformance\n - 2.1. Syntax Notation\n - 2.2. Requirements Notation\n - 2.3. Length Requirements\n - 2.4. Error Handling\n - 2.5. Protocol Version\n- 3. Terminology and Core Concepts\n - 3.1. Resources\n - 3.2. Representations\n - 3.3. Connections, Clients, and Servers\n - 3.4. Messages\n - 3.5. User Agents\n - 3.6. Origin Server\n - 3.7. Intermediaries\n - 3.8. Caches\n - 3.9. Example Message Exchange\n- 4. Identifiers in HTTP\n - 4.1. URI References\n - 4.2. HTTP-Related URI Schemes\n - 4.2.1. http URI Scheme\n - 4.2.2. https URI Scheme\n - 4.2.3. http(s) Normalization and Comparison\n - 4.2.4. Deprecation of userinfo in http(s) URIs\n - 4.2.5. http(s) References with Fragment Identifiers\n - 4.3. Authoritative Access\n - 4.3.1. URI Origin\n - 4.3.2. http Origins\n - 4.3.3. https Origins\n - 4.3.4. https Certificate Verification\n - 4.3.5. IP-ID Reference Identity\n- 5. Fields\n - 5.1. Field Names\n - 5.2. Field Lines and Combined Field Value\n - 5.3. Field Order\n - 5.4. Field Limits\n - 5.5. Field Values\n - 5.6. Common Rules for Defining Field Values\n - 5.6.1. Lists (#rule ABNF Extension)\n - 5.6.1.1. Sender Requirements\n - 5.6.1.2. Recipient Requirements\n - 5.6.2. Tokens\n - 5.6.3. Whitespace\n - 5.6.4. Quoted Strings\n - 5.6.5. Comments\n - 5.6.6. Parameters\n - 5.6.7. Date/Time Formats\n- 6. Message Abstraction\n - 6.1. Framing and Completeness\n - 6.2. Control Data\n - 6.3. Header Fields\n - 6.4. Content\n - 6.4.1. Content Semantics\n - 6.4.2. Identifying Content\n - 6.5. Trailer Fields\n - 6.5.1. Limitations on Use of Trailers\n - 6.5.2. Processing Trailer Fields\n - 6.6. Message Metadata\n - 6.6.1. Date\n - 6.6.2. Trailer\n- 7. Routing HTTP Messages\n - 7.1. Determining the Target Resource\n - 7.2. Host and :authority\n - 7.3. Routing Inbound Requests\n - 7.3.1. To a Cache\n - 7.3.2. To a Proxy\n - 7.3.3. To the Origin\n - 7.4. Rejecting Misdirected Requests\n - 7.5. Response Correlation\n - 7.6. Message Forwarding\n - 7.6.1. Connection\n - 7.6.2. Max-Forwards\n - 7.6.3. Via\n - 7.7. Message Transformations\n - 7.8. Upgrade\n- 8. Representation Data and Metadata\n - 8.1. Representation Data\n - 8.2. Representation Metadata\n - 8.3. Content-Type\n - 8.3.1. Media Type\n - 8.3.2. Charset\n - 8.3.3. Multipart Types\n - 8.4. Content-Encoding\n - 8.4.1. Content Codings\n - 8.4.1.1. Compress Coding\n - 8.4.1.2. Deflate Coding\n - 8.4.1.3. Gzip Coding\n - 8.5. Content-Language\n - 8.5.1. Language Tags\n - 8.6. Content-Length\n - 8.7. Content-Location\n - 8.8. Validator Fields\n - 8.8.1. Weak versus Strong\n - 8.8.2. Last-Modified\n - 8.8.2.1. Generation\n - 8.8.2.2. Comparison\n - 8.8.3. ETag\n - 8.8.3.1. Generation\n - 8.8.3.2. Comparison\n - 8.8.3.3. Example: Entity Tags Varying on Content-Negotiated Resources\n- 9. Methods\n - 9.1. Overview\n - 9.2. Common Method Properties\n - 9.2.1. Safe Methods\n - 9.2.2. Idempotent Methods\n - 9.2.3. Methods and Caching\n - 9.3. Method Definitions\n - 9.3.1. GET\n - 9.3.2. HEAD\n - 9.3.3. POST\n - 9.3.4. PUT\n - 9.3.5. DELETE\n - 9.3.6. CONNECT\n - 9.3.7. OPTIONS\n - 9.3.8. TRACE\n- 10. Message Context\n - 10.1. Request Context Fields\n - 10.1.1. Expect\n - 10.1.2. From\n - 10.1.3. Referer\n - 10.1.4. TE\n - 10.1.5. User-Agent\n - 10.2. Response Context Fields\n - 10.2.1. Allow\n - 10.2.2. Location\n - 10.2.3. Retry-After\n - 10.2.4. Server\n- 11. HTTP Authentication\n - 11.1. Authentication Scheme\n - 11.2. Authentication Parameters\n - 11.3. Challenge and Response\n - 11.4. Credentials\n - 11.5. Establishing a Protection Space (Realm)\n - 11.6. Authenticating Users to Origin Servers\n - 11.6.1. WWW-Authenticate\n - 11.6.2. Authorization\n - 11.6.3. Authentication-Info\n - 11.7. Authenticating Clients to Proxies\n - 11.7.1. Proxy-Authenticate\n - 11.7.2. Proxy-Authorization\n - 11.7.3. Proxy-Authentication-Info\n- 12. Content Negotiation\n - 12.1. Proactive Negotiation\n - 12.2. Reactive Negotiation\n - 12.3. Request Content Negotiation\n - 12.4. Content Negotiation Field Features\n - 12.4.1. Absence\n - 12.4.2. Quality Values\n - 12.4.3. Wildcard Values\n - 12.5. Content Negotiation Fields\n - 12.5.1. Accept\n - 12.5.2. Accept-Charset\n - 12.5.3. Accept-Encoding\n - 12.5.4. Accept-Language\n - 12.5.5. Vary\n- 13. Conditional Requests\n - 13.1. Preconditions\n - 13.1.1. If-Match\n - 13.1.2. If-None-Match\n - 13.1.3. If-Modified-Since\n - 13.1.4. If-Unmodified-Since\n - 13.1.5. If-Range\n - 13.2. Evaluation of Preconditions\n - 13.2.1. When to Evaluate\n - 13.2.2. Precedence of Preconditions\n- 14. Range Requests\n - 14.1. Range Units\n - 14.1.1. Range Specifiers\n - 14.1.2. Byte Ranges\n - 14.2. Range\n - 14.3. Accept-Ranges\n - 14.4. Content-Range\n - 14.5. Partial PUT\n - 14.6. Media Type multipart/byteranges\n- 15. Status Codes\n - 15.1. Overview of Status Codes\n - 15.2. Informational 1xx\n - 15.2.1. 100 Continue\n - 15.2.2. 101 Switching Protocols\n - 15.3. Successful 2xx\n - 15.3.1. 200 OK\n - 15.3.2. 201 Created\n - 15.3.3. 202 Accepted\n - 15.3.4. 203 Non-Authoritative Information\n - 15.3.5. 204 No Content\n - 15.3.6. 205 Reset Content\n - 15.3.7. 206 Partial Content\n - 15.3.7.1. Single Part\n - 15.3.7.2. Multiple Parts\n - 15.3.7.3. Combining Parts\n - 15.4. Redirection 3xx\n - 15.4.1. 300 Multiple Choices\n - 15.4.2. 301 Moved Permanently\n - 15.4.3. 302 Found\n - 15.4.4. 303 See Other\n - 15.4.5. 304 Not Modified\n - 15.4.6. 305 Use Proxy\n - 15.4.7. 306 (Unused)\n - 15.4.8. 307 Temporary Redirect\n - 15.4.9. 308 Permanent Redirect\n - 15.5. Client Error 4xx\n - 15.5.1. 400 Bad Request\n - 15.5.2. 401 Unauthorized\n - 15.5.3. 402 Payment Required\n - 15.5.4. 403 Forbidden\n - 15.5.5. 404 Not Found\n - 15.5.6. 405 Method Not Allowed\n - 15.5.7. 406 Not Acceptable\n - 15.5.8. 407 Proxy Authentication Required\n - 15.5.9. 408 Request Timeout\n - 15.5.10. 409 Conflict\n - 15.5.11. 410 Gone\n - 15.5.12. 411 Length Required\n - 15.5.13. 412 Precondition Failed\n - 15.5.14. 413 Content Too Large\n - 15.5.15. 414 URI Too Long\n - 15.5.16. 415 Unsupported Media Type\n - 15.5.17. 416 Range Not Satisfiable\n - 15.5.18. 417 Expectation Failed\n - 15.5.19. 418 (Unused)\n - 15.5.20. 421 Misdirected Request\n - 15.5.21. 422 Unprocessable Content\n - 15.5.22. 426 Upgrade Required\n - 15.6. Server Error 5xx\n - 15.6.1. 500 Internal Server Error\n - 15.6.2. 501 Not Implemented\n - 15.6.3. 502 Bad Gateway\n - 15.6.4. 503 Service Unavailable\n - 15.6.5. 504 Gateway Timeout\n - 15.6.6. 505 HTTP Version Not Supported\n- 16. Extending HTTP\n - 16.1. Method Extensibility\n - 16.1.1. Method Registry\n - 16.1.2. Considerations for New Methods\n - 16.2. Status Code Extensibility\n - 16.2.1. Status Code Registry\n - 16.2.2. Considerations for New Status Codes\n - 16.3. Field Extensibility\n - 16.3.1. Field Name Registry\n - 16.3.2. Considerations for New Fields\n - 16.3.2.1. Considerations for New Field Names\n - 16.3.2.2. Considerations for New Field Values\n - 16.4. Authentication Scheme Extensibility\n - 16.4.1. Authentication Scheme Registry\n - 16.4.2. Considerations for New Authentication Schemes\n - 16.5. Range Unit Extensibility\n - 16.5.1. Range Unit Registry\n - 16.5.2. Considerations for New Range Units\n - 16.6. Content Coding Extensibility\n - 16.6.1. Content Coding Registry\n - 16.6.2. Considerations for New Content Codings\n - 16.7. Upgrade Token Registry\n- 17. Security Considerations\n - 17.1. Establishing Authority\n - 17.2. Risks of Intermediaries\n - 17.3. Attacks Based on File and Path Names\n - 17.4. Attacks Based on Command, Code, or Query Injection\n - 17.5. Attacks via Protocol Element Length\n - 17.6. Attacks Using Shared-Dictionary Compression\n - 17.7. Disclosure of Personal Information\n - 17.8. Privacy of Server Log Information\n - 17.9. Disclosure of Sensitive Information in URIs\n - 17.10. Application Handling of Field Names\n - 17.11. Disclosure of Fragment after Redirects\n - 17.12. Disclosure of Product Information\n - 17.13. Browser Fingerprinting\n - 17.14. Validator Retention\n - 17.15. Denial-of-Service Attacks Using Range\n - 17.16. Authentication Considerations\n - 17.16.1. Confidentiality of Credentials\n - 17.16.2. Credentials and Idle Clients\n - 17.16.3. Protection Spaces\n - 17.16.4. Additional Response Fields\n- 18. IANA Considerations\n - 18.1. URI Scheme Registration\n - 18.2. Method Registration\n - 18.3. Status Code Registration\n - 18.4. Field Name Registration\n - 18.5. Authentication Scheme Registration\n - 18.6. Content Coding Registration\n - 18.7. Range Unit Registration\n - 18.8. Media Type Registration\n - 18.9. Port Registration\n - 18.10. Upgrade Token Registration\n- 19. References\n - 19.1. Normative References\n - 19.2. Informative References\n- Appendix A. Collected ABNF\n- Appendix B. Changes from Previous RFCs\n - B.1. Changes from RFC 2818\n - B.2. Changes from RFC 7230\n - B.3. Changes from RFC 7231\n - B.4. Changes from RFC 7232\n - B.5. Changes from RFC 7233\n - B.6. Changes from RFC 7235\n - B.7. Changes from RFC 7538\n - B.8. Changes from RFC 7615\n - B.9. Changes from RFC 7694\n- Acknowledgements\n- Index\n- Authors' Addresses\n\n## 1. Introduction\n\n### 1.1. Purpose\n\nThe 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.\n\nHTTP hides the details of how a service is implemented by presenting a uniform interface to clients that is independent of the types of resources provided. Likewise, servers do not need to be aware of each client's purpose: a request can be considered in isolation rather than being associated with a specific type of client or a predetermined sequence of application steps. This allows general-purpose implementations to be used effectively in many different contexts, reduces interaction complexity, and enables independent evolution over time.\n\nHTTP is also designed for use as an intermediation protocol, wherein proxies and gateways can translate non-HTTP information systems into a more generic interface.\n\nOne consequence of this flexibility is that the protocol cannot be defined in terms of what occurs behind the interface. Instead, we are limited to defining the syntax of communication, the intent of received communication, and the expected behavior of recipients. If the communication is considered in isolation, then successful actions ought to be reflected in corresponding changes to the observable interface provided by servers. However, since multiple clients might act in parallel and perhaps at cross-purposes, we cannot require that such changes be observable beyond the scope of a single response.\n\n### 1.2. History and Evolution\n\nHTTP has been the primary information transfer protocol for the World Wide Web since its introduction in 1990. It began as a trivial mechanism for low-latency requests, with a single method (GET) to request transfer of a presumed hypertext document identified by a given pathname. As the Web grew, HTTP was extended to enclose requests and responses within messages, transfer arbitrary data formats using MIME-like media types, and route requests through intermediaries. These protocols were eventually defined as HTTP/0.9 and HTTP/1.0 (see [HTTP/1.0]).\n\nHTTP/1.1 was designed to refine the protocol's features while retaining compatibility with the existing text-based messaging syntax, improving its interoperability, scalability, and robustness across the Internet. This included length-based data delimiters for both fixed and dynamic (chunked) content, a consistent framework for content negotiation, opaque validators for conditional requests, cache controls for better cache consistency, range requests for partial updates, and default persistent connections. HTTP/1.1 was introduced in 1995 and published on the Standards Track in 1997 [RFC2068], revised in 1999 [RFC2616], and revised again in 2014 ([RFC7230] through [RFC7235]).\n\nHTTP/2 ([HTTP/2]) introduced a multiplexed session layer on top of the existing TLS and TCP protocols for exchanging concurrent HTTP messages with efficient field compression and server push. HTTP/3 ([HTTP/3]) provides greater independence for concurrent messages by using QUIC as a secure multiplexed transport over UDP instead of TCP.\n\nAll 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.\n\nThis revision of HTTP separates the definition of semantics (this document) and caching ([CACHING]) from the current HTTP/1.1 messaging syntax ([HTTP/1.1]) to allow each major protocol version to progress independently while referring to the same core semantics.\n\n### 1.3. Core Semantics\n\nHTTP provides a uniform interface for interacting with a resource (Section 3.1) — regardless of its type, nature, or implementation — by sending messages that manipulate or transfer representations (Section 3.2).\n\nEach message is either a request or a response. A client constructs request messages that communicate its intentions and routes those messages toward an identified origin server. A server listens for requests, parses each message received, interprets the message semantics in relation to the identified target resource, and responds to that request with one or more response messages. The client examines received responses to see if its intentions were carried out, determining what to do next based on the status codes and content received.\n\nHTTP semantics include the intentions defined by each request method (Section 9), extensions to those semantics that might be described in request header fields, status codes that describe the response (Section 15), and other control data and resource metadata that might be given in response fields.\n\nSemantics also include representation metadata that describe how content is intended to be interpreted by a recipient, request header fields that might influence content selection, and the various selection algorithms that are collectively referred to as content negotiation (Section 12).\n\n### 1.4. Specifications Obsoleted by This Document\n\n| Title | Reference | See |\n| --- | --- | --- |\n| HTTP Over TLS | [RFC2818] | B.1 |\n| HTTP/1.1 Message Syntax and Routing [*] | [RFC7230] | B.2 |\n| HTTP/1.1 Semantics and Content | [RFC7231] | B.3 |\n| HTTP/1.1 Conditional Requests | [RFC7232] | B.4 |\n| HTTP/1.1 Range Requests | [RFC7233] | B.5 |\n| HTTP/1.1 Authentication | [RFC7235] | B.6 |\n| HTTP Status Code 308 (Permanent Redirect) | [RFC7538] | B.7 |\n| HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields | [RFC7615] | B.8 |\n| HTTP Client-Initiated Content-Encoding | [RFC7694] | B.9 |\n\n[*] 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].\n\n## 2. Conformance\n\n### 2.1. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234], extended with the notation for case-sensitivity in strings defined in [RFC7405].\n\nIt 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.\n\nAs a convention, ABNF rule names prefixed with \"obs-\" denote obsolete grammar rules that appear for historical reasons.\n\nThe following core rules are included by reference, as defined in [Appendix B.1](https://www.rfc-editor.org/rfc/rfc5234.html#appendix-B.1) of [RFC5234]: ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible US-ASCII character).\n\nSection 5.6 defines some generic syntactic components for field values.\n\nThis specification uses the terms \"character\", \"character encoding scheme\", \"charset\", and \"protocol element\" as they are defined in [RFC6365].\n\n### 2.2. Requirements Notation\n\nThe 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.\n\nThis 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.\n\nThe 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.\n\nAn implementation is considered conformant if it complies with all of the requirements associated with the roles it partakes in HTTP.\n\nA 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).\n\nConformance 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.\n\nWhen 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.\n\n### 2.3. Length Requirements\n\nA recipient *SHOULD* parse a received protocol element defensively, with only marginal expectations that the element will conform to its ABNF grammar and fit within a reasonable buffer size.\n\nHTTP 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.\n\nAt a minimum, a recipient *MUST* be able to parse and process protocol element lengths that are at least as long as the values that it generates for those same protocol elements in other messages. For example, an origin server that publishes very long URI references to its own resources needs to be able to parse and process those same references when received as a target URI.\n\nMany 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.\n\n### 2.4. Error Handling\n\nA recipient *MUST* interpret a received protocol element according to the semantics defined for it by this specification, including extensions to this specification, unless the recipient has determined (through experience or configuration) that the sender incorrectly implements what is implied by those semantics. For example, an origin server might disregard the contents of a received Accept-Encoding header field if inspection of the User-Agent header field indicates a specific implementation version that is known to fail on receipt of certain content codings.\n\nUnless noted otherwise, a recipient *MAY* attempt to recover a usable protocol element from an invalid construct. HTTP does not define specific error handling mechanisms except when they have a direct impact on security, since different applications of the protocol require different error handling strategies. For example, a Web browser might wish to transparently recover from a response where the Location header field doesn't parse according to the ABNF, whereas a systems control client might consider any form of error recovery to be dangerous.\n\nSome requests can be automatically retried by a client in the event of an underlying connection failure, as described in Section 9.2.2.\n\n### 2.5. Protocol Version\n\nHTTP's version number consists of two decimal digits separated by a \".\" (period or decimal point). The first digit (major version) indicates the messaging syntax, whereas the second digit (minor version) indicates the highest minor version within that major version to which the sender is conformant (able to understand for future communication).\n\nWhile HTTP's core semantics don't change between protocol versions, their expression \"on the wire\" can change, and so the HTTP version number changes when incompatible changes are made to the wire format. Additionally, HTTP allows incremental, backwards-compatible changes to be made to the protocol without changing its version through the use of defined extension points (Section 16).\n\nThe protocol version as a whole indicates the sender's conformance with the set of requirements laid out in that version's corresponding specification(s). For example, the version \"HTTP/1.1\" is defined by the combined specifications of this document, \"HTTP Caching\" [CACHING], and \"HTTP/1.1\" [HTTP/1.1].\n\nHTTP's major version number is incremented when an incompatible message syntax is introduced. The minor number is incremented when changes made to the protocol have the effect of adding to the message semantics or implying additional capabilities of the sender.\n\nThe minor version advertises the sender's communication capabilities even when the sender is only using a backwards-compatible subset of the protocol, thereby letting the recipient know that more advanced features can be used in response (by servers) or in future requests (by clients).\n\nWhen 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.\n\n## 3. Terminology and Core Concepts\n\nHTTP was created for the World Wide Web (WWW) architecture and has evolved over time to support the scalability needs of a worldwide hypertext system. Much of that architecture is reflected in the terminology used to define HTTP.\n\n### 3.1. Resources\n\nThe 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.\n\nOne design goal of HTTP is to separate resource identification from request semantics, which is made possible by vesting the request semantics in the request method (Section 9) and a few request-modifying header fields. A resource cannot treat a request in a manner inconsistent with the semantics of the method of the request. For example, though the URI of a resource might imply semantics that are not safe, a client can expect the resource to avoid actions that are unsafe when processing a request with a safe method (see Section 9.2.1).\n\nHTTP relies upon the Uniform Resource Identifier (URI) standard [URI] to indicate the target resource (Section 7.1) and relationships between resources.\n\n### 3.2. Representations\n\nA 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).\n\nHTTP allows \"information hiding\" behind its uniform interface by defining communication with respect to a transferable representation of the resource state, rather than transferring the resource itself. This allows the resource identified by a URI to be anything, including temporal functions like \"the current weather in Laguna Beach\", while potentially providing information that represents that resource at the time a message is generated [REST].\n\nThe uniform interface is similar to a window through which one can observe and act upon a thing only through the communication of messages to an independent actor on the other side. A shared abstraction is needed to represent (\"take the place of\") the current or desired state of that thing in our communications. When a representation is hypertext, it can provide both a representation of the resource state and processing instructions that help guide the recipient's future interactions.\n\nA target resource might be provided with, or be capable of generating, multiple representations that are each intended to reflect the resource's current state. An algorithm, usually based on content negotiation (Section 12), would be used to select one of those representations as being most applicable to a given request. This selected representation provides the data and metadata for evaluating conditional requests (Section 13) and constructing the content for 200 (OK), 206 (Partial Content), and 304 (Not Modified) responses to GET (Section 9.3.1).\n\n### 3.3. Connections, Clients, and Servers\n\nHTTP is a client/server protocol that operates over a reliable transport- or session-layer connection.\n\nAn HTTP client is a program that establishes a connection to a server for the purpose of sending one or more HTTP requests. An HTTP server is a program that accepts connections in order to service HTTP requests by sending HTTP responses.\n\nThe 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.\n\nHTTP is defined as a stateless protocol, meaning that each request message's semantics can be understood in isolation, and that the relationship between connections and messages on them has no impact on the interpretation of those messages. For example, a CONNECT request (Section 9.3.6) or a request with the Upgrade header field (Section 7.8) can occur at any time, not just in the first message on a connection. Many implementations depend on HTTP's stateless design in order to reuse proxied connections or dynamically load balance requests across multiple servers.\n\nAs 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.\n\n### 3.4. Messages\n\nHTTP 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.\n\nA client sends requests to a server in the form of a request message with a method (Section 9) and request target (Section 7.1). The request might also contain header fields (Section 6.3) for request modifiers, client information, and representation metadata, content (Section 6.4) intended for processing in accordance with the method, and trailer fields (Section 6.5) to communicate information collected while sending the content.\n\nA server responds to a client's request by sending one or more response messages, each including a status code (Section 15). The response might also contain header fields for server information, resource metadata, and representation metadata, content to be interpreted in accordance with the status code, and trailer fields to communicate information collected while sending the content.\n\n### 3.5. User Agents\n\nThe term user agent refers to any of the various client programs that initiate a request.\n\nThe most familiar form of user agent is the general-purpose Web browser, but that's only a small percentage of implementations. Other common user agents include spiders (web-traversing robots), command-line tools, billboard screens, household appliances, scales, light bulbs, firmware update scripts, mobile apps, and communication devices in a multitude of shapes and sizes.\n\nBeing 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.\n\nMany 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.\n\n### 3.6. Origin Server\n\nThe term origin server refers to a program that can originate authoritative responses for a given target resource.\n\nThe 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.\n\nMost 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).\n\n```\n request >\n UA ======================================= O\n < response\n```\n\n### 3.7. Intermediaries\n\nHTTP 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.\n\n```\n > > > >\n UA =========== A =========== B =========== C =========== O\n < < < <\n```\n\nThe 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.\n\nThe terms upstream and downstream are used to describe directional requirements in relation to the message flow: all messages flow from upstream to downstream. The terms inbound and outbound are used to describe directional requirements in relation to the request route: inbound means \"toward the origin server\", whereas outbound means \"toward the user agent\".\n\nA proxy is a message-forwarding agent that is chosen by the client, usually via local configuration rules, to receive requests for some type(s) of absolute URI and attempt to satisfy those requests via translation through the HTTP interface. Some translations are minimal, such as for proxy requests for \"http\" URIs, whereas other requests might require translation to and from entirely different application-level protocols. Proxies are often used to group an organization's HTTP requests through a common intermediary for the sake of security services, annotation services, or shared caching. Some proxies are designed to apply transformations to selected messages or content while they are being forwarded, as described in Section 7.7.\n\nA gateway (a.k.a. reverse proxy) is an intermediary that acts as an origin server for the outbound connection but translates received requests and forwards them inbound to another server or servers. Gateways are often used to encapsulate legacy or untrusted information services, to improve server performance through accelerator caching, and to enable partitioning or load balancing of HTTP services across multiple machines.\n\nAll HTTP requirements applicable to an origin server also apply to the outbound communication of a gateway. A gateway communicates with inbound servers using any protocol that it desires, including private extensions to HTTP that are outside the scope of this specification. However, an HTTP-to-HTTP gateway that wishes to interoperate with third-party HTTP servers needs to conform to user agent requirements on the gateway's inbound connection.\n\nA tunnel acts as a blind relay between two connections without changing the messages. Once active, a tunnel is not considered a party to the HTTP communication, though the tunnel might have been initiated by an HTTP request. A tunnel ceases to exist when both ends of the relayed connection are closed. Tunnels are used to extend a virtual connection through an intermediary, such as when Transport Layer Security (TLS, [TLS13]) is used to establish confidential communication through a shared firewall proxy.\n\nThe above categories for intermediary only consider those acting as participants in the HTTP communication. There are also intermediaries that can act on lower layers of the network protocol stack, filtering or redirecting HTTP traffic without the knowledge or permission of message senders. Network intermediaries are indistinguishable (at a protocol level) from an on-path attacker, often introducing security flaws or interoperability problems due to mistakenly violating HTTP semantics.\n\nFor example, an interception proxy [RFC3040] (also commonly known as a transparent proxy [RFC1919]) differs from an HTTP proxy because it is not chosen by the client. Instead, an interception proxy filters or redirects outgoing TCP port 80 packets (and occasionally other common port traffic). Interception proxies are commonly found on public network access points, as a means of enforcing account subscription prior to allowing use of non-local Internet services, and within corporate firewalls to enforce network usage policies.\n\n### 3.8. Caches\n\nA 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.\n\nThe effect of a cache is that the request/response chain is shortened if one of the participants along the chain has a cached response applicable to that request. The following illustrates the resulting chain if B has a cached copy of an earlier response from O (via C) for a request that has not been cached by UA or A.\n\n```\n > >\n UA =========== A =========== B - - - - - - C - - - - - - O\n < <\n```\n\nA response is cacheable if a cache is allowed to store a copy of the response message for use in answering subsequent requests. Even when a response is cacheable, there might be additional constraints placed by the client or by the origin server on when that cached response can be used for a particular request. HTTP requirements for cache behavior and cacheable responses are defined in [CACHING].\n\nThere is a wide variety of architectures and configurations of caches deployed across the World Wide Web and inside large organizations. These include national hierarchies of proxy caches to save bandwidth and reduce latency, content delivery networks that use gateway caching to optimize regional and global distribution of popular sites, collaborative systems that broadcast or multicast cache entries, archives of pre-fetched cache entries for use in off-line or high-latency environments, and so on.\n\n### 3.9. Example Message Exchange\n\nThe following example illustrates a typical HTTP/1.1 message exchange for a GET request (Section 9.3.1) on the URI \"http://www.example.com/hello.txt\":\n\nClient request:\n\n```\nGET /hello.txt HTTP/1.1\nUser-Agent: curl/7.64.1\nHost: www.example.com\nAccept-Language: en, mi\n```\n\nServer response:\n\n```\nHTTP/1.1 200 OK\nDate: Mon, 27 Jul 2009 12:28:53 GMT\nServer: Apache\nLast-Modified: Wed, 22 Jul 2009 19:15:56 GMT\nETag: \"34aa387-d-1568eb00\"\nAccept-Ranges: bytes\nContent-Length: 51\nVary: Accept-Encoding\nContent-Type: text/plain\n\nHello World! My content includes a trailing CRLF.\n```\n\n## 4. Identifiers in HTTP\n\nUniform Resource Identifiers (URIs) [URI] are used throughout HTTP as the means for identifying resources (Section 3.1).\n\n### 4.1. URI References\n\nURI references are used to target requests, indicate redirects, and define relationships.\n\nThe definitions of \"URI-reference\", \"absolute-URI\", \"relative-part\", \"authority\", \"port\", \"host\", \"path-abempty\", \"segment\", and \"query\" are adopted from the URI generic syntax. An \"absolute-path\" rule is defined for protocol elements that can contain a non-empty path component. (This rule differs slightly from the path-abempty rule of RFC 3986, which allows for an empty path, and path-absolute rule, which does not allow paths that begin with \"//\".) A \"partial-URI\" rule is defined for protocol elements that can contain a relative URI but not a fragment component.\n\n```\n URI-reference = \n absolute-URI = \n relative-part = \n authority = \n uri-host = \n port = \n path-abempty = \n segment = \n query = \n\n absolute-path = 1*( \"/\" segment )\n partial-URI = relative-part [ \"?\" query ]\n```\n\nEach 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).\n\nIt is *RECOMMENDED* that all senders and recipients support, at a minimum, URIs with lengths of 8000 octets in protocol elements. Note that this implies some structures and on-wire representations (for example, the request line in HTTP/1.1) will necessarily be larger in some cases.\n\n### 4.2. HTTP-Related URI Schemes\n\nIANA maintains the registry of URI Schemes [BCP35] at [https://www.iana.org/assignments/uri-schemes/](https://www.iana.org/assignments/uri-schemes/). Although requests might target any URI scheme, the following schemes are inherent to HTTP servers:\n\n| URI Scheme | Description | Section |\n| --- | --- | --- |\n| http | Hypertext Transfer Protocol | 4.2.1 |\n| https | Hypertext Transfer Protocol Secure | 4.2.2 |\n\nNote 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.\n\n#### 4.2.1. http URI Scheme\n\nThe \"http\" URI scheme is hereby defined for minting identifiers within the hierarchical namespace governed by a potential HTTP origin server listening for TCP ([TCP]) connections on a given port.\n\n```\n http-URI = \"http\" \"://\" authority path-abempty [ \"?\" query ]\n```\n\nThe origin server for an \"http\" URI is identified by the authority component, which includes a host identifier ([URI], [Section 3.2.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2)) and optional port number ([URI], [Section 3.2.3](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.3)). If the port subcomponent is empty or not given, TCP port 80 (the reserved port for WWW services) is the default. The origin determines who has the right to respond authoritatively to requests that target the identified resource, as defined in Section 4.3.2.\n\nA sender *MUST NOT* generate an \"http\" URI with an empty host identifier. A recipient that processes such a URI reference *MUST* reject it as invalid.\n\nThe hierarchical path component and optional query component identify the target resource within that origin server's namespace.\n\n#### 4.2.2. https URI Scheme\n\nThe \"https\" URI scheme is hereby defined for minting identifiers within the hierarchical namespace governed by a potential origin server listening for TCP connections on a given port and capable of establishing a TLS ([TLS13]) connection that has been secured for HTTP communication. In this context, secured specifically means that the server has been authenticated as acting on behalf of the identified authority and all HTTP communication with that server has confidentiality and integrity protection that is acceptable to both client and server.\n\n```\n https-URI = \"https\" \"://\" authority path-abempty [ \"?\" query ]\n```\n\nThe origin server for an \"https\" URI is identified by the authority component, which includes a host identifier ([URI], [Section 3.2.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2)) and optional port number ([URI], [Section 3.2.3](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.3)). If the port subcomponent is empty or not given, TCP port 443 (the reserved port for HTTP over TLS) is the default. The origin determines who has the right to respond authoritatively to requests that target the identified resource, as defined in Section 4.3.3.\n\nA sender *MUST NOT* generate an \"https\" URI with an empty host identifier. A recipient that processes such a URI reference *MUST* reject it as invalid.\n\nThe hierarchical path component and optional query component identify the target resource within that origin server's namespace.\n\nA 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.\n\nResources 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.\n\n#### 4.2.3. http(s) Normalization and Comparison\n\nURIs with an \"http\" or \"https\" scheme are normalized and compared according to the methods defined in [Section 6](https://www.rfc-editor.org/rfc/rfc3986.html#section-6) of [URI], using the defaults described above for each scheme.\n\nHTTP 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.\n\nScheme-based normalization ([Section 6.2.3](https://www.rfc-editor.org/rfc/rfc3986.html#section-6.2.3) of [URI]) of \"http\" and \"https\" URIs involves the following additional rules:\n\n- If the port is equal to the default port for a scheme, the normal form is to omit the port subcomponent.\n- 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.\n- The scheme and host are case-insensitive and normally provided in lowercase; all other components are compared in a case-sensitive manner.\n- 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](https://www.rfc-editor.org/rfc/rfc3986.html#section-2.1) and [2.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-2.2) of [URI] ).\n\nFor example, the following three URIs are equivalent:\n\n```\n http://example.com:80/~smith/home.html\n http://EXAMPLE.com/%7Esmith/home.html\n http://EXAMPLE.com:/%7esmith/home.html\n```\n\nTwo 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](https://www.rfc-editor.org/rfc/rfc3986.html#section-6.2) of [URI]).\n\n#### 4.2.4. Deprecation of userinfo in http(s) URIs\n\nThe URI generic syntax for authority also includes a userinfo subcomponent ([URI], [Section 3.2.1](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.1)) for including user authentication information in the URI. In that subcomponent, the use of the format \"user:password\" is deprecated.\n\nSome implementations make use of the userinfo component for internal configuration of authentication information, such as within command invocation options, configuration files, or bookmark lists, even though such usage might expose a user identifier or password.\n\nA 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.\n\nBefore 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.\n\n#### 4.2.5. http(s) References with Fragment Identifiers\n\nFragment identifiers allow for indirect identification of a secondary resource, independent of the URI scheme, as defined in [Section 3.5](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.5) of [URI]. Some protocol elements that refer to a URI allow inclusion of a fragment, while others do not. They are distinguished by use of the ABNF rule for elements where fragment is allowed; otherwise, a specific rule that excludes fragments is used.\n\n### 4.3. Authoritative Access\n\nAuthoritative access refers to dereferencing a given identifier, for the sake of access to the identified resource, in a way that the client believes is authoritative (controlled by the resource owner). The process for determining whether access is granted is defined by the URI scheme and often uses data within the URI components, such as the authority component when the generic syntax is used. However, authoritative access is not limited to the identified mechanism.\n\nSection 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.\n\nSee Section 17.1 for security considerations related to establishing authority.\n\n#### 4.3.1. URI Origin\n\nThe origin for a given URI is the triple of scheme, host, and port after normalizing the scheme and host to lowercase and normalizing the port to remove any leading zeros. If port is elided from the URI, the default port for that scheme is used. For example, the URI\n\n```\n https://Example.Com/happy.js\n```\n\nwould have the origin\n\n```\n { \"https\", \"example.com\", \"443\" }\n```\n\nwhich can also be described as the normalized URI prefix with port always present:\n\n```\n https://example.com:443\n```\n\nEach 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.\n\nTwo 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.\n\nOrigin is also used within HTML and related Web protocols, beyond the scope of this document, as described in [RFC6454].\n\n#### 4.3.2. http Origins\n\nAlthough HTTP is independent of the transport protocol, the \"http\" scheme (Section 4.2.1) is specific to associating authority with whomever controls the origin server listening for TCP connections on the indicated port of whatever host is identified within the authority component. This is a very weak sense of authority because it depends on both client-specific name resolution mechanisms and communication that might not be secured from an on-path attacker. Nevertheless, it is a sufficient minimum for binding \"http\" identifiers to an origin server for consistent resolution within a trusted environment.\n\nIf the host identifier is provided as an IP address, the origin server is the listener (if any) on the indicated TCP port at that IP address. If host is a registered name, the registered name is an indirect identifier for use with a name resolution service, such as DNS, to find an address for an appropriate origin server.\n\nWhen an \"http\" 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, and sending over that connection an HTTP request message containing a request target that matches the client's target URI (Section 7.1).\n\nIf the server responds to such a request with a non-interim HTTP response message, as described in Section 15, then that response is considered an authoritative answer to the client's request.\n\nNote, 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.\n\n#### 4.3.3. https Origins\n\nThe \"https\" scheme (Section 4.2.2) associates authority based on the ability of a server to use the private key corresponding to a certificate that the client considers to be trustworthy for the identified origin server. The client usually relies upon a chain of trust, conveyed from some prearranged or configured trust anchor, to deem a certificate trustworthy (Section 4.3.4).\n\nIn HTTP/1.1 and earlier, a client will only attribute authority to a server when they are communicating over a successfully established and secured connection specifically to that URI origin's host. The connection establishment and certificate verification are used as proof of authority.\n\nIn HTTP/2 and HTTP/3, a client will attribute authority to a server when they are communicating over a successfully established and secured connection if the URI origin's host matches any of the hosts present in the server's certificate and the client believes that it could open a connection to that host for that URI. In practice, a client will make a DNS query to check that the origin's host contains the same server IP address as the established connection. This restriction can be removed by the origin server sending an equivalent ORIGIN frame [RFC8336].\n\nThe 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).\n\nAn origin server might be unwilling to process requests for certain target URIs even when they have the authority to do so. For example, when a host operates distinct services on different ports (e.g., 443 and 8000), checking the target URI at the origin server is necessary (even after the connection has been secured) because a network attacker might cause connections for one port to be received at some other port. Failing to check the target URI might allow such an attacker to replace a response to one target URI (e.g., \"https://example.com/foo\") with a seemingly authoritative response from the other port (e.g., \"https://example.com:8000/foo\").\n\nNote 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.\n\nWhen 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).\n\nIf the server responds to such a request with a non-interim HTTP response message, as described in Section 15, then that response is considered an authoritative answer to the client's request.\n\nNote, 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]).\n\n#### 4.3.4. https Certificate Verification\n\nTo 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.\n\nIn general, a client *MUST* verify the service identity using the verification process defined in [Section 6](https://www.rfc-editor.org/rfc/rfc6125.html#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.\n\nA reference identity of type CN-ID *MUST NOT* be used by clients. As noted in [Section 6.2.1](https://www.rfc-editor.org/rfc/rfc6125.html#section-6.2.1) of [RFC6125], a reference identity of type CN-ID might be used by older clients.\n\nA client might be specially configured to accept an alternative form of server identity verification. For example, a client might be connecting to a server whose address and hostname are dynamic, with an expectation that the service will present a specific certificate (or a certificate matching some externally defined reference identity) rather than one matching the target URI's origin.\n\nIn special cases, it might be appropriate for a client to simply ignore the server's identity, but it must be understood that this leaves a connection open to active attack.\n\nIf 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.\n\n#### 4.3.5. IP-ID Reference Identity\n\nA server that is identified using an IP address literal in the \"host\" field of an \"https\" URI has a reference identity of type IP-ID. An IP version 4 address uses the \"IPv4address\" ABNF rule, and an IP version 6 address uses the \"IP-literal\" production with the \"IPv6address\" option; see [Section 3.2.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2) of [URI]. A reference identity of IP-ID contains the decoded bytes of the IP address.\n\nAn IP version 4 address is 4 octets, and an IP version 6 address is 16 octets. Use of IP-ID is not defined for any other IP version. The iPAddress choice in the certificate subjectAltName extension does not explicitly include the IP version and so relies on the length of the address to distinguish versions; see [Section 4.2.1.6](https://www.rfc-editor.org/rfc/rfc5280.html#section-4.2.1.6) of [RFC5280].\n\nA reference identity of type IP-ID matches if the address is identical to an iPAddress value of the subjectAltName extension of the certificate.\n\n## 5. Fields\n\nHTTP 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).\n\n### 5.1. Field Names\n\nA field name labels the corresponding field value as having the semantics defined by that name. For example, the Date header field is defined in Section 6.6.1 as containing the origination timestamp for the message in which it appears.\n\n```\n field-name = token \n```\n\nField names are case-insensitive and ought to be registered within the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\"; see Section 16.3.1.\n\nThe interpretation of a field does not change between minor versions of the same major HTTP version, though the default behavior of a recipient in the absence of such a field can change. Unless specified otherwise, fields are defined for all versions of HTTP. In particular, the Host and Connection fields ought to be recognized by all HTTP implementations whether or not they advertise conformance with HTTP/1.1.\n\nNew fields can be introduced without changing the protocol version if their defined semantics allow them to be safely ignored by recipients that do not recognize them; see Section 16.3.\n\nA proxy *MUST* forward unrecognized header fields unless the field name is listed in the Connection header field (Section 7.6.1) or the proxy is specifically configured to block, or otherwise transform, such fields. Other recipients *SHOULD* ignore unrecognized header and trailer fields. Adhering to these requirements allows HTTP's functionality to be extended without updating or removing deployed intermediaries.\n\n### 5.2. Field Lines and Combined Field Value\n\nField sections are composed of any number of field lines, each with a field name (see Section 5.1) identifying the field, and a field line value that conveys data for that instance of the field.\n\nWhen 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.\n\nFor example, this section:\n\n```\nExample-Field: Foo, Bar\nExample-Field: Baz\n```\n\ncontains 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\".\n\n### 5.3. Field Order\n\nA 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.\n\nThe 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.\n\nThis 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).\n\nThe 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.\n\nA 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.\n\n### 5.4. Field Limits\n\nHTTP does not place a predefined limit on the length of each field line, field value, or on the length of a header or trailer section as a whole, as described in Section 2. Various ad hoc limitations on individual lengths are found in practice, often depending on the specific field's semantics.\n\nA 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](rfc9112.html#request.smuggling) of [HTTP/1.1]).\n\nA 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.\n\n### 5.5. Field Values\n\nHTTP field values consist of a sequence of characters in a format defined by the field's grammar. Each field's grammar is usually defined using ABNF ([RFC5234]).\n\n```\n field-value = *field-content field-content = field-vchar\n [ 1*( SP / HTAB / field-vchar ) field-vchar ]\n field-vchar = VCHAR / obs-text obs-text = %x80-FF\n```\n\nA field value does not include leading or trailing whitespace. When a specific version of HTTP allows such whitespace to appear in a message, a field parsing implementation *MUST* exclude such whitespace prior to evaluating the field value.\n\nField values are usually constrained to the range of US-ASCII characters [USASCII]. Fields needing a greater range of characters can use an encoding, such as the one defined in [RFC8187]. Historically, HTTP allowed field content with text in the ISO-8859-1 charset [ISO-8859-1], supporting other charsets only through use of [RFC2047] encoding. Specifications for newly defined fields *SHOULD* limit their values to visible US-ASCII octets (VCHAR), SP, and HTAB. A recipient *SHOULD* treat other allowed octets in field content (i.e., obs-text) as opaque data.\n\nField 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).\n\nFields that only anticipate a single member as the field value are referred to as singleton fields.\n\nFields 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.\n\nBecause 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.\n\nFor 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:\n\n```\nExample-URIs: \"http://example.com/a.html,foo\",\n \"http://without-a-comma.example.com/\"\nExample-Dates: \"Sat, 04 May 1996\", \"Wed, 14 Sep 2005\"\n```\n\nNote 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.\n\nMany fields (such as Content-Type, defined in Section 8.3) use a common syntax for parameters that allows both unquoted (token) and quoted (quoted-string) syntax for a parameter value (Section 5.6.6). Use of common syntax allows recipients to reuse existing parser components. When allowing both forms, the meaning of a parameter value ought to be the same whether it was received as a token or a quoted string.\n\n### 5.6. Common Rules for Defining Field Values\n\n#### 5.6.1. Lists (#rule ABNF Extension)\n\nA #rule extension to the ABNF rules of [RFC5234] is used to improve readability in the definitions of some list-based field values.\n\nA construct \"#\" is defined, similar to \"*\", for defining comma-delimited lists of elements. The full form is \"#element\" indicating at least and at most elements, each separated by a single comma (\",\") and optional whitespace (OWS, defined in Section 5.6.3).\n\n##### 5.6.1.1. Sender Requirements\n\nIn any production that uses the list construct, a sender *MUST NOT* generate empty list elements. In other words, a sender has to generate lists that satisfy the following syntax:\n\n```\n 1#element => element *( OWS \",\" OWS element )\n```\n\nand:\n\n```\n #element => [ 1#element ]\n```\n\nand for n >= 1 and m > 1:\n\n```\n #element => element *( OWS \",\" OWS element )\n```\n\nAppendix A shows the collected ABNF for senders after the list constructs have been expanded.\n\n##### 5.6.1.2. Recipient Requirements\n\nEmpty elements do not contribute to the count of elements present. A recipient *MUST* parse and ignore a reasonable number of empty list elements: enough to handle common mistakes by senders that merge values, but not so much that they could be used as a denial-of-service mechanism. In other words, a recipient *MUST* accept lists that satisfy the following syntax:\n\n```\n #element => [ element ] *( OWS \",\" OWS [ element ] )\n```\n\nNote 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.\n\nFor example, given these ABNF productions:\n\n```\n example-list = 1#example-list-elmt\n example-list-elmt = token ; see Section 5.6.2 \n```\n\nThen the following are valid values for example-list (not including the double quotes, which are present for delimitation only):\n\n```\n \"foo,bar\"\n \"foo ,bar,\"\n \"foo , ,bar,charlie\"\n```\n\nIn contrast, the following values would be invalid, since at least one non-empty element is required by the example-list production:\n\n```\n \"\"\n \",\"\n \", ,\"\n```\n\n#### 5.6.2. Tokens\n\nTokens are short textual identifiers that do not include whitespace or delimiters.\n\n```\n token = 1*tchar tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\n / DIGIT / ALPHA\n ; any VCHAR, except delimiters\n```\n\nMany 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 \"(),/:;<=>?@[\\]{}\").\n\n#### 5.6.3. Whitespace\n\nThis specification uses three rules to denote the use of linear whitespace: OWS (optional whitespace), RWS (required whitespace), and BWS (\"bad\" whitespace).\n\nThe 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.\n\nThe 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.\n\nOWS 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.\n\nThe 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.\n\nBWS has no semantics. Any content known to be defined as BWS *MAY* be removed before interpreting it or forwarding the message downstream.\n\n```\n OWS = *( SP / HTAB )\n ; optional whitespace\n RWS = 1*( SP / HTAB )\n ; required whitespace\n BWS = OWS\n ; \"bad\" whitespace\n```\n\n#### 5.6.4. Quoted Strings\n\nA string of text is parsed as a single value if it is quoted using double-quote marks.\n\n```\n quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text \n```\n\nThe backslash octet (\"\\\") can be used as a single-octet quoting mechanism within quoted-string and comment constructs. Recipients that process the value of a quoted-string *MUST* handle a quoted-pair as if it were replaced by the octet following the backslash.\n\n```\n quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n```\n\nA sender *SHOULD NOT* generate a quoted-pair in a quoted-string except where necessary to quote DQUOTE and backslash octets occurring within that string. A sender *SHOULD NOT* generate a quoted-pair in a comment except where necessary to quote parentheses [\"(\" and \")\"] and backslash octets occurring within that comment.\n\n#### 5.6.5. Comments\n\nComments 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.\n\n```\n comment = \"(\" *( ctext / quoted-pair / comment ) \")\"\n ctext = HTAB / SP / %x21-27 / %x2A-5B / %x5D-7E / obs-text \n```\n\n#### 5.6.6. Parameters\n\nParameters 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.\n\n```\n parameters = *( OWS \";\" OWS [ parameter ] )\n parameter = parameter-name \"=\" parameter-value parameter-name = token parameter-value = ( token / quoted-string )\n```\n\nParameter names are case-insensitive. Parameter values might or might not be case-sensitive, depending on the semantics of the parameter name. Examples of parameters and some equivalent forms can be seen in media types (Section 8.3.1) and the Accept header field (Section 12.5.1).\n\nA parameter value that matches the token production can be transmitted either as a token or within a quoted-string. The quoted and unquoted values are equivalent.\n\n#### 5.6.7. Date/Time Formats\n\nPrior to 1995, there were three different formats commonly used by servers to communicate timestamps. For compatibility with old implementations, all three are defined here. The preferred format is a fixed-length and single-zone subset of the date and time specification used by the Internet Message Format [RFC5322].\n\n```\n HTTP-date = IMF-fixdate / obs-date \n```\n\nAn example of the preferred format is\n\n```\nSun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate\n```\n\nExamples of the two obsolete formats are\n\n```\nSunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format\nSun Nov 6 08:49:37 1994 ; ANSI C's asctime() format\n```\n\nA recipient that parses a timestamp value in an HTTP field *MUST* accept all three HTTP-date formats. When a sender generates a field that contains one or more timestamps defined as HTTP-date, the sender *MUST* generate those timestamps in the IMF-fixdate format.\n\nAn HTTP-date value represents time as an instance of Coordinated Universal Time (UTC). The first two formats indicate UTC by the three-letter abbreviation for Greenwich Mean Time, \"GMT\", a predecessor of the UTC name; values in the asctime format are assumed to be in UTC.\n\nA clock is an implementation capable of providing a reasonable approximation of the current instant in UTC. A clock implementation ought to use NTP ([RFC5905]), or some similar protocol, to synchronize with UTC.\n\nPreferred format:\n\n```\n IMF-fixdate = day-name \",\" SP date1 SP time-of-day SP GMT\n ; fixed length/zone/capitalization subset of the format\n ; see Section 3.3 of [RFC5322] day-name = %s\"Mon\" / %s\"Tue\" / %s\"Wed\"\n / %s\"Thu\" / %s\"Fri\" / %s\"Sat\" / %s\"Sun\"\n\n date1 = day SP month SP year\n ; e.g., 02 Jun 1982\n\n day = 2DIGIT month = %s\"Jan\" / %s\"Feb\" / %s\"Mar\" / %s\"Apr\"\n / %s\"May\" / %s\"Jun\" / %s\"Jul\" / %s\"Aug\"\n / %s\"Sep\" / %s\"Oct\" / %s\"Nov\" / %s\"Dec\"\n year = 4DIGIT GMT = %s\"GMT\"\n\n time-of-day = hour \":\" minute \":\" second\n ; 00:00:00 - 23:59:60 (leap second)\n\n hour = 2DIGIT minute = 2DIGIT second = 2DIGIT \n```\n\nObsolete formats:\n\n```\n obs-date = rfc850-date / asctime-date \n```\n\n```\n rfc850-date = day-name-l \",\" SP date2 SP time-of-day SP GMT date2 = day \"-\" month \"-\" 2DIGIT\n ; e.g., 02-Jun-82\n\n day-name-l = %s\"Monday\" / %s\"Tuesday\" / %s\"Wednesday\"\n / %s\"Thursday\" / %s\"Friday\" / %s\"Saturday\"\n / %s\"Sunday\"\n```\n\n```\n asctime-date = day-name SP date3 SP time-of-day SP year date3 = month SP ( 2DIGIT / ( SP 1DIGIT ))\n ; e.g., Jun 2\n```\n\nHTTP-date is case sensitive. Note that [Section 4.2](rfc9111.html#expiration.model) of [CACHING] relaxes this for cache recipients.\n\nA sender *MUST NOT* generate additional whitespace in an HTTP-date beyond that specifically included as SP in the grammar. The semantics of day-name, day, month, year, and time-of-day are the same as those defined for the Internet Message Format constructs with the corresponding name ([RFC5322], [Section 3.3](https://www.rfc-editor.org/rfc/rfc5322.html#section-3.3)).\n\nRecipients of a timestamp value in rfc850-date format, which uses a two-digit year, *MUST* interpret a timestamp that appears to be more than 50 years in the future as representing the most recent year in the past that had the same last two digits.\n\nRecipients of timestamp values are encouraged to be robust in parsing timestamps unless otherwise restricted by the field definition. For example, messages are occasionally forwarded over HTTP from a non-HTTP source that might generate any of the date and time specifications defined by the Internet Message Format.\n\n## 6. Message Abstraction\n\nEach major version of HTTP defines its own syntax for communicating messages. This section defines an abstract data type for HTTP messages based on a generalization of those message characteristics, common structure, and capacity for conveying semantics. This abstraction is used to define requirements on senders and recipients that are independent of the HTTP version, such that a message in one version can be relayed through other versions without changing its meaning.\n\nA message consists of the following:\n\n- control data to describe and route the message,\n- a headers lookup table of name/value pairs for extending that control data and conveying additional information about the sender, message, content, or context,\n- a potentially unbounded stream of content, and\n- a trailers lookup table of name/value pairs for communicating information obtained while sending the content.\n\nFraming and control data is sent first, followed by a header section containing fields for the headers table. When a message includes content, the content is sent after the header section, potentially followed by a trailer section that might contain fields for the trailers table.\n\nMessages are expected to be processed as a stream, wherein the purpose of that stream and its continued processing is revealed while being read. Hence, control data describes what the recipient needs to know immediately, header fields describe what needs to be known before receiving content, the content (when present) presumably contains what the recipient wants or needs to fulfill the message semantics, and trailer fields provide optional metadata that was unknown prior to sending the content.\n\nMessages are intended to be self-descriptive: everything a recipient needs to know about the message can be determined by looking at the message itself, after decoding or reconstituting parts that have been compressed or elided in transit, without requiring an understanding of the sender's current application state (established via prior messages). However, a client *MUST* retain knowledge of the request when parsing, interpreting, or caching a corresponding response. For example, responses to the HEAD method look just like the beginning of a response to GET but cannot be parsed in the same manner.\n\nNote that this message abstraction is a generalization across many versions of HTTP, including features that might not be found in some versions. For example, trailers were introduced within the HTTP/1.1 chunked transfer coding as a trailer section after the content. An equivalent feature is present in HTTP/2 and HTTP/3 within the header block that terminates each stream.\n\n### 6.1. Framing and Completeness\n\nMessage framing indicates how each message begins and ends, such that each message can be distinguished from other messages or noise on the same connection. Each major version of HTTP defines its own framing mechanism.\n\nHTTP/0.9 and early deployments of HTTP/1.0 used closure of the underlying connection to end a response. For backwards compatibility, this implicit framing is also allowed in HTTP/1.1. However, implicit framing can fail to distinguish an incomplete response if the connection closes early. For that reason, almost all modern implementations use explicit framing in the form of length-delimited sequences of message data.\n\nA message is considered complete when all of the octets indicated by its framing are available. Note that, when no explicit framing is used, a response message that is ended by the underlying connection's close is considered complete even though it might be indistinguishable from an incomplete response, unless a transport-level error indicates that it is not complete.\n\n### 6.2. Control Data\n\nMessages start with control data that describe its primary purpose. Request message control data includes a request method (Section 9), request target (Section 7.1), and protocol version (Section 2.5). Response message control data includes a status code (Section 15), optional reason phrase, and protocol version.\n\nIn 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\").\n\nEvery HTTP message has a protocol version. Depending on the version in use, it might be identified within the message explicitly or inferred by the connection over which the message is received. Recipients use that version information to determine limitations or potential for later communication with that sender.\n\nWhen a message is forwarded by an intermediary, the protocol version is updated to reflect the version used by that intermediary. The Via header field (Section 7.6.3) is used to communicate upstream protocol information within a forwarded message.\n\nA client *SHOULD* send a request version equal to the highest version to which the client is conformant and whose major version is no higher than the highest version supported by the server, if this is known. A client *MUST NOT* send a version to which it is not conformant.\n\nA 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.\n\nA server *SHOULD* send a response version equal to the highest version to which the server is conformant that has a major version less than or equal to the one received in the request. A server *MUST NOT* send a version to which it is not conformant. A server can send a 505 (HTTP Version Not Supported) response if it wishes, for any reason, to refuse service of the client's major protocol version.\n\nA recipient that receives a message with a major version number that it implements and a minor version number higher than what it implements *SHOULD* process the message as if it were in the highest minor version within that major version to which the recipient is conformant. A recipient can assume that a message with a higher minor version, when sent to a recipient that has not yet indicated support for that higher version, is sufficiently backwards-compatible to be safely processed by any implementation of the same major version.\n\n### 6.3. Header Fields\n\nFields (Section 5) that are sent or received before the content are referred to as \"header fields\" (or just \"headers\", colloquially).\n\nThe header section of a message consists of a sequence of header field lines. Each header field might modify or extend message semantics, describe the sender, define the content, or provide additional context.\n\n### 6.4. Content\n\nHTTP 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.\n\nThis 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](rfc9112.html#message.body) 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).\n\n#### 6.4.1. Content Semantics\n\nThe purpose of content in a request is defined by the method semantics (Section 9).\n\nFor example, a representation in the content of a PUT request (Section 9.3.4) represents the desired state of the target resource after the request is successfully applied, whereas a representation in the content of a POST request (Section 9.3.3) represents information to be processed by the target resource.\n\nIn a response, the content's purpose is defined by the request method, response status code (Section 15), and response fields describing that content. For example, the content of a 200 (OK) response to GET (Section 9.3.1) represents the current state of the target resource, as observed at the time of the message origination date (Section 6.6.1), whereas the content of the same status code in a response to POST might represent either the processing result or the new state of the target resource after applying the processing.\n\nThe content of a 206 (Partial Content) response to GET contains either a single part of the selected representation or a multipart message body containing multiple parts of that representation, as described in Section 15.3.7.\n\nResponse messages with an error status code usually contain content that represents the error condition, such that the content describes the error state and what steps are suggested for resolving it.\n\nResponses to the HEAD request method (Section 9.3.2) never include content; the associated response header fields indicate only what their values would have been if the request method had been GET (Section 9.3.1).\n\n2xx (Successful) responses to a CONNECT request method (Section 9.3.6) switch the connection to tunnel mode instead of having content.\n\nAll 1xx (Informational), 204 (No Content), and 304 (Not Modified) responses do not include content.\n\nAll other responses do include content, although that content might be of zero length.\n\n#### 6.4.2. Identifying Content\n\nWhen a complete or partial representation is transferred as message content, it is often desirable for the sender to supply, or the recipient to determine, an identifier for a resource corresponding to that specific representation. For example, a client making a GET request on a resource for \"the current weather report\" might want an identifier specific to the content returned (e.g., \"weather report for Laguna Beach at 20210720T1711\"). This can be useful for sharing or bookmarking content from resources that are expected to have changing representations over time.\n\nFor a request message:\n\n- If the request has a Content-Location header field, then the sender asserts that the content is a representation of the resource identified by the Content-Location field value. However, such an assertion cannot be trusted unless it can be verified by other means (not defined by this specification). The information might still be useful for revision history links.\n- Otherwise, the content is unidentified by HTTP, but a more specific identifier might be supplied within the content itself.\n\nFor a response message, the following rules are applied in order until a match is found:\n\n1. If the request method is HEAD or the response status code is 204 (No Content) or 304 (Not Modified) , there is no content in the response.\n2. If the request method is GET and the response status code is 200 (OK) , the content is a representation of the target resource ( Section 7.1 ).\n3. If the request method is GET and the response status code is 203 (Non-Authoritative Information) , the content is a potentially modified or enhanced representation of the target resource as provided by an intermediary.\n4. If the request method is GET and the response status code is 206 (Partial Content) , the content is one or more parts of a representation of the target resource.\n5. If the response has a Content-Location header field and its field value is a reference to the same URI as the target URI, the content is a representation of the target resource.\n6. If the response has a Content-Location header field and its field value is a reference to a URI different from the target URI, then the sender asserts that the content is a representation of the resource identified by the Content-Location field value. However, such an assertion cannot be trusted unless it can be verified by other means (not defined by this specification).\n7. Otherwise, the content is unidentified by HTTP, but a more specific identifier might be supplied within the content itself.\n\n### 6.5. Trailer Fields\n\nFields (Section 5) that are located within a trailer section are referred to as \"trailer fields\" (or just \"trailers\", colloquially). Trailer fields can be useful for supplying message integrity checks, digital signatures, delivery metrics, or post-processing status information.\n\nTrailer 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.\n\n#### 6.5.1. Limitations on Use of Trailers\n\nA trailer section is only possible when supported by the version of HTTP in use and enabled by an explicit framing mechanism. For example, the chunked transfer coding in HTTP/1.1 allows a trailer section to be sent after the content ([Section 7.1.2](rfc9112.html#chunked.trailer.section) of [HTTP/1.1]).\n\nMany fields cannot be processed outside the header section because their evaluation is necessary prior to receiving the content, such as those that describe message framing, routing, authentication, request modifiers, response controls, or content format. A sender *MUST NOT* generate a trailer field unless the sender knows the corresponding header field name's definition permits the field to be sent in trailers.\n\nTrailer fields can be difficult to process by intermediaries that forward messages from one protocol version to another. If the entire message can be buffered in transit, some intermediaries could merge trailer fields into the header section (as appropriate) before it is forwarded. However, in most cases, the trailers are simply discarded. A recipient *MUST NOT* merge a trailer field into a header section unless the recipient understands the corresponding header field definition and that definition explicitly permits and defines how trailer field values can be safely merged.\n\nThe presence of the keyword \"trailers\" in the TE header field (Section 10.1.4) of a request indicates that the client is willing to accept trailer fields, on behalf of itself and any downstream clients. For requests from an intermediary, this implies that all downstream clients are willing to accept trailer fields in the forwarded response. Note that the presence of \"trailers\" does not mean that the client(s) will process any particular trailer field in the response; only that the trailer section(s) will not be dropped by any of the clients.\n\nBecause of the potential for trailer fields to be discarded in transit, a server *SHOULD NOT* generate trailer fields that it believes are necessary for the user agent to receive.\n\n#### 6.5.2. Processing Trailer Fields\n\nThe \"Trailer\" header field (Section 6.6.2) can be sent to indicate fields likely to be sent in the trailer section, which allows recipients to prepare for their receipt before processing the content. For example, this could be useful if a field name indicates that a dynamic checksum should be calculated as the content is received and then immediately checked upon receipt of the trailer field value.\n\nLike 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.\n\nAt 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.\n\n### 6.6. Message Metadata\n\nFields that describe the message itself, such as when and how the message has been generated, can appear in both requests and responses.\n\n#### 6.6.1. Date\n\nThe \"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](https://www.rfc-editor.org/rfc/rfc5322.html#section-3.6.1) of [RFC5322]. The field value is an HTTP-date, as defined in Section 5.6.7.\n\n```\n Date = HTTP-date \n```\n\nAn example is\n\n```\nDate: Tue, 15 Nov 1994 08:12:31 GMT\n```\n\nA 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.\n\nAn 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.\n\nAn origin server without a clock *MUST NOT* generate a Date header field.\n\nA recipient with a clock that receives a response message without a Date header field *MUST* record the time it was received and append a corresponding Date header field to the message's header section if it is cached or forwarded downstream.\n\nA recipient with a clock that receives a response with an invalid Date header field value *MAY* replace that value with the time that response was received.\n\nA user agent *MAY* send a Date header field in a request, though generally will not do so unless it is believed to convey useful information to the server. For example, custom applications of HTTP might convey a Date if the server is expected to adjust its interpretation of the user's request based on differences between the user agent and server clocks.\n\n#### 6.6.2. Trailer\n\nThe \"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.\n\n```\n Trailer = #field-name \n```\n\nFor example, a sender might indicate that a signature will be computed as the content is being streamed and provide the final signature as a trailer field. This allows a recipient to perform the same check on the fly as it receives the content.\n\nA sender that intends to generate one or more trailer fields in a message *SHOULD* generate a Trailer header field in the header section of that message to indicate which fields might be present in the trailers.\n\nIf an intermediary discards the trailer section in transit, the Trailer field could provide a hint of what metadata was lost, though there is no guarantee that a sender of Trailer will always follow through by sending the named fields.\n\n## 7. Routing HTTP Messages\n\nHTTP request message routing is determined by each client based on the target resource, the client's proxy configuration, and establishment or reuse of an inbound connection. The corresponding response routing follows the same connection chain back to the client.\n\n### 7.1. Determining the Target Resource\n\nAlthough HTTP is used in a wide variety of applications, most clients rely on the same resource identification mechanism and configuration techniques as general-purpose Web browsers. Even when communication options are hard-coded in a client's configuration, we can think of their combined effect as a URI reference (Section 4.1).\n\nA URI reference is resolved to its absolute form in order to obtain the target URI. The target URI excludes the reference's fragment component, if any, since fragment identifiers are reserved for client-side processing ([URI], [Section 3.5](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.5)).\n\nTo perform an action on a target resource, the client sends a request message containing enough components of its parsed target URI to enable recipients to identify that same resource. For historical reasons, the parsed target URI components, collectively referred to as the request target, are sent within the message control data and the Host header field (Section 7.2).\n\nThere are two unusual cases for which the request target components are in a method-specific form:\n\n- For CONNECT ( Section 9.3.6 ), the request target is the host name and port number of the tunnel destination, separated by a colon.\n- For OPTIONS ( Section 9.3.7 ), the request target can be a single asterisk (\"*\").\n\nSee the respective method definitions for details. These forms *MUST NOT* be used with other methods.\n\nUpon receipt of a client's request, a server reconstructs the target URI from the received components in accordance with their local configuration and incoming connection context. This reconstruction is specific to each major protocol version. For example, [Section 3.3](rfc9112.html#reconstructing.target.uri) of [HTTP/1.1] defines how a server determines the target URI of an HTTP/1.1 request.\n\n### 7.2. Host and :authority\n\nThe \"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.\n\nIn 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.\n\n```\n Host = uri-host [ \":\" port ] ; Section 4 \n```\n\nThe 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.\n\nFor example, a GET request to the origin server for would begin with:\n\n```\nGET /pub/WWW/ HTTP/1.1\nHost: www.example.org\n```\n\nSince 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.\n\n### 7.3. Routing Inbound Requests\n\nOnce the target URI and its origin are determined, a client decides whether a network request is necessary to accomplish the desired semantics and, if so, where that request is to be directed.\n\n#### 7.3.1. To a Cache\n\nIf the client has a cache [CACHING] and the request can be satisfied by it, then the request is usually directed there first.\n\n#### 7.3.2. To a Proxy\n\nIf 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.\n\nIf an \"http\" or \"https\" proxy is applicable, the client connects inbound by establishing (or reusing) a connection to that proxy and then sending it an HTTP request message containing a request target that matches the client's target URI.\n\n#### 7.3.3. To the Origin\n\nIf no proxy is applicable, a typical client will invoke a handler routine (specific to the target URI's scheme) to obtain access to the identified resource. How that is accomplished is dependent on the target URI scheme and defined by its associated specification.\n\nSection 4.3.2 defines how to obtain access to an \"http\" resource by establishing (or reusing) an inbound connection to the identified origin server and then sending it an HTTP request message containing a request target that matches the client's target URI.\n\nSection 4.3.3 defines how to obtain access to an \"https\" resource by establishing (or reusing) an inbound secured connection to an origin server that is authoritative for the identified origin and then sending it an HTTP request message containing a request target that matches the client's target URI.\n\n### 7.4. Rejecting Misdirected Requests\n\nOnce a request is received by a server and parsed sufficiently to determine its target URI, the server decides whether to process the request itself, forward the request to another server, redirect the client to a different resource, respond with an error, or drop the connection. This decision can be influenced by anything about the request or connection context, but is specifically directed at whether the server has been configured to process requests for that target URI and whether the connection context is appropriate for that request.\n\nFor example, a request might have been misdirected, deliberately or accidentally, such that the information within a received Host header field differs from the connection's host or port. If the connection is from a trusted gateway, such inconsistency might be expected; otherwise, it might indicate an attempt to bypass security filters, trick the server into delivering non-public content, or poison a cache. See Section 17 for security considerations regarding message routing.\n\nUnless the connection is from a trusted gateway, an origin server *MUST* reject a request if any scheme-specific requirements for the target URI are not met. In particular, a request for an \"https\" resource *MUST* be rejected unless it has been received over a connection that has been secured via a certificate valid for that target URI's origin, as defined by Section 4.2.2.\n\nThe 421 (Misdirected Request) status code in a response indicates that the origin server has rejected the request because it appears to have been misdirected (Section 15.5.20).\n\n### 7.5. Response Correlation\n\nA connection might be used for multiple request/response exchanges. The mechanism used to correlate between request and response messages is version dependent; some versions of HTTP use implicit ordering of messages, while others use an explicit identifier.\n\nAll responses, regardless of the status code (including interim responses) can be sent at any time after a request is received, even if the request is not yet complete. A response can complete before its corresponding request is complete (Section 6.1). Likewise, clients are not expected to wait any specific amount of time for a response. Clients (including intermediaries) might abandon a request if the response is not received within a reasonable period of time.\n\nA client that receives a response while it is still sending the associated request *SHOULD* continue sending that request unless it receives an explicit indication to the contrary (see, e.g., [Section 9.5](rfc9112.html#persistent.failures) of [HTTP/1.1] and [Section 6.4](https://www.rfc-editor.org/rfc/rfc9113.html#section-6.4) of [HTTP/2]).\n\n### 7.6. Message Forwarding\n\nAs described in Section 3.7, intermediaries can serve a variety of roles in the processing of HTTP requests and responses. Some intermediaries are used to improve performance or availability. Others are used for access control or to filter content. Since an HTTP stream has characteristics similar to a pipe-and-filter architecture, there are no inherent limits to the extent an intermediary can enhance (or interfere) with either direction of the stream.\n\nIntermediaries are expected to forward messages even when protocol elements are not recognized (e.g., new methods, status codes, or field names) since that preserves extensibility for downstream recipients.\n\nAn intermediary not acting as a tunnel *MUST* implement the Connection header field, as specified in Section 7.6.1, and exclude fields from being forwarded that are only intended for the incoming connection.\n\nAn intermediary *MUST NOT* forward a message to itself unless it is protected from an infinite request loop. In general, an intermediary ought to recognize its own server names, including any aliases, local variations, or literal IP addresses, and respond to such requests directly.\n\nAn HTTP message can be parsed as a stream for incremental processing or forwarding downstream. However, senders and recipients cannot rely on incremental delivery of partial messages, since some implementations will buffer or delay message forwarding for the sake of network efficiency, security checks, or content transformations.\n\n#### 7.6.1. Connection\n\nThe \"Connection\" header field allows the sender to list desired control options for the current connection.\n\n```\n Connection = #connection-option connection-option = token \n```\n\nConnection options are case-insensitive.\n\nWhen a field aside from Connection is used to supply control information for or about the current connection, the sender *MUST* list the corresponding field name within the Connection header field. Note that some versions of HTTP prohibit the use of fields for such information, and therefore do not allow the Connection field.\n\nIntermediaries *MUST* parse a received Connection header field before a message is forwarded and, for each connection-option in this field, remove any header or trailer field(s) from the message with the same name as the connection-option, and then remove the Connection header field itself (or replace it with the intermediary's own control options for the forwarded message).\n\nHence, the Connection header field provides a declarative way of distinguishing fields that are only intended for the immediate recipient (\"hop-by-hop\") from those fields that are intended for all recipients on the chain (\"end-to-end\"), enabling the message to be self-descriptive and allowing future connection-specific extensions to be deployed without fear that they will be blindly forwarded by older intermediaries.\n\nFurthermore, intermediaries *SHOULD* remove or replace fields that are known to require removal before forwarding, whether or not they appear as a connection-option, after applying those fields' semantics. This includes but is not limited to:\n\n- Proxy-Connection ( [Appendix C.2.2](rfc9112.html#compatibility.with.http.1.0.persistent.connections) of [HTTP/1.1] )\n- Keep-Alive ( [Section 19.7.1](https://www.rfc-editor.org/rfc/rfc2068.html#section-19.7.1) of [RFC2068] )\n- TE ( Section 10.1.4 )\n- Transfer-Encoding ( [Section 6.1](rfc9112.html#field.transfer-encoding) of [HTTP/1.1] )\n- Upgrade ( Section 7.8 )\n\nA sender *MUST NOT* send a connection option corresponding to a field that is intended for all recipients of the content. For example, [Cache-Control](rfc9111.html#field.cache-control) is never appropriate as a connection option ([Section 5.2](rfc9111.html#field.cache-control) of [CACHING]).\n\nConnection options do not always correspond to a field present in the message, since a connection-specific field might not be needed if there are no parameters associated with a connection option. In contrast, a connection-specific field received without a corresponding connection option usually indicates that the field has been improperly forwarded by an intermediary and ought to be ignored by the recipient.\n\nWhen defining a new connection option that does not correspond to a field, specification authors ought to reserve the corresponding field name anyway in order to avoid later collisions. Such reserved field names are registered in the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" (Section 16.3.1).\n\n#### 7.6.2. Max-Forwards\n\nThe \"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.\n\n```\n Max-Forwards = 1*DIGIT \n```\n\nThe Max-Forwards value is a decimal integer indicating the remaining number of times this request message can be forwarded.\n\nEach intermediary that receives a TRACE or OPTIONS request containing a Max-Forwards header field *MUST* check and update its value prior to forwarding the request. If the received value is zero (0), the intermediary *MUST NOT* forward the request; instead, the intermediary *MUST* respond as the final recipient. If the received Max-Forwards value is greater than zero, the intermediary *MUST* generate an updated Max-Forwards field in the forwarded message with a field value that is the lesser of a) the received value decremented by one (1) or b) the recipient's maximum supported value for Max-Forwards.\n\nA recipient *MAY* ignore a Max-Forwards header field received with any other request methods.\n\n#### 7.6.3. Via\n\nThe \"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](https://www.rfc-editor.org/rfc/rfc5322.html#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.\n\n```\n Via = #( received-protocol RWS received-by [ RWS comment ] )\n\n received-protocol = [ protocol-name \"/\" ] protocol-version\n ; see Section 7.8 received-by = pseudonym [ \":\" port ]\n pseudonym = token \n```\n\nEach 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.\n\nA proxy *MUST* send an appropriate Via header field, as described below, in each message that it forwards. An HTTP-to-HTTP gateway *MUST* send an appropriate Via header field in each inbound request message and *MAY* send a Via header field in forwarded response messages.\n\nFor each intermediary, the received-protocol indicates the protocol and protocol version used by the upstream sender of the message. Hence, the Via field value records the advertised protocol capabilities of the request/response chain such that they remain visible to downstream recipients; this can be useful for determining what backwards-incompatible features might be safe to use in response, or within a later request, as described in Section 2.5. For brevity, the protocol-name is omitted when the received protocol is HTTP.\n\nThe 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.\n\nA sender *MAY* generate comments to identify the software of each recipient, analogous to the User-Agent and Server header fields. However, comments in Via are optional, and a recipient *MAY* remove them prior to forwarding the message.\n\nFor example, a request message could be sent from an HTTP/1.0 user agent to an internal proxy code-named \"fred\", which uses HTTP/1.1 to forward the request to a public proxy at p.example.net, which completes the request by forwarding it to the origin server at www.example.com. The request received by www.example.com would then have the following Via header field:\n\n```\nVia: 1.0 fred, 1.1 p.example.net\n```\n\nAn intermediary used as a portal through a network firewall *SHOULD NOT* forward the names and ports of hosts within the firewall region unless it is explicitly enabled to do so. If not enabled, such an intermediary *SHOULD* replace each received-by host of any host behind the firewall by an appropriate pseudonym for that host.\n\nAn intermediary *MAY* combine an ordered subsequence of Via header field list members into a single member if the entries have identical received-protocol values. For example,\n\n```\nVia: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy\n```\n\ncould be collapsed to\n\n```\nVia: 1.0 ricky, 1.1 mertz, 1.0 lucy\n```\n\nA 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.\n\n### 7.7. Message Transformations\n\nSome intermediaries include features for transforming messages and their content. A proxy might, for example, convert between image formats in order to save cache space or to reduce the amount of traffic on a slow link. However, operational problems might occur when these transformations are applied to content intended for critical applications, such as medical imaging or scientific data analysis, particularly when integrity checks or digital signatures are used to ensure that the content received is identical to the original.\n\nAn HTTP-to-HTTP proxy is called a transforming proxy if it is designed or configured to modify messages in a semantically meaningful way (i.e., modifications, beyond those required by normal HTTP processing, that change the message in a way that would be significant to the original sender or potentially significant to downstream recipients). For example, a transforming proxy might be acting as a shared annotation server (modifying responses to include references to a local annotation database), a malware filter, a format transcoder, or a privacy filter. Such transformations are presumed to be desired by whichever client (or client organization) chose the proxy.\n\nIf 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.\n\nA 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](rfc9112.html#origin-form) of [HTTP/1.1]) or \"*\" ([Section 3.2.4](rfc9112.html#asterisk-form) of [HTTP/1.1]), depending on the request method.\n\nA proxy *MUST NOT* transform the content (Section 6.4) of a response message that contains a no-transform cache directive ([Section 5.2.2.6](rfc9111.html#cache-response-directive.no-transform) of [CACHING]). Note that this does not apply to message transformations that do not change the content, such as the addition or removal of transfer codings ([Section 7](rfc9112.html#transfer.codings) of [HTTP/1.1]).\n\nA 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).\n\nA proxy *SHOULD NOT* modify header fields that provide information about the endpoints of the communication chain, the resource state, or the selected representation (other than the content) unless the field's definition specifically allows such modification or the modification is deemed necessary for privacy or security.\n\n### 7.8. Upgrade\n\nThe \"Upgrade\" header field is intended to provide a simple mechanism for transitioning from HTTP/1.1 to some other protocol on the same connection.\n\nA 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.\n\n```\n Upgrade = #protocol protocol = protocol-name [\"/\" protocol-version]\n protocol-name = token protocol-version = token \n```\n\nAlthough protocol names are registered with a preferred case, recipients *SHOULD* use case-insensitive comparison when matching each protocol-name to supported protocols.\n\nA server that sends a 101 (Switching Protocols) response *MUST* send an Upgrade header field to indicate the new protocol(s) to which the connection is being switched; if multiple protocol layers are being switched, the sender *MUST* list the protocols in layer-ascending order. A server *MUST NOT* switch to a protocol that was not indicated by the client in the corresponding request's Upgrade header field. A server *MAY* choose to ignore the order of preference indicated by the client and select the new protocol(s) based on other factors, such as the nature of the request or the current load on the server.\n\nA server that sends a 426 (Upgrade Required) response *MUST* send an Upgrade header field to indicate the acceptable protocols, in order of descending preference.\n\nA server *MAY* send an Upgrade header field in any other response to advertise that it implements support for upgrading to the listed protocols, in order of descending preference, when appropriate for a future request.\n\nThe following is a hypothetical example sent by a client:\n\n```\nGET /hello HTTP/1.1\nHost: www.example.com\nConnection: upgrade\nUpgrade: websocket, IRC/6.9, RTA/x11\n```\n\nThe capabilities and nature of the application-level communication after the protocol change is entirely dependent upon the new protocol(s) chosen. However, immediately after sending the 101 (Switching Protocols) response, the server is expected to continue responding to the original request as if it had received its equivalent within the new protocol (i.e., the server still has an outstanding request to satisfy after the protocol has been changed, and is expected to do so without requiring the request to be repeated).\n\nFor 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.\n\nThe following is an example response to the above hypothetical request:\n\n```\nHTTP/1.1 101 Switching Protocols\nConnection: upgrade\nUpgrade: websocket\n\n[... data stream switches to websocket with an appropriate response\n(as defined by new protocol) to the \"GET /hello\" request ...]\n```\n\nA sender of Upgrade *MUST* also send an \"Upgrade\" connection option in the Connection header field (Section 7.6.1) to inform intermediaries not to forward this field. A server that receives an Upgrade header field in an HTTP/1.0 request *MUST* ignore that Upgrade field.\n\nA client cannot begin using an upgraded protocol on the connection until it has completely sent the request message (i.e., the client can't change the protocol it is sending in the middle of a message). If a server receives both an Upgrade and an Expect header field with the \"100-continue\" expectation (Section 10.1.1), the server *MUST* send a 100 (Continue) response before sending a 101 (Switching Protocols) response.\n\nThe Upgrade header field only applies to switching protocols on top of the existing connection; it cannot be used to switch the underlying connection (transport) protocol, nor to switch the existing communication to a different connection. For those purposes, it is more appropriate to use a 3xx (Redirection) response (Section 15.4).\n\nThis 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.\n\n## 8. Representation Data and Metadata\n\n### 8.1. Representation Data\n\nThe representation data associated with an HTTP message is either provided as the content of the message or referred to by the message semantics and the target URI. The representation data is in a format and encoding defined by the representation metadata header fields.\n\nThe 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:\n\n```\n representation-data := Content-Encoding( Content-Type( data ) )\n```\n\n### 8.2. Representation Metadata\n\nRepresentation header fields provide metadata about the representation. When a message includes content, the representation header fields describe how to interpret that data. In a response to a HEAD request, the representation header fields describe the representation data that would have been enclosed in the content if the same request had been a GET.\n\n### 8.3. Content-Type\n\nThe \"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.\n\n```\n Content-Type = media-type \n```\n\nMedia types are defined in Section 8.3.1. An example of the field is\n\n```\nContent-Type: text/html; charset=ISO-8859-4\n```\n\nA sender that generates a message containing content *SHOULD* generate a Content-Type header field in that message unless the intended media type of the enclosed representation is unknown to the sender. If a Content-Type header field is not present, the recipient *MAY* either assume a media type of \"application/octet-stream\" ([RFC2046], [Section 4.5.1](https://www.rfc-editor.org/rfc/rfc2046.html#section-4.5.1)) or examine the data to determine its type.\n\nIn practice, resource owners do not always properly configure their origin server to provide the correct Content-Type for a given representation. Some user agents examine the content and, in certain cases, override the received type (for example, see [Sniffing]). This \"MIME sniffing\" risks drawing incorrect conclusions about the data, which might expose the user to additional security risks (e.g., \"privilege escalation\"). Furthermore, distinct media types often share a common data format, differing only in how the data is intended to be processed, which is impossible to distinguish by inspecting the data alone. When sniffing is implemented, implementers are encouraged to provide a means for the user to disable it.\n\nAlthough Content-Type is defined as a singleton field, it is sometimes incorrectly generated multiple times, resulting in a combined field value that appears to be a list. Recipients often attempt to handle this error by using the last syntactically valid member of the list, leading to potential interoperability and security issues if different implementations have different error handling behaviors.\n\n#### 8.3.1. Media Type\n\nHTTP uses media types [RFC2046] in the Content-Type (Section 8.3) and Accept (Section 12.5.1) header fields in order to provide open and extensible data typing and type negotiation. Media types define both a data format and various processing models: how to process that data in accordance with the message context.\n\n```\n media-type = type \"/\" subtype parameters type = token subtype = token \n```\n\nThe type and subtype tokens are case-insensitive.\n\nThe type/subtype *MAY* be followed by semicolon-delimited parameters (Section 5.6.6) in the form of name/value pairs. The presence or absence of a parameter might be significant to the processing of a media type, depending on its definition within the media type registry. Parameter values might or might not be case-sensitive, depending on the semantics of the parameter name.\n\nFor example, the following media types are equivalent in describing HTML text data encoded in the UTF-8 character encoding scheme, but the first is preferred for consistency (the \"charset\" parameter value is defined as being case-insensitive in [RFC2046], [Section 4.1.2](https://www.rfc-editor.org/rfc/rfc2046.html#section-4.1.2)):\n\n```\n text/html;charset=utf-8\n Text/HTML;Charset=\"utf-8\"\n text/html; charset=\"utf-8\"\n text/html;charset=UTF-8\n```\n\nMedia types ought to be registered with IANA according to the procedures defined in [BCP13].\n\n#### 8.3.2. Charset\n\nHTTP uses charset names to indicate or negotiate the character encoding scheme ([RFC6365], [Section 2](https://www.rfc-editor.org/rfc/rfc6365.html#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.\n\nCharset names ought to be registered in the IANA \"Character Sets\" registry ([https://www.iana.org/assignments/character-sets](https://www.iana.org/assignments/character-sets)) according to the procedures defined in [Section 2](https://www.rfc-editor.org/rfc/rfc2978.html#section-2) of [RFC2978].\n\n#### 8.3.3. Multipart Types\n\nMIME provides for a number of \"multipart\" types — encapsulations of one or more representations within a single message body. All multipart types share a common syntax, as defined in [Section 5.1.1](https://www.rfc-editor.org/rfc/rfc2046.html#section-5.1.1) of [RFC2046], and include a boundary parameter as part of the media type value. The message body is itself a protocol element; a sender *MUST* generate only CRLF to represent line breaks between body parts.\n\nHTTP message framing does not use the multipart boundary as an indicator of message body length, though it might be used by implementations that generate or process the content. For example, the \"multipart/form-data\" type is often used for carrying form data in a request, as described in [RFC7578], and the \"multipart/byteranges\" type is defined by this specification for use in some 206 (Partial Content) responses (see Section 15.3.7).\n\n### 8.4. Content-Encoding\n\nThe \"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.\n\n```\n Content-Encoding = #content-coding \n```\n\nAn example of its use is\n\n```\nContent-Encoding: gzip\n```\n\nIf one or more encodings have been applied to a representation, the sender that applied the encodings *MUST* generate a Content-Encoding header field that lists the content codings in the order in which they were applied. Note that the coding named \"identity\" is reserved for its special role in Accept-Encoding and thus *SHOULD NOT* be included.\n\nAdditional information about the encoding parameters can be provided by other header fields not defined by this specification.\n\nUnlike Transfer-Encoding ([Section 6.1](rfc9112.html#field.transfer-encoding) of [HTTP/1.1]), the codings listed in Content-Encoding are a characteristic of the representation; the representation is defined in terms of the coded form, and all other metadata about the representation is about the coded form unless otherwise noted in the metadata definition. Typically, the representation is only decoded just prior to rendering or analogous usage.\n\nIf the media type includes an inherent encoding, such as a data format that is always compressed, then that encoding would not be restated in Content-Encoding even if it happens to be the same algorithm as one of the content codings. Such a content coding would only be listed if, for some bizarre reason, it is applied a second time to form the representation. Likewise, an origin server might choose to publish the same data as multiple representations that differ only in whether the coding is defined as part of Content-Type or Content-Encoding, since some user agents will behave differently in their handling of each response (e.g., open a \"Save as ...\" dialog instead of automatic decompression and rendering of content).\n\nAn origin server *MAY* respond with a status code of 415 (Unsupported Media Type) if a representation in the request message has a content coding that is not acceptable.\n\n#### 8.4.1. Content Codings\n\nContent coding values indicate an encoding transformation that has been or can be applied to a representation. Content codings are primarily used to allow a representation to be compressed or otherwise usefully transformed without losing the identity of its underlying media type and without loss of information. Frequently, the representation is stored in coded form, transmitted directly, and only decoded by the final recipient.\n\n```\n content-coding = token \n```\n\nAll content codings are case-insensitive and ought to be registered within the \"HTTP Content Coding Registry\", as described in Section 16.6\n\nContent-coding values are used in the Accept-Encoding (Section 12.5.3) and Content-Encoding (Section 8.4) header fields.\n\n##### 8.4.1.1. Compress Coding\n\nThe \"compress\" coding is an adaptive Lempel-Ziv-Welch (LZW) coding [Welch] that is commonly produced by the UNIX file compression program \"compress\". A recipient *SHOULD* consider \"x-compress\" to be equivalent to \"compress\".\n\n##### 8.4.1.2. Deflate Coding\n\nThe \"deflate\" coding is a \"zlib\" data format [RFC1950] containing a \"deflate\" compressed data stream [RFC1951] that uses a combination of the Lempel-Ziv (LZ77) compression algorithm and Huffman coding.\n\n##### 8.4.1.3. Gzip Coding\n\nThe \"gzip\" coding is an LZ77 coding with a 32-bit Cyclic Redundancy Check (CRC) that is commonly produced by the gzip file compression program [RFC1952]. A recipient *SHOULD* consider \"x-gzip\" to be equivalent to \"gzip\".\n\n### 8.5. Content-Language\n\nThe \"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.\n\n```\n Content-Language = #language-tag \n```\n\nLanguage tags are defined in Section 8.5.1. The primary purpose of Content-Language is to allow a user to identify and differentiate representations according to the users' own preferred language. Thus, if the content is intended only for a Danish-literate audience, the appropriate field is\n\n```\nContent-Language: da\n```\n\nIf no Content-Language is specified, the default is that the content is intended for all language audiences. This might mean that the sender does not consider it to be specific to any natural language, or that the sender does not know for which language it is intended.\n\nMultiple languages *MAY* be listed for content that is intended for multiple audiences. For example, a rendition of the \"Treaty of Waitangi\", presented simultaneously in the original Maori and English versions, would call for\n\n```\nContent-Language: mi, en\n```\n\nHowever, just because multiple languages are present within a representation does not mean that it is intended for multiple linguistic audiences. An example would be a beginner's language primer, such as \"A First Lesson in Latin\", which is clearly intended to be used by an English-literate audience. In this case, the Content-Language would properly only include \"en\".\n\nContent-Language *MAY* be applied to any media type — it is not limited to textual documents.\n\n#### 8.5.1. Language Tags\n\nA language tag, as defined in [RFC5646], identifies a natural language spoken, written, or otherwise conveyed by human beings for communication of information to other human beings. Computer languages are explicitly excluded.\n\nHTTP uses language tags within the Accept-Language and Content-Language header fields. Accept-Language uses the broader language-range production defined in Section 12.5.4, whereas Content-Language uses the language-tag production defined below.\n\n```\n language-tag = \n```\n\nA language tag is a sequence of one or more case-insensitive subtags, each separated by a hyphen character (\"-\", %x2D). In most cases, a language tag consists of a primary language subtag that identifies a broad family of related languages (e.g., \"en\" = English), which is optionally followed by a series of subtags that refine or narrow that language's range (e.g., \"en-CA\" = the variety of English as communicated in Canada). Whitespace is not allowed within a language tag. Example tags include:\n\n```\n fr, en-US, es-419, az-Arab, x-pig-latin, man-Nkoo-GN\n```\n\nSee [RFC5646] for further information.\n\n### 8.6. Content-Length\n\nThe \"Content-Length\" header field indicates the associated representation's data length as a decimal non-negative integer number of octets. When transferring a representation as content, Content-Length refers specifically to the amount of data enclosed so that it can be used to delimit framing (e.g., [Section 6.2](rfc9112.html#body.content-length) of [HTTP/1.1]). In other cases, Content-Length indicates the selected representation's current length, which can be used by recipients to estimate transfer time or to compare with previously stored representations.\n\n```\n Content-Length = 1*DIGIT \n```\n\nAn example is\n\n```\nContent-Length: 3495\n```\n\nA user agent *SHOULD* send Content-Length in a request when the method defines a meaning for enclosed content and it is not sending [Transfer-Encoding](rfc9112.html#field.transfer-encoding). For example, a user agent normally sends Content-Length in a POST request even when the value is 0 (indicating empty content). A user agent *SHOULD NOT* send a Content-Length header field when the request message does not contain content and the method semantics do not anticipate such data.\n\nA server *MAY* send a Content-Length header field in a response to a HEAD request (Section 9.3.2); a server *MUST NOT* send Content-Length in such a response unless its field value equals the decimal number of octets that would have been sent in the content of a response if the same request had used the GET method.\n\nA server *MAY* send a Content-Length header field in a 304 (Not Modified) response to a conditional GET request (Section 15.4.5); a server *MUST NOT* send Content-Length in such a response unless its field value equals the decimal number of octets that would have been sent in the content of a 200 (OK) response to the same request.\n\nA server *MUST NOT* send a Content-Length header field in any response with a status code of 1xx (Informational) or 204 (No Content). A server *MUST NOT* send a Content-Length header field in any 2xx (Successful) response to a CONNECT request (Section 9.3.6).\n\nAside from the cases defined above, in the absence of Transfer-Encoding, an origin server *SHOULD* send a Content-Length header field when the content size is known prior to sending the complete header section. This will allow downstream recipients to measure transfer progress, know when a received message is complete, and potentially reuse the connection for additional requests.\n\nAny Content-Length field value greater than or equal to zero is valid. Since there is no predefined limit to the length of content, a recipient *MUST* anticipate potentially large decimal numerals and prevent parsing errors due to integer conversion overflows or precision loss due to integer conversion (Section 17.5).\n\nBecause Content-Length is used for message delimitation in HTTP/1.1, its field value can impact how the message is parsed by downstream recipients even when the immediate connection is not using HTTP/1.1. If the message is forwarded by a downstream intermediary, a Content-Length field value that is inconsistent with the received message framing might cause a security failure due to request smuggling or response splitting.\n\nAs a result, a sender *MUST NOT* forward a message with a Content-Length header field value that is known to be incorrect.\n\nLikewise, a sender *MUST NOT* forward a message with a Content-Length header field value that does not match the ABNF above, with one exception: a recipient of a Content-Length header field value consisting of the same decimal value repeated as a comma-separated list (e.g, \"Content-Length: 42, 42\") *MAY* either reject the message as invalid or replace that invalid field value with a single instance of the decimal value, since this likely indicates that a duplicate was generated or combined by an upstream message processor.\n\n### 8.7. Content-Location\n\nThe \"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.\n\n```\n Content-Location = absolute-URI / partial-URI \n```\n\nThe field value is either an absolute-URI or a partial-URI. In the latter case (Section 4), the referenced URI is relative to the target URI ([URI], [Section 5](https://www.rfc-editor.org/rfc/rfc3986.html#section-5)).\n\nThe Content-Location value is not a replacement for the target URI (Section 7.1). It is representation metadata. It has the same syntax and semantics as the header field of the same name defined for MIME body parts in [Section 4](https://www.rfc-editor.org/rfc/rfc2557.html#section-4) of [RFC2557]. However, its appearance in an HTTP message has some special implications for HTTP recipients.\n\nIf Content-Location is included in a 2xx (Successful) response message and its value refers (after conversion to absolute form) to a URI that is the same as the target URI, then the recipient *MAY* consider the content to be a current representation of that resource at the time indicated by the message origination date. For a GET (Section 9.3.1) or HEAD (Section 9.3.2) request, this is the same as the default semantics when no Content-Location is provided by the server. For a state-changing request like PUT (Section 9.3.4) or POST (Section 9.3.3), it implies that the server's response contains the new representation of that resource, thereby distinguishing it from representations that might only report about the action (e.g., \"It worked!\"). This allows authoring applications to update their local copies without the need for a subsequent GET request.\n\nIf Content-Location is included in a 2xx (Successful) response message and its field value refers to a URI that differs from the target URI, then the origin server claims that the URI is an identifier for a different resource corresponding to the enclosed representation. Such a claim can only be trusted if both identifiers share the same resource owner, which cannot be programmatically determined via HTTP.\n\n- For a response to a GET or HEAD request, this is an indication that the target URI refers to a resource that is subject to content negotiation and the Content-Location field value is a more specific identifier for the selected representation .\n- For a 201 (Created) response to a state-changing method, a Content-Location field value that is identical to the Location field value indicates that this content is a current representation of the newly created resource.\n- Otherwise, such a Content-Location indicates that this content is a representation reporting on the requested action's status and that the same report is available (for future access with GET) at the given URI. For example, a purchase transaction made via a POST request might include a receipt document as the content of the 200 (OK) response; the Content-Location field value provides an identifier for retrieving a copy of that same receipt in the future.\n\nA user agent that sends Content-Location in a request message is stating that its value refers to where the user agent originally obtained the content of the enclosed representation (prior to any modifications made by that user agent). In other words, the user agent is providing a back link to the source of the original representation.\n\nAn origin server that receives a Content-Location field in a request message *MUST* treat the information as transitory request context rather than as metadata to be saved verbatim as part of the representation. An origin server *MAY* use that context to guide in processing the request or to save it for other uses, such as within source links or versioning metadata. However, an origin server *MUST NOT* use such context information to alter the request semantics.\n\nFor example, if a client makes a PUT request on a negotiated resource and the origin server accepts that PUT (without redirection), then the new state of that resource is expected to be consistent with the one representation supplied in that PUT; the Content-Location cannot be used as a form of reverse content selection identifier to update only one of the negotiated representations. If the user agent had wanted the latter semantics, it would have applied the PUT directly to the Content-Location URI.\n\n### 8.8. Validator Fields\n\nResource metadata is referred to as a validator if it can be used within a precondition (Section 13.1) to make a conditional request (Section 13). Validator fields convey a current validator for the selected representation (Section 3.2).\n\nIn responses to safe requests, validator fields describe the selected representation chosen by the origin server while handling the response. Note that, depending on the method and status code semantics, the selected representation for a given response is not necessarily the same as the representation enclosed as response content.\n\nIn a successful response to a state-changing request, validator fields describe the new representation that has replaced the prior selected representation as a result of processing the request.\n\nFor example, an ETag field in a 201 (Created) response communicates the entity tag of the newly created resource's representation, so that the entity tag can be used as a validator in later conditional requests to prevent the \"lost update\" problem.\n\nThis specification defines two forms of metadata that are commonly used to observe resource state and test for preconditions: modification dates (Section 8.8.2) and opaque entity tags (Section 8.8.3). Additional metadata that reflects resource state has been defined by various extensions of HTTP, such as Web Distributed Authoring and Versioning [WEBDAV], that are beyond the scope of this specification.\n\n#### 8.8.1. Weak versus Strong\n\nValidators come in two flavors: strong or weak. Weak validators are easy to generate but are far less useful for comparisons. Strong validators are ideal for comparisons but can be very difficult (and occasionally impossible) to generate efficiently. Rather than impose that all forms of resource adhere to the same strength of validator, HTTP exposes the type of validator in use and imposes restrictions on when weak validators can be used as preconditions.\n\nA strong validator is representation metadata that changes value whenever a change occurs to the representation data that would be observable in the content of a 200 (OK) response to GET.\n\nA 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.\n\nCache entries might persist for arbitrarily long periods, regardless of expiration times. Thus, a cache might attempt to validate an entry using a validator that it obtained in the distant past. A strong validator is unique across all versions of all representations associated with a particular resource over time. However, there is no implication of uniqueness across representations of different resources (i.e., the same strong validator might be in use for representations of multiple resources at the same time and does not imply that those representations are equivalent).\n\nThere 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.\n\nIn contrast, a weak validator is representation metadata that might not change for every change to the representation data. This weakness might be due to limitations in how the value is calculated (e.g., clock resolution), an inability to ensure uniqueness for all possible representations of the resource, or a desire of the resource owner to group representations by some self-determined set of equivalency rather than unique sequences of data.\n\nAn origin server *SHOULD* change a weak entity tag whenever it considers prior representations to be unacceptable as a substitute for the current representation. In other words, a weak entity tag ought to change whenever the origin server wants caches to invalidate old responses.\n\nFor example, the representation of a weather report that changes in content every second, based on dynamic measurements, might be grouped into sets of equivalent representations (from the origin server's perspective) with the same weak validator in order to allow cached representations to be valid for a reasonable period of time (perhaps adjusted dynamically based on server load or weather quality). Likewise, a representation's modification time, if defined with only one-second resolution, might be a weak validator if it is possible for the representation to be modified twice during a single second and retrieved between those modifications.\n\nLikewise, a validator is weak if it is shared by two or more representations of a given resource at the same time, unless those representations have identical representation data. For example, if the origin server sends the same validator for a representation with a gzip content coding applied as it does for a representation with no content coding, then that validator is weak. However, two simultaneous representations might share the same strong validator if they differ only in the representation metadata, such as when two different media types are available for the same representation data.\n\nStrong 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.\n\n#### 8.8.2. Last-Modified\n\nThe \"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.\n\n```\n Last-Modified = HTTP-date \n```\n\nAn example of its use is\n\n```\nLast-Modified: Tue, 15 Nov 1994 12:45:26 GMT\n```\n\n##### 8.8.2.1. Generation\n\nAn 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.\n\nA representation is typically the sum of many parts behind the resource interface. The last-modified time would usually be the most recent time that any of those parts were changed. How that value is determined for any given resource is an implementation detail beyond the scope of this specification.\n\nAn origin server *SHOULD* obtain the Last-Modified value of the representation as close as possible to the time that it generates the Date field value for its response. This allows a recipient to make an accurate assessment of the representation's modification time, especially if the representation changes near the time that the response is generated.\n\nAn 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.\n\nAn origin server without a clock *MUST NOT* generate a Last-Modified date for a response unless that date value was assigned to the resource by some other system (presumably one with a clock).\n\n##### 8.8.2.2. Comparison\n\nA 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:\n\n- The validator is being compared by an origin server to the actual current validator for the representation and,\n- That origin server reliably knows that the associated representation did not change twice during the second covered by the presented validator;\n\nor\n\n- The validator is about to be used by a client in an If-Modified-Since , If-Unmodified-Since , or If-Range header field, because the client has a cache entry for the associated representation, and\n- That cache entry includes a Date value which is at least one second after the Last-Modified value and the client has reason to believe that they were generated by the same clock or that there is enough difference between the Last-Modified and Date values to make clock synchronization issues unlikely;\n\nor\n\n- The validator is being compared by an intermediate cache to the validator stored in its cache entry for the representation, and\n- That cache entry includes a Date value which is at least one second after the Last-Modified value and the cache has reason to believe that they were generated by the same clock or that there is enough difference between the Last-Modified and Date values to make clock synchronization issues unlikely.\n\nThis 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.\n\n#### 8.8.3. ETag\n\nThe \"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.\n\n```\n ETag = entity-tag entity-tag = [ weak ] opaque-tag weak = %s\"W/\"\n opaque-tag = DQUOTE *etagc DQUOTE etagc = %x21 / %x23-7E / obs-text\n ; VCHAR except double quotes, plus obs-text\n```\n\nAn 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.\n\nExamples:\n\n```\nETag: \"xyzzy\"\nETag: W/\"xyzzy\"\nETag: \"\"\n```\n\nAn 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).\n\nA 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.\n\n##### 8.8.3.1. Generation\n\nThe 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.\n\nFor example, a resource that has implementation-specific versioning applied to all changes might use an internal revision number, perhaps combined with a variance identifier for content negotiation, to accurately differentiate between representations. Other implementations might use a collision-resistant hash of representation content, a combination of various file attributes, or a modification timestamp that has sub-second resolution.\n\nAn origin server *SHOULD* send an ETag for any selected representation for which detection of changes can be reasonably and consistently determined, since the entity tag's use in conditional requests and evaluating cache freshness ([CACHING]) can substantially reduce unnecessary transfers and significantly improve service availability, scalability, and reliability.\n\n##### 8.8.3.2. Comparison\n\nThere are two entity tag comparison functions, depending on whether or not the comparison context allows the use of weak validators:\n\nStrong comparison:\n\ntwo entity tags are equivalent if both are not weak and their opaque-tags match character-by-character.\n\nWeak comparison:\n\ntwo entity tags are equivalent if their opaque-tags match character-by-character, regardless of either or both being tagged as \"weak\".\n\nThe example below shows the results for a set of entity tag pairs and both the weak and strong comparison function results:\n\n| ETag 1 | ETag 2 | Strong Comparison | Weak Comparison |\n| --- | --- | --- | --- |\n| W/\"1\" | W/\"1\" | no match | match |\n| W/\"1\" | W/\"2\" | no match | no match |\n| W/\"1\" | \"1\" | no match | match |\n| \"1\" | \"1\" | match | match |\n\n##### 8.8.3.3. Example: Entity Tags Varying on Content-Negotiated Resources\n\nConsider a resource that is subject to content negotiation (Section 12), and where the representations sent in response to a GET request vary based on the Accept-Encoding request header field (Section 12.5.3):\n\n>> Request:\n\n```\nGET /index HTTP/1.1\nHost: www.example.com\nAccept-Encoding: gzip\n```\n\nIn this case, the response might or might not use the gzip content coding. If it does not, the response might look like:\n\n>> Response:\n\n```\nHTTP/1.1 200 OK\nDate: Fri, 26 Mar 2010 00:05:00 GMT\nETag: \"123-a\"\nContent-Length: 70\nVary: Accept-Encoding\nContent-Type: text/plain\n\nHello World!\nHello World!\nHello World!\nHello World!\nHello World!\n```\n\nAn alternative representation that does use gzip content coding would be:\n\n>> Response:\n\n```\nHTTP/1.1 200 OK\nDate: Fri, 26 Mar 2010 00:05:00 GMT\nETag: \"123-b\"\nContent-Length: 43\nVary: Accept-Encoding\nContent-Type: text/plain\nContent-Encoding: gzip\n\n...binary data...\n```\n\n## 9. Methods\n\n### 9.1. Overview\n\nThe 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.\n\nThe request method's semantics might be further specialized by the semantics of some header fields when present in a request if those additional semantics do not conflict with the method. For example, a client can send conditional request header fields (Section 13.1) to make the requested action conditional on the current state of the target resource.\n\nHTTP is designed to be usable as an interface to distributed object systems. The request method invokes an action to be applied to a target resource in much the same way that a remote method invocation can be sent to an identified object.\n\n```\n method = token \n```\n\nThe method token is case-sensitive because it might be used as a gateway to object-based systems with case-sensitive method names. By convention, standardized methods are defined in all-uppercase US-ASCII letters.\n\nUnlike distributed objects, the standardized request methods in HTTP are not resource-specific, since uniform interfaces provide for better visibility and reuse in network-based systems [REST]. Once defined, a standardized method ought to have the same semantics when applied to any resource, though each resource determines for itself whether those semantics are implemented or allowed.\n\nThis specification defines a number of standardized methods that are commonly used in HTTP, as outlined by the following table.\n\n| Method Name | Description | Section |\n| --- | --- | --- |\n| GET | Transfer a current representation of the target resource. | 9.3.1 |\n| HEAD | Same as GET, but do not transfer the response content. | 9.3.2 |\n| POST | Perform resource-specific processing on the request content. | 9.3.3 |\n| PUT | Replace all current representations of the target resource with the request content. | 9.3.4 |\n| DELETE | Remove all current representations of the target resource. | 9.3.5 |\n| CONNECT | Establish a tunnel to the server identified by the target resource. | 9.3.6 |\n| OPTIONS | Describe the communication options for the target resource. | 9.3.7 |\n| TRACE | Perform a message loop-back test along the path to the target resource. | 9.3.8 |\n\nAll general-purpose servers *MUST* support the methods GET and HEAD. All other methods are *OPTIONAL*.\n\nThe set of methods allowed by a target resource can be listed in an Allow header field (Section 10.2.1). However, the set of allowed methods can change dynamically. An origin server that receives a request method that is unrecognized or not implemented *SHOULD* respond with the 501 (Not Implemented) status code. An origin server that receives a request method that is recognized and implemented, but not allowed for the target resource, *SHOULD* respond with the 405 (Method Not Allowed) status code.\n\nAdditional methods, outside the scope of this specification, have been specified for use in HTTP. All such methods ought to be registered within the \"Hypertext Transfer Protocol (HTTP) Method Registry\", as described in Section 16.1.\n\n### 9.2. Common Method Properties\n\n#### 9.2.1. Safe Methods\n\nRequest methods are considered safe if their defined semantics are essentially read-only; i.e., the client does not request, and does not expect, any state change on the origin server as a result of applying a safe method to a target resource. Likewise, reasonable use of a safe method is not expected to cause any harm, loss of property, or unusual burden on the origin server.\n\nThis definition of safe methods does not prevent an implementation from including behavior that is potentially harmful, that is not entirely read-only, or that causes side effects while invoking a safe method. What is important, however, is that the client did not request that additional behavior and cannot be held accountable for it. For example, most servers append request information to access log files at the completion of every response, regardless of the method, and that is considered safe even though the log storage might become full and cause the server to fail. Likewise, a safe request initiated by selecting an advertisement on the Web will often have the side effect of charging an advertising account.\n\nOf the request methods defined by this specification, the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe.\n\nThe purpose of distinguishing between safe and unsafe methods is to allow automated retrieval processes (spiders) and cache performance optimization (pre-fetching) to work without fear of causing harm. In addition, it allows a user agent to apply appropriate constraints on the automated use of unsafe methods when processing potentially untrusted content.\n\nA user agent *SHOULD* distinguish between safe and unsafe methods when presenting potential actions to a user, such that the user can be made aware of an unsafe action before it is requested.\n\nWhen a resource is constructed such that parameters within the target URI have the effect of selecting an action, it is the resource owner's responsibility to ensure that the action is consistent with the request method semantics. For example, it is common for Web-based content editing software to use actions within query parameters, such as \"page?do=delete\". If the purpose of such a resource is to perform an unsafe action, then the resource owner *MUST* disable or disallow that action when it is accessed using a safe request method. Failure to do so will result in unfortunate side effects when automated processes perform a GET on every URI reference for the sake of link maintenance, pre-fetching, building a search index, etc.\n\n#### 9.2.2. Idempotent Methods\n\nA request method is considered idempotent if the intended effect on the server of multiple identical requests with that method is the same as the effect for a single such request. Of the request methods defined by this specification, PUT, DELETE, and safe request methods are idempotent.\n\nLike 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.\n\nIdempotent methods are distinguished because the request can be repeated automatically if a communication failure occurs before the client is able to read the server's response. For example, if a client sends a PUT request and the underlying connection is closed before any response is received, then the client can establish a new connection and retry the idempotent request. It knows that repeating the request will have the same intended effect, even if the original request succeeded, though the response might differ.\n\nA client *SHOULD NOT* automatically retry a request with a non-idempotent method unless it has some means to know that the request semantics are actually idempotent, regardless of the method, or some means to detect that the original request was never applied.\n\nFor example, a user agent can repeat a POST request automatically if it knows (through design or configuration) that the request is safe for that resource. Likewise, a user agent designed specifically to operate on a version control repository might be able to recover from partial failure conditions by checking the target resource revision(s) after a failed connection, reverting or fixing any changes that were partially applied, and then automatically retrying the requests that failed.\n\nSome clients take a riskier approach and attempt to guess when an automatic retry is possible. For example, a client might automatically retry a POST request if the underlying transport connection closed before any part of a response is received, particularly if an idle persistent connection was used.\n\nA proxy *MUST NOT* automatically retry non-idempotent requests. A client *SHOULD NOT* automatically retry a failed automatic retry.\n\n#### 9.2.3. Methods and Caching\n\nFor a cache to store and use a response, the associated method needs to explicitly allow caching and to detail under what conditions a response can be used to satisfy subsequent requests; a method definition that does not do so cannot be cached. For additional requirements see [CACHING].\n\nThis specification defines caching semantics for GET, HEAD, and POST, although the overwhelming majority of cache implementations only support GET and HEAD.\n\n### 9.3. Method Definitions\n\n#### 9.3.1. GET\n\nThe GET method requests transfer of a current selected representation for the target resource. A successful response reflects the quality of \"sameness\" identified by the target URI ([Section 1.2.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-1.2.2) of [URI]). Hence, retrieving identifiable information via HTTP is usually performed by making a GET request on an identifier associated with the potential for providing that information in a 200 (OK) response.\n\nGET is the primary mechanism of information retrieval and the focus of almost all performance optimizations. Applications that produce a URI for each important resource can benefit from those optimizations while enabling their reuse by other applications, creating a network effect that promotes further expansion of the Web.\n\nIt is tempting to think of resource identifiers as remote file system pathnames and of representations as being a copy of the contents of such files. In fact, that is how many resources are implemented (see Section 17.3 for related security considerations). However, there are no such limitations in practice.\n\nThe HTTP interface for a resource is just as likely to be implemented as a tree of content objects, a programmatic view on various database records, or a gateway to other information systems. Even when the URI mapping mechanism is tied to a file system, an origin server might be configured to execute the files with the request as input and send the output as the representation rather than transfer the files directly. Regardless, only the origin server needs to know how each resource identifier corresponds to an implementation and how that implementation manages to select and send a current representation of the target resource.\n\nA client can alter the semantics of GET to be a \"range request\", requesting transfer of only some part(s) of the selected representation, by sending a Range header field in the request (Section 14.2).\n\nAlthough request message framing is independent of the method used, content received in a GET request has no generally defined semantics, cannot alter the meaning or target of the request, and might lead some implementations to reject the request and close the connection because of its potential as a request smuggling attack ([Section 11.2](rfc9112.html#request.smuggling) of [HTTP/1.1]). A client *SHOULD NOT* generate content in a GET request unless it is made directly to an origin server that has previously indicated, in or out of band, that such a request has a purpose and will be adequately supported. An origin server *SHOULD NOT* rely on private agreements to receive content, since participants in HTTP communication are often unaware of intermediaries along the request chain.\n\nThe response to a GET request is cacheable; a cache *MAY* use it to satisfy subsequent GET and HEAD requests unless otherwise indicated by the Cache-Control header field ([Section 5.2](rfc9111.html#field.cache-control) of [CACHING]).\n\nWhen information retrieval is performed with a mechanism that constructs a target URI from user-provided information, such as the query fields of a form using GET, potentially sensitive data might be provided that would not be appropriate for disclosure within a URI (see Section 17.9). In some cases, the data can be filtered or transformed such that it would not reveal such information. In others, particularly when there is no benefit from caching a response, using the POST method (Section 9.3.3) instead of GET can transmit such information in the request content rather than within the target URI.\n\n#### 9.3.2. HEAD\n\nThe 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.\n\nThe 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.\n\nAlthough request message framing is independent of the method used, content received in a HEAD request has no generally defined semantics, cannot alter the meaning or target of the request, and might lead some implementations to reject the request and close the connection because of its potential as a request smuggling attack ([Section 11.2](rfc9112.html#request.smuggling) of [HTTP/1.1]). A client *SHOULD NOT* generate content in a HEAD request unless it is made directly to an origin server that has previously indicated, in or out of band, that such a request has a purpose and will be adequately supported. An origin server *SHOULD NOT* rely on private agreements to receive content, since participants in HTTP communication are often unaware of intermediaries along the request chain.\n\nThe response to a HEAD request is cacheable; a cache *MAY* use it to satisfy subsequent HEAD requests unless otherwise indicated by the Cache-Control header field ([Section 5.2](rfc9111.html#field.cache-control) of [CACHING]). A HEAD response might also affect previously cached responses to GET; see [Section 4.3.5](rfc9111.html#head.effects) of [CACHING].\n\n#### 9.3.3. POST\n\nThe 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):\n\n- Providing a block of data, such as the fields entered into an HTML form, to a data-handling process;\n- Posting a message to a bulletin board, newsgroup, mailing list, blog, or similar group of articles;\n- Creating a new resource that has yet to be identified by the origin server; and\n- Appending data to a resource's existing representation(s).\n\nAn origin server indicates response semantics by choosing an appropriate status code depending on the result of processing the POST request; almost all of the status codes defined by this specification could be received in a response to POST (the exceptions being 206 (Partial Content), 304 (Not Modified), and 416 (Range Not Satisfiable)).\n\nIf 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).\n\nResponses to POST requests are only cacheable when they include explicit freshness information (see [Section 4.2.1](rfc9111.html#calculating.freshness.lifetime) of [CACHING]) and a Content-Location header field that has the same value as the POST's target URI (Section 8.7). A cached POST response can be reused to satisfy a later GET or HEAD request. In contrast, a POST request cannot be satisfied by a cached POST response because POST is potentially unsafe; see [Section 4](rfc9111.html#constructing.responses.from.caches) of [CACHING].\n\nIf the result of processing a POST would be equivalent to a representation of an existing resource, an origin server *MAY* redirect the user agent to that resource by sending a 303 (See Other) response with the existing resource's identifier in the Location field. This has the benefits of providing the user agent a resource identifier and transferring the representation via a method more amenable to shared caching, though at the cost of an extra request if the user agent does not already have the representation cached.\n\n#### 9.3.4. PUT\n\nThe 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.\n\nIf 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.\n\nAn origin server *SHOULD* verify that the PUT representation is consistent with its configured constraints for the target resource. For example, if an origin server determines a resource's representation metadata based on the URI, then the origin server needs to ensure that the content received in a successful PUT request is consistent with that metadata. When a PUT representation is inconsistent with the target resource, the origin server *SHOULD* either make them consistent, by transforming the representation or changing the resource configuration, or respond with an appropriate error message containing sufficient information to explain why the representation is unsuitable. The 409 (Conflict) or 415 (Unsupported Media Type) status codes are suggested, with the latter being specific to constraints on Content-Type values.\n\nFor example, if the target resource is configured to always have a Content-Type of \"text/html\" and the representation being PUT has a Content-Type of \"image/jpeg\", the origin server ought to do one of:\n\n1. reconfigure the target resource to reflect the new media type;\n2. transform the PUT representation to a format consistent with that of the resource before saving it as the new resource state; or,\n3. reject the request with a 415 (Unsupported Media Type) response indicating that the target resource is limited to \"text/html\", perhaps including a link to a different resource that would be a suitable target for the new representation.\n\nHTTP 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.\n\nThis 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).\n\nAn 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).\n\nThe fundamental difference between the POST and PUT methods is highlighted by the different intent for the enclosed representation. The target resource in a POST request is intended to handle the enclosed representation according to the resource's own semantics, whereas the enclosed representation in a PUT request is defined as replacing the state of the target resource. Hence, the intent of PUT is idempotent and visible to intermediaries, even though the exact effect is only known by the origin server.\n\nProper interpretation of a PUT request presumes that the user agent knows which target resource is desired. A service that selects a proper URI on behalf of the client, after receiving a state-changing request, *SHOULD* be implemented using the POST method rather than PUT. If the origin server will not make the requested PUT state change to the target resource and instead wishes to have it applied to a different resource, such as when the resource has been moved to a different URI, then the origin server *MUST* send an appropriate 3xx (Redirection) response; the user agent *MAY* then make its own decision regarding whether or not to redirect the request.\n\nA PUT request applied to the target resource can have side effects on other resources. For example, an article might have a URI for identifying \"the current version\" (a resource) that is separate from the URIs identifying each particular version (different resources that at one point shared the same state as the current version resource). A successful PUT request on \"the current version\" URI might therefore create a new version resource in addition to changing the state of the target resource, and might also cause links to be added between the related resources.\n\nSome origin servers support use of the Content-Range header field (Section 14.4) as a request modifier to perform a partial PUT, as described in Section 14.5.\n\nResponses to the PUT method are not cacheable. If a successful PUT request passes through a cache that has one or more stored responses for the target URI, those stored responses will be invalidated (see [Section 4.4](rfc9111.html#invalidation) of [CACHING]).\n\n#### 9.3.5. DELETE\n\nThe 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.\n\nIf the target resource has one or more current representations, they might or might not be destroyed by the origin server, and the associated storage might or might not be reclaimed, depending entirely on the nature of the resource and its implementation by the origin server (which are beyond the scope of this specification). Likewise, other implementation aspects of a resource might need to be deactivated or archived as a result of a DELETE, such as database or gateway connections. In general, it is assumed that the origin server will only allow DELETE on resources for which it has a prescribed mechanism for accomplishing the deletion.\n\nRelatively 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.\n\nIf a DELETE method is successfully applied, the origin server *SHOULD* send\n\n- a 202 (Accepted) status code if the action will likely succeed but has not yet been enacted,\n- a 204 (No Content) status code if the action has been enacted and no further information is to be supplied, or\n- a 200 (OK) status code if the action has been enacted and the response message includes a representation describing the status.\n\nAlthough request message framing is independent of the method used, content received in a DELETE request has no generally defined semantics, cannot alter the meaning or target of the request, and might lead some implementations to reject the request and close the connection because of its potential as a request smuggling attack ([Section 11.2](rfc9112.html#request.smuggling) of [HTTP/1.1]). A client *SHOULD NOT* generate content in a DELETE request unless it is made directly to an origin server that has previously indicated, in or out of band, that such a request has a purpose and will be adequately supported. An origin server *SHOULD NOT* rely on private agreements to receive content, since participants in HTTP communication are often unaware of intermediaries along the request chain.\n\nResponses to the DELETE method are not cacheable. If a successful DELETE request passes through a cache that has one or more stored responses for the target URI, those stored responses will be invalidated (see [Section 4.4](rfc9111.html#invalidation) of [CACHING]).\n\n#### 9.3.6. CONNECT\n\nThe 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]).\n\nCONNECT 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,\n\n```\nCONNECT server.example.com:80 HTTP/1.1\nHost: server.example.com\n```\n\nA server *MUST* reject a CONNECT request that targets an empty or invalid port number, typically by responding with a 400 (Bad Request) status code.\n\nBecause CONNECT changes the request/response nature of an HTTP connection, specific HTTP versions might have different ways of mapping its semantics into the protocol's wire format.\n\nCONNECT is intended for use in requests to a proxy. The recipient can establish a tunnel either by directly connecting to the server identified by the request target or, if configured to use another proxy, by forwarding the CONNECT request to the next inbound proxy. An origin server *MAY* accept a CONNECT request, but most origin servers do not implement CONNECT.\n\nAny 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.\n\nA tunnel is closed when a tunnel intermediary detects that either side has closed its connection: the intermediary *MUST* attempt to send any outstanding data that came from the closed side to the other side, close both connections, and then discard any remaining data left undelivered.\n\nProxy authentication might be used to establish the authority to create a tunnel. For example,\n\n```\nCONNECT server.example.com:443 HTTP/1.1\nHost: server.example.com:443\nProxy-Authorization: basic aGVsbG86d29ybGQ=\n```\n\nThere are significant risks in establishing a tunnel to arbitrary servers, particularly when the destination is a well-known or reserved TCP port that is not intended for Web traffic. For example, a CONNECT to \"example.com:25\" would suggest that the proxy connect to the reserved port for SMTP traffic; if allowed, that could trick the proxy into relaying spam email. Proxies that support CONNECT *SHOULD* restrict its use to a limited set of known ports or a configurable list of safe request targets.\n\nA server *MUST NOT* send any [Transfer-Encoding](rfc9112.html#field.transfer-encoding) or Content-Length header fields in a 2xx (Successful) response to CONNECT. A client *MUST* ignore any Content-Length or Transfer-Encoding header fields received in a successful response to CONNECT.\n\nA CONNECT request message does not have content. The interpretation of data sent after the header section of the CONNECT request message is specific to the version of HTTP in use.\n\nResponses to the CONNECT method are not cacheable.\n\n#### 9.3.7. OPTIONS\n\nThe 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.\n\nAn OPTIONS request with an asterisk (\"*\") as the request target (Section 7.1) applies to the server in general rather than to a specific resource. Since a server's communication options typically depend on the resource, the \"*\" request is only useful as a \"ping\" or \"no-op\" type of method; it does nothing beyond allowing the client to test the capabilities of the server. For example, this can be used to test a proxy for HTTP/1.1 conformance (or lack thereof).\n\nIf the request target is not an asterisk, the OPTIONS request applies to the options that are available when communicating with the target resource.\n\nA server generating a successful response to OPTIONS *SHOULD* send any header that might indicate optional features implemented by the server and applicable to the target resource (e.g., Allow), including potential extensions not defined by this specification. The response content, if any, might also describe the communication options in a machine or human-readable representation. A standard format for such a representation is not defined by this specification, but might be defined by future extensions to HTTP.\n\nA client *MAY* send a Max-Forwards header field in an OPTIONS request to target a specific recipient in the request chain (see Section 7.6.2). A proxy *MUST NOT* generate a Max-Forwards header field while forwarding a request unless that request was received with a Max-Forwards field.\n\nA client that generates an OPTIONS request containing content *MUST* send a valid Content-Type header field describing the representation media type. Note that this specification does not define any use for such content.\n\nResponses to the OPTIONS method are not cacheable.\n\n#### 9.3.8. TRACE\n\nThe 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](rfc9112.html#media.type.message.http) 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).\n\nA client *MUST NOT* generate fields in a TRACE request containing sensitive data that might be disclosed by the response. For example, it would be foolish for a user agent to send stored user credentials (Section 11) or cookies [COOKIE] in a TRACE request. The final recipient of the request *SHOULD* exclude any request fields that are likely to contain sensitive data when that recipient generates the response content.\n\nTRACE 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.\n\nA client *MUST NOT* send content in a TRACE request.\n\nResponses to the TRACE method are not cacheable.\n\n## 10. Message Context\n\n### 10.1. Request Context Fields\n\nThe request header fields below provide additional information about the request context, including information about the user, user agent, and resource behind the request.\n\n#### 10.1.1. Expect\n\nThe \"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.\n\n```\n Expect = #expectation expectation = token [ \"=\" ( token / quoted-string ) parameters ]\n```\n\nThe Expect field value is case-insensitive.\n\nThe only expectation defined by this specification is \"100-continue\" (with no defined parameters).\n\nA server that receives an Expect field value containing a member other than 100-continue *MAY* respond with a 417 (Expectation Failed) status code to indicate that the unexpected expectation cannot be met.\n\nA 100-continue expectation informs recipients that the client is about to send (presumably large) content in this request and wishes to receive a 100 (Continue) interim response if the method, target URI, and header fields are not sufficient to cause an immediate success, redirect, or error response. This allows the client to wait for an indication that it is worthwhile to send the content before actually doing so, which can improve efficiency when the data is huge or when the client anticipates that an error is likely (e.g., when sending a state-changing method, for the first time, without previously verified authentication credentials).\n\nFor example, a request that begins with\n\n```\nPUT /somewhere/fun HTTP/1.1\nHost: origin.example.com\nContent-Type: video/h264\nContent-Length: 1234567890987\nExpect: 100-continue\n```\n\nallows the origin server to immediately respond with an error message, such as 401 (Unauthorized) or 405 (Method Not Allowed), before the client starts filling the pipes with an unnecessary data transfer.\n\nRequirements for clients:\n\n- A client *MUST NOT* generate a 100-continue expectation in a request that does not include content.\n- A client that will wait for a 100 (Continue) response before sending the request content *MUST* send an Expect header field containing a 100-continue expectation.\n- A client that sends a 100-continue expectation is not required to wait for any specific length of time; such a client *MAY* proceed to send the content even if it has not yet received a response. Furthermore, since 100 (Continue) responses cannot be sent through an HTTP/1.0 intermediary, such a client *SHOULD NOT* wait for an indefinite period before sending the content.\n- A client that receives a 417 (Expectation Failed) status code in response to a request containing a 100-continue expectation *SHOULD* repeat that request without a 100-continue expectation, since the 417 response merely indicates that the response chain does not support expectations (e.g., it passes through an HTTP/1.0 server).\n\nRequirements for servers:\n\n- A server that receives a 100-continue expectation in an HTTP/1.0 request *MUST* ignore that expectation.\n- A server *MAY* omit sending a 100 (Continue) response if it has already received some or all of the content for the corresponding request, or if the framing indicates that there is no content.\n- A server that sends a 100 (Continue) response *MUST* ultimately send a final status code, once it receives and processes the request content, unless the connection is closed prematurely.\n- A server that responds with a final status code before reading the entire request content *SHOULD* indicate whether it intends to close the connection (e.g., see [Section 9.6](rfc9112.html#persistent.tear-down) of [HTTP/1.1] ) or continue reading the request content.\n\nUpon 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:\n\n- an immediate response with a final status code, if that status can be determined by examining just the method, target URI, and header fields, or\n- an immediate 100 (Continue) response to encourage the client to send the request content.\n\nThe origin server *MUST NOT* wait for the content before sending the 100 (Continue) response.\n\nUpon 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:\n\n- send an immediate response with a final status code, if that status can be determined by examining just the method, target URI, and header fields, or\n- forward the request toward the origin server by sending a corresponding request-line and header section to the next inbound server.\n\nIf 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.\n\n#### 10.1.2. From\n\nThe \"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](https://www.rfc-editor.org/rfc/rfc5322.html#section-3.4) of [RFC5322]:\n\n```\n From = mailbox mailbox = \n```\n\nAn example is:\n\n```\nFrom: spider-admin@example.org\n```\n\nThe 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.\n\nA 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.\n\nA 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.\n\n#### 10.1.3. Referer\n\nThe \"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.\n\n```\n Referer = absolute-URI / partial-URI \n```\n\nThe field value is either an absolute-URI or a partial-URI. In the latter case (Section 4), the referenced URI is relative to the target URI ([URI], [Section 5](https://www.rfc-editor.org/rfc/rfc3986.html#section-5)).\n\nThe Referer header field allows servers to generate back-links to other resources for simple analytics, logging, optimized caching, etc. It also allows obsolete or mistyped links to be found for maintenance. Some servers use the Referer header field as a means of denying links from other sites (so-called \"deep linking\") or restricting cross-site request forgery (CSRF), but not all requests contain it.\n\nExample:\n\n```\nReferer: http://www.example.org/hypertext/Overview.html\n```\n\nIf 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\".\n\nThe 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.\n\nThe 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.\n\nSome intermediaries have been known to indiscriminately remove Referer header fields from outgoing requests. This has the unfortunate side effect of interfering with protection against CSRF attacks, which can be far more harmful to their users. Intermediaries and user agent extensions that wish to limit information disclosure in Referer ought to restrict their changes to specific edits, such as replacing internal domain names with pseudonyms or truncating the query and/or path components. An intermediary *SHOULD NOT* modify or delete the Referer header field when the field value shares the same scheme and host as the target URI.\n\n#### 10.1.4. TE\n\nThe \"TE\" header field describes capabilities of the client with regard to transfer codings and trailer sections.\n\nAs described in Section 6.5, a TE field with a \"trailers\" member sent in a request indicates that the client will not discard trailer fields.\n\nTE is also used within HTTP/1.1 to advise servers about which transfer codings the client is able to accept in a response. As of publication, only HTTP/1.1 uses transfer codings (see [Section 7](rfc9112.html#transfer.codings) of [HTTP/1.1]).\n\nThe 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.\n\n```\n TE = #t-codings t-codings = \"trailers\" / ( transfer-coding [ weight ] )\n transfer-coding = token *( OWS \";\" OWS transfer-parameter )\n transfer-parameter = token BWS \"=\" BWS ( token / quoted-string )\n```\n\nA sender of TE *MUST* also send a \"TE\" connection option within the Connection header field (Section 7.6.1) to inform intermediaries not to forward this field.\n\n#### 10.1.5. User-Agent\n\nThe \"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.\n\n```\n User-Agent = product *( RWS ( product / comment ) )\n```\n\nThe User-Agent field value consists of one or more product identifiers, each followed by zero or more comments (Section 5.6.5), which together identify the user agent software and its significant subproducts. By convention, the product identifiers are listed in decreasing order of their significance for identifying the user agent software. Each product identifier consists of a name and optional version.\n\n```\n product = token [\"/\" product-version]\n product-version = token \n```\n\nA sender *SHOULD* limit generated product identifiers to what is necessary to identify the product; a sender *MUST NOT* generate advertising or other nonessential information within the product identifier. A sender *SHOULD NOT* generate information in product-version that is not a version identifier (i.e., successive versions of the same product name ought to differ only in the product-version portion of the product identifier).\n\nExample:\n\n```\nUser-Agent: CERN-LineMode/2.15 libwww/2.17b3\n```\n\nA user agent *SHOULD NOT* generate a User-Agent header field containing needlessly fine-grained detail and *SHOULD* limit the addition of subproducts by third parties. Overly long and detailed User-Agent field values increase request latency and the risk of a user being identified against their wishes (\"fingerprinting\").\n\nLikewise, implementations are encouraged not to use the product tokens of other implementations in order to declare compatibility with them, as this circumvents the purpose of the field. If a user agent masquerades as a different user agent, recipients can assume that the user intentionally desires to see responses tailored for that identified user agent, even if they might not work as well for the actual user agent being used.\n\n### 10.2. Response Context Fields\n\nThe response header fields below provide additional information about the response, beyond what is implied by the status code, including information about the server, about the target resource, or about related resources.\n\n#### 10.2.1. Allow\n\nThe \"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.\n\n```\n Allow = #method \n```\n\nExample of use:\n\n```\nAllow: GET, HEAD, PUT\n```\n\nThe 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.\n\nA 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.\n\n#### 10.2.2. Location\n\nThe \"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.\n\n```\n Location = URI-reference \n```\n\nThe field value consists of a single URI-reference. When it has the form of a relative reference ([URI], [Section 4.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-4.2)), the final value is computed by resolving it against the target URI ([URI], [Section 5](https://www.rfc-editor.org/rfc/rfc3986.html#section-5)).\n\nFor 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.\n\nIf the Location value provided in a 3xx (Redirection) response does not have a fragment component, a user agent *MUST* process the redirection as if the value inherits the fragment component of the URI reference used to generate the target URI (i.e., the redirection inherits the original reference's fragment, if any).\n\nFor 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:\n\n```\nLocation: /People.html#tim\n```\n\nwhich suggests that the user agent redirect to \"http://www.example.org/People.html#tim\"\n\nLikewise, a GET request generated for the URI reference \"http://www.example.org/index.html#larry\" might result in a 301 (Moved Permanently) response containing the header field:\n\n```\nLocation: http://www.example.net/index.html\n```\n\nwhich suggests that the user agent redirect to \"http://www.example.net/index.html#larry\", preserving the original fragment identifier.\n\nThere are circumstances in which a fragment identifier in a Location value would not be appropriate. For example, the Location header field in a 201 (Created) response is supposed to provide a URI that is specific to the created resource.\n\n#### 10.2.3. Retry-After\n\nServers 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.\n\nThe Retry-After field value can be either an HTTP-date or a number of seconds to delay after receiving the response.\n\n```\n Retry-After = HTTP-date / delay-seconds \n```\n\nA delay-seconds value is a non-negative decimal integer, representing time in seconds.\n\n```\n delay-seconds = 1*DIGIT \n```\n\nTwo examples of its use are\n\n```\nRetry-After: Fri, 31 Dec 1999 23:59:59 GMT\nRetry-After: 120\n```\n\nIn the latter example, the delay is 2 minutes.\n\n#### 10.2.4. Server\n\nThe \"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.\n\n```\n Server = product *( RWS ( product / comment ) )\n```\n\nThe 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.\n\nExample:\n\n```\nServer: CERN/3.0 libwww/2.17\n```\n\nAn origin server *SHOULD NOT* generate a Server header field containing needlessly fine-grained detail and *SHOULD* limit the addition of subproducts by third parties. Overly long and detailed Server field values increase response latency and potentially reveal internal implementation details that might make it (slightly) easier for attackers to find and exploit known security holes.\n\n## 11. HTTP Authentication\n\n### 11.1. Authentication Scheme\n\nHTTP provides a general framework for access control and authentication, via an extensible set of challenge-response authentication schemes, which can be used by a server to challenge a client request and by a client to provide authentication information. It uses a case-insensitive token to identify the authentication scheme:\n\n```\n auth-scheme = token \n```\n\nAside 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.\n\n### 11.2. Authentication Parameters\n\nThe authentication scheme is followed by additional information necessary for achieving authentication via that scheme as either a comma-separated list of parameters or a single sequence of characters capable of holding base64-encoded information.\n\n```\n token68 = 1*( ALPHA / DIGIT /\n \"-\" / \".\" / \"_\" / \"~\" / \"+\" / \"/\" ) *\"=\"\n```\n\nThe 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]).\n\nAuthentication parameters are name/value pairs, where the name token is matched case-insensitively and each parameter name *MUST* only occur once per challenge.\n\n```\n auth-param = token BWS \"=\" BWS ( token / quoted-string )\n```\n\nParameter values can be expressed either as \"token\" or as \"quoted-string\" (Section 5.6). Authentication scheme definitions need to accept both notations, both for senders and recipients, to allow recipients to use generic parsing components regardless of the authentication scheme.\n\nFor backwards compatibility, authentication scheme definitions can restrict the format for senders to one of the two variants. This can be important when it is known that deployed implementations will fail when encountering one of the two formats.\n\n### 11.3. Challenge and Response\n\nA 401 (Unauthorized) response message is used by an origin server to challenge the authorization of a user agent, including a WWW-Authenticate header field containing at least one challenge applicable to the requested resource.\n\nA 407 (Proxy Authentication Required) response message is used by a proxy to challenge the authorization of a client, including a Proxy-Authenticate header field containing at least one challenge applicable to the proxy for the requested resource.\n\n```\n challenge = auth-scheme [ 1*SP ( token68 / #auth-param ) ]\n```\n\nA user agent that wishes to authenticate itself with an origin server — usually, but not necessarily, after receiving a 401 (Unauthorized) — can do so by including an Authorization header field with the request.\n\nA 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.\n\n### 11.4. Credentials\n\nBoth 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.\n\n```\n credentials = auth-scheme [ 1*SP ( token68 / #auth-param ) ]\n```\n\nUpon receipt of a request for a protected resource that omits credentials, contains invalid credentials (e.g., a bad password) or partial credentials (e.g., when the authentication scheme requires more than one round trip), an origin server *SHOULD* send a 401 (Unauthorized) response that contains a WWW-Authenticate header field with at least one (possibly new) challenge applicable to the requested resource.\n\nLikewise, upon receipt of a request that omits proxy credentials or contains invalid or partial proxy credentials, a proxy that requires authentication *SHOULD* generate a 407 (Proxy Authentication Required) response that contains a Proxy-Authenticate header field with at least one (possibly new) challenge applicable to the proxy.\n\nA 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).\n\nHTTP does not restrict applications to this simple challenge-response framework for access authentication. Additional mechanisms can be used, such as authentication at the transport level or via message encapsulation, and with additional header fields specifying authentication information. However, such additional mechanisms are not defined by this specification.\n\nNote that various custom mechanisms for user authentication use the Set-Cookie and Cookie header fields, defined in [COOKIE], for passing tokens related to authentication.\n\n### 11.5. Establishing a Protection Space (Realm)\n\nThe realm authentication parameter is reserved for use by authentication schemes that wish to indicate a scope of protection.\n\nA protection space is defined by the origin (see Section 4.3.1) of the server being accessed, in combination with the realm value if present. These realms allow the protected resources on a server to be partitioned into a set of protection spaces, each with its own authentication scheme and/or authorization database. The realm value is a string, generally assigned by the origin server, that can have additional semantics specific to the authentication scheme. Note that a response can have multiple challenges with the same auth-scheme but with different realms.\n\nThe protection space determines the domain over which credentials can be automatically applied. If a prior request has been authorized, the user agent *MAY* reuse the same credentials for all other requests within that protection space for a period of time determined by the authentication scheme, parameters, and/or user preferences (such as a configurable inactivity timeout).\n\nThe extent of a protection space, and therefore the requests to which credentials might be automatically applied, is not necessarily known to clients without additional information. An authentication scheme might define parameters that describe the extent of a protection space. Unless specifically allowed by the authentication scheme, a single protection space cannot extend outside the scope of its server.\n\nFor historical reasons, a sender *MUST* only generate the quoted-string syntax. Recipients might have to support both token and quoted-string syntax for maximum interoperability with existing clients that have been accepting both notations for a long time.\n\n### 11.6. Authenticating Users to Origin Servers\n\n#### 11.6.1. WWW-Authenticate\n\nThe \"WWW-Authenticate\" response header field indicates the authentication scheme(s) and parameters applicable to the target resource.\n\n```\n WWW-Authenticate = #challenge \n```\n\nA server generating a 401 (Unauthorized) response *MUST* send a WWW-Authenticate header field containing at least one challenge. A server *MAY* generate a WWW-Authenticate header field in other response messages to indicate that supplying credentials (or different credentials) might affect the response.\n\nA proxy forwarding a response *MUST NOT* modify any WWW-Authenticate header fields in that response.\n\nUser 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.\n\nFor instance:\n\n```\nWWW-Authenticate: Basic realm=\"simple\", Newauth realm=\"apps\",\n type=1, title=\"Login to \\\"apps\\\"\"\n```\n\nThis 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\".\n\nSome user agents do not recognize this form, however. As a result, sending a WWW-Authenticate field value with more than one member on the same field line might not be interoperable.\n\n#### 11.6.2. Authorization\n\nThe \"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.\n\n```\n Authorization = credentials \n```\n\nIf a request is authenticated and a realm specified, the same credentials are presumed to be valid for all other requests within this realm (assuming that the authentication scheme itself does not require otherwise, such as credentials that vary according to a challenge value or using synchronized clocks).\n\nA proxy forwarding a request *MUST NOT* modify any Authorization header fields in that request. See [Section 3.5](rfc9111.html#caching.authenticated.responses) of [CACHING] for details of and requirements pertaining to handling of the Authorization header field by HTTP caches.\n\n#### 11.6.3. Authentication-Info\n\nHTTP 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).\n\nThe 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](https://www.rfc-editor.org/rfc/rfc7616.html#section-3.5) of [RFC7616].\n\n```\n Authentication-Info = #auth-param \n```\n\nThe Authentication-Info field can be used in any HTTP response, independently of request method and status code. Its semantics are defined by the authentication scheme indicated by the Authorization header field (Section 11.6.2) of the corresponding request.\n\nA proxy forwarding a response is not allowed to modify the field value in any way.\n\nAuthentication-Info can be sent as a trailer field (Section 6.5) when the authentication scheme explicitly allows this.\n\n### 11.7. Authenticating Clients to Proxies\n\n#### 11.7.1. Proxy-Authenticate\n\nThe \"Proxy-Authenticate\" header field consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the proxy for this request. A proxy *MUST* send at least one Proxy-Authenticate header field in each 407 (Proxy Authentication Required) response that it generates.\n\n```\n Proxy-Authenticate = #challenge \n```\n\nUnlike WWW-Authenticate, the Proxy-Authenticate header field applies only to the next outbound client on the response chain. This is because only the client that chose a given proxy is likely to have the credentials necessary for authentication. However, when multiple proxies are used within the same administrative domain, such as office and regional caching proxies within a large corporate network, it is common for credentials to be generated by the user agent and passed through the hierarchy until consumed. Hence, in such a configuration, it will appear as if Proxy-Authenticate is being forwarded because each proxy will send the same challenge set.\n\nNote that the parsing considerations for WWW-Authenticate apply to this header field as well; see Section 11.6.1 for details.\n\n#### 11.7.2. Proxy-Authorization\n\nThe \"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.\n\n```\n Proxy-Authorization = credentials \n```\n\nUnlike Authorization, the Proxy-Authorization header field applies only to the next inbound proxy that demanded authentication using the Proxy-Authenticate header field. When multiple proxies are used in a chain, the Proxy-Authorization header field is consumed by the first inbound proxy that was expecting to receive credentials. A proxy *MAY* relay the credentials from the client request to the next proxy if that is the mechanism by which the proxies cooperatively authenticate a given request.\n\n#### 11.7.3. Proxy-Authentication-Info\n\nThe \"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:\n\n```\n Proxy-Authentication-Info = #auth-param \n```\n\nHowever, unlike Authentication-Info, the Proxy-Authentication-Info header field applies only to the next outbound client on the response chain. This is because only the client that chose a given proxy is likely to have the credentials necessary for authentication. However, when multiple proxies are used within the same administrative domain, such as office and regional caching proxies within a large corporate network, it is common for credentials to be generated by the user agent and passed through the hierarchy until consumed. Hence, in such a configuration, it will appear as if Proxy-Authentication-Info is being forwarded because each proxy will send the same field value.\n\nProxy-Authentication-Info can be sent as a trailer field (Section 6.5) when the authentication scheme explicitly allows this.\n\n## 12. Content Negotiation\n\nWhen responses convey content, whether indicating a success or an error, the origin server often has different ways of representing that information; for example, in different formats, languages, or encodings. Likewise, different users or user agents might have differing capabilities, characteristics, or preferences that could influence which representation, among those available, would be best to deliver. For this reason, HTTP provides mechanisms for content negotiation.\n\nThis specification defines three patterns of content negotiation that can be made visible within the protocol: \"proactive\" negotiation, where the server selects the representation based upon the user agent's stated preferences; \"reactive\" negotiation, where the server provides a list of representations for the user agent to choose from; and \"request content\" negotiation, where the user agent selects the representation for a future request based upon the server's stated preferences in past responses.\n\nOther patterns of content negotiation include \"conditional content\", where the representation consists of multiple parts that are selectively rendered based on user agent parameters, \"active content\", where the representation contains a script that makes additional (more specific) requests based on the user agent characteristics, and \"Transparent Content Negotiation\" ([RFC2295]), where content selection is performed by an intermediary. These patterns are not mutually exclusive, and each has trade-offs in applicability and practicality.\n\nNote 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.\n\n### 12.1. Proactive Negotiation\n\nWhen content negotiation preferences are sent by the user agent in a request to encourage an algorithm located at the server to select the preferred representation, it is called proactive negotiation (a.k.a., server-driven negotiation). Selection is based on the available representations for a response (the dimensions over which it might vary, such as language, content coding, etc.) compared to various information supplied in the request, including both the explicit negotiation header fields below and implicit characteristics, such as the client's network address or parts of the User-Agent field.\n\nProactive negotiation is advantageous when the algorithm for selecting from among the available representations is difficult to describe to a user agent, or when the server desires to send its \"best guess\" to the user agent along with the first response (when that \"best guess\" is good enough for the user, this avoids the round-trip delay of a subsequent request). In order to improve the server's guess, a user agent *MAY* send request header fields that describe its preferences.\n\nProactive negotiation has serious disadvantages:\n\n- It is impossible for the server to accurately determine what might be \"best\" for any given user, since that would require complete knowledge of both the capabilities of the user agent and the intended use for the response (e.g., does the user want to view it on screen or print it on paper?);\n- Having the user agent describe its capabilities in every request can be both very inefficient (given that only a small percentage of responses have multiple representations) and a potential risk to the user's privacy;\n- It complicates the implementation of an origin server and the algorithms for generating responses to a request; and,\n- It limits the reusability of responses for shared caching.\n\nA user agent cannot rely on proactive negotiation preferences being consistently honored, since the origin server might not implement proactive negotiation for the requested resource or might decide that sending a response that doesn't conform to the user agent's preferences is better than sending a 406 (Not Acceptable) response.\n\nA Vary header field (Section 12.5.5) is often sent in a response subject to proactive negotiation to indicate what parts of the request information were used in the selection algorithm.\n\nThe request header fields Accept, Accept-Charset, Accept-Encoding, and Accept-Language are defined below for a user agent to engage in proactive negotiation of the response content. The preferences sent in these fields apply to any content in the response, including representations of the target resource, representations of error or processing status, and potentially even the miscellaneous text strings that might appear within the protocol.\n\n### 12.2. Reactive Negotiation\n\nWith reactive negotiation (a.k.a., agent-driven negotiation), selection of content (regardless of the status code) is performed by the user agent after receiving an initial response. The mechanism for reactive negotiation might be as simple as a list of references to alternative representations.\n\nIf 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).\n\nA server might choose not to send an initial representation, other than the list of alternatives, and thereby indicate that reactive negotiation by the user agent is preferred. For example, the alternatives listed in responses with the 300 (Multiple Choices) and 406 (Not Acceptable) status codes include information about available representations so that the user or user agent can react by making a selection.\n\nReactive negotiation is advantageous when the response would vary over commonly used dimensions (such as type, language, or encoding), when the origin server is unable to determine a user agent's capabilities from examining the request, and generally when public caches are used to distribute server load and reduce network usage.\n\nReactive negotiation suffers from the disadvantages of transmitting a list of alternatives to the user agent, which degrades user-perceived latency if transmitted in the header section, and needing a second request to obtain an alternate representation. Furthermore, this specification does not define a mechanism for supporting automatic selection, though it does not prevent such a mechanism from being developed.\n\n### 12.3. Request Content Negotiation\n\nWhen content negotiation preferences are sent in a server's response, the listed preferences are called request content negotiation because they intend to influence selection of an appropriate content for subsequent requests to that resource. For example, the Accept (Section 12.5.1) and Accept-Encoding (Section 12.5.3) header fields can be sent in a response to indicate preferred media types and content codings for subsequent requests to that resource.\n\nSimilarly, [Section 3.1](https://www.rfc-editor.org/rfc/rfc5789.html#section-3.1) of [RFC5789] defines the \"Accept-Patch\" response header field, which allows discovery of which content types are accepted in PATCH requests.\n\n### 12.4. Content Negotiation Field Features\n\n#### 12.4.1. Absence\n\nFor each of the content negotiation fields, a request that does not contain the field implies that the sender has no preference on that dimension of negotiation.\n\nIf a content negotiation header field is present in a request and none of the available representations for the response can be considered acceptable according to it, the origin server can either honor the header field by sending a 406 (Not Acceptable) response or disregard the header field by treating the response as if it is not subject to content negotiation for that request header field. This does not imply, however, that the client will be able to use the representation.\n\n#### 12.4.2. Quality Values\n\nThe content negotiation fields defined by this specification use a common parameter, named \"q\" (case-insensitive), to assign a relative \"weight\" to the preference for that associated kind of content. This weight is referred to as a \"quality value\" (or \"qvalue\") because the same parameter name is often used within server configurations to assign a weight to the relative quality of the various representations that can be selected for a resource.\n\nThe weight is normalized to a real number in the range 0 through 1, where 0.001 is the least preferred and 1 is the most preferred; a value of 0 means \"not acceptable\". If no \"q\" parameter is present, the default weight is 1.\n\n```\n weight = OWS \";\" OWS \"q=\" qvalue qvalue = ( \"0\" [ \".\" 0*3DIGIT ] )\n / ( \"1\" [ \".\" 0*3(\"0\") ] )\n```\n\nA 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.\n\n#### 12.4.3. Wildcard Values\n\nMost of these header fields, where indicated, define a wildcard value (\"*\") to select unspecified values. If no wildcard is present, values that are not explicitly mentioned in the field are considered unacceptable. Within Vary, the wildcard value means that the variance is unlimited.\n\n### 12.5. Content Negotiation Fields\n\n#### 12.5.1. Accept\n\nThe \"Accept\" header field can be used by user agents to specify their preferences regarding response media types. For example, Accept header fields can be used to indicate that the request is specifically limited to a small set of desired types, as in the case of a request for an in-line image.\n\nWhen sent by a server in a response, Accept provides information about which content types are preferred in the content of a subsequent request to the same resource.\n\n```\n Accept = #( media-range [ weight ] )\n\n media-range = ( \"*/*\"\n / ( type \"/\" \"*\" )\n / ( type \"/\" subtype )\n ) parameters \n```\n\nThe 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.\n\nEach media-range might be followed by optional applicable media type parameters (e.g., charset), followed by an optional \"q\" parameter for indicating a relative weight (Section 12.4.2).\n\nPrevious specifications allowed additional extension parameters to appear after the weight parameter. The accept extension grammar (accept-params, accept-ext) has been removed because it had a complicated definition, was not being used in practice, and is more easily deployed through new header fields. Senders using weights *SHOULD* send \"q\" last (after all media-range parameters). Recipients *SHOULD* process any parameter named \"q\" as weight, regardless of parameter ordering.\n\nThe example\n\n```\nAccept: audio/*; q=0.2, audio/basic\n```\n\nis interpreted as \"I prefer audio/basic, but send me any audio type if it is the best available after an 80% markdown in quality\".\n\nA more elaborate example is\n\n```\nAccept: text/plain; q=0.5, text/html,\n text/x-dvi; q=0.8, text/x-c\n```\n\nVerbally, this would be interpreted as \"text/html and text/x-c are the equally preferred media types, but if they do not exist, then send the text/x-dvi representation, and if that does not exist, send the text/plain representation\".\n\nMedia ranges can be overridden by more specific media ranges or specific media types. If more than one media range applies to a given type, the most specific reference has precedence. For example,\n\n```\nAccept: text/*, text/plain, text/plain;format=flowed, */*\n```\n\nhave the following precedence:\n\n1. text/plain;format=flowed\n2. text/plain\n3. text/*\n4. */*\n\nThe 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,\n\n```\nAccept: text/*;q=0.3, text/plain;q=0.7, text/plain;format=flowed,\n text/plain;format=fixed;q=0.4, */*;q=0.5\n```\n\nwould cause the following values to be associated:\n\n| Media Type | Quality Value |\n| --- | --- |\n| text/plain;format=flowed | 1 |\n| text/plain | 0.7 |\n| text/html | 0.3 |\n| image/jpeg | 0.5 |\n| text/plain;format=fixed | 0.4 |\n| text/html;level=3 | 0.7 |\n\n#### 12.5.2. Accept-Charset\n\nThe \"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.\n\n```\n Accept-Charset = #( ( token / \"*\" ) [ weight ] )\n```\n\nCharset 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\n\n```\nAccept-Charset: iso-8859-5, unicode-1-1;q=0.8\n```\n\nThe special value \"*\", if present in the Accept-Charset header field, matches every charset that is not mentioned elsewhere in the field.\n\n#### 12.5.3. Accept-Encoding\n\nThe \"Accept-Encoding\" header field can be used to indicate preferences regarding the use of content codings (Section 8.4.1).\n\nWhen sent by a user agent in a request, Accept-Encoding indicates the content codings acceptable in a response.\n\nWhen sent by a server in a response, Accept-Encoding provides information about which content codings are preferred in the content of a subsequent request to the same resource.\n\nAn \"identity\" token is used as a synonym for \"no encoding\" in order to communicate when no encoding is preferred.\n\n```\n Accept-Encoding = #( codings [ weight ] )\n codings = content-coding / \"identity\" / \"*\"\n```\n\nEach codings value *MAY* be given an associated quality value (weight) representing the preference for that encoding, as defined in Section 12.4.2. The asterisk \"*\" symbol in an Accept-Encoding field matches any available content coding not explicitly listed in the field.\n\nExamples:\n\n```\nAccept-Encoding: compress, gzip\nAccept-Encoding:\nAccept-Encoding: *\nAccept-Encoding: compress;q=0.5, gzip;q=1.0\nAccept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0\n```\n\nA server tests whether a content coding for a given representation is acceptable using these rules:\n\n1. If no Accept-Encoding header field is in the request, any content coding is considered acceptable by the user agent.\n2. If the representation has no content coding, then it is acceptable by default unless specifically excluded by the Accept-Encoding header field stating either \"identity;q=0\" or \"*;q=0\" without a more specific entry for \"identity\".\n3. If the representation's content coding is one of the content codings listed in the Accept-Encoding field value, then it is acceptable unless it is accompanied by a qvalue of 0. (As defined in Section 12.4.2 , a qvalue of 0 means \"not acceptable\".)\n\nA representation could be encoded with multiple content codings. However, most content codings are alternative ways to accomplish the same purpose (e.g., data compression). When selecting between multiple content codings that have the same purpose, the acceptable content coding with the highest non-zero qvalue is preferred.\n\nAn Accept-Encoding header field with a field value that is empty implies that the user agent does not want any content coding in response. If a non-empty Accept-Encoding header field is present in a request and none of the available representations for the response have a content coding that is listed as acceptable, the origin server *SHOULD* send a response without any content coding unless the identity coding is indicated as unacceptable.\n\nWhen the Accept-Encoding header field is present in a response, it indicates what content codings the resource was willing to accept in the associated request. The field value is evaluated the same way as in a request.\n\nNote that this information is specific to the associated request; the set of supported encodings might be different for other resources on the same server and could change over time or depend on other aspects of the request (such as the request method).\n\nServers that fail a request due to an unsupported content coding ought to respond with a 415 (Unsupported Media Type) status and include an Accept-Encoding header field in that response, allowing clients to distinguish between issues related to content codings and media types. In order to avoid confusion with issues related to media types, servers that fail a request with a 415 status for reasons unrelated to content codings *MUST NOT* include the Accept-Encoding header field.\n\nThe most common use of Accept-Encoding is in responses with a 415 (Unsupported Media Type) status code, in response to optimistic use of a content coding by clients. However, the header field can also be used to indicate to clients that content codings are supported in order to optimize future interactions. For example, a resource might include it in a 2xx (Successful) response when the request content was big enough to justify use of a compression coding but the client failed do so.\n\n#### 12.5.4. Accept-Language\n\nThe \"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.\n\n```\n Accept-Language = #( language-range [ weight ] )\n language-range =\n \n```\n\nEach language-range can be given an associated quality value representing an estimate of the user's preference for the languages specified by that range, as defined in Section 12.4.2. For example,\n\n```\nAccept-Language: da, en-gb;q=0.8, en;q=0.7\n```\n\nwould mean: \"I prefer Danish, but will accept British English and other types of English\".\n\nNote 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](https://www.rfc-editor.org/rfc/rfc4647.html#section-2.3) of [RFC4647].\n\nFor matching, [Section 3](https://www.rfc-editor.org/rfc/rfc4647.html#section-3) of [RFC4647] defines several matching schemes. Implementations can offer the most appropriate matching scheme for their requirements. The \"Basic Filtering\" scheme ([RFC4647], [Section 3.3.1](https://www.rfc-editor.org/rfc/rfc4647.html#section-3.3.1)) is identical to the matching scheme that was previously defined for HTTP in [Section 14.4](https://www.rfc-editor.org/rfc/rfc2616.html#section-14.4) of [RFC2616].\n\nIt might be contrary to the privacy expectations of the user to send an Accept-Language header field with the complete linguistic preferences of the user in every request (Section 17.13).\n\nSince intelligibility is highly dependent on the individual user, user agents need to allow user control over the linguistic preference (either through configuration of the user agent itself or by defaulting to a user controllable system setting). A user agent that does not provide such control to the user *MUST NOT* send an Accept-Language header field.\n\n#### 12.5.5. Vary\n\nThe \"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.\n\n```\n Vary = #( \"*\" / field-name )\n```\n\nA 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.\n\nA 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.\n\nFor example, a response that contains\n\n```\nVary: accept-encoding, accept-language\n```\n\nindicates 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.\n\nA Vary field containing a list of field names has two purposes:\n\n1. 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](rfc9111.html#caching.negotiated.responses) 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.\n2. To inform user agent recipients that this response was subject to content negotiation (Section 12) and a different representation might be sent in a subsequent request if other values are provided in the listed header fields (proactive negotiation).\n\nAn origin server *SHOULD* generate a Vary header field on a cacheable response when it wishes that response to be selectively reused for subsequent requests. Generally, that is the case when the response content has been tailored to better fit the preferences expressed by those selecting header fields, such as when an origin server has selected the response's language based on the request's Accept-Language header field.\n\nVary might be elided when an origin server considers variance in content selection to be less significant than Vary's performance impact on caching, particularly when reuse is already limited by cache response directives ([Section 5.2](rfc9111.html#field.cache-control) of [CACHING]).\n\nThere is no need to send the Authorization field name in Vary because reuse of that response for a different user is prohibited by the field definition (Section 11.6.2). Likewise, if the response content has been selected or influenced by network region, but the origin server wants the cached response to be reused even if recipients move from one region to another, then there is no need for the origin server to indicate such variance in Vary.\n\n## 13. Conditional Requests\n\nA conditional request is an HTTP request with one or more request header fields that indicate a precondition to be tested before applying the request method to the target resource. Section 13.2 defines when to evaluate preconditions and their order of precedence when more than one precondition is present.\n\nConditional 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.\n\n### 13.1. Preconditions\n\nPreconditions 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.\n\nEach precondition defined below consists of a comparison between a set of validators obtained from prior representations of the target resource to the current state of validators for the selected representation (Section 8.8). Hence, these preconditions evaluate whether the state of the target resource has changed since a given state known by the client. The effect of such an evaluation depends on the method semantics and choice of conditional, as defined in Section 13.2.\n\nOther preconditions, defined by other specifications as extension fields, might place conditions on all recipients, on the state of the target resource in general, or on a group of resources. For instance, the \"If\" header field in WebDAV can make a request conditional on various aspects of multiple resources, such as locks, if the recipient understands and implements that field ([WEBDAV], [Section 10.4](https://www.rfc-editor.org/rfc/rfc4918.html#section-10.4)).\n\nExtensibility of preconditions is only possible when the precondition can be safely ignored if unknown (like If-Modified-Since), when deployment can be assumed for a given use case, or when implementation is signaled by some other property of the target resource. This encourages a focus on mutually agreed deployment of common standards.\n\n#### 13.1.1. If-Match\n\nThe \"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.\n\nAn origin server *MUST* use the strong comparison function when comparing entity tags for If-Match (Section 8.8.3.2), since the client intends this precondition to prevent the method from being applied if there have been any changes to the representation data.\n\n```\n If-Match = \"*\" / #entity-tag \n```\n\nExamples:\n\n```\nIf-Match: \"xyzzy\"\nIf-Match: \"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"\nIf-Match: *\n```\n\nIf-Match is most often used with state-changing methods (e.g., POST, PUT, DELETE) to prevent accidental overwrites when multiple user agents might be acting in parallel on the same resource (i.e., to prevent the \"lost update\" problem). In general, it can be used with any method that involves the selection or modification of a representation to abort the request if the selected representation's current entity tag is not a member within the If-Match field value.\n\nWhen an origin server receives a request that selects a representation and that request includes an If-Match header field, the origin server *MUST* evaluate the If-Match condition per Section 13.2 prior to performing the method.\n\nTo evaluate a received If-Match header field:\n\n1. If the field value is \"*\", the condition is true if the origin server has a current representation for the target resource.\n2. 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.\n3. Otherwise, the condition is false.\n\nAn origin server that evaluates an If-Match condition *MUST NOT* perform the requested method if the condition evaluates to false. Instead, the origin server *MAY* indicate that the conditional request failed by responding with a 412 (Precondition Failed) status code. Alternatively, if the request is a state-changing operation that appears to have already been applied to the selected representation, the origin server *MAY* respond with a 2xx (Successful) status code (i.e., the change requested by the user agent has already succeeded, but the user agent might not be aware of it, perhaps because the prior response was lost or an equivalent change was made by some other user agent).\n\nAllowing an origin server to send a success response when a change request appears to have already been applied is more efficient for many authoring use cases, but comes with some risk if multiple user agents are making change requests that are very similar but not cooperative. For example, multiple user agents writing to a common resource as a semaphore (e.g., a nonatomic increment) are likely to collide and potentially lose important state transitions. For those kinds of resources, an origin server is better off being stringent in sending 412 for every failed precondition on an unsafe method. In other cases, excluding the ETag field from a success response might encourage the user agent to perform a GET as its next request to eliminate confusion about the resource's current state.\n\nA client *MAY* send an If-Match header field in a GET request to indicate that it would prefer a 412 (Precondition Failed) response if the selected representation does not match. However, this is only useful in range requests (Section 14) for completing a previously received partial representation when there is no desire for a new representation. If-Range (Section 13.1.5) is better suited for range requests when the client prefers to receive a new representation.\n\nA cache or intermediary *MAY* ignore If-Match because its interoperability features are only necessary for an origin server.\n\nNote 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.\n\n#### 13.1.2. If-None-Match\n\nThe \"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.\n\nA recipient *MUST* use the weak comparison function when comparing entity tags for If-None-Match (Section 8.8.3.2), since weak entity tags can be used for cache validation even if there have been changes to the representation data.\n\n```\n If-None-Match = \"*\" / #entity-tag \n```\n\nExamples:\n\n```\nIf-None-Match: \"xyzzy\"\nIf-None-Match: W/\"xyzzy\"\nIf-None-Match: \"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"\nIf-None-Match: W/\"xyzzy\", W/\"r2d2xxxx\", W/\"c3piozzzz\"\nIf-None-Match: *\n```\n\nIf-None-Match is primarily used in conditional GET requests to enable efficient updates of cached information with a minimum amount of transaction overhead. When a client desires to update one or more stored responses that have entity tags, the client *SHOULD* generate an If-None-Match header field containing a list of those entity tags when making a GET request; this allows recipient servers to send a 304 (Not Modified) response to indicate when one of those stored responses matches the selected representation.\n\nIf-None-Match can also be used with a value of \"*\" to prevent an unsafe request method (e.g., PUT) from inadvertently modifying an existing representation of the target resource when the client believes that the resource does not have a current representation (Section 9.2.1). This is a variation on the \"lost update\" problem that might arise if more than one client attempts to create an initial representation for the target resource.\n\nWhen an origin server receives a request that selects a representation and that request includes an If-None-Match header field, the origin server *MUST* evaluate the If-None-Match condition per Section 13.2 prior to performing the method.\n\nTo evaluate a received If-None-Match header field:\n\n1. If the field value is \"*\", the condition is false if the origin server has a current representation for the target resource.\n2. 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.\n3. Otherwise, the condition is true.\n\nAn origin server that evaluates an If-None-Match condition *MUST NOT* perform the requested method if the condition evaluates to false; instead, the origin server *MUST* respond with either a) the 304 (Not Modified) status code if the request method is GET or HEAD or b) the 412 (Precondition Failed) status code for all other request methods.\n\nRequirements on cache handling of a received If-None-Match header field are defined in [Section 4.3.2](rfc9111.html#validation.received) of [CACHING].\n\nNote 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.\n\n#### 13.1.3. If-Modified-Since\n\nThe \"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.\n\n```\n If-Modified-Since = HTTP-date \n```\n\nAn example of the field is:\n\n```\nIf-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT\n```\n\nA recipient *MUST* ignore If-Modified-Since if the request contains an If-None-Match header field; the condition in If-None-Match is considered to be a more accurate replacement for the condition in If-Modified-Since, and the two are only combined for the sake of interoperating with older intermediaries that might not implement If-None-Match.\n\nA recipient *MUST* ignore the If-Modified-Since header field if the received field value is not a valid HTTP-date, the field value has more than one member, or if the request method is neither GET nor HEAD.\n\nA recipient *MUST* ignore the If-Modified-Since header field if the resource does not have a modification date available.\n\nA recipient *MUST* interpret an If-Modified-Since field value's timestamp in terms of the origin server's clock.\n\nIf-Modified-Since is typically used for two distinct purposes: 1) to allow efficient updates of a cached representation that does not have an entity tag and 2) to limit the scope of a web traversal to resources that have recently changed.\n\nWhen 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.\n\nWhen 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.\n\nWhen an origin server receives a request that selects a representation and that request includes an If-Modified-Since header field without an If-None-Match header field, the origin server *SHOULD* evaluate the If-Modified-Since condition per Section 13.2 prior to performing the method.\n\nTo evaluate a received If-Modified-Since header field:\n\n1. If the selected representation's last modification date is earlier or equal to the date provided in the field value, the condition is false.\n2. Otherwise, the condition is true.\n\nAn origin server that evaluates an If-Modified-Since condition *SHOULD NOT* perform the requested method if the condition evaluates to false; instead, the origin server *SHOULD* generate a 304 (Not Modified) response, including only those metadata that are useful for identifying or updating a previously cached response.\n\nRequirements on cache handling of a received If-Modified-Since header field are defined in [Section 4.3.2](rfc9111.html#validation.received) of [CACHING].\n\n#### 13.1.4. If-Unmodified-Since\n\nThe \"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.\n\n```\n If-Unmodified-Since = HTTP-date \n```\n\nAn example of the field is:\n\n```\nIf-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT\n```\n\nA recipient *MUST* ignore If-Unmodified-Since if the request contains an If-Match header field; the condition in If-Match is considered to be a more accurate replacement for the condition in If-Unmodified-Since, and the two are only combined for the sake of interoperating with older intermediaries that might not implement If-Match.\n\nA recipient *MUST* ignore the If-Unmodified-Since header field if the received field value is not a valid HTTP-date (including when the field value appears to be a list of dates).\n\nA recipient *MUST* ignore the If-Unmodified-Since header field if the resource does not have a modification date available.\n\nA recipient *MUST* interpret an If-Unmodified-Since field value's timestamp in terms of the origin server's clock.\n\nIf-Unmodified-Since is most often used with state-changing methods (e.g., POST, PUT, DELETE) to prevent accidental overwrites when multiple user agents might be acting in parallel on a resource that does not supply entity tags with its representations (i.e., to prevent the \"lost update\" problem). In general, it can be used with any method that involves the selection or modification of a representation to abort the request if the selected representation's last modification date has changed since the date provided in the If-Unmodified-Since field value.\n\nWhen an origin server receives a request that selects a representation and that request includes an If-Unmodified-Since header field without an If-Match header field, the origin server *MUST* evaluate the If-Unmodified-Since condition per Section 13.2 prior to performing the method.\n\nTo evaluate a received If-Unmodified-Since header field:\n\n1. If the selected representation's last modification date is earlier than or equal to the date provided in the field value, the condition is true.\n2. Otherwise, the condition is false.\n\nAn origin server that evaluates an If-Unmodified-Since condition *MUST NOT* perform the requested method if the condition evaluates to false. Instead, the origin server *MAY* indicate that the conditional request failed by responding with a 412 (Precondition Failed) status code. Alternatively, if the request is a state-changing operation that appears to have already been applied to the selected representation, the origin server *MAY* respond with a 2xx (Successful) status code (i.e., the change requested by the user agent has already succeeded, but the user agent might not be aware of it, perhaps because the prior response was lost or an equivalent change was made by some other user agent).\n\nAllowing an origin server to send a success response when a change request appears to have already been applied is more efficient for many authoring use cases, but comes with some risk if multiple user agents are making change requests that are very similar but not cooperative. In those cases, an origin server is better off being stringent in sending 412 for every failed precondition on an unsafe method.\n\nA client *MAY* send an If-Unmodified-Since header field in a GET request to indicate that it would prefer a 412 (Precondition Failed) response if the selected representation has been modified. However, this is only useful in range requests (Section 14) for completing a previously received partial representation when there is no desire for a new representation. If-Range (Section 13.1.5) is better suited for range requests when the client prefers to receive a new representation.\n\nA cache or intermediary *MAY* ignore If-Unmodified-Since because its interoperability features are only necessary for an origin server.\n\n#### 13.1.5. If-Range\n\nThe \"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.\n\nIf a client has a partial copy of a representation and wishes to have an up-to-date copy of the entire representation, it could use the Range header field with a conditional GET (using either or both of If-Unmodified-Since and If-Match.) However, if the precondition fails because the representation has been modified, the client would then have to make a second request to obtain the entire current representation.\n\nThe \"If-Range\" header field allows a client to \"short-circuit\" the second request. Informally, its meaning is as follows: if the representation is unchanged, send me the part(s) that I am requesting in Range; otherwise, send me the entire representation.\n\n```\n If-Range = entity-tag / HTTP-date \n```\n\nA valid entity-tag can be distinguished from a valid HTTP-date by examining the first three characters for a DQUOTE.\n\nA client *MUST NOT* generate an If-Range header field in a request that does not contain a Range header field. A server *MUST* ignore an If-Range header field received in a request that does not contain a Range header field. An origin server *MUST* ignore an If-Range header field received in a request for a target resource that does not support Range requests.\n\nA client *MUST NOT* generate an If-Range header field containing an entity tag that is marked as weak. A client *MUST NOT* generate an If-Range header field containing an HTTP-date unless the client has no entity tag for the corresponding representation and the date is a strong validator in the sense defined by Section 8.8.2.2.\n\nA server that receives an If-Range header field on a Range request *MUST* evaluate the condition per Section 13.2 prior to performing the method.\n\nTo evaluate a received If-Range header field containing an HTTP-date:\n\n1. If the HTTP-date validator provided is not a strong validator in the sense defined by Section 8.8.2.2 , the condition is false.\n2. If the HTTP-date validator provided exactly matches the Last-Modified field value for the selected representation, the condition is true.\n3. Otherwise, the condition is false.\n\nTo evaluate a received If-Range header field containing an entity-tag:\n\n1. If the entity-tag validator provided exactly matches the ETag field value for the selected representation using the strong comparison function ( Section 8.8.3.2 ), the condition is true.\n2. Otherwise, the condition is false.\n\nA recipient of an If-Range header field *MUST* ignore the Range header field if the If-Range condition evaluates to false. Otherwise, the recipient *SHOULD* process the Range header field as requested.\n\nNote 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.\n\n### 13.2. Evaluation of Preconditions\n\n#### 13.2.1. When to Evaluate\n\nExcept when excluded below, a recipient cache or origin server *MUST* evaluate received request preconditions after it has successfully performed its normal request checks and just before it would process the request content (if any) or perform the action associated with the request method. A server *MUST* ignore all received preconditions if its response to the same request without those conditions, prior to processing the request content, would have been a status code other than a 2xx (Successful) or 412 (Precondition Failed). In other words, redirects and failures that can be detected before significant processing occurs take precedence over the evaluation of preconditions.\n\nA 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.\n\nNote 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.\n\nAlthough conditional request header fields are defined as being usable with the HEAD method (to keep HEAD's semantics consistent with those of GET), there is no point in sending a conditional HEAD because a successful response is around the same size as a 304 (Not Modified) response and more useful than a 412 (Precondition Failed) response.\n\n#### 13.2.2. Precedence of Preconditions\n\nWhen more than one conditional request header field is present in a request, the order in which the fields are evaluated becomes important. In practice, the fields defined in this document are consistently implemented in a single, logical order, since \"lost update\" preconditions have more strict requirements than cache validation, a validated cache is more efficient than a partial response, and entity tags are presumed to be more accurate than date validators.\n\nA recipient cache or origin server *MUST* evaluate the request preconditions defined by this specification in the following order:\n\n1. When recipient is the origin server and If-Match is present, evaluate the If-Match precondition: if true, continue to step 3if false, respond 412 (Precondition Failed) unless it can be determined that the state-changing request has already succeeded (see Section 13.1.1)\n2. When recipient is the origin server, If-Match is not present, and If-Unmodified-Since is present, evaluate the If-Unmodified-Since precondition: if true, continue to step 3if false, respond 412 (Precondition Failed) unless it can be determined that the state-changing request has already succeeded (see Section 13.1.4)\n3. When If-None-Match is present, evaluate the If-None-Match precondition: if true, continue to step 5if false for GET/HEAD, respond 304 (Not Modified)if false for other methods, respond 412 (Precondition Failed)\n4. When the method is GET or HEAD, If-None-Match is not present, and If-Modified-Since is present, evaluate the If-Modified-Since precondition: if true, continue to step 5if false, respond 304 (Not Modified)\n5. When the method is GET and both Range and If-Range are present, evaluate the If-Range precondition: if true and the Range is applicable to the selected representation, respond 206 (Partial Content)otherwise, ignore the Range header field and respond 200 (OK)\n6. Otherwise, perform the requested method and respond according to its success or failure.\n\nAny extension to HTTP that defines additional conditional request header fields ought to define the order for evaluating such fields in relation to those defined in this document and other conditionals that might be found in practice.\n\n## 14. Range Requests\n\nClients often encounter interrupted data transfers as a result of canceled requests or dropped connections. When a client has stored a partial representation, it is desirable to request the remainder of that representation in a subsequent request rather than transfer the entire representation. Likewise, devices with limited local storage might benefit from being able to request only a subset of a larger representation, such as a single page of a very large document, or the dimensions of an embedded image.\n\nRange requests are an *OPTIONAL* feature of HTTP, designed so that recipients not implementing this feature (or not supporting it for the target resource) can respond as if it is a normal GET request without impacting interoperability. Partial responses are indicated by a distinct status code to not be mistaken for full responses by caches that might not implement the feature.\n\n### 14.1. Range Units\n\nRepresentation data can be partitioned into subranges when there are addressable structural units inherent to that data's content coding or media type. For example, octet (a.k.a. byte) boundaries are a structural unit common to all representation data, allowing partitions of the data to be identified as a range of bytes at some offset from the start or end of that data.\n\nThis general notion of a range unit is used in the Accept-Ranges (Section 14.3) response header field to advertise support for range requests, the Range (Section 14.2) request header field to delineate the parts of a representation that are requested, and the Content-Range (Section 14.4) header field to describe which part of a representation is being transferred.\n\n```\n range-unit = token \n```\n\nAll range unit names are case-insensitive and ought to be registered within the \"HTTP Range Unit Registry\", as defined in Section 16.5.1.\n\nRange units are intended to be extensible, as described in Section 16.5.\n\n#### 14.1.1. Range Specifiers\n\nRanges are expressed in terms of a range unit paired with a set of range specifiers. The range unit name determines what kinds of range-spec are applicable to its own specifiers. Hence, the following grammar is generic: each range unit is expected to specify requirements on when int-range, suffix-range, and other-range are allowed.\n\nA range request can specify a single range or a set of ranges within a single representation.\n\n```\n ranges-specifier = range-unit \"=\" range-set range-set = 1#range-spec range-spec = int-range\n / suffix-range\n / other-range \n```\n\nAn int-range is a range expressed as two non-negative integers or as one non-negative integer through to the end of the representation data. The range unit specifies what the integers mean (e.g., they might indicate unit offsets from the beginning, inclusive numbered parts, etc.).\n\n```\n int-range = first-pos \"-\" [ last-pos ]\n first-pos = 1*DIGIT last-pos = 1*DIGIT \n```\n\nAn int-range is invalid if the last-pos value is present and less than the first-pos.\n\nA suffix-range is a range expressed as a suffix of the representation data with the provided non-negative integer maximum length (in range units). In other words, the last N units of the representation data.\n\n```\n suffix-range = \"-\" suffix-length suffix-length = 1*DIGIT \n```\n\nTo provide for extensibility, the other-range rule is a mostly unconstrained grammar that allows application-specific or future range units to define additional range specifiers.\n\n```\n other-range = 1*( %x21-2B / %x2D-7E )\n ; 1*(VCHAR excluding comma)\n```\n\nA ranges-specifier is invalid if it contains any range-spec that is invalid or undefined for the indicated range-unit.\n\nA valid ranges-specifier is satisfiable if it contains at least one range-spec that is satisfiable, as defined by the indicated range-unit. Otherwise, the ranges-specifier is unsatisfiable.\n\n#### 14.1.2. Byte Ranges\n\nThe \"bytes\" range unit is used to express subranges of a representation data's octet sequence. Each byte range is expressed as an integer range at some offset, relative to either the beginning (int-range) or end (suffix-range) of the representation data. Byte ranges do not use the other-range specifier.\n\nThe 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.\n\nIf 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.\n\nExamples of bytes range specifiers:\n\n- The first 500 bytes (byte offsets 0-499, inclusive): bytes=0-499\n- The second 500 bytes (byte offsets 500-999, inclusive): bytes=500-999\n\nA 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).\n\nA 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.\n\nAdditional examples, assuming a representation of length 10000:\n\n- The final 500 bytes (byte offsets 9500-9999, inclusive): bytes=-500 Or: bytes=9500-\n- The first and last bytes only (bytes 0 and 9999): bytes=0-0,-1\n- The first, middle, and last 1000 bytes: bytes= 0-999, 4500-5499, -1000\n- Other valid (but not canonical) specifications of the second 500 bytes (byte offsets 500-999, inclusive): bytes=500-600,601-999\nbytes=500-700,601-999\n\nFor a GET request, a valid bytes range-spec is satisfiable if it is either:\n\n- an int-range with a first-pos that is less than the current length of the selected representation or\n- a suffix-range with a non-zero suffix-length .\n\nWhen 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.\n\nIn the byte-range syntax, first-pos, last-pos, and suffix-length are expressed as decimal number of octets. Since there is no predefined limit to the length of content, recipients *MUST* anticipate potentially large decimal numerals and prevent parsing errors due to integer conversion overflows.\n\n### 14.2. Range\n\nThe \"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.\n\n```\n Range = ranges-specifier \n```\n\nA 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.\n\nA server *MUST* ignore a Range header field received with a request method that is unrecognized or for which range handling is not defined. For this specification, GET is the only method for which range handling is defined.\n\nAn 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.\n\nA server that supports range requests *MAY* ignore or reject a Range header field that contains an invalid ranges-specifier (Section 14.1.1), a ranges-specifier with more than two overlapping ranges, or a set of many small ranges that are not listed in ascending order, since these are indications of either a broken client or a deliberate denial-of-service attack (Section 17.15). A client *SHOULD NOT* request multiple ranges that are inherently less efficient to process and transfer than a single range that encompasses the same data.\n\nA 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).\n\nA client that is requesting multiple ranges *SHOULD* list those ranges in ascending order (the order in which they would typically be received in a complete representation) unless there is a specific need to request a later part earlier. For example, a user agent processing a large representation with an internal catalog of parts might need to request later parts first, particularly if the representation consists of pages stored in reverse order and the user agent wishes to transfer one page at a time.\n\nThe Range header field is evaluated after evaluating the precondition header fields defined in Section 13.1, and only if the result in absence of the Range header field would be a 200 (OK) response. In other words, Range is ignored when a conditional GET would result in a 304 (Not Modified) response.\n\nThe If-Range header field (Section 13.1.5) can be used as a precondition to applying the Range header field.\n\nIf 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.\n\nThe 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).\n\nIf 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.\n\n### 14.3. Accept-Ranges\n\nThe \"Accept-Ranges\" field in a response indicates whether an upstream server supports range requests for the target resource.\n\n```\n Accept-Ranges = acceptable-ranges acceptable-ranges = 1#range-unit \n```\n\nFor example, a server that supports byte-range requests (Section 14.1.2) can send the field\n\n```\nAccept-Ranges: bytes\n```\n\nto 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.\n\nA client *MAY* generate range requests regardless of having received an Accept-Ranges field. The information only provides advice for the sake of improving performance and reducing unnecessary network transfers.\n\nConversely, a client *MUST NOT* assume that receiving an Accept-Ranges field means that future range requests will return partial responses. The content might change, the server might only support range requests at certain times or under certain conditions, or a different intermediary might process the next request.\n\nA server that does not support any kind of range request for the target resource *MAY* send\n\n```\nAccept-Ranges: none\n```\n\nto advise the client not to attempt a range request on the same request path. The range unit \"none\" is reserved for this purpose.\n\nThe Accept-Ranges field *MAY* be sent in a trailer section, but is preferred to be sent as a header field because the information is particularly useful for restarting large information transfers that have failed in mid-content (before the trailer section is received).\n\n### 14.4. Content-Range\n\nThe \"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.\n\n```\n Content-Range = range-unit SP\n ( range-resp / unsatisfied-range )\n\n range-resp = incl-range \"/\" ( complete-length / \"*\" )\n incl-range = first-pos \"-\" last-pos unsatisfied-range = \"*/\" complete-length complete-length = 1*DIGIT \n```\n\nIf 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.\n\nContent-Range might also be sent as a request modifier to request a partial PUT, as described in Section 14.5, based on private agreements between client and origin server. A server *MUST* ignore a Content-Range header field received in a request with a method for which Content-Range support is not defined.\n\nFor 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.\n\nThe following example illustrates when the complete length of the selected representation is known by the sender to be 1234 bytes:\n\n```\nContent-Range: bytes 42-1233/1234\n```\n\nand this second example illustrates when the complete length is unknown:\n\n```\nContent-Range: bytes 42-1233/*\n```\n\nA Content-Range field value is invalid if it contains a range-resp that has a last-pos value less than its first-pos value, or a complete-length value less than or equal to its last-pos value. The recipient of an invalid Content-Range *MUST NOT* attempt to recombine the received content with a stored representation.\n\nA server generating a 416 (Range Not Satisfiable) response to a byte-range request *SHOULD* send a Content-Range header field with an unsatisfied-range value, as in the following example:\n\n```\nContent-Range: bytes */1234\n```\n\nThe complete-length in a 416 response indicates the current length of the selected representation.\n\nThe Content-Range header field has no meaning for status codes that do not explicitly describe its semantic. For this specification, only the 206 (Partial Content) and 416 (Range Not Satisfiable) status codes describe a meaning for Content-Range.\n\nThe following are examples of Content-Range values in which the selected representation contains a total of 1234 bytes:\n\n- The first 500 bytes: Content-Range: bytes 0-499/1234\n- The second 500 bytes: Content-Range: bytes 500-999/1234\n- All except for the first 500 bytes: Content-Range: bytes 500-1233/1234\n- The last 500 bytes: Content-Range: bytes 734-1233/1234\n\n### 14.5. Partial PUT\n\nSome origin servers support PUT of a partial representation when the user agent sends a Content-Range header field (Section 14.4) in the request, though such support is inconsistent and depends on private agreements with user agents. In general, it requests that the state of the target resource be partly replaced with the enclosed content at an offset and length indicated by the Content-Range value, where the offset is relative to the current selected representation.\n\nAn 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.\n\nPartial PUT is not backwards compatible with the original definition of PUT. It may result in the content being written as a complete replacement for the current representation.\n\nPartial resource updates are also possible by targeting a separately identified resource with state that overlaps or extends a portion of the larger resource, or by using a different method that has been specifically defined for partial updates (for example, the PATCH method defined in [RFC5789]).\n\n### 14.6. Media Type multipart/byteranges\n\nWhen a 206 (Partial Content) response message includes the content of multiple ranges, they are transmitted as body parts in a multipart message body ([RFC2046], [Section 5.1](https://www.rfc-editor.org/rfc/rfc2046.html#section-5.1)) with the media type of \"multipart/byteranges\".\n\nThe \"multipart/byteranges\" media type includes one or more body parts, each with its own Content-Type and Content-Range fields. The required boundary parameter specifies the boundary string used to separate each body part.\n\nImplementation Notes:\n\n1. Additional CRLFs might precede the first boundary string in the body.\n2. Although [RFC2046] permits the boundary string to be quoted, some existing implementations handle a quoted boundary string incorrectly.\n3. A number of clients and servers were coded to an early draft of the byteranges specification that used a media type of \"multipart/x-byteranges\", which is almost (but not quite) compatible with this type.\n\nDespite the name, the \"multipart/byteranges\" media type is not limited to byte ranges. The following example uses an \"exampleunit\" range unit:\n\n```\nHTTP/1.1 206 Partial Content\nDate: Tue, 14 Nov 1995 06:25:24 GMT\nLast-Modified: Tue, 14 July 04:58:08 GMT\nContent-Length: 2331785\nContent-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES\n\n--THIS_STRING_SEPARATES\nContent-Type: video/example\nContent-Range: exampleunit 1.2-4.3/25\n\n...the first range...\n--THIS_STRING_SEPARATES\nContent-Type: video/example\nContent-Range: exampleunit 11.2-14.3/25\n\n...the second range\n--THIS_STRING_SEPARATES--\n```\n\nThe following information serves as the registration form for the \"multipart/byteranges\" media type.\n\nType name:\n\nmultipart\n\nSubtype name:\n\nbyteranges\n\nRequired parameters:\n\nboundary\n\nOptional parameters:\n\nN/A\n\nEncoding considerations:\n\nonly \"7bit\", \"8bit\", or \"binary\" are permitted\n\nSecurity considerations:\n\nsee Section 17\n\nInteroperability considerations:\n\nN/A\n\nPublished specification:\n\nRFC 9110 (see Section 14.6)\n\nApplications that use this media type:\n\nHTTP components supporting multiple ranges in a single request\n\nFragment identifier considerations:\n\nN/A\n\nAdditional information:\n\nDeprecated alias names for this type:N/AMagic number(s):N/AFile extension(s):N/AMacintosh file type code(s):N/A\n\nPerson and email address to contact for further information:\n\nSee Authors' Addresses section.\n\nIntended usage:\n\nCOMMON\n\nRestrictions on usage:\n\nN/A\n\nAuthor:\n\nSee Authors' Addresses section.\n\nChange controller:\n\nIESG\n\n## 15. Status Codes\n\nThe status code of a response is a three-digit integer code that describes the result of the request and the semantics of the response, including whether the request was successful and what content is enclosed (if any). All valid status codes are within the range of 100 to 599, inclusive.\n\nThe 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:\n\n- 1xx (Informational) : The request was received, continuing process\n- 2xx (Successful) : The request was successfully received, understood, and accepted\n- 3xx (Redirection) : Further action needs to be taken in order to complete the request\n- 4xx (Client Error) : The request contains bad syntax or cannot be fulfilled\n- 5xx (Server Error) : The server failed to fulfill an apparently valid request\n\nHTTP status codes are extensible. A client is not required to understand the meaning of all registered status codes, though such understanding is obviously desirable. However, a client *MUST* understand the class of any status code, as indicated by the first digit, and treat an unrecognized status code as being equivalent to the x00 status code of that class.\n\nFor example, if a client receives an unrecognized status code of 471, it can see from the first digit that there was something wrong with its request and treat the response as if it had received a 400 (Bad Request) status code. The response message will usually contain a representation that explains the status.\n\nValues 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.\n\nA single request can have multiple associated responses: zero or more interim (non-final) responses with status codes in the \"informational\" (1xx) range, followed by exactly one final response with a status code in one of the other ranges.\n\n### 15.1. Overview of Status Codes\n\nThe status codes listed below are defined in this specification. The reason phrases listed here are only recommendations — they can be replaced by local equivalents or left out altogether without affecting the protocol.\n\nResponses with status codes that are defined as heuristically cacheable (e.g., 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, and 501 in this specification) can be reused by a cache with heuristic expiration unless otherwise indicated by the method definition or explicit cache controls [CACHING]; all other status codes are not heuristically cacheable.\n\nAdditional status codes, outside the scope of this specification, have been specified for use in HTTP. All such status codes ought to be registered within the \"Hypertext Transfer Protocol (HTTP) Status Code Registry\", as described in Section 16.2.\n\n### 15.2. Informational 1xx\n\nThe 1xx (Informational) class of status code indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response. Since HTTP/1.0 did not define any 1xx status codes, a server *MUST NOT* send a 1xx response to an HTTP/1.0 client.\n\nA 1xx response is terminated by the end of the header section; it cannot contain content or trailers.\n\nA 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.\n\nA 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).\n\n#### 15.2.1. 100 Continue\n\nThe 100 (Continue) status code indicates that the initial part of a request has been received and has not yet been rejected by the server. The server intends to send a final response after the request has been fully received and acted upon.\n\nWhen 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.\n\nIf the request did not contain an Expect header field containing the 100-continue expectation, the client can simply discard this interim response.\n\n#### 15.2.2. 101 Switching Protocols\n\nThe 101 (Switching Protocols) status code indicates that the server understands and is willing to comply with the client's request, via the Upgrade header field (Section 7.8), for a change in the application protocol being used on this connection. The server *MUST* generate an Upgrade header field in the response that indicates which protocol(s) will be in effect after this response.\n\nIt 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.\n\n### 15.3. Successful 2xx\n\nThe 2xx (Successful) class of status code indicates that the client's request was successfully received, understood, and accepted.\n\n#### 15.3.1. 200 OK\n\nThe 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:\n\n| Request Method | Response content is a representation of: |\n| --- | --- |\n| GET | the target resource |\n| HEAD | the target resource, like GET, but without transferring the representation data |\n| POST | the status of, or results obtained from, the action |\n| PUT, DELETE | the status of the action |\n| OPTIONS | communication options for the target resource |\n| TRACE | the request message as received by the server returning the trace |\n\nAside from responses to CONNECT, a 200 response is expected to contain message content unless the message framing explicitly indicates that the content has zero length. If some aspect of the request indicates a preference for no content upon success, the origin server ought to send a 204 (No Content) response instead. For CONNECT, there is no content because the successful result is a tunnel, which begins immediately after the 200 response header section.\n\nA 200 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\nIn 200 responses to GET or HEAD, an origin server *SHOULD* send any available validator fields (Section 8.8) for the selected representation, with both a strong entity tag and a Last-Modified date being preferred.\n\nIn 200 responses to state-changing methods, any validator fields (Section 8.8) sent in the response convey the current validators for the new representation formed as a result of successfully applying the request semantics. Note that the PUT method (Section 9.3.4) has additional requirements that might preclude sending such validators.\n\n#### 15.3.2. 201 Created\n\nThe 201 (Created) status code indicates that the request has been fulfilled and has resulted in one or more new resources being created. The primary resource created by the request is identified by either a Location header field in the response or, if no Location header field is received, by the target URI.\n\nThe 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.\n\n#### 15.3.3. 202 Accepted\n\nThe 202 (Accepted) status code indicates that the request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility in HTTP for re-sending a status code from an asynchronous operation.\n\nThe 202 response is intentionally noncommittal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the server persist until the process is completed. The representation sent with this response ought to describe the request's current status and point to (or embed) a status monitor that can provide the user with an estimate of when the request will be fulfilled.\n\n#### 15.3.4. 203 Non-Authoritative Information\n\nThe 203 (Non-Authoritative Information) status code indicates that the request was successful but the enclosed content has been modified from that of the origin server's 200 (OK) response by a transforming proxy (Section 7.7). This status code allows the proxy to notify recipients when a transformation has been applied, since that knowledge might impact later decisions regarding the content. For example, future cache validation requests for the content might only be applicable along the same request path (through the same proxies).\n\nA 203 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n#### 15.3.5. 204 No Content\n\nThe 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.\n\nFor 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.\n\nThe 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.\n\nFor 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.\n\nA 204 response is terminated by the end of the header section; it cannot contain content or trailers.\n\nA 204 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n#### 15.3.6. 205 Reset Content\n\nThe 205 (Reset Content) status code indicates that the server has fulfilled the request and desires that the user agent reset the \"document view\", which caused the request to be sent, to its original state as received from the origin server.\n\nThis response is intended to support a common data entry use case where the user receives content that supports data entry (a form, notepad, canvas, etc.), enters or manipulates data in that space, causes the entered data to be submitted in a request, and then the data entry mechanism is reset for the next entry so that the user can easily initiate another input action.\n\nSince the 205 status code implies that no additional content will be provided, a server *MUST NOT* generate content in a 205 response.\n\n#### 15.3.7. 206 Partial Content\n\nThe 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.\n\nA 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.\n\nA client *MUST* inspect a 206 response's Content-Type and Content-Range field(s) to determine what parts are enclosed and whether additional requests are needed.\n\nA server that generates a 206 response *MUST* generate the following header fields, in addition to those required in the subsections below, if the field would have been sent in a 200 (OK) response to the same request: Date, [Cache-Control](rfc9111.html#field.cache-control), ETag, [Expires](rfc9111.html#field.expires), Content-Location, and Vary.\n\nA Content-Length header field present in a 206 response indicates the number of octets in the content of this message, which is usually not the complete length of the selected representation. Each Content-Range header field includes information about the selected representation's complete length.\n\nA sender that generates a 206 response to a request with an If-Range header field *SHOULD NOT* generate other representation header fields beyond those required because the client already has a prior response containing those header fields. Otherwise, a sender *MUST* generate all of the representation header fields that would have been sent in a 200 (OK) response to the same request.\n\nA 206 response is heuristically cacheable; i.e., unless otherwise indicated by explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n##### 15.3.7.1. Single Part\n\nIf a single part is being transferred, the server generating the 206 response *MUST* generate a Content-Range header field, describing what range of the selected representation is enclosed, and a content consisting of the range. For example:\n\n```\nHTTP/1.1 206 Partial Content\nDate: Wed, 15 Nov 1995 06:25:24 GMT\nLast-Modified: Wed, 15 Nov 1995 04:58:08 GMT\nContent-Range: bytes 21010-47021/47022\nContent-Length: 26012\nContent-Type: image/gif\n\n... 26012 bytes of partial image data ...\n```\n\n##### 15.3.7.2. Multiple Parts\n\nIf multiple parts are being transferred, the server generating the 206 response *MUST* generate \"multipart/byteranges\" content, as defined in Section 14.6, and a Content-Type header field containing the \"multipart/byteranges\" media type and its required boundary parameter. To avoid confusion with single-part responses, a server *MUST NOT* generate a Content-Range header field in the HTTP header section of a multiple part response (this field will be sent in each part instead).\n\nWithin 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:\n\n```\nHTTP/1.1 206 Partial Content\nDate: Wed, 15 Nov 1995 06:25:24 GMT\nLast-Modified: Wed, 15 Nov 1995 04:58:08 GMT\nContent-Length: 1741\nContent-Type: multipart/byteranges; boundary=THIS_STRING_SEPARATES\n\n--THIS_STRING_SEPARATES\nContent-Type: application/pdf\nContent-Range: bytes 500-999/8000\n\n...the first range...\n--THIS_STRING_SEPARATES\nContent-Type: application/pdf\nContent-Range: bytes 7000-7999/8000\n\n...the second range\n--THIS_STRING_SEPARATES--\n```\n\nWhen 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.\n\nA server *MUST NOT* generate a multipart response to a request for a single range, since a client that does not request multiple parts might not support multipart responses. However, a server *MAY* generate a \"multipart/byteranges\" response with only a single body part if multiple ranges were requested and only one range was found to be satisfiable or only one range remained after coalescing. A client that cannot process a \"multipart/byteranges\" response *MUST NOT* generate a request that asks for multiple ranges.\n\nA server that generates a multipart response *SHOULD* send the parts in the same order that the corresponding range-spec appeared in the received Range header field, excluding those ranges that were deemed unsatisfiable or that were coalesced into other ranges. A client that receives a multipart response *MUST* inspect the Content-Range header field present in each body part in order to determine which range is contained in that body part; a client cannot rely on receiving the same ranges that it requested, nor the same order that it requested.\n\n##### 15.3.7.3. Combining Parts\n\nA response might transfer only a subrange of a representation if the connection closed prematurely or if the request used one or more Range specifications. After several such transfers, a client might have received several ranges of the same representation. These ranges can only be safely combined if they all have in common the same strong validator (Section 8.8.1).\n\nA client that has received multiple partial responses to GET requests on a target resource *MAY* combine those responses into a larger continuous range if they share the same strong validator.\n\nIf the most recent response is an incomplete 200 (OK) response, then the header fields of that response are used for any combined response and replace those of the matching stored responses.\n\nIf the most recent response is a 206 (Partial Content) response and at least one of the matching stored responses is a 200 (OK), then the combined response header fields consist of the most recent 200 response's header fields. If all of the matching stored responses are 206 responses, then the stored response with the most recent header fields is used as the source of header fields for the combined response, except that the client *MUST* use other header fields provided in the new response, aside from Content-Range, to replace all instances of the corresponding header fields in the stored response.\n\nThe combined response content consists of the union of partial content ranges within the new response and all of the matching stored responses. If the union consists of the entire range of the representation, then the client *MUST* process the combined response as if it were a complete 200 (OK) response, including a Content-Length header field that reflects the complete length. Otherwise, the client *MUST* process the set of continuous ranges as one of the following: an incomplete 200 (OK) response if the combined response is a prefix of the representation, a single 206 (Partial Content) response containing \"multipart/byteranges\" content, or multiple 206 (Partial Content) responses, each with one continuous range that is indicated by a Content-Range header field.\n\n### 15.4. Redirection 3xx\n\nThe 3xx (Redirection) class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. There are several types of redirects:\n\n1. Redirects that indicate this resource might be available at a different URI, as provided by the Location header field, as in the status codes 301 (Moved Permanently) , 302 (Found) , 307 (Temporary Redirect) , and 308 (Permanent Redirect) .\n2. Redirection that offers a choice among matching resources capable of representing this resource, as in the 300 (Multiple Choices) status code.\n3. Redirection to a different resource, identified by the Location header field, that can represent an indirect response to the request, as in the 303 (See Other) status code.\n4. Redirection to a previously stored result, as in the 304 (Not Modified) status code.\n\nIf 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.\n\nWhen automatically following a redirected request, the user agent *SHOULD* resend the original request message with the following modifications:\n\n1. 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.\n2. Remove header fields that were automatically generated by the implementation, replacing them with updated values as appropriate to the new request. This includes: Connection-specific header fields (see Section 7.6.1),Header fields specific to the client's proxy configuration, including (but not limited to) Proxy-Authorization,Origin-specific header fields (if any), including (but not limited to) Host,Validating header fields that were added by the implementation's cache (e.g., If-None-Match, If-Modified-Since), andResource-specific header fields, including (but not limited to) Referer, Origin, Authorization, and Cookie.\n3. Consider removing header fields that were not automatically generated by the implementation (i.e., those present in the request because they were added by the calling context) where there are security implications; this includes but is not limited to Authorization and Cookie.\n4. Change the request method according to the redirecting status code's semantics, if applicable.\n5. If the request method has been changed to GET or HEAD, remove content-specific header fields, including (but not limited to) Content-Encoding, Content-Language, Content-Location, Content-Type, Content-Length, Digest, Last-Modified.\n\nA client *SHOULD* detect and intervene in cyclical redirections (i.e., \"infinite\" redirection loops).\n\n#### 15.4.1. 300 Multiple Choices\n\nThe 300 (Multiple Choices) status code indicates that the target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers. In other words, the server desires that the user agent engage in reactive negotiation to select the most appropriate representation(s) for its needs (Section 12).\n\nIf the server has a preferred choice, the server *SHOULD* generate a Location header field containing a preferred choice's URI reference. The user agent *MAY* use the Location field value for automatic redirection.\n\nFor 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.\n\nA 300 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n#### 15.4.2. 301 Moved Permanently\n\nThe 301 (Moved Permanently) status code indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. The server is suggesting that a user agent with link-editing capability can permanently replace references to the target URI with one of the new references sent by the server. However, this suggestion is usually ignored unless the user agent is actively editing references (e.g., engaged in authoring content), the connection is secured, and the origin server is a trusted authority for the content being edited.\n\nThe server *SHOULD* generate a Location header field in the response containing a preferred URI reference for the new permanent URI. The user agent *MAY* use the Location field value for automatic redirection. The server's response content usually contains a short hypertext note with a hyperlink to the new URI(s).\n\nA 301 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n#### 15.4.3. 302 Found\n\nThe 302 (Found) status code indicates that the target resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client ought to continue to use the target URI for future requests.\n\nThe server *SHOULD* generate a Location header field in the response containing a URI reference for the different URI. The user agent *MAY* use the Location field value for automatic redirection. The server's response content usually contains a short hypertext note with a hyperlink to the different URI(s).\n\n#### 15.4.4. 303 See Other\n\nThe 303 (See Other) status code indicates that the server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request. A user agent can perform a retrieval request targeting that URI (a GET or HEAD request if using HTTP), which might also be redirected, and present the eventual result as an answer to the original request. Note that the new URI in the Location header field is not considered equivalent to the target URI.\n\nThis status code is applicable to any HTTP method. It is primarily used to allow the output of a POST action to redirect the user agent to a different resource, since doing so provides the information corresponding to the POST response as a resource that can be separately identified, bookmarked, and cached.\n\nA 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.\n\nExcept for responses to a HEAD request, the representation of a 303 response ought to contain a short hypertext note with a hyperlink to the same URI reference provided in the Location header field.\n\n#### 15.4.5. 304 Not Modified\n\nThe 304 (Not Modified) status code indicates that a conditional GET or HEAD request has been received and would have resulted in a 200 (OK) response if it were not for the fact that the condition evaluated to false. In other words, there is no need for the server to transfer a representation of the target resource because the request indicates that the client, which made the request conditional, already has a valid representation; the server is therefore redirecting the client to make use of that stored representation as if it were the content of a 200 (OK) response.\n\nThe server generating a 304 response *MUST* generate any of the following header fields that would have been sent in a 200 (OK) response to the same request:\n\n- Content-Location , Date , ETag , and Vary\n- [Cache-Control](rfc9111.html#field.cache-control) and [Expires](rfc9111.html#field.expires) (see [CACHING] )\n\nSince the goal of a 304 response is to minimize information transfer when the recipient already has one or more cached representations, a sender *SHOULD NOT* generate representation metadata other than the above listed fields unless said metadata exists for the purpose of guiding cache updates (e.g., Last-Modified might be useful if the response does not have an ETag field).\n\nRequirements on a cache that receives a 304 response are defined in [Section 4.3.4](rfc9111.html#freshening.responses) of [CACHING]. If the conditional request originated with an outbound client, such as a user agent with its own cache sending a conditional GET to a shared proxy, then the proxy *SHOULD* forward the 304 response to that client.\n\nA 304 response is terminated by the end of the header section; it cannot contain content or trailers.\n\n#### 15.4.6. 305 Use Proxy\n\nThe 305 (Use Proxy) status code was defined in a previous version of this specification and is now deprecated ([Appendix B](https://www.rfc-editor.org/rfc/rfc7231.html#appendix-B) of [RFC7231]).\n\n#### 15.4.7. 306 (Unused)\n\nThe 306 status code was defined in a previous version of this specification, is no longer used, and the code is reserved.\n\n#### 15.4.8. 307 Temporary Redirect\n\nThe 307 (Temporary Redirect) status code indicates that the target resource resides temporarily under a different URI and the user agent *MUST NOT* change the request method if it performs an automatic redirection to that URI. Since the redirection can change over time, the client ought to continue using the original target URI for future requests.\n\nThe server *SHOULD* generate a Location header field in the response containing a URI reference for the different URI. The user agent *MAY* use the Location field value for automatic redirection. The server's response content usually contains a short hypertext note with a hyperlink to the different URI(s).\n\n#### 15.4.9. 308 Permanent Redirect\n\nThe 308 (Permanent Redirect) status code indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. The server is suggesting that a user agent with link-editing capability can permanently replace references to the target URI with one of the new references sent by the server. However, this suggestion is usually ignored unless the user agent is actively editing references (e.g., engaged in authoring content), the connection is secured, and the origin server is a trusted authority for the content being edited.\n\nThe server *SHOULD* generate a Location header field in the response containing a preferred URI reference for the new permanent URI. The user agent *MAY* use the Location field value for automatic redirection. The server's response content usually contains a short hypertext note with a hyperlink to the new URI(s).\n\nA 308 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n### 15.5. Client Error 4xx\n\nThe 4xx (Client Error) class of status code indicates that the client seems to have erred. Except when responding to a HEAD request, the server *SHOULD* send a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. User agents *SHOULD* display any included representation to the user.\n\n#### 15.5.1. 400 Bad Request\n\nThe 400 (Bad Request) status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).\n\n#### 15.5.2. 401 Unauthorized\n\nThe 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.\n\nIf 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.\n\n#### 15.5.3. 402 Payment Required\n\nThe 402 (Payment Required) status code is reserved for future use.\n\n#### 15.5.4. 403 Forbidden\n\nThe 403 (Forbidden) status code indicates that the server understood the request but refuses to fulfill it. A server that wishes to make public why the request has been forbidden can describe that reason in the response content (if any).\n\nIf authentication credentials were provided in the request, the server considers them insufficient to grant access. The client *SHOULD NOT* automatically repeat the request with the same credentials. The client *MAY* repeat the request with new or different credentials. However, a request might be forbidden for reasons unrelated to the credentials.\n\nAn origin server that wishes to \"hide\" the current existence of a forbidden target resource *MAY* instead respond with a status code of 404 (Not Found).\n\n#### 15.5.5. 404 Not Found\n\nThe 404 (Not Found) status code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists. A 404 status code does not indicate whether this lack of representation is temporary or permanent; the 410 (Gone) status code is preferred over 404 if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent.\n\nA 404 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n#### 15.5.6. 405 Method Not Allowed\n\nThe 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.\n\nA 405 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n#### 15.5.7. 406 Not Acceptable\n\nThe 406 (Not Acceptable) status code indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request (Section 12.1), and the server is unwilling to supply a default representation.\n\nThe server *SHOULD* generate content containing a list of available representation characteristics and corresponding resource identifiers from which the user or user agent can choose the one most appropriate. A user agent *MAY* automatically select the most appropriate choice from that list. However, this specification does not define any standard for such automatic selection, as described in Section 15.4.1.\n\n#### 15.5.8. 407 Proxy Authentication Required\n\nThe 407 (Proxy Authentication Required) status code is similar to 401 (Unauthorized), but it indicates that the client needs to authenticate itself in order to use a proxy for this request. The proxy *MUST* send a Proxy-Authenticate header field (Section 11.7.1) containing a challenge applicable to that proxy for the request. The client *MAY* repeat the request with a new or replaced Proxy-Authorization header field (Section 11.7.2).\n\n#### 15.5.9. 408 Request Timeout\n\nThe 408 (Request Timeout) status code indicates that the server did not receive a complete request message within the time that it was prepared to wait.\n\nIf the client has an outstanding request in transit, it *MAY* repeat that request. If the current connection is not usable (e.g., as it would be in HTTP/1.1 because request delimitation is lost), a new connection will be used.\n\n#### 15.5.10. 409 Conflict\n\nThe 409 (Conflict) status code indicates that the request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. The server *SHOULD* generate content that includes enough information for a user to recognize the source of the conflict.\n\nConflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the representation being PUT included changes to a resource that conflict with those made by an earlier (third-party) request, the origin server might use a 409 response to indicate that it can't complete the request. In this case, the response representation would likely contain information useful for merging the differences based on the revision history.\n\n#### 15.5.11. 410 Gone\n\nThe 410 (Gone) status code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. If the origin server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) ought to be used instead.\n\nThe 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer associated with the origin server's site. It is not necessary to mark all permanently unavailable resources as \"gone\" or to keep the mark for any length of time — that is left to the discretion of the server owner.\n\nA 410 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n#### 15.5.12. 411 Length Required\n\nThe 411 (Length Required) status code indicates that the server refuses to accept the request without a defined Content-Length (Section 8.6). The client *MAY* repeat the request if it adds a valid Content-Length header field containing the length of the request content.\n\n#### 15.5.13. 412 Precondition Failed\n\nThe 412 (Precondition Failed) status code indicates that one or more conditions given in the request header fields evaluated to false when tested on the server (Section 13). This response status code allows the client to place preconditions on the current resource state (its current representations and metadata) and, thus, prevent the request method from being applied if the target resource is in an unexpected state.\n\n#### 15.5.14. 413 Content Too Large\n\nThe 413 (Content Too Large) status code indicates that the server is refusing to process a request because the request content is larger than the server is willing or able to process. The server *MAY* terminate the request, if the protocol version in use allows it; otherwise, the server *MAY* close the connection.\n\nIf the condition is temporary, the server *SHOULD* generate a Retry-After header field to indicate that it is temporary and after what time the client *MAY* try again.\n\n#### 15.5.15. 414 URI Too Long\n\nThe 414 (URI Too Long) status code indicates that the server is refusing to service the request because the target URI is longer than the server is willing to interpret. This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long query information, when the client has descended into an infinite loop of redirection (e.g., a redirected URI prefix that points to a suffix of itself) or when the server is under attack by a client attempting to exploit potential security holes.\n\nA 414 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n#### 15.5.16. 415 Unsupported Media Type\n\nThe 415 (Unsupported Media Type) status code indicates that the origin server is refusing to service the request because the content is in a format not supported by this method on the target resource.\n\nThe format problem might be due to the request's indicated Content-Type or Content-Encoding, or as a result of inspecting the data directly.\n\nIf the problem was caused by an unsupported content coding, the Accept-Encoding response header field (Section 12.5.3) ought to be used to indicate which (if any) content codings would have been accepted in the request.\n\nOn 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.\n\n#### 15.5.17. 416 Range Not Satisfiable\n\nThe 416 (Range Not Satisfiable) status code indicates that the set of ranges in the request's Range header field (Section 14.2) has been rejected either because none of the requested ranges are satisfiable or because the client has requested an excessive number of small or overlapping ranges (a potential denial of service attack).\n\nEach 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.\n\nA server that generates a 416 response to a byte-range request *SHOULD* generate a Content-Range header field specifying the current length of the selected representation (Section 14.4).\n\nFor example:\n\n```\nHTTP/1.1 416 Range Not Satisfiable\nDate: Fri, 20 Jan 2012 15:41:54 GMT\nContent-Range: bytes */47022\n```\n\n#### 15.5.18. 417 Expectation Failed\n\nThe 417 (Expectation Failed) status code indicates that the expectation given in the request's Expect header field (Section 10.1.1) could not be met by at least one of the inbound servers.\n\n#### 15.5.19. 418 (Unused)\n\n[RFC2324] was an April 1 RFC that lampooned the various ways HTTP was abused; one such abuse was the definition of an application-specific 418 status code, which has been deployed as a joke often enough for the code to be unusable for any future use.\n\nTherefore, 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.\n\n#### 15.5.20. 421 Misdirected Request\n\nThe 421 (Misdirected Request) status code indicates that the request was directed at a server that is unable or unwilling to produce an authoritative response for the target URI. An origin server (or gateway acting on behalf of the origin server) sends 421 to reject a target URI that does not match an origin for which the server has been configured (Section 4.3.1) or does not match the connection context over which the request was received (Section 7.4).\n\nA 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].\n\nA proxy *MUST NOT* generate a 421 response.\n\n#### 15.5.21. 422 Unprocessable Content\n\nThe 422 (Unprocessable Content) status code indicates that the server understands the content type of the request content (hence a 415 (Unsupported Media Type) status code is inappropriate), and the syntax of the request content is correct, but it was unable to process the contained instructions. For example, this status code can be sent if an XML request content contains well-formed (i.e., syntactically correct), but semantically erroneous XML instructions.\n\n#### 15.5.22. 426 Upgrade Required\n\nThe 426 (Upgrade Required) status code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The server *MUST* send an Upgrade header field in a 426 response to indicate the required protocol(s) (Section 7.8).\n\nExample:\n\n```\nHTTP/1.1 426 Upgrade Required\nUpgrade: HTTP/3.0\nConnection: Upgrade\nContent-Length: 53\nContent-Type: text/plain\n\nThis service requires use of the HTTP/3.0 protocol.\n```\n\n### 15.6. Server Error 5xx\n\nThe 5xx (Server Error) class of status code indicates that the server is aware that it has erred or is incapable of performing the requested method. Except when responding to a HEAD request, the server *SHOULD* send a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. A user agent *SHOULD* display any included representation to the user. These status codes are applicable to any request method.\n\n#### 15.6.1. 500 Internal Server Error\n\nThe 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.\n\n#### 15.6.2. 501 Not Implemented\n\nThe 501 (Not Implemented) status code indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.\n\nA 501 response is heuristically cacheable; i.e., unless otherwise indicated by the method definition or explicit cache controls (see [Section 4.2.2](rfc9111.html#heuristic.freshness) of [CACHING]).\n\n#### 15.6.3. 502 Bad Gateway\n\nThe 502 (Bad Gateway) status code indicates that the server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.\n\n#### 15.6.4. 503 Service Unavailable\n\nThe 503 (Service Unavailable) status code indicates that the server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. The server *MAY* send a Retry-After header field (Section 10.2.3) to suggest an appropriate amount of time for the client to wait before retrying the request.\n\n#### 15.6.5. 504 Gateway Timeout\n\nThe 504 (Gateway Timeout) status code indicates that the server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.\n\n#### 15.6.6. 505 HTTP Version Not Supported\n\nThe 505 (HTTP Version Not Supported) status code indicates that the server does not support, or refuses to support, the major version of HTTP that was used in the request message. The server is indicating that it is unable or unwilling to complete the request using the same major version as the client, as described in Section 2.5, other than with this error message. The server *SHOULD* generate a representation for the 505 response that describes why that version is not supported and what other protocols are supported by that server.\n\n## 16. Extending HTTP\n\nHTTP defines a number of generic extension points that can be used to introduce capabilities to the protocol without introducing a new version, including methods, status codes, field names, and further extensibility points within defined fields, such as authentication schemes and cache directives (see Cache-Control extensions in [Section 5.2.3](rfc9111.html#cache.control.extensions) of [CACHING]). Because the semantics of HTTP are not versioned, these extension points are persistent; the version of the protocol in use does not affect their semantics.\n\nVersion-independent extensions are discouraged from depending on or interacting with the specific version of the protocol in use. When this is unavoidable, careful consideration needs to be given to how the extension can interoperate across versions.\n\nAdditionally, specific versions of HTTP might have their own extensibility points, such as transfer codings in HTTP/1.1 ([Section 6.1](rfc9112.html#field.transfer-encoding) of [HTTP/1.1]) and HTTP/2 SETTINGS or frame types ([HTTP/2]). These extension points are specific to the version of the protocol they occur within.\n\nVersion-specific extensions cannot override or modify the semantics of a version-independent mechanism or extension point (like a method or header field) without explicitly being allowed by that protocol element. For example, the CONNECT method (Section 9.3.6) allows this.\n\nThese guidelines assure that the protocol operates correctly and predictably, even when parts of the path implement different versions of HTTP.\n\n### 16.1. Method Extensibility\n\n#### 16.1.1. Method Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Method Registry\", maintained by IANA at [https://www.iana.org/assignments/http-methods](https://www.iana.org/assignments/http-methods), registers method names.\n\nHTTP method registrations *MUST* include the following fields:\n\n- Method Name (see Section 9 )\n- Safe (\"yes\" or \"no\", see Section 9.2.1 )\n- Idempotent (\"yes\" or \"no\", see Section 9.2.2 )\n- Pointer to specification text\n\nValues to be added to this namespace require IETF Review (see [RFC8126], [Section 4.8](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.8)).\n\n#### 16.1.2. Considerations for New Methods\n\nStandardized methods are generic; that is, they are potentially applicable to any resource, not just one particular media type, kind of resource, or application. As such, it is preferred that new methods be registered in a document that isn't specific to a single application or data format, since orthogonal technologies deserve orthogonal specification.\n\nSince message parsing (Section 6) needs to be independent of method semantics (aside from responses to HEAD), definitions of new methods cannot change the parsing algorithm or prohibit the presence of content on either the request or the response message. Definitions of new methods can specify that only a zero-length content is allowed by requiring a Content-Length header field with a value of \"0\".\n\nLikewise, 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.\n\nA new method definition needs to indicate whether it is safe (Section 9.2.1), idempotent (Section 9.2.2), cacheable (Section 9.2.3), what semantics are to be associated with the request content (if any), and what refinements the method makes to header field or status code semantics. If the new method is cacheable, its definition ought to describe how, and under what conditions, a cache can store a response and use it to satisfy a subsequent request. The new method ought to describe whether it can be made conditional (Section 13.1) and, if so, how a server responds when the condition is false. Likewise, if the new method might have some use for partial response semantics (Section 14.2), it ought to document this, too.\n\n### 16.2. Status Code Extensibility\n\n#### 16.2.1. Status Code Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Status Code Registry\", maintained by IANA at [https://www.iana.org/assignments/http-status-codes](https://www.iana.org/assignments/http-status-codes), registers [status code](rfc9112.html#status.line) numbers.\n\nA registration *MUST* include the following fields:\n\n- Status Code (3 digits)\n- Short Description\n- Pointer to specification text\n\nValues to be added to the HTTP status code namespace require IETF Review (see [RFC8126], [Section 4.8](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.8)).\n\n#### 16.2.2. Considerations for New Status Codes\n\nWhen it is necessary to express semantics for a response that are not defined by current status codes, a new status code can be registered. Status codes are generic; they are potentially applicable to any resource, not just one particular media type, kind of resource, or application of HTTP. As such, it is preferred that new status codes be registered in a document that isn't specific to a single application.\n\nNew 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.\n\nProposals 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.\n\nThe definition of a new status code ought to explain the request conditions that would cause a response containing that status code (e.g., combinations of request header fields and/or method(s)) along with any dependencies on response header fields (e.g., what fields are required, what fields can modify the semantics, and what field semantics are further refined when used with the new status code).\n\nBy default, a status code applies only to the request corresponding to the response it occurs within. If a status code applies to a larger scope of applicability — for example, all requests to the resource in question or all requests to a server — this must be explicitly specified. When doing so, it should be noted that not all clients can be expected to consistently apply a larger scope because they might not understand the new status code.\n\nThe 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.\n\nFinally, 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).\n\n### 16.3. Field Extensibility\n\nHTTP's most widely used extensibility point is the definition of new header and trailer fields.\n\nNew 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.\n\nHowever, defining a field doesn't guarantee its deployment or recognition by recipients. Most fields are designed with the expectation that a recipient can safely ignore (but forward downstream) any field not recognized. In other cases, the sender's ability to understand a given field might be indicated by its prior communication, perhaps in the protocol version or fields that it sent in prior messages, or its use of a specific media type. Likewise, direct inspection of support might be possible through an OPTIONS request or by interacting with a defined well-known URI [RFC8615] if such inspection is defined along with the field being introduced.\n\n#### 16.3.1. Field Name Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" defines the namespace for HTTP field names.\n\nAny 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.\n\nThe \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" is located at [https://www.iana.org/assignments/http-fields/](https://www.iana.org/assignments/http-fields/). Registration requests can be made by following the instructions located there or by sending an email to the \"ietf-http-wg@w3.org\" mailing list.\n\nField names are registered on the advice of a designated expert (appointed by the IESG or their delegate). Fields with the status 'permanent' are Specification Required ([RFC8126], [Section 4.6](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.6)).\n\nRegistration requests consist of the following information:\n\nField name:\n\nThe 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.\n\nStatus:\n\n\"permanent\", \"provisional\", \"deprecated\", or \"obsoleted\".\n\nSpecification document(s):\n\nReference 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.\n\nAnd optionally:\n\nComments:\n\nAdditional information, such as about reserved entries.\n\nThe expert(s) can define additional fields to be collected in the registry, in consultation with the community.\n\nStandards-defined names have a status of \"permanent\". Other names can also be registered as permanent if the expert(s) finds that they are in use, in consultation with the community. Other names should be registered as \"provisional\".\n\nProvisional entries can be removed by the expert(s) if — in consultation with the community — the expert(s) find that they are not in use. The expert(s) can change a provisional entry's status to permanent at any time.\n\nNote that names can be registered by third parties (including the expert(s)) if the expert(s) determines that an unregistered name is widely deployed and not likely to be registered in a timely manner otherwise.\n\n#### 16.3.2. Considerations for New Fields\n\nHTTP header and trailer fields are a widely used extension point for the protocol. While they can be used in an ad hoc fashion, fields that are intended for wider use need to be carefully documented to ensure interoperability.\n\nIn particular, authors of specifications defining new fields are advised to consider and, where appropriate, document the following aspects:\n\n- 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.\n- Whether the field semantics are further refined by their context, such as their use with certain request methods or status codes.\n- 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.\n- Under what conditions intermediaries are allowed to insert, delete, or modify the field's value.\n- If the field is allowable in trailers; by default, it will not be (see Section 6.5.1 ).\n- 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 ).\n- Whether the field introduces any additional security considerations, such as disclosure of privacy-related data.\n\nRequest header fields have additional considerations that need to be documented if the default behavior is not appropriate:\n\n- If it is appropriate to list the field name in a Vary response header field (e.g., when the request header field is used by an origin server's content selection algorithm; see Section 12.5.5 ).\n- If the field is intended to be stored when received in a PUT request (see Section 9.3.4 ).\n- If the field ought to be removed when automatically redirecting a request due to security concerns (see Section 15.4 ).\n\n##### 16.3.2.1. Considerations for New Field Names\n\nAuthors of specifications defining new fields are advised to choose a short but descriptive field name. Short names avoid needless data transmission; descriptive names avoid confusion and \"squatting\" on names that might have broader uses.\n\nTo that end, limited-use fields (such as a header confined to a single application or use case) are encouraged to use a name that includes that use (or an abbreviation) as a prefix; for example, if the Foo Application needs a Description field, it might use \"Foo-Desc\"; \"Description\" is too generic, and \"Foo-Description\" is needlessly long.\n\nWhile the field-name syntax is defined to allow any token character, in practice some implementations place limits on the characters they accept in field-names. To be interoperable, new field names *SHOULD* constrain themselves to alphanumeric characters, \"-\", and \".\", and *SHOULD* begin with a letter. For example, the underscore (\"_\") character can be problematic when passed through non-HTTP gateway interfaces (see Section 17.10).\n\nField names ought not be prefixed with \"X-\"; see [BCP178] for further information.\n\nOther 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.\n\n##### 16.3.2.2. Considerations for New Field Values\n\nA major task in the definition of a new HTTP field is the specification of the field value syntax: what senders should generate, and how recipients should infer semantics from what is received.\n\nAuthors 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.\n\nAuthors are advised to carefully consider how the combination of multiple field lines will impact them (see Section 5.3). Because senders might erroneously send multiple values, and both intermediaries and HTTP libraries can perform combination automatically, this applies to all field values — even when only a single value is anticipated.\n\nTherefore, authors are advised to delimit or encode values that contain commas (e.g., with the quoted-string rule of Section 5.6.4, the String data type of [RFC8941], or a field-specific encoding). This ensures that commas within field data are not confused with the commas that delimit a list value.\n\nFor 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.\n\nAuthors 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).\n\n### 16.4. Authentication Scheme Extensibility\n\n#### 16.4.1. Authentication Scheme Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Authentication Scheme Registry\" defines the namespace for the authentication schemes in challenges and credentials. It is maintained at [https://www.iana.org/assignments/http-authschemes](https://www.iana.org/assignments/http-authschemes).\n\nRegistrations *MUST* include the following fields:\n\n- Authentication Scheme Name\n- Pointer to specification text\n- Notes (optional)\n\nValues to be added to this namespace require IETF Review (see [RFC8126], [Section 4.8](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.8)).\n\n#### 16.4.2. Considerations for New Authentication Schemes\n\nThere are certain aspects of the HTTP Authentication framework that put constraints on how new authentication schemes can work:\n\n- HTTP authentication is presumed to be stateless: all of the information necessary to authenticate a request *MUST* be provided in the request, rather than be dependent on the server remembering prior requests. Authentication based on, or bound to, the underlying connection is outside the scope of this specification and inherently flawed unless steps are taken to ensure that the connection cannot be used by any party other than the authenticated user (see Section 3.3).\n- The authentication parameter \"realm\" is reserved for defining protection spaces as described in Section 11.5. New schemes *MUST NOT* use it in a way incompatible with that definition.\n- The \"token68\" notation was introduced for compatibility with existing authentication schemes and can only be used once per challenge or credential. Thus, new schemes ought to use the auth-param syntax instead, because otherwise future extensions will be impossible.\n- The parsing of challenges and credentials is defined by this specification and cannot be modified by new authentication schemes. When the auth-param syntax is used, all parameters ought to support both token and quoted-string syntax, and syntactical constraints ought to be defined on the field value after parsing (i.e., quoted-string processing). This is necessary so that recipients can use a generic parser that applies to all authentication schemes. **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.\n- Definitions of new schemes ought to define the treatment of unknown extension parameters. In general, a \"must-ignore\" rule is preferable to a \"must-understand\" rule, because otherwise it will be hard to introduce new parameters in the presence of legacy recipients. Furthermore, it's good to describe the policy for defining new parameters (such as \"update the specification\" or \"use this registry\").\n- Authentication schemes need to document whether they are usable in origin-server authentication (i.e., using WWW-Authenticate), and/or proxy authentication (i.e., using Proxy-Authenticate).\n- The credentials carried in an Authorization header field are specific to the user agent and, therefore, have the same effect on HTTP caches as the \"private\" cache response directive ([Section 5.2.2.7](rfc9111.html#cache-response-directive.private) of [CACHING]), within the scope of the request in which they appear. Therefore, new authentication schemes that choose not to carry credentials in the Authorization header field (e.g., using a newly defined header field) will need to explicitly disallow caching, by mandating the use of cache response directives (e.g., \"private\").\n- Schemes using Authentication-Info, Proxy-Authentication-Info, or any other authentication related response header field need to consider and document the related security considerations (see Section 17.16.4).\n\n### 16.5. Range Unit Extensibility\n\n#### 16.5.1. Range Unit Registry\n\nThe \"HTTP Range Unit Registry\" defines the namespace for the range unit names and refers to their corresponding specifications. It is maintained at [https://www.iana.org/assignments/http-parameters](https://www.iana.org/assignments/http-parameters).\n\nRegistration of an HTTP Range Unit *MUST* include the following fields:\n\n- Name\n- Description\n- Pointer to specification text\n\nValues to be added to this namespace require IETF Review (see [RFC8126], [Section 4.8](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.8)).\n\n#### 16.5.2. Considerations for New Range Units\n\nOther range units, such as format-specific boundaries like pages, sections, records, rows, or time, are potentially usable in HTTP for application-specific purposes, but are not commonly used in practice. Implementors of alternative range units ought to consider how they would work with content codings and general-purpose intermediaries.\n\n### 16.6. Content Coding Extensibility\n\n#### 16.6.1. Content Coding Registry\n\nThe \"HTTP Content Coding Registry\", maintained by IANA at [https://www.iana.org/assignments/http-parameters/](https://www.iana.org/assignments/http-parameters/), registers content-coding names.\n\nContent coding registrations *MUST* include the following fields:\n\n- Name\n- Description\n- Pointer to specification text\n\nNames of content codings *MUST NOT* overlap with names of transfer codings (per the \"HTTP Transfer Coding Registry\" located at [https://www.iana.org/assignments/http-parameters/](https://www.iana.org/assignments/http-parameters/)) unless the encoding transformation is identical (as is the case for the compression codings defined in Section 8.4.1).\n\nValues to be added to this namespace require IETF Review (see [Section 4.8](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.8) of [RFC8126]) and *MUST* conform to the purpose of content coding defined in Section 8.4.1.\n\n#### 16.6.2. Considerations for New Content Codings\n\nNew content codings ought to be self-descriptive whenever possible, with optional parameters discoverable within the coding format itself, rather than rely on external metadata that might be lost during transit.\n\n### 16.7. Upgrade Token Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Upgrade Token Registry\" defines the namespace for protocol-name tokens used to identify protocols in the Upgrade header field. The registry is maintained at [https://www.iana.org/assignments/http-upgrade-tokens](https://www.iana.org/assignments/http-upgrade-tokens).\n\nEach registered protocol name is associated with contact information and an optional set of specifications that details how the connection will be processed after it has been upgraded.\n\nRegistrations happen on a \"First Come First Served\" basis (see [Section 4.4](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.4) of [RFC8126]) and are subject to the following rules:\n\n1. A protocol-name token, once registered, stays registered forever.\n2. A protocol-name token is case-insensitive and registered with the preferred case to be generated by senders.\n3. The registration *MUST* name a responsible party for the registration.\n4. The registration *MUST* name a point of contact.\n5. The registration *MAY* name a set of specifications associated with that token. Such specifications need not be publicly available.\n6. The registration *SHOULD* name a set of expected \"protocol-version\" tokens associated with that token at the time of registration.\n7. The responsible party *MAY* change the registration at any time. The IANA will keep a record of all such changes, and make them available upon request.\n8. The IESG *MAY* reassign responsibility for a protocol token. This will normally only be used in the case when a responsible party cannot be contacted.\n\n## 17. Security Considerations\n\nThis section is meant to inform developers, information providers, and users of known security concerns relevant to HTTP semantics and its use for transferring information over the Internet. Considerations related to caching are discussed in [Section 7](rfc9111.html#security.considerations) of [CACHING], and considerations related to HTTP/1.1 message syntax and parsing are discussed in [Section 11](rfc9112.html#security.considerations) of [HTTP/1.1].\n\nThe list of considerations below is not exhaustive. Most security concerns related to HTTP semantics are about securing server-side applications (code behind the HTTP interface), securing user agent processing of content received via HTTP, or secure use of the Internet in general, rather than security of the protocol. The security considerations for URIs, which are fundamental to HTTP operation, are discussed in [Section 7](https://www.rfc-editor.org/rfc/rfc3986.html#section-7) of [URI]. Various organizations maintain topical information and links to current research on Web application security (e.g., [OWASP]).\n\n### 17.1. Establishing Authority\n\nHTTP relies on the notion of an authoritative response: a response that has been determined by (or at the direction of) the origin server identified within the target URI to be the most appropriate response for that request given the state of the target resource at the time of response message origination.\n\nWhen a registered name is used in the authority component, the \"http\" URI scheme (Section 4.2.1) relies on the user's local name resolution service to determine where it can find authoritative responses. This means that any attack on a user's network host table, cached names, or name resolution libraries becomes an avenue for attack on establishing authority for \"http\" URIs. Likewise, the user's choice of server for Domain Name Service (DNS), and the hierarchy of servers from which it obtains resolution results, could impact the authenticity of address mappings; DNS Security Extensions (DNSSEC, [RFC4033]) are one way to improve authenticity, as are the various mechanisms for making DNS requests over more secure transfer protocols.\n\nFurthermore, after an IP address is obtained, establishing authority for an \"http\" URI is vulnerable to attacks on Internet Protocol routing.\n\nThe \"https\" scheme (Section 4.2.2) is intended to prevent (or at least reveal) many of these potential attacks on establishing authority, provided that the negotiated connection is secured and the client properly verifies that the communicating server's identity matches the target URI's authority component (Section 4.3.4). Correctly implementing such verification can be difficult (see [Georgiev]).\n\nAuthority for a given origin server can be delegated through protocol extensions; for example, [ALTSVC]. Likewise, the set of servers for which a connection is considered authoritative can be changed with a protocol extension like [RFC8336].\n\nProviding a response from a non-authoritative source, such as a shared proxy cache, is often useful to improve performance and availability, but only to the extent that the source can be trusted or the distrusted response can be safely used.\n\nUnfortunately, communicating authority to users can be difficult. For example, phishing is an attack on the user's perception of authority, where that perception can be misled by presenting similar branding in hypertext, possibly aided by userinfo obfuscating the authority component (see Section 4.2.1). User agents can reduce the impact of phishing attacks by enabling users to easily inspect a target URI prior to making an action, by prominently distinguishing (or rejecting) userinfo when present, and by not sending stored credentials and cookies when the referring document is from an unknown or untrusted source.\n\n### 17.2. Risks of Intermediaries\n\nHTTP intermediaries are inherently situated for on-path attacks. Compromise of the systems on which the intermediaries run can result in serious security and privacy problems. Intermediaries might have access to security-related information, personal information about individual users and organizations, and proprietary information belonging to users and content providers. A compromised intermediary, or an intermediary implemented or configured without regard to security and privacy considerations, might be used in the commission of a wide range of potential attacks.\n\nIntermediaries that contain a shared cache are especially vulnerable to cache poisoning attacks, as described in [Section 7](rfc9111.html#security.considerations) of [CACHING].\n\nImplementers need to consider the privacy and security implications of their design and coding decisions, and of the configuration options they provide to operators (especially the default configuration).\n\nIntermediaries are no more trustworthy than the people and policies under which they operate; HTTP cannot solve this problem.\n\n### 17.3. Attacks Based on File and Path Names\n\nOrigin servers frequently make use of their local file system to manage the mapping from target URI to resource representations. Most file systems are not designed to protect against malicious file or path names. Therefore, an origin server needs to avoid accessing names that have a special significance to the system when mapping the target resource to files, folders, or directories.\n\nFor 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.\n\nAttacks based on such special names tend to focus on either denial-of-service (e.g., telling the server to read from a COM port) or disclosure of configuration and source files that are not meant to be served.\n\n### 17.4. Attacks Based on Command, Code, or Query Injection\n\nOrigin servers often use parameters within the URI as a means of identifying system services, selecting database entries, or choosing a data source. However, data received in a request cannot be trusted. An attacker could construct any of the request data elements (method, target URI, header fields, or content) to contain data that might be misinterpreted as a command, code, or query when passed through a command invocation, language interpreter, or database interface.\n\nFor example, SQL injection is a common attack wherein additional query language is inserted within some part of the target URI or header fields (e.g., Host, Referer, etc.). If the received data is used directly within a SELECT statement, the query language might be interpreted as a database command instead of a simple string value. This type of implementation vulnerability is extremely common, in spite of being easy to prevent.\n\nIn general, resource implementations ought to avoid use of request data in contexts that are processed or interpreted as instructions. Parameters ought to be compared to fixed strings and acted upon as a result of that comparison, rather than passed through an interface that is not prepared for untrusted data. Received data that isn't based on fixed parameters ought to be carefully filtered or encoded to avoid being misinterpreted.\n\nSimilar considerations apply to request data when it is stored and later processed, such as within log files, monitoring tools, or when included within a data format that allows embedded scripts.\n\n### 17.5. Attacks via Protocol Element Length\n\nBecause HTTP uses mostly textual, character-delimited fields, parsers are often vulnerable to attacks based on sending very long (or very slow) streams of data, particularly where an implementation is expecting a protocol element with no predefined length (Section 2.3).\n\nTo promote interoperability, specific recommendations are made for minimum size limits on fields (Section 5.4). These are minimum recommendations, chosen to be supportable even by implementations with limited resources; it is expected that most implementations will choose substantially higher limits.\n\nA server can reject a message that has a target URI that is too long (Section 15.5.15) or request content that is too large (Section 15.5.14). Additional status codes related to capacity limits have been defined by extensions to HTTP [RFC6585].\n\nRecipients 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.\n\n### 17.6. Attacks Using Shared-Dictionary Compression\n\nSome attacks on encrypted protocols use the differences in size created by dynamic compression to reveal confidential information; for example, [BREACH]. These attacks rely on creating a redundancy between attacker-controlled content and the confidential information, such that a dynamic compression algorithm using the same dictionary for both content will compress more efficiently when the attacker-controlled content matches parts of the confidential content.\n\nHTTP messages can be compressed in a number of ways, including using TLS compression, content codings, transfer codings, and other extension or version-specific mechanisms.\n\nThe most effective mitigation for this risk is to disable compression on sensitive data, or to strictly separate sensitive data from attacker-controlled data so that they cannot share the same compression dictionary. With careful design, a compression scheme can be designed in a way that is not considered exploitable in limited use cases, such as HPACK ([HPACK]).\n\n### 17.7. Disclosure of Personal Information\n\nClients are often privy to large amounts of personal information, including both information provided by the user to interact with resources (e.g., the user's name, location, mail address, passwords, encryption keys, etc.) and information about the user's browsing activity over time (e.g., history, bookmarks, etc.). Implementations need to prevent unintentional disclosure of personal information.\n\n### 17.8. Privacy of Server Log Information\n\nA server is in the position to save personal data about a user's requests over time, which might identify their reading patterns or subjects of interest. In particular, log information gathered at an intermediary often contains a history of user agent interaction, across a multitude of sites, that can be traced to individual users.\n\nHTTP log information is confidential in nature; its handling is often constrained by laws and regulations. Log information needs to be securely stored and appropriate guidelines followed for its analysis. Anonymization of personal information within individual entries helps, but it is generally not sufficient to prevent real log traces from being re-identified based on correlation with other access characteristics. As such, access traces that are keyed to a specific client are unsafe to publish even if the key is pseudonymous.\n\nTo minimize the risk of theft or accidental publication, log information ought to be purged of personally identifiable information, including user identifiers, IP addresses, and user-provided query parameters, as soon as that information is no longer necessary to support operational needs for security, auditing, or fraud control.\n\n### 17.9. Disclosure of Sensitive Information in URIs\n\nURIs are intended to be shared, not secured, even when they identify secure resources. URIs are often shown on displays, added to templates when a page is printed, and stored in a variety of unprotected bookmark lists. Many servers, proxies, and user agents log or display the target URI in places where it might be visible to third parties. It is therefore unwise to include information within a URI that is sensitive, personally identifiable, or a risk to disclose.\n\nWhen an application uses client-side mechanisms to construct a target URI out of user-provided information, such as the query fields of a form using GET, potentially sensitive data might be provided that would not be appropriate for disclosure within a URI. POST is often preferred in such cases because it usually doesn't construct a URI; instead, POST of a form transmits the potentially sensitive data in the request content. However, this hinders caching and uses an unsafe method for what would otherwise be a safe request. Alternative workarounds include transforming the user-provided data prior to constructing the URI or filtering the data to only include common values that are not sensitive. Likewise, redirecting the result of a query to a different (server-generated) URI can remove potentially sensitive data from later links and provide a cacheable response for later reuse.\n\nSince 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.\n\n### 17.10. Application Handling of Field Names\n\nServers often use non-HTTP gateway interfaces and frameworks to process a received request and produce content for the response. For historical reasons, such interfaces often pass received field names as external variable names, using a name mapping suitable for environment variables.\n\nFor example, the Common Gateway Interface (CGI) mapping of protocol-specific meta-variables, defined by [Section 4.1.18](https://www.rfc-editor.org/rfc/rfc3875.html#section-4.1.18) of [RFC3875], is applied to received header fields that do not correspond to one of CGI's standard variables; the mapping consists of prepending \"HTTP_\" to each name and changing all instances of hyphen (\"-\") to underscore (\"_\"). This same mapping has been inherited by many other application frameworks in order to simplify moving applications from one platform to the next.\n\nIn CGI, a received Content-Length field would be passed as the meta-variable \"CONTENT_LENGTH\" with a string value matching the received field's value. In contrast, a received \"Content_Length\" header field would be passed as the protocol-specific meta-variable \"HTTP_CONTENT_LENGTH\", which might lead to some confusion if an application mistakenly reads the protocol-specific meta-variable instead of the default one. (This historical practice is why Section 16.3.2.1 discourages the creation of new field names that contain an underscore.)\n\nUnfortunately, mapping field names to different interface names can lead to security vulnerabilities if the mapping is incomplete or ambiguous. For example, if an attacker were to send a field named \"Transfer_Encoding\", a naive interface might map that to the same variable name as the \"Transfer-Encoding\" field, resulting in a potential request smuggling vulnerability ([Section 11.2](rfc9112.html#request.smuggling) of [HTTP/1.1]).\n\nTo mitigate the associated risks, implementations that perform such mappings are advised to make the mapping unambiguous and complete for the full range of potential octets received as a name (including those that are discouraged or forbidden by the HTTP grammar). For example, a field with an unusual name character might result in the request being blocked, the specific field being removed, or the name being passed with a different prefix to distinguish it from other fields.\n\n### 17.11. Disclosure of Fragment after Redirects\n\nAlthough fragment identifiers used within URI references are not sent in requests, implementers ought to be aware that they will be visible to the user agent and any extensions or scripts running as a result of the response. In particular, when a redirect occurs and the original request's fragment identifier is inherited by the new reference in Location (Section 10.2.2), this might have the effect of disclosing one site's fragment to another site. If the first site uses personal information in fragments, it ought to ensure that redirects to other sites include a (possibly empty) fragment component in order to block that inheritance.\n\n### 17.12. Disclosure of Product Information\n\nThe User-Agent (Section 10.1.5), Via (Section 7.6.3), and Server (Section 10.2.4) header fields often reveal information about the respective sender's software systems. In theory, this can make it easier for an attacker to exploit known security holes; in practice, attackers tend to try all potential holes regardless of the apparent software versions being used.\n\nProxies that serve as a portal through a network firewall ought to take special precautions regarding the transfer of header information that might identify hosts behind the firewall. The Via header field allows intermediaries to replace sensitive machine names with pseudonyms.\n\n### 17.13. Browser Fingerprinting\n\nBrowser fingerprinting is a set of techniques for identifying a specific user agent over time through its unique set of characteristics. These characteristics might include information related to how it uses the underlying transport protocol, feature capabilities, and scripting environment, though of particular interest here is the set of unique characteristics that might be communicated via HTTP. Fingerprinting is considered a privacy concern because it enables tracking of a user agent's behavior over time ([Bujlow]) without the corresponding controls that the user might have over other forms of data collection (e.g., cookies). Many general-purpose user agents (i.e., Web browsers) have taken steps to reduce their fingerprints.\n\nThere are a number of request header fields that might reveal information to servers that is sufficiently unique to enable fingerprinting. The From header field is the most obvious, though it is expected that From will only be sent when self-identification is desired by the user. Likewise, Cookie header fields are deliberately designed to enable re-identification, so fingerprinting concerns only apply to situations where cookies are disabled or restricted by the user agent's configuration.\n\nThe User-Agent header field might contain enough information to uniquely identify a specific device, usually when combined with other characteristics, particularly if the user agent sends excessive details about the user's system or extensions. However, the source of unique information that is least expected by users is proactive negotiation (Section 12.1), including the Accept, Accept-Charset, Accept-Encoding, and Accept-Language header fields.\n\nIn addition to the fingerprinting concern, detailed use of the Accept-Language header field can reveal information the user might consider to be of a private nature. For example, understanding a given language set might be strongly correlated to membership in a particular ethnic group. An approach that limits such loss of privacy would be for a user agent to omit the sending of Accept-Language except for sites that have been explicitly permitted, perhaps via interaction after detecting a Vary header field that indicates language negotiation might be useful.\n\nIn environments where proxies are used to enhance privacy, user agents ought to be conservative in sending proactive negotiation header fields. General-purpose user agents that provide a high degree of header field configurability ought to inform users about the loss of privacy that might result if too much detail is provided. As an extreme privacy measure, proxies could filter the proactive negotiation header fields in relayed requests.\n\n### 17.14. Validator Retention\n\nThe validators defined by this specification are not intended to ensure the validity of a representation, guard against malicious changes, or detect on-path attacks. At best, they enable more efficient cache updates and optimistic concurrent writes when all participants are behaving nicely. At worst, the conditions will fail and the client will receive a response that is no more harmful than an HTTP exchange without conditional requests.\n\nAn 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.\n\n### 17.15. Denial-of-Service Attacks Using Range\n\nUnconstrained multiple range requests are susceptible to denial-of-service attacks because the effort required to request many overlapping ranges of the same data is tiny compared to the time, memory, and bandwidth consumed by attempting to serve the requested data in many parts. Servers ought to ignore, coalesce, or reject egregious range requests, such as requests for more than two overlapping ranges or for many small ranges in a single set, particularly when the ranges are requested out of order for no apparent reason. Multipart range requests are not designed to support random access.\n\n### 17.16. Authentication Considerations\n\nEverything about the topic of HTTP authentication is a security consideration, so the list of considerations below is not exhaustive. Furthermore, it is limited to security considerations regarding the authentication framework, in general, rather than discussing all of the potential considerations for specific authentication schemes (which ought to be documented in the specifications that define those schemes). Various organizations maintain topical information and links to current research on Web application security (e.g., [OWASP]), including common pitfalls for implementing and using the authentication schemes found in practice.\n\n#### 17.16.1. Confidentiality of Credentials\n\nThe HTTP authentication framework does not define a single mechanism for maintaining the confidentiality of credentials; instead, each authentication scheme defines how the credentials are encoded prior to transmission. While this provides flexibility for the development of future authentication schemes, it is inadequate for the protection of existing schemes that provide no confidentiality on their own, or that do not sufficiently protect against replay attacks. Furthermore, if the server expects credentials that are specific to each individual user, the exchange of those credentials will have the effect of identifying that user even if the content within credentials remains confidential.\n\nHTTP depends on the security properties of the underlying transport- or session-level connection to provide confidential transmission of fields. Services that depend on individual user authentication require a secured connection prior to exchanging credentials (Section 4.2.2).\n\n#### 17.16.2. Credentials and Idle Clients\n\nExisting HTTP clients and user agents typically retain authentication information indefinitely. HTTP does not provide a mechanism for the origin server to direct clients to discard these cached credentials, since the protocol has no awareness of how credentials are obtained or managed by the user agent. The mechanisms for expiring or revoking credentials can be specified as part of an authentication scheme definition.\n\nCircumstances under which credential caching can interfere with the application's security model include but are not limited to:\n\n- 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.\n- 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.\n\nUser agents that cache credentials are encouraged to provide a readily accessible mechanism for discarding cached credentials under user control.\n\n#### 17.16.3. Protection Spaces\n\nAuthentication schemes that solely rely on the \"realm\" mechanism for establishing a protection space will expose credentials to all resources on an origin server. Clients that have successfully made authenticated requests with a resource can use the same authentication credentials for other resources on the same origin server. This makes it possible for a different resource to harvest authentication credentials for other resources.\n\nThis is of particular concern when an origin server hosts resources for multiple parties under the same origin (Section 11.5). Possible mitigation strategies include restricting direct access to authentication credentials (i.e., not making the content of the Authorization request header field available), and separating protection spaces by using a different host name (or port number) for each party.\n\n#### 17.16.4. Additional Response Fields\n\nAdding information to responses that are sent over an unencrypted channel can affect security and privacy. The presence of the Authentication-Info and Proxy-Authentication-Info header fields alone indicates that HTTP authentication is in use. Additional information could be exposed by the contents of the authentication-scheme specific parameters; this will have to be considered in the definitions of these schemes.\n\n## 18. IANA Considerations\n\nThe change controller for the following registrations is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n### 18.1. URI Scheme Registration\n\nIANA has updated the \"Uniform Resource Identifier (URI) Schemes\" registry [BCP35] at [https://www.iana.org/assignments/uri-schemes/](https://www.iana.org/assignments/uri-schemes/) with the permanent schemes listed in Table 2 in Section 4.2.\n\n### 18.2. Method Registration\n\nIANA has updated the \"Hypertext Transfer Protocol (HTTP) Method Registry\" at [https://www.iana.org/assignments/http-methods](https://www.iana.org/assignments/http-methods) with the registration procedure of Section 16.1.1 and the method names summarized in the following table.\n\n| Method | Safe | Idempotent | Section |\n| --- | --- | --- | --- |\n| CONNECT | no | no | 9.3.6 |\n| DELETE | no | yes | 9.3.5 |\n| GET | yes | yes | 9.3.1 |\n| HEAD | yes | yes | 9.3.2 |\n| OPTIONS | yes | yes | 9.3.7 |\n| POST | no | no | 9.3.3 |\n| PUT | no | yes | 9.3.4 |\n| TRACE | yes | yes | 9.3.8 |\n| * | no | no | 18.2 |\n\nThe 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\").\n\n### 18.3. Status Code Registration\n\nIANA has updated the \"Hypertext Transfer Protocol (HTTP) Status Code Registry\" at [https://www.iana.org/assignments/http-status-codes](https://www.iana.org/assignments/http-status-codes) with the registration procedure of Section 16.2.1 and the status code values summarized in the following table.\n\n| Value | Description | Section |\n| --- | --- | --- |\n| 100 | Continue | 15.2.1 |\n| 101 | Switching Protocols | 15.2.2 |\n| 200 | OK | 15.3.1 |\n| 201 | Created | 15.3.2 |\n| 202 | Accepted | 15.3.3 |\n| 203 | Non-Authoritative Information | 15.3.4 |\n| 204 | No Content | 15.3.5 |\n| 205 | Reset Content | 15.3.6 |\n| 206 | Partial Content | 15.3.7 |\n| 300 | Multiple Choices | 15.4.1 |\n| 301 | Moved Permanently | 15.4.2 |\n| 302 | Found | 15.4.3 |\n| 303 | See Other | 15.4.4 |\n| 304 | Not Modified | 15.4.5 |\n| 305 | Use Proxy | 15.4.6 |\n| 306 | (Unused) | 15.4.7 |\n| 307 | Temporary Redirect | 15.4.8 |\n| 308 | Permanent Redirect | 15.4.9 |\n| 400 | Bad Request | 15.5.1 |\n| 401 | Unauthorized | 15.5.2 |\n| 402 | Payment Required | 15.5.3 |\n| 403 | Forbidden | 15.5.4 |\n| 404 | Not Found | 15.5.5 |\n| 405 | Method Not Allowed | 15.5.6 |\n| 406 | Not Acceptable | 15.5.7 |\n| 407 | Proxy Authentication Required | 15.5.8 |\n| 408 | Request Timeout | 15.5.9 |\n| 409 | Conflict | 15.5.10 |\n| 410 | Gone | 15.5.11 |\n| 411 | Length Required | 15.5.12 |\n| 412 | Precondition Failed | 15.5.13 |\n| 413 | Content Too Large | 15.5.14 |\n| 414 | URI Too Long | 15.5.15 |\n| 415 | Unsupported Media Type | 15.5.16 |\n| 416 | Range Not Satisfiable | 15.5.17 |\n| 417 | Expectation Failed | 15.5.18 |\n| 418 | (Unused) | 15.5.19 |\n| 421 | Misdirected Request | 15.5.20 |\n| 422 | Unprocessable Content | 15.5.21 |\n| 426 | Upgrade Required | 15.5.22 |\n| 500 | Internal Server Error | 15.6.1 |\n| 501 | Not Implemented | 15.6.2 |\n| 502 | Bad Gateway | 15.6.3 |\n| 503 | Service Unavailable | 15.6.4 |\n| 504 | Gateway Timeout | 15.6.5 |\n| 505 | HTTP Version Not Supported | 15.6.6 |\n\n### 18.4. Field Name Registration\n\nThis specification updates the HTTP-related aspects of the existing registration procedures for message header fields defined in [RFC3864]. It replaces the old procedures as they relate to HTTP by defining a new registration procedure and moving HTTP field definitions into a separate registry.\n\nIANA has created a new registry titled \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" as outlined in Section 16.3.1.\n\nIANA 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/](https://www.iana.org/assignments/message-headers/)) with the protocol 'http' to this registry and has applied the following changes:\n\n1. The 'Applicable Protocol' field has been omitted.\n2. Entries that had a status of 'standard', 'experimental', 'reserved', or 'informational' have been made to have a status of 'permanent'.\n3. Provisional entries without a status have been made to have a status of 'provisional'.\n4. Permanent entries without a status (after confirmation that the registration document did not define one) have been made to have a status of 'provisional'. The expert(s) can choose to update the entries' status if there is evidence that another is more appropriate.\n\nIANA 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:\n\nIANA has updated the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" with the field names listed in the following table.\n\n| Field Name | Status | Section | Comments |\n| --- | --- | --- | --- |\n| Accept | permanent | 12.5.1 | |\n| Accept-Charset | deprecated | 12.5.2 | |\n| Accept-Encoding | permanent | 12.5.3 | |\n| Accept-Language | permanent | 12.5.4 | |\n| Accept-Ranges | permanent | 14.3 | |\n| Allow | permanent | 10.2.1 | |\n| Authentication-Info | permanent | 11.6.3 | |\n| Authorization | permanent | 11.6.2 | |\n| Connection | permanent | 7.6.1 | |\n| Content-Encoding | permanent | 8.4 | |\n| Content-Language | permanent | 8.5 | |\n| Content-Length | permanent | 8.6 | |\n| Content-Location | permanent | 8.7 | |\n| Content-Range | permanent | 14.4 | |\n| Content-Type | permanent | 8.3 | |\n| Date | permanent | 6.6.1 | |\n| ETag | permanent | 8.8.3 | |\n| Expect | permanent | 10.1.1 | |\n| From | permanent | 10.1.2 | |\n| Host | permanent | 7.2 | |\n| If-Match | permanent | 13.1.1 | |\n| If-Modified-Since | permanent | 13.1.3 | |\n| If-None-Match | permanent | 13.1.2 | |\n| If-Range | permanent | 13.1.5 | |\n| If-Unmodified-Since | permanent | 13.1.4 | |\n| Last-Modified | permanent | 8.8.2 | |\n| Location | permanent | 10.2.2 | |\n| Max-Forwards | permanent | 7.6.2 | |\n| Proxy-Authenticate | permanent | 11.7.1 | |\n| Proxy-Authentication-Info | permanent | 11.7.3 | |\n| Proxy-Authorization | permanent | 11.7.2 | |\n| Range | permanent | 14.2 | |\n| Referer | permanent | 10.1.3 | |\n| Retry-After | permanent | 10.2.3 | |\n| Server | permanent | 10.2.4 | |\n| TE | permanent | 10.1.4 | |\n| Trailer | permanent | 6.6.2 | |\n| Upgrade | permanent | 7.8 | |\n| User-Agent | permanent | 10.1.5 | |\n| Vary | permanent | 12.5.5 | |\n| Via | permanent | 7.6.3 | |\n| WWW-Authenticate | permanent | 11.6.1 | |\n| * | permanent | 12.5.5 | (reserved) |\n\nThe 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).\n\nIANA has updated the \"Content-MD5\" entry in the new registry to have a status of 'obsoleted' with references to [Section 14.15](https://www.rfc-editor.org/rfc/rfc2616.html#section-14.15) of [RFC2616] (for the definition of the header field) and [Appendix B](https://www.rfc-editor.org/rfc/rfc7231.html#appendix-B) of [RFC7231] (which removed the field definition from the updated specification).\n\n### 18.5. Authentication Scheme Registration\n\nIANA has updated the \"Hypertext Transfer Protocol (HTTP) Authentication Scheme Registry\" at [https://www.iana.org/assignments/http-authschemes](https://www.iana.org/assignments/http-authschemes) with the registration procedure of Section 16.4.1. No authentication schemes are defined in this document.\n\n### 18.6. Content Coding Registration\n\nIANA has updated the \"HTTP Content Coding Registry\" at [https://www.iana.org/assignments/http-parameters/](https://www.iana.org/assignments/http-parameters/) with the registration procedure of Section 16.6.1 and the content coding names summarized in the table below.\n\n| Name | Description | Section |\n| --- | --- | --- |\n| compress | UNIX \"compress\" data format [Welch] | 8.4.1.1 |\n| deflate | \"deflate\" compressed data ([RFC1951]) inside the \"zlib\" data format ([RFC1950]) | 8.4.1.2 |\n| gzip | GZIP file format [RFC1952] | 8.4.1.3 |\n| identity | Reserved | 12.5.3 |\n| x-compress | Deprecated (alias for compress) | 8.4.1.1 |\n| x-gzip | Deprecated (alias for gzip) | 8.4.1.3 |\n\n### 18.7. Range Unit Registration\n\nIANA has updated the \"HTTP Range Unit Registry\" at [https://www.iana.org/assignments/http-parameters/](https://www.iana.org/assignments/http-parameters/) with the registration procedure of Section 16.5.1 and the range unit names summarized in the table below.\n\n| Range Unit Name | Description | Section |\n| --- | --- | --- |\n| bytes | a range of octets | 14.1.2 |\n| none | reserved as keyword to indicate range requests are not supported | 14.3 |\n\n### 18.8. Media Type Registration\n\nIANA has updated the \"Media Types\" registry at [https://www.iana.org/assignments/media-types](https://www.iana.org/assignments/media-types) with the registration information in Section 14.6 for the media type \"multipart/byteranges\".\n\nIANA has updated the registry note about \"q\" parameters with a link to Section 12.5.1 of this document.\n\n### 18.9. Port Registration\n\nIANA has updated the \"Service Name and Transport Protocol Port Number Registry\" at [https://www.iana.org/assignments/service-names-port-numbers/](https://www.iana.org/assignments/service-names-port-numbers/) for the services on ports 80 and 443 that use UDP or TCP to:\n\n1. use this document as \"Reference\", and\n2. when currently unspecified, set \"Assignee\" to \"IESG\" and \"Contact\" to \"IETF_Chair\".\n\n### 18.10. Upgrade Token Registration\n\nIANA has updated the \"Hypertext Transfer Protocol (HTTP) Upgrade Token Registry\" at [https://www.iana.org/assignments/http-upgrade-tokens](https://www.iana.org/assignments/http-upgrade-tokens) with the registration procedure described in Section 16.7 and the upgrade token names summarized in the following table.\n\n| Name | Description | Expected Version Tokens | Section |\n| --- | --- | --- | --- |\n| HTTP | Hypertext Transfer Protocol | any DIGIT.DIGIT (e.g., \"2.0\") | 2.5 |\n\n## 19. References\n\n### 19.1. Normative References\n\n[CACHING]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html)”, [STD 98](https://www.rfc-editor.org/info/std98), RFC 9111, [DOI 10.17487/RFC9111](https://dx.doi.org/10.17487/RFC9111), June 2022.\n\n[RFC1950]\n\nDeutsch, P. and J-L. Gailly, “[ZLIB Compressed Data Format Specification version 3.3](https://www.rfc-editor.org/rfc/rfc1950.html)”, RFC 1950, [DOI 10.17487/RFC1950](https://dx.doi.org/10.17487/RFC1950), May 1996, <[https://www.rfc-editor.org/info/rfc1950](https://www.rfc-editor.org/info/rfc1950)>.\n\n[RFC1951]\n\nDeutsch, P., “[DEFLATE Compressed Data Format Specification version 1.3](https://www.rfc-editor.org/rfc/rfc1951.html)”, RFC 1951, [DOI 10.17487/RFC1951](https://dx.doi.org/10.17487/RFC1951), May 1996, <[https://www.rfc-editor.org/info/rfc1951](https://www.rfc-editor.org/info/rfc1951)>.\n\n[RFC1952]\n\nDeutsch, P., “[GZIP file format specification version 4.3](https://www.rfc-editor.org/rfc/rfc1952.html)”, RFC 1952, [DOI 10.17487/RFC1952](https://dx.doi.org/10.17487/RFC1952), May 1996, <[https://www.rfc-editor.org/info/rfc1952](https://www.rfc-editor.org/info/rfc1952)>.\n\n[RFC2046]\n\nFreed, N. and N. Borenstein, “[Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types](https://www.rfc-editor.org/rfc/rfc2046.html)”, RFC 2046, [DOI 10.17487/RFC2046](https://dx.doi.org/10.17487/RFC2046), November 1996, <[https://www.rfc-editor.org/info/rfc2046](https://www.rfc-editor.org/info/rfc2046)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC4647]\n\nPhillips, A., Ed. and M. Davis, Ed., “[Matching of Language Tags](https://www.rfc-editor.org/rfc/rfc4647.html)”, [BCP 47](https://www.rfc-editor.org/info/bcp47), RFC 4647, [DOI 10.17487/RFC4647](https://dx.doi.org/10.17487/RFC4647), September 2006, <[https://www.rfc-editor.org/info/rfc4647](https://www.rfc-editor.org/info/rfc4647)>.\n\n[RFC4648]\n\nJosefsson, S., “[The Base16, Base32, and Base64 Data Encodings](https://www.rfc-editor.org/rfc/rfc4648.html)”, RFC 4648, [DOI 10.17487/RFC4648](https://dx.doi.org/10.17487/RFC4648), October 2006, <[https://www.rfc-editor.org/info/rfc4648](https://www.rfc-editor.org/info/rfc4648)>.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC5280]\n\nCooper, 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](https://www.rfc-editor.org/rfc/rfc5280.html)”, RFC 5280, [DOI 10.17487/RFC5280](https://dx.doi.org/10.17487/RFC5280), May 2008, <[https://www.rfc-editor.org/info/rfc5280](https://www.rfc-editor.org/info/rfc5280)>.\n\n[RFC5322]\n\nResnick, P., Ed., “[Internet Message Format](https://www.rfc-editor.org/rfc/rfc5322.html)”, RFC 5322, [DOI 10.17487/RFC5322](https://dx.doi.org/10.17487/RFC5322), October 2008, <[https://www.rfc-editor.org/info/rfc5322](https://www.rfc-editor.org/info/rfc5322)>.\n\n[RFC5646]\n\nPhillips, A., Ed. and M. Davis, Ed., “[Tags for Identifying Languages](https://www.rfc-editor.org/rfc/rfc5646.html)”, [BCP 47](https://www.rfc-editor.org/info/bcp47), RFC 5646, [DOI 10.17487/RFC5646](https://dx.doi.org/10.17487/RFC5646), September 2009, <[https://www.rfc-editor.org/info/rfc5646](https://www.rfc-editor.org/info/rfc5646)>.\n\n[RFC6125]\n\nSaint-Andre, P. and J. Hodges, “[Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)](https://www.rfc-editor.org/rfc/rfc6125.html)”, RFC 6125, [DOI 10.17487/RFC6125](https://dx.doi.org/10.17487/RFC6125), March 2011, <[https://www.rfc-editor.org/info/rfc6125](https://www.rfc-editor.org/info/rfc6125)>.\n\n[RFC6365]\n\nHoffman, P. and J. Klensin, “[Terminology Used in Internationalization in the IETF](https://www.rfc-editor.org/rfc/rfc6365.html)”, [BCP 166](https://www.rfc-editor.org/info/bcp166), RFC 6365, [DOI 10.17487/RFC6365](https://dx.doi.org/10.17487/RFC6365), September 2011, <[https://www.rfc-editor.org/info/rfc6365](https://www.rfc-editor.org/info/rfc6365)>.\n\n[RFC7405]\n\nKyzivat, P., “[Case-Sensitive String Support in ABNF](https://www.rfc-editor.org/rfc/rfc7405.html)”, RFC 7405, [DOI 10.17487/RFC7405](https://dx.doi.org/10.17487/RFC7405), December 2014, <[https://www.rfc-editor.org/info/rfc7405](https://www.rfc-editor.org/info/rfc7405)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[TCP]\n\nPostel, J., “[Transmission Control Protocol](https://www.rfc-editor.org/rfc/rfc793.html)”, [STD 7](https://www.rfc-editor.org/info/std7), RFC 793, [DOI 10.17487/RFC0793](https://dx.doi.org/10.17487/RFC0793), September 1981, <[https://www.rfc-editor.org/info/rfc793](https://www.rfc-editor.org/info/rfc793)>.\n\n[TLS13]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n[URI]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[https://www.rfc-editor.org/info/rfc3986](https://www.rfc-editor.org/info/rfc3986)>.\n\n[USASCII]\n\nAmerican National Standards Institute, “Coded Character Set -- 7-bit American Standard Code for Information Interchange”, ANSI X3.4, 1986.\n\n[Welch]\n\nWelch, T., “[A Technique for High-Performance Data Compression](https://ieeexplore.ieee.org/document/1659158/)”, IEEE Computer 17(6), [DOI 10.1109/MC.1984.1659158](https://dx.doi.org/10.1109/MC.1984.1659158), June 1984, <[https://ieeexplore.ieee.org/document/1659158/](https://ieeexplore.ieee.org/document/1659158/)>.\n\n### 19.2. Informative References\n\n[ALTSVC]\n\nNottingham, M., McManus, P., and J. Reschke, “[HTTP Alternative Services](https://www.rfc-editor.org/rfc/rfc7838.html)”, RFC 7838, [DOI 10.17487/RFC7838](https://dx.doi.org/10.17487/RFC7838), April 2016, <[https://www.rfc-editor.org/info/rfc7838](https://www.rfc-editor.org/info/rfc7838)>.\n\n[BCP13]\n\nFreed, N. and J. Klensin, “[Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures](https://www.rfc-editor.org/rfc/rfc4289.html)”, [BCP 13](https://www.rfc-editor.org/info/bcp13), RFC 4289, [DOI 10.17487/RFC4289](https://dx.doi.org/10.17487/RFC4289), December 2005.\n\nFreed, N., Klensin, J., and T. Hansen, “[Media Type Specifications and Registration Procedures](https://www.rfc-editor.org/rfc/rfc6838.html)”, [BCP 13](https://www.rfc-editor.org/info/bcp13), RFC 6838, [DOI 10.17487/RFC6838](https://dx.doi.org/10.17487/RFC6838), January 2013.\n\n<[https://www.rfc-editor.org/info/bcp13](https://www.rfc-editor.org/info/bcp13)>\n\n[BCP178]\n\nSaint-Andre, P., Crocker, D., and M. Nottingham, “[Deprecating the \"X-\" Prefix and Similar Constructs in Application Protocols](https://www.rfc-editor.org/rfc/rfc6648.html)”, [BCP 178](https://www.rfc-editor.org/info/bcp178), RFC 6648, [DOI 10.17487/RFC6648](https://dx.doi.org/10.17487/RFC6648), June 2012.\n\n<[https://www.rfc-editor.org/info/bcp178](https://www.rfc-editor.org/info/bcp178)>\n\n[BCP35]\n\nThaler, D., Ed., Hansen, T., and T. Hardie, “[Guidelines and Registration Procedures for URI Schemes](https://www.rfc-editor.org/rfc/rfc7595.html)”, [BCP 35](https://www.rfc-editor.org/info/bcp35), RFC 7595, [DOI 10.17487/RFC7595](https://dx.doi.org/10.17487/RFC7595), June 2015.\n\n<[https://www.rfc-editor.org/info/bcp35](https://www.rfc-editor.org/info/bcp35)>\n\n[BREACH]\n\nGluck, Y., Harris, N., and A. Prado, “[BREACH: Reviving the CRIME Attack](http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf)”, July 2013, <[http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf](http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf)>.\n\n[Bujlow]\n\nBujlow, 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](https://dx.doi.org/10.1109/JPROC.2016.2637878), In Proceedings of the IEEE 105(8), August 2017.\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, [DOI 10.17487/RFC6265](https://dx.doi.org/10.17487/RFC6265), April 2011, <[https://www.rfc-editor.org/info/rfc6265](https://www.rfc-editor.org/info/rfc6265)>.\n\n[Err1912]\n\nRFC Errata, [Erratum ID 1912](https://www.rfc-editor.org/errata/eid1912), RFC 2978, <[https://www.rfc-editor.org/errata/eid1912](https://www.rfc-editor.org/errata/eid1912)>.\n\n[Err5433]\n\nRFC Errata, [Erratum ID 5433](https://www.rfc-editor.org/errata/eid5433), RFC 2978, <[https://www.rfc-editor.org/errata/eid5433](https://www.rfc-editor.org/errata/eid5433)>.\n\n[Georgiev]\n\nGeorgiev, 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](https://dx.doi.org/10.1145/2382196.2382204), In Proceedings of the 2012 ACM Conference on Computer and Communications Security (CCS '12), pp. 38-49, October 2012.\n\n[HPACK]\n\nPeon, R. and H. Ruellan, “[HPACK: Header Compression for HTTP/2](https://www.rfc-editor.org/rfc/rfc7541.html)”, RFC 7541, [DOI 10.17487/RFC7541](https://dx.doi.org/10.17487/RFC7541), May 2015, <[https://www.rfc-editor.org/info/rfc7541](https://www.rfc-editor.org/info/rfc7541)>.\n\n[HTTP/1.0]\n\nBerners-Lee, T., Fielding, R., and H. Frystyk, “[Hypertext Transfer Protocol -- HTTP/1.0](https://www.rfc-editor.org/rfc/rfc1945.html)”, RFC 1945, [DOI 10.17487/RFC1945](https://dx.doi.org/10.17487/RFC1945), May 1996, <[https://www.rfc-editor.org/info/rfc1945](https://www.rfc-editor.org/info/rfc1945)>.\n\n[HTTP/1.1]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html)”, [STD 99](https://www.rfc-editor.org/info/std99), RFC 9112, [DOI 10.17487/RFC9112](https://dx.doi.org/10.17487/RFC9112), June 2022.\n\n[HTTP/2]\n\nThomson, M., Ed. and C. Benfield, Ed., “[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html)”, RFC 9113, [DOI 10.17487/RFC9113](https://dx.doi.org/10.17487/RFC9113), June 2022, <[https://www.rfc-editor.org/info/rfc9113](https://www.rfc-editor.org/info/rfc9113)>.\n\n[HTTP/3]\n\nBishop, M., Ed., “[HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html)”, RFC 9114, [DOI 10.17487/RFC9114](https://dx.doi.org/10.17487/RFC9114), June 2022, <[https://www.rfc-editor.org/info/rfc9114](https://www.rfc-editor.org/info/rfc9114)>.\n\n[ISO-8859-1]\n\nInternational Organization for Standardization, “Information technology -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1”, ISO/IEC 8859-1:1998, 1998.\n\n[Kri2001]\n\nKristol, D., “[HTTP Cookies: Standards, Privacy, and Politics](http://arxiv.org/abs/cs.SE/0105018)”, ACM Transactions on Internet Technology 1(2), November 2001, <[http://arxiv.org/abs/cs.SE/0105018](http://arxiv.org/abs/cs.SE/0105018)>.\n\n[OWASP]\n\n[The Open Web Application Security Project](https://www.owasp.org/), <[https://www.owasp.org/](https://www.owasp.org/)>.\n\n[REST]\n\nFielding, R., “[Architectural Styles and the Design of Network-based Software Architectures](https://roy.gbiv.com/pubs/dissertation/top.htm)”, Doctoral Dissertation, University of California, Irvine, September 2000, <[https://roy.gbiv.com/pubs/dissertation/top.htm](https://roy.gbiv.com/pubs/dissertation/top.htm)>.\n\n[RFC1919]\n\nChatel, M., “[Classical versus Transparent IP Proxies](https://www.rfc-editor.org/rfc/rfc1919.html)”, RFC 1919, [DOI 10.17487/RFC1919](https://dx.doi.org/10.17487/RFC1919), March 1996, <[https://www.rfc-editor.org/info/rfc1919](https://www.rfc-editor.org/info/rfc1919)>.\n\n[RFC2047]\n\nMoore, K., “[MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text](https://www.rfc-editor.org/rfc/rfc2047.html)”, RFC 2047, [DOI 10.17487/RFC2047](https://dx.doi.org/10.17487/RFC2047), November 1996, <[https://www.rfc-editor.org/info/rfc2047](https://www.rfc-editor.org/info/rfc2047)>.\n\n[RFC2068]\n\nFielding, R., Gettys, J., Mogul, J., Frystyk, H., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2068.html)”, RFC 2068, [DOI 10.17487/RFC2068](https://dx.doi.org/10.17487/RFC2068), January 1997, <[https://www.rfc-editor.org/info/rfc2068](https://www.rfc-editor.org/info/rfc2068)>.\n\n[RFC2145]\n\nMogul, J., Fielding, R., Gettys, J., and H. Frystyk, “[Use and Interpretation of HTTP Version Numbers](https://www.rfc-editor.org/rfc/rfc2145.html)”, RFC 2145, [DOI 10.17487/RFC2145](https://dx.doi.org/10.17487/RFC2145), May 1997, <[https://www.rfc-editor.org/info/rfc2145](https://www.rfc-editor.org/info/rfc2145)>.\n\n[RFC2295]\n\nHoltman, K. and A. Mutz, “[Transparent Content Negotiation in HTTP](https://www.rfc-editor.org/rfc/rfc2295.html)”, RFC 2295, [DOI 10.17487/RFC2295](https://dx.doi.org/10.17487/RFC2295), March 1998, <[https://www.rfc-editor.org/info/rfc2295](https://www.rfc-editor.org/info/rfc2295)>.\n\n[RFC2324]\n\nMasinter, L., “[Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)](https://www.rfc-editor.org/rfc/rfc2324.html)”, RFC 2324, [DOI 10.17487/RFC2324](https://dx.doi.org/10.17487/RFC2324), 1 April 1998, <[https://www.rfc-editor.org/info/rfc2324](https://www.rfc-editor.org/info/rfc2324)>.\n\n[RFC2557]\n\nPalme, J., Hopmann, A., and N. Shelness, “[MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)](https://www.rfc-editor.org/rfc/rfc2557.html)”, RFC 2557, [DOI 10.17487/RFC2557](https://dx.doi.org/10.17487/RFC2557), March 1999, <[https://www.rfc-editor.org/info/rfc2557](https://www.rfc-editor.org/info/rfc2557)>.\n\n[RFC2616]\n\nFielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, [DOI 10.17487/RFC2616](https://dx.doi.org/10.17487/RFC2616), June 1999, <[https://www.rfc-editor.org/info/rfc2616](https://www.rfc-editor.org/info/rfc2616)>.\n\n[RFC2617]\n\nFranks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A., and L. Stewart, “[HTTP Authentication: Basic and Digest Access Authentication](https://www.rfc-editor.org/rfc/rfc2617.html)”, RFC 2617, [DOI 10.17487/RFC2617](https://dx.doi.org/10.17487/RFC2617), June 1999, <[https://www.rfc-editor.org/info/rfc2617](https://www.rfc-editor.org/info/rfc2617)>.\n\n[RFC2774]\n\nNielsen, H., Leach, P., and S. Lawrence, “[An HTTP Extension Framework](https://www.rfc-editor.org/rfc/rfc2774.html)”, RFC 2774, [DOI 10.17487/RFC2774](https://dx.doi.org/10.17487/RFC2774), February 2000, <[https://www.rfc-editor.org/info/rfc2774](https://www.rfc-editor.org/info/rfc2774)>.\n\n[RFC2818]\n\nRescorla, E., “[HTTP Over TLS](https://www.rfc-editor.org/rfc/rfc2818.html)”, RFC 2818, [DOI 10.17487/RFC2818](https://dx.doi.org/10.17487/RFC2818), May 2000, <[https://www.rfc-editor.org/info/rfc2818](https://www.rfc-editor.org/info/rfc2818)>.\n\n[RFC2978]\n\nFreed, N. and J. Postel, “[IANA Charset Registration Procedures](https://www.rfc-editor.org/rfc/rfc2978.html)”, [BCP 19](https://www.rfc-editor.org/info/bcp19), RFC 2978, [DOI 10.17487/RFC2978](https://dx.doi.org/10.17487/RFC2978), October 2000, <[https://www.rfc-editor.org/info/rfc2978](https://www.rfc-editor.org/info/rfc2978)>.\n\n[RFC3040]\n\nCooper, I., Melve, I., and G. Tomlinson, “[Internet Web Replication and Caching Taxonomy](https://www.rfc-editor.org/rfc/rfc3040.html)”, RFC 3040, [DOI 10.17487/RFC3040](https://dx.doi.org/10.17487/RFC3040), January 2001, <[https://www.rfc-editor.org/info/rfc3040](https://www.rfc-editor.org/info/rfc3040)>.\n\n[RFC3864]\n\nKlyne, G., Nottingham, M., and J. Mogul, “[Registration Procedures for Message Header Fields](https://www.rfc-editor.org/rfc/rfc3864.html)”, [BCP 90](https://www.rfc-editor.org/info/bcp90), RFC 3864, [DOI 10.17487/RFC3864](https://dx.doi.org/10.17487/RFC3864), September 2004, <[https://www.rfc-editor.org/info/rfc3864](https://www.rfc-editor.org/info/rfc3864)>.\n\n[RFC3875]\n\nRobinson, D. and K. Coar, “[The Common Gateway Interface (CGI) Version 1.1](https://www.rfc-editor.org/rfc/rfc3875.html)”, RFC 3875, [DOI 10.17487/RFC3875](https://dx.doi.org/10.17487/RFC3875), October 2004, <[https://www.rfc-editor.org/info/rfc3875](https://www.rfc-editor.org/info/rfc3875)>.\n\n[RFC4033]\n\nArends, R., Austein, R., Larson, M., Massey, D., and S. Rose, “[DNS Security Introduction and Requirements](https://www.rfc-editor.org/rfc/rfc4033.html)”, RFC 4033, [DOI 10.17487/RFC4033](https://dx.doi.org/10.17487/RFC4033), March 2005, <[https://www.rfc-editor.org/info/rfc4033](https://www.rfc-editor.org/info/rfc4033)>.\n\n[RFC4559]\n\nJaganathan, K., Zhu, L., and J. Brezak, “[SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows](https://www.rfc-editor.org/rfc/rfc4559.html)”, RFC 4559, [DOI 10.17487/RFC4559](https://dx.doi.org/10.17487/RFC4559), June 2006, <[https://www.rfc-editor.org/info/rfc4559](https://www.rfc-editor.org/info/rfc4559)>.\n\n[RFC5789]\n\nDusseault, L. and J. Snell, “[PATCH Method for HTTP](https://www.rfc-editor.org/rfc/rfc5789.html)”, RFC 5789, [DOI 10.17487/RFC5789](https://dx.doi.org/10.17487/RFC5789), March 2010, <[https://www.rfc-editor.org/info/rfc5789](https://www.rfc-editor.org/info/rfc5789)>.\n\n[RFC5905]\n\nMills, D., Martin, J., Ed., Burbank, J., and W. Kasch, “[Network Time Protocol Version 4: Protocol and Algorithms Specification](https://www.rfc-editor.org/rfc/rfc5905.html)”, RFC 5905, [DOI 10.17487/RFC5905](https://dx.doi.org/10.17487/RFC5905), June 2010, <[https://www.rfc-editor.org/info/rfc5905](https://www.rfc-editor.org/info/rfc5905)>.\n\n[RFC6454]\n\nBarth, A., “[The Web Origin Concept](https://www.rfc-editor.org/rfc/rfc6454.html)”, RFC 6454, [DOI 10.17487/RFC6454](https://dx.doi.org/10.17487/RFC6454), December 2011, <[https://www.rfc-editor.org/info/rfc6454](https://www.rfc-editor.org/info/rfc6454)>.\n\n[RFC6585]\n\nNottingham, M. and R. Fielding, “[Additional HTTP Status Codes](https://www.rfc-editor.org/rfc/rfc6585.html)”, RFC 6585, [DOI 10.17487/RFC6585](https://dx.doi.org/10.17487/RFC6585), April 2012, <[https://www.rfc-editor.org/info/rfc6585](https://www.rfc-editor.org/info/rfc6585)>.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[https://www.rfc-editor.org/info/rfc7230](https://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC7231]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content](https://www.rfc-editor.org/rfc/rfc7231.html)”, RFC 7231, [DOI 10.17487/RFC7231](https://dx.doi.org/10.17487/RFC7231), June 2014, <[https://www.rfc-editor.org/info/rfc7231](https://www.rfc-editor.org/info/rfc7231)>.\n\n[RFC7232]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests](https://www.rfc-editor.org/rfc/rfc7232.html)”, RFC 7232, [DOI 10.17487/RFC7232](https://dx.doi.org/10.17487/RFC7232), June 2014, <[https://www.rfc-editor.org/info/rfc7232](https://www.rfc-editor.org/info/rfc7232)>.\n\n[RFC7233]\n\nFielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Range Requests](https://www.rfc-editor.org/rfc/rfc7233.html)”, RFC 7233, [DOI 10.17487/RFC7233](https://dx.doi.org/10.17487/RFC7233), June 2014, <[https://www.rfc-editor.org/info/rfc7233](https://www.rfc-editor.org/info/rfc7233)>.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, [DOI 10.17487/RFC7234](https://dx.doi.org/10.17487/RFC7234), June 2014, <[https://www.rfc-editor.org/info/rfc7234](https://www.rfc-editor.org/info/rfc7234)>.\n\n[RFC7235]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Authentication](https://www.rfc-editor.org/rfc/rfc7235.html)”, RFC 7235, [DOI 10.17487/RFC7235](https://dx.doi.org/10.17487/RFC7235), June 2014, <[https://www.rfc-editor.org/info/rfc7235](https://www.rfc-editor.org/info/rfc7235)>.\n\n[RFC7538]\n\nReschke, J., “[The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)](https://www.rfc-editor.org/rfc/rfc7538.html)”, RFC 7538, [DOI 10.17487/RFC7538](https://dx.doi.org/10.17487/RFC7538), April 2015, <[https://www.rfc-editor.org/info/rfc7538](https://www.rfc-editor.org/info/rfc7538)>.\n\n[RFC7540]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol Version 2 (HTTP/2)](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[https://www.rfc-editor.org/info/rfc7540](https://www.rfc-editor.org/info/rfc7540)>.\n\n[RFC7578]\n\nMasinter, L., “[Returning Values from Forms: multipart/form-data](https://www.rfc-editor.org/rfc/rfc7578.html)”, RFC 7578, [DOI 10.17487/RFC7578](https://dx.doi.org/10.17487/RFC7578), July 2015, <[https://www.rfc-editor.org/info/rfc7578](https://www.rfc-editor.org/info/rfc7578)>.\n\n[RFC7615]\n\nReschke, J., “[HTTP Authentication-Info and Proxy-Authentication-Info Response Header Fields](https://www.rfc-editor.org/rfc/rfc7615.html)”, RFC 7615, [DOI 10.17487/RFC7615](https://dx.doi.org/10.17487/RFC7615), September 2015, <[https://www.rfc-editor.org/info/rfc7615](https://www.rfc-editor.org/info/rfc7615)>.\n\n[RFC7616]\n\nShekh-Yusef, R., Ed., Ahrens, D., and S. Bremer, “[HTTP Digest Access Authentication](https://www.rfc-editor.org/rfc/rfc7616.html)”, RFC 7616, [DOI 10.17487/RFC7616](https://dx.doi.org/10.17487/RFC7616), September 2015, <[https://www.rfc-editor.org/info/rfc7616](https://www.rfc-editor.org/info/rfc7616)>.\n\n[RFC7617]\n\nReschke, J., “[The 'Basic' HTTP Authentication Scheme](https://www.rfc-editor.org/rfc/rfc7617.html)”, RFC 7617, [DOI 10.17487/RFC7617](https://dx.doi.org/10.17487/RFC7617), September 2015, <[https://www.rfc-editor.org/info/rfc7617](https://www.rfc-editor.org/info/rfc7617)>.\n\n[RFC7694]\n\nReschke, J., “[Hypertext Transfer Protocol (HTTP) Client-Initiated Content-Encoding](https://www.rfc-editor.org/rfc/rfc7694.html)”, RFC 7694, [DOI 10.17487/RFC7694](https://dx.doi.org/10.17487/RFC7694), November 2015, <[https://www.rfc-editor.org/info/rfc7694](https://www.rfc-editor.org/info/rfc7694)>.\n\n[RFC8126]\n\nCotton, M., Leiba, B., and T. Narten, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc8126.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 8126, [DOI 10.17487/RFC8126](https://dx.doi.org/10.17487/RFC8126), June 2017, <[https://www.rfc-editor.org/info/rfc8126](https://www.rfc-editor.org/info/rfc8126)>.\n\n[RFC8187]\n\nReschke, J., “[Indicating Character Encoding and Language for HTTP Header Field Parameters](https://www.rfc-editor.org/rfc/rfc8187.html)”, RFC 8187, [DOI 10.17487/RFC8187](https://dx.doi.org/10.17487/RFC8187), September 2017, <[https://www.rfc-editor.org/info/rfc8187](https://www.rfc-editor.org/info/rfc8187)>.\n\n[RFC8246]\n\nMcManus, P., “[HTTP Immutable Responses](https://www.rfc-editor.org/rfc/rfc8246.html)”, RFC 8246, [DOI 10.17487/RFC8246](https://dx.doi.org/10.17487/RFC8246), September 2017, <[https://www.rfc-editor.org/info/rfc8246](https://www.rfc-editor.org/info/rfc8246)>.\n\n[RFC8288]\n\nNottingham, M., “[Web Linking](https://www.rfc-editor.org/rfc/rfc8288.html)”, RFC 8288, [DOI 10.17487/RFC8288](https://dx.doi.org/10.17487/RFC8288), October 2017, <[https://www.rfc-editor.org/info/rfc8288](https://www.rfc-editor.org/info/rfc8288)>.\n\n[RFC8336]\n\nNottingham, M. and E. Nygren, “[The ORIGIN HTTP/2 Frame](https://www.rfc-editor.org/rfc/rfc8336.html)”, RFC 8336, [DOI 10.17487/RFC8336](https://dx.doi.org/10.17487/RFC8336), March 2018, <[https://www.rfc-editor.org/info/rfc8336](https://www.rfc-editor.org/info/rfc8336)>.\n\n[RFC8615]\n\nNottingham, M., “[Well-Known Uniform Resource Identifiers (URIs)](https://www.rfc-editor.org/rfc/rfc8615.html)”, RFC 8615, [DOI 10.17487/RFC8615](https://dx.doi.org/10.17487/RFC8615), May 2019, <[https://www.rfc-editor.org/info/rfc8615](https://www.rfc-editor.org/info/rfc8615)>.\n\n[RFC8941]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc8941.html)”, RFC 8941, [DOI 10.17487/RFC8941](https://dx.doi.org/10.17487/RFC8941), February 2021, <[https://www.rfc-editor.org/info/rfc8941](https://www.rfc-editor.org/info/rfc8941)>.\n\n[Sniffing]\n\nWHATWG, “[MIME Sniffing](https://mimesniff.spec.whatwg.org)”, <[https://mimesniff.spec.whatwg.org](https://mimesniff.spec.whatwg.org)>.\n\n[WEBDAV]\n\nDusseault, L., Ed., “[HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)](https://www.rfc-editor.org/rfc/rfc4918.html)”, RFC 4918, [DOI 10.17487/RFC4918](https://dx.doi.org/10.17487/RFC4918), June 2007, <[https://www.rfc-editor.org/info/rfc4918](https://www.rfc-editor.org/info/rfc4918)>.\n\n## Appendix A. Collected ABNF\n\nIn the collected ABNF below, list rules are expanded per Section 5.6.1.\n\n```\nAccept = [ ( media-range [ weight ] ) *( OWS \",\" OWS ( media-range [\n weight ] ) ) ]\nAccept-Charset = [ ( ( token / \"*\" ) [ weight ] ) *( OWS \",\" OWS ( (\n token / \"*\" ) [ weight ] ) ) ]\nAccept-Encoding = [ ( codings [ weight ] ) *( OWS \",\" OWS ( codings [\n weight ] ) ) ]\nAccept-Language = [ ( language-range [ weight ] ) *( OWS \",\" OWS (\n language-range [ weight ] ) ) ]\nAccept-Ranges = acceptable-ranges\nAllow = [ method *( OWS \",\" OWS method ) ]\nAuthentication-Info = [ auth-param *( OWS \",\" OWS auth-param ) ]\nAuthorization = credentials\n\nBWS = OWS\n\nConnection = [ connection-option *( OWS \",\" OWS connection-option )\n ]\nContent-Encoding = [ content-coding *( OWS \",\" OWS content-coding )\n ]\nContent-Language = [ language-tag *( OWS \",\" OWS language-tag ) ]\nContent-Length = 1*DIGIT\nContent-Location = absolute-URI / partial-URI\nContent-Range = range-unit SP ( range-resp / unsatisfied-range )\nContent-Type = media-type\n\nDate = HTTP-date\n\nETag = entity-tag\nExpect = [ expectation *( OWS \",\" OWS expectation ) ]\n\nFrom = mailbox\n\nGMT = %x47.4D.54 ; GMT\n\nHTTP-date = IMF-fixdate / obs-date\nHost = uri-host [ \":\" port ]\n\nIMF-fixdate = day-name \",\" SP date1 SP time-of-day SP GMT\nIf-Match = \"*\" / [ entity-tag *( OWS \",\" OWS entity-tag ) ]\nIf-Modified-Since = HTTP-date\nIf-None-Match = \"*\" / [ entity-tag *( OWS \",\" OWS entity-tag ) ]\nIf-Range = entity-tag / HTTP-date\nIf-Unmodified-Since = HTTP-date\n\nLast-Modified = HTTP-date\nLocation = URI-reference\n\nMax-Forwards = 1*DIGIT\n\nOWS = *( SP / HTAB )\n\nProxy-Authenticate = [ challenge *( OWS \",\" OWS challenge ) ]\nProxy-Authentication-Info = [ auth-param *( OWS \",\" OWS auth-param )\n ]\nProxy-Authorization = credentials\n\nRWS = 1*( SP / HTAB )\nRange = ranges-specifier\nReferer = absolute-URI / partial-URI\nRetry-After = HTTP-date / delay-seconds\n\nServer = product *( RWS ( product / comment ) )\n\nTE = [ t-codings *( OWS \",\" OWS t-codings ) ]\nTrailer = [ field-name *( OWS \",\" OWS field-name ) ]\n\nURI-reference = \nUpgrade = [ protocol *( OWS \",\" OWS protocol ) ]\nUser-Agent = product *( RWS ( product / comment ) )\n\nVary = [ ( \"*\" / field-name ) *( OWS \",\" OWS ( \"*\" / field-name ) )\n ]\nVia = [ ( received-protocol RWS received-by [ RWS comment ] ) *( OWS\n \",\" OWS ( received-protocol RWS received-by [ RWS comment ] ) ) ]\n\nWWW-Authenticate = [ challenge *( OWS \",\" OWS challenge ) ]\n\nabsolute-URI = \nabsolute-path = 1*( \"/\" segment )\nacceptable-ranges = range-unit *( OWS \",\" OWS range-unit )\nasctime-date = day-name SP date3 SP time-of-day SP year\nauth-param = token BWS \"=\" BWS ( token / quoted-string )\nauth-scheme = token\nauthority = \n\nchallenge = auth-scheme [ 1*SP ( token68 / [ auth-param *( OWS \",\"\n OWS auth-param ) ] ) ]\ncodings = content-coding / \"identity\" / \"*\"\ncomment = \"(\" *( ctext / quoted-pair / comment ) \")\"\ncomplete-length = 1*DIGIT\nconnection-option = token\ncontent-coding = token\ncredentials = auth-scheme [ 1*SP ( token68 / [ auth-param *( OWS \",\"\n OWS auth-param ) ] ) ]\nctext = HTAB / SP / %x21-27 ; '!'-'''\n / %x2A-5B ; '*'-'['\n / %x5D-7E ; ']'-'~'\n / obs-text\n\ndate1 = day SP month SP year\ndate2 = day \"-\" month \"-\" 2DIGIT\ndate3 = month SP ( 2DIGIT / ( SP DIGIT ) )\nday = 2DIGIT\nday-name = %x4D.6F.6E ; Mon\n / %x54.75.65 ; Tue\n / %x57.65.64 ; Wed\n / %x54.68.75 ; Thu\n / %x46.72.69 ; Fri\n / %x53.61.74 ; Sat\n / %x53.75.6E ; Sun\nday-name-l = %x4D.6F.6E.64.61.79 ; Monday\n / %x54.75.65.73.64.61.79 ; Tuesday\n / %x57.65.64.6E.65.73.64.61.79 ; Wednesday\n / %x54.68.75.72.73.64.61.79 ; Thursday\n / %x46.72.69.64.61.79 ; Friday\n / %x53.61.74.75.72.64.61.79 ; Saturday\n / %x53.75.6E.64.61.79 ; Sunday\ndelay-seconds = 1*DIGIT\n\nentity-tag = [ weak ] opaque-tag\netagc = \"!\" / %x23-7E ; '#'-'~'\n / obs-text\nexpectation = token [ \"=\" ( token / quoted-string ) parameters ]\n\nfield-content = field-vchar [ 1*( SP / HTAB / field-vchar )\n field-vchar ]\nfield-name = token\nfield-value = *field-content\nfield-vchar = VCHAR / obs-text\nfirst-pos = 1*DIGIT\n\nhour = 2DIGIT\nhttp-URI = \"http://\" authority path-abempty [ \"?\" query ]\nhttps-URI = \"https://\" authority path-abempty [ \"?\" query ]\n\nincl-range = first-pos \"-\" last-pos\nint-range = first-pos \"-\" [ last-pos ]\n\nlanguage-range = \nlanguage-tag = \nlast-pos = 1*DIGIT\n\nmailbox = \nmedia-range = ( \"*/*\" / ( type \"/*\" ) / ( type \"/\" subtype ) )\n parameters\nmedia-type = type \"/\" subtype parameters\nmethod = token\nminute = 2DIGIT\nmonth = %x4A.61.6E ; Jan\n / %x46.65.62 ; Feb\n / %x4D.61.72 ; Mar\n / %x41.70.72 ; Apr\n / %x4D.61.79 ; May\n / %x4A.75.6E ; Jun\n / %x4A.75.6C ; Jul\n / %x41.75.67 ; Aug\n / %x53.65.70 ; Sep\n / %x4F.63.74 ; Oct\n / %x4E.6F.76 ; Nov\n / %x44.65.63 ; Dec\n\nobs-date = rfc850-date / asctime-date\nobs-text = %x80-FF\nopaque-tag = DQUOTE *etagc DQUOTE\nother-range = 1*( %x21-2B ; '!'-'+'\n / %x2D-7E ; '-'-'~'\n )\n\nparameter = parameter-name \"=\" parameter-value\nparameter-name = token\nparameter-value = ( token / quoted-string )\nparameters = *( OWS \";\" OWS [ parameter ] )\npartial-URI = relative-part [ \"?\" query ]\npath-abempty = \nport = \nproduct = token [ \"/\" product-version ]\nproduct-version = token\nprotocol = protocol-name [ \"/\" protocol-version ]\nprotocol-name = token\nprotocol-version = token\npseudonym = token\n\nqdtext = HTAB / SP / \"!\" / %x23-5B ; '#'-'['\n / %x5D-7E ; ']'-'~'\n / obs-text\nquery = \nquoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\nquoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE\nqvalue = ( \"0\" [ \".\" *3DIGIT ] ) / ( \"1\" [ \".\" *3\"0\" ] )\n\nrange-resp = incl-range \"/\" ( complete-length / \"*\" )\nrange-set = range-spec *( OWS \",\" OWS range-spec )\nrange-spec = int-range / suffix-range / other-range\nrange-unit = token\nranges-specifier = range-unit \"=\" range-set\nreceived-by = pseudonym [ \":\" port ]\nreceived-protocol = [ protocol-name \"/\" ] protocol-version\nrelative-part = \nrfc850-date = day-name-l \",\" SP date2 SP time-of-day SP GMT\n\nsecond = 2DIGIT\nsegment = \nsubtype = token\nsuffix-length = 1*DIGIT\nsuffix-range = \"-\" suffix-length\n\nt-codings = \"trailers\" / ( transfer-coding [ weight ] )\ntchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\" / \"+\" / \"-\" / \".\" /\n \"^\" / \"_\" / \"`\" / \"|\" / \"~\" / DIGIT / ALPHA\ntime-of-day = hour \":\" minute \":\" second\ntoken = 1*tchar\ntoken68 = 1*( ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\" / \"+\" / \"/\" )\n *\"=\"\ntransfer-coding = token *( OWS \";\" OWS transfer-parameter )\ntransfer-parameter = token BWS \"=\" BWS ( token / quoted-string )\ntype = token\n\nunsatisfied-range = \"*/\" complete-length\nuri-host = \n\nweak = %x57.2F ; W/\nweight = OWS \";\" OWS \"q=\" qvalue\n\nyear = 4DIGIT\n```\n\n## Appendix B. Changes from Previous RFCs\n\n### B.1. Changes from RFC 2818\n\nNone.\n\n### B.2. Changes from RFC 7230\n\nThe sections introducing HTTP's design goals, history, architecture, conformance criteria, protocol versioning, URIs, message routing, and header fields have been moved here.\n\nThe requirement on semantic conformance has been replaced with permission to ignore or work around implementation-specific failures. (Section 2.2)\n\nThe description of an origin and authoritative access to origin servers has been extended for both \"http\" and \"https\" URIs to account for alternative services and secured connections that are not necessarily based on TCP. (Sections 4.2.1, 4.2.2, 4.3.1, and 7.3.3)\n\nExplicit 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)\n\nParameters in media type, media range, and expectation can be empty via one or more trailing semicolons. (Section 5.6.6)\n\n\"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)\n\nTrailer field semantics now transcend the specifics of chunked transfer coding. The use of trailer fields has been further limited to allow generation as a trailer field only when the sender knows the field defines that usage and to allow merging into the header section only if the recipient knows the corresponding field definition permits and defines how to merge. In all other cases, implementations are encouraged either to store the trailer fields separately or to discard them instead of merging. (Section 6.5.1)\n\nThe 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)\n\nThe 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)\n\n### B.3. Changes from RFC 7231\n\nMinimum URI lengths to be supported by implementations are now recommended. (Section 4.1)\n\nThe 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)\n\nParameters in media type, media range, and expectation can be empty via one or more trailing semicolons. (Section 5.6.6)\n\nAn 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)\n\nThe 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)\n\nThe term \"effective request URI\" has been replaced with \"target URI\". (Section 7.1)\n\nRestrictions on client retries have been loosened to reflect implementation behavior. (Section 9.2.2)\n\nThe 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)\n\nThe use of the Content-Range header field (Section 14.4) as a request modifier on PUT is allowed. (Section 9.3.4)\n\nA superfluous requirement about setting Content-Length has been removed from the description of the OPTIONS method. (Section 9.3.7)\n\nThe normative requirement to use the \"message/http\" media type in TRACE responses has been removed. (Section 9.3.8)\n\nList-based grammar for Expect has been restored for compatibility with RFC 2616. (Section 10.1.1)\n\nAccept and Accept-Encoding are allowed in response messages; the latter was introduced by [RFC7694]. (Section 12.3)\n\n\"Accept Parameters\" (accept-params and accept-ext ABNF production) have been removed from the definition of the Accept field. (Section 12.5.1)\n\nThe Accept-Charset field is now deprecated. (Section 12.5.2)\n\nThe semantics of \"*\" in the Vary header field when other values are present was clarified. (Section 12.5.5)\n\nRange units are compared in a case-insensitive fashion. (Section 14.1)\n\nThe use of the Accept-Ranges field is not restricted to origin servers. (Section 14.3)\n\nThe process of creating a redirected request has been clarified. (Section 15.4)\n\nStatus code 308 (previously defined in [RFC7538]) has been added so that it's defined closer to status codes 301, 302, and 307. (Section 15.4.9)\n\nStatus code 421 (previously defined in [Section 9.1.2](https://www.rfc-editor.org/rfc/rfc7540.html#section-9.1.2) of [RFC7540]) has been added because of its general applicability. 421 is no longer defined as heuristically cacheable since the response is specific to the connection (not the target resource). (Section 15.5.20)\n\nStatus code 422 (previously defined in [Section 11.2](https://www.rfc-editor.org/rfc/rfc4918.html#section-11.2) of [WEBDAV]) has been added because of its general applicability. (Section 15.5.21)\n\n### B.4. Changes from RFC 7232\n\nPrevious revisions of HTTP imposed an arbitrary 60-second limit on the determination of whether Last-Modified was a strong validator to guard against the possibility that the Date and Last-Modified values are generated from different clocks or at somewhat different times during the preparation of the response. This specification has relaxed that to allow reasonable discretion. (Section 8.8.2.2)\n\nAn edge-case requirement on If-Match and If-Unmodified-Since has been removed that required a validator not to be sent in a 2xx response if validation fails because the change request has already been applied. (Sections 13.1.1 and 13.1.4)\n\nThe fact that If-Unmodified-Since does not apply to a resource without a concept of modification time has been clarified. (Section 13.1.4)\n\nPreconditions can now be evaluated before the request content is processed rather than waiting until the response would otherwise be successful. (Section 13.2)\n\n### B.5. Changes from RFC 7233\n\nRefactored the range-unit and ranges-specifier grammars to simplify and reduce artificial distinctions between bytes and other (extension) range units, removing the overlapping grammar of other-range-unit by defining range units generically as a token and placing extensions within the scope of a range-spec (other-range). This disambiguates the role of list syntax (commas) in all range sets, including extension range units, for indicating a range-set of more than one range. Moving the extension grammar into range specifiers also allows protocol specific to byte ranges to be specified separately.\n\nIt is now possible to define Range handling on extension methods. (Section 14.2)\n\nDescribed use of the Content-Range header field (Section 14.4) as a request modifier to perform a partial PUT. (Section 14.5)\n\n### B.6. Changes from RFC 7235\n\nNone.\n\n### B.7. Changes from RFC 7538\n\nNone.\n\n### B.8. Changes from RFC 7615\n\nNone.\n\n### B.9. Changes from RFC 7694\n\nThis specification includes the extension defined in [RFC7694] but leaves out examples and deployment considerations.\n\n## Acknowledgements\n\nAside 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.\n\nThis 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.\n\nSince 2014, the following contributors have helped improve this specification by reporting bugs, asking smart questions, drafting or reviewing text, and evaluating issues:\n\nAlan Egerton, Alex Rousskov, Amichai Rothman, Amos Jeffries, Anders Kaseorg, Andreas Gebhardt, Anne van Kesteren, Armin Abfalterer, Aron Duby, Asanka Herath, Asbjørn Ulsberg, Asta Olofsson, Attila Gulyas, Austin Wright, Barry Pollard, Ben Burkert, Benjamin Kaduk, Björn Höhrmann, Brad Fitzpatrick, Chris Pacejo, Colin Bendell, Cory Benfield, Cory Nelson, Daisuke Miyakawa, Dale Worley, Daniel Stenberg, Danil Suits, David Benjamin, David Matson, David Schinazi, Дилян ПалаŃ�зов (Dilyan Palauzov), Eric Anderson, Eric Rescorla, Éric Vyncke, Erik Kline, Erwin Pe, Etan Kissling, Evert Pot, Evgeny Vrublevsky, Florian Best, Francesca Palombini, Igor Lubashev, James Callahan, James Peach, Jeffrey Yasskin, Kalin Gyokov, Kannan Goundan, 奥 一穂 (Kazuho Oku), Ken Murchison, Krzysztof MaczyĹ„ski, Lars Eggert, Lucas Pardue, Martin Duke, Martin DĂĽrst, Martin Thomson, Martynas JuseviÄŤius, Matt Menke, Matthias Pigulla, Mattias Grenfeldt, Michael Osipov, Mike Bishop, Mike Pennisi, Mike Taylor, Mike West, Mohit Sethi, Murray Kucherawy, Nathaniel J. Smith, Nicholas Hurley, Nikita Prokhorov, Patrick McManus, Piotr Sikora, Poul-Henning Kamp, Rick van Rein, Robert Wilton, Roberto Polli, Roman Danyliw, Samuel Williams, Semyon Kholodnov, Simon Pieters, Simon SchĂĽppel, Stefan Eissing, Taylor Hunt, Todd Greer, Tommy Pauly, Vasiliy Faronov, Vladimir Lashchev, Wenbo Zhu, William A. Rowe Jr., Willy Tarreau, Xingwei Liu, Yishuai Li, and Zaheduzzaman Sarker.\n\n## Index\n\n1 2 3 4 5 A B C D E F G H I K L M N O P R S T U V W X\n\n- **1**\n - 100 Continue (status code) **15.2.1** , 18.3\n - 100-continue (expect value) **10.1.1**\n - 101 Switching Protocols (status code) **15.2.2** , 18.3\n - 1xx Informational (status code class) **15.2**\n- **2**\n - 200 OK (status code) **15.3.1** , 18.3\n - 201 Created (status code) **15.3.2** , 18.3\n - 202 Accepted (status code) **15.3.3** , 18.3\n - 203 Non-Authoritative Information (status code) 7.7 , **15.3.4** , 18.3\n - 204 No Content (status code) **15.3.5** , 18.3\n - 205 Reset Content (status code) **15.3.6** , 18.3\n - 206 Partial Content (status code) 6.4.1 , 8.3.3 , 14.2 , **15.3.7** , 18.3\n - 2xx Successful (status code class) **15.3**\n- **3**\n - 300 Multiple Choices (status code) **15.4.1** , 15.5.7 , 18.3\n - 301 Moved Permanently (status code) **15.4.2** , 18.3\n - 302 Found (status code) **15.4.3** , 18.3\n - 303 See Other (status code) **15.4.4** , 18.3\n - 304 Not Modified (status code) 8.6 , **15.4.5** , 18.3\n - 305 Use Proxy (status code) **15.4.6** , 18.3\n - 306 (Unused) (status code) **15.4.7** , 18.3\n - 307 Temporary Redirect (status code) **15.4.8** , 18.3\n - 308 Permanent Redirect (status code) **15.4.9** , 18.3 , B.3\n - 3xx Redirection (status code class) 7.8 , **15.4** , 16.3.2 , B.3\n- **4**\n - 400 Bad Request (status code) **15.5.1** , 18.3\n - 401 Unauthorized (status code) **15.5.2** , 18.3\n - 402 Payment Required (status code) **15.5.3** , 18.3\n - 403 Forbidden (status code) 11.4 , **15.5.4** , 18.3\n - 404 Not Found (status code) **15.5.5** , 18.3\n - 405 Method Not Allowed (status code) **15.5.6** , 18.3\n - 406 Not Acceptable (status code) **15.5.7** , 18.3\n - 407 Proxy Authentication Required (status code) **15.5.8** , 18.3\n - 408 Request Timeout (status code) **15.5.9** , 18.3\n - 409 Conflict (status code) **15.5.10** , 18.3\n - 410 Gone (status code) **15.5.11** , 18.3\n - 411 Length Required (status code) **15.5.12** , 18.3\n - 412 Precondition Failed (status code) **15.5.13** , 18.3\n - 413 Content Too Large (status code) **15.5.14** , 17.5 , 18.3\n - 414 URI Too Long (status code) **15.5.15** , 17.5 , 18.3\n - 415 Unsupported Media Type (status code) **15.5.16** , 18.3\n - 416 Range Not Satisfiable (status code) **15.5.17** , 18.3\n - 417 Expectation Failed (status code) **15.5.18** , 18.3\n - 418 (Unused) (status code) **15.5.19** , 18.3\n - 421 Misdirected Request (status code) 7.4 , **15.5.20** , 18.3 , B.3\n - 422 Unprocessable Content (status code) **15.5.21** , 18.3 , B.3\n - 426 Upgrade Required (status code) **15.5.22** , 18.3\n - 4xx Client Error (status code class) **15.5**\n- **5**\n - 500 Internal Server Error (status code) **15.6.1** , 18.3\n - 501 Not Implemented (status code) **15.6.2** , 18.3\n - 502 Bad Gateway (status code) **15.6.3** , 18.3\n - 503 Service Unavailable (status code) **15.6.4** , 18.3\n - 504 Gateway Timeout (status code) **15.6.5** , 18.3\n - 505 HTTP Version Not Supported (status code) **15.6.6** , 18.3\n - 5xx Server Error (status code class) **15.6**\n- **A**\n - accelerator **3.7**\n - Accept header field 5.6.6 , 8.3.1 , 12.3 , **12.5.1** , 15.5.16 , 18.4 , 18.8 , B.3\n - Accept-Charset header field **12.5.2** , 18.4 , B.3\n - Accept-Encoding header field 8.4.1 , 8.8.3.3 , 12.3 , **12.5.3** , 15.5.16 , 18.4 , 18.6\n - Accept-Language header field 8.5.1 , **12.5.4** , 18.4\n - Accept-Ranges header field 14.1 , **14.3** , 18.4 , 18.7 , B.3\n - Allow header field 9.1 , **10.2.1** , 18.4\n - *ALTSVC* 4.3.2 , 15.5.20 , 17.1 , **19.2**\n - Authentication-Info header field **11.6.3** , 18.4\n - authoritative response **17.1**\n - Authorization header field **11.6.2** , 11.6.3 , 12.5.5 , 15.5.2 , 18.4\n- **B**\n - *BREACH* 17.6 , **19.2**\n - browser **3.5**\n - *Bujlow* 17.13 , **19.2**\n- **C**\n - cache **3.8**\n - cacheable **3.8**\n - *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**\n - *Section 3.5* 11.6.2\n - *Section 4* 9.3.3\n - *Section 4.1* 12.5.5\n - *Section 4.2* 5.6.7\n - *Section 4.2.1* 9.3.3\n - *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\n - *Section 4.3.2* 13.1.2 , 13.1.3\n - *Section 4.3.4* 15.4.5\n - *Section 4.3.5* 9.3.2\n - *Section 4.4* 9.3.4 , 9.3.5\n - *Section 5.2* 7.6.1 , 9.3.1 , 9.3.2 , 12.5.5\n - *Section 5.2.2.6* 7.7\n - *Section 5.2.2.7* 16.4.2\n - *Section 5.2.3* 16\n - *Section 7* 17 , 17.2\n - client **3.3**\n - clock **5.6.7**\n - complete **6.1**\n - compress (Coding Format) 8.4.1.1\n - compress (content coding) **8.4.1**\n - conditional request **13**\n - CONNECT method 3.3 , 6.4.1 , 7.1 , 8.6 , 9.1 , **9.3.6** , 16 , 16.1.2 , 18.2\n - connection **3.3**\n - Connection header field 5.1 , 7.6 , **7.6.1** , 7.8 , 10.1.4 , 15.4 , 16.3.2 , 18.4\n - content 6.4\n - content coding **8.4.1**\n - content negotiation 1.3\n - Content-Encoding header field **8.4** , 8.4.1 , 18.4\n - Content-Language header field **8.5** , 18.4\n - Content-Length header field **8.6** , 15.5.12 , 18.4\n - Content-Location header field **8.7** , 9.3.3 , 10.2.2 , 18.4\n - Content-MD5 header field **18.4**\n - Content-Range header field 9.3.4 , 14.1 , **14.4** , 14.5 , 14.5 , 15.5.17 , 18.4 , B.3 , B.5\n - Content-Type header field 5.5 , **8.3** , 8.3.1 , 18.4\n - control data **6.2**\n - *COOKIE* 4.2.2 , 5.3 , 9.3.8 , 11.4 , **19.2**\n- **D**\n - Date header field 5.1 , 6.4.1 , **6.6.1** , 8.8.2.1 , 18.4\n - deflate (Coding Format) 8.4.1.2\n - deflate (content coding) **8.4.1**\n - DELETE method 9.1 , 9.2.2 , **9.3.5** , 18.2 , B.3\n - Delimiters 5.6.2\n - downstream **3.7**\n- **E**\n - effective request URI **7.1**\n - *Err1912* 8.3.2 , **19.2**\n - *Err5433* 8.3.2 , **19.2**\n - ETag field 8.8 , **8.8.3** , 18.4\n - Expect header field 7.8 , **10.1.1** , 15.2.1 , 15.5.18 , 18.4 , B.3\n- **F**\n - field **5** , 6.3\n - field line 5.2\n - field line value 5.2\n - field name 5.2\n - field value 5.2\n - Fields\n - * **18.4**\n - Accept 5.6.6 , 8.3.1 , 12.3 , **12.5.1** , 15.5.16 , 18.4 , 18.8 , B.3\n - Accept-Charset **12.5.2** , 18.4 , B.3\n - Accept-Encoding 8.4.1 , 8.8.3.3 , 12.3 , **12.5.3** , 15.5.16 , 18.4 , 18.6\n - Accept-Language 8.5.1 , **12.5.4** , 18.4\n - Accept-Ranges 14.1 , **14.3** , 18.4 , 18.7 , B.3\n - Allow 9.1 , **10.2.1** , 18.4\n - Authentication-Info **11.6.3** , 18.4\n - Authorization **11.6.2** , 11.6.3 , 12.5.5 , 15.5.2 , 18.4\n - Connection 5.1 , 7.6 , **7.6.1** , 7.8 , 10.1.4 , 15.4 , 16.3.2 , 18.4\n - Content-Encoding **8.4** , 8.4.1 , 18.4\n - Content-Language **8.5** , 18.4\n - Content-Length **8.6** , 15.5.12 , 18.4\n - Content-Location **8.7** , 9.3.3 , 10.2.2 , 18.4\n - Content-MD5 **18.4**\n - Content-Range 9.3.4 , 14.1 , **14.4** , 14.5 , 14.5 , 15.5.17 , 18.4 , B.3 , B.5\n - Content-Type 5.5 , **8.3** , 8.3.1 , 18.4\n - Date 5.1 , 6.4.1 , **6.6.1** , 8.8.2.1 , 18.4\n - ETag 8.8 , **8.8.3** , 18.4\n - Expect 7.8 , **10.1.1** , 15.2.1 , 15.5.18 , 18.4 , B.3\n - From **10.1.2** , 18.4\n - Host 4.3.3 , 7.1 , **7.2** , 18.4 , B.2\n - If-Match **13.1.1** , 13.2.2 , 18.4 , B.4\n - If-Modified-Since **13.1.3** , 18.4\n - If-None-Match **13.1.2** , 18.4\n - If-Range 13.1.1 , 13.1.4 , **13.1.5** , 14.2 , 18.4\n - If-Unmodified-Since **13.1.4** , 13.2.2 , 18.4 , B.4 , B.4\n - Last-Modified 8.8 , **8.8.2** , 18.4\n - Location 9.3.3 , **10.2.2** , 15.4 , 17.11 , 18.4\n - Max-Forwards **7.6.2** , 9.3.7 , 9.3.8 , 18.4\n - Proxy-Authenticate **11.7.1** , 15.5.8 , 18.4\n - Proxy-Authentication-Info **11.7.3** , 18.4\n - Proxy-Authorization **11.7.2** , 11.7.3 , 15.5.8 , 18.4\n - Range 9.3.1 , 14.1 , **14.2** , 15.5.17 , 16.1.2 , 18.4 , B.5\n - Referer **10.1.3** , 17.9 , 18.4\n - Retry-After **10.2.3** , 15.6.4 , 18.4\n - Server **10.2.4** , 17.12 , 18.4\n - TE 6.5.1 , 7.6.1 , **10.1.4** , 18.4\n - Trailer 6.5.2 , **6.6.2** , 18.4\n - Upgrade 3.3 , 7.6.1 , 7.6.3 , **7.8** , 15.2.2 , 15.5.22 , 18.4\n - User-Agent **10.1.5** , 10.2.4 , 17.12 , 18.4\n - Vary 12.1 , **12.5.5** , 16.3.2 , 18.4 , 18.4 , 18.4 , B.3\n - Via 6.2 , **7.6.3** , 9.3.8 , 17.12 , 18.4 , B.2\n - WWW-Authenticate **11.6.1** , 11.7.1 , 15.5.2 , 18.4\n - Fragment Identifiers 4.2.5\n - From header field **10.1.2** , 18.4\n- **G**\n - gateway **3.7**\n - *Georgiev* 17.1 , **19.2**\n - 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\n - Grammar\n - absolute-path **4.1**\n - absolute-URI **4.1**\n - Accept **12.5.1**\n - Accept-Charset **12.5.2**\n - Accept-Encoding **12.5.3**\n - Accept-Language **12.5.4**\n - Accept-Ranges **14.3**\n - acceptable-ranges **14.3**\n - Allow **10.2.1**\n - ALPHA **2.1**\n - asctime-date **5.6.7**\n - auth-param **11.2**\n - auth-scheme **11.1**\n - Authentication-Info **11.6.3**\n - authority **4.1**\n - Authorization **11.6.2**\n - BWS **5.6.3**\n - challenge **11.3**\n - codings **12.5.3**\n - comment **5.6.5**\n - complete-length **14.4**\n - Connection **7.6.1**\n - connection-option **7.6.1**\n - content-coding **8.4.1**\n - Content-Encoding **8.4**\n - Content-Language **8.5**\n - Content-Length **8.6**\n - Content-Location **8.7**\n - Content-Range **14.4**\n - Content-Type **8.3**\n - CR **2.1**\n - credentials **11.4**\n - CRLF **2.1**\n - ctext **5.6.5**\n - CTL **2.1**\n - Date **6.6.1**\n - date1 **5.6.7**\n - day **5.6.7**\n - day-name **5.6.7**\n - day-name-l **5.6.7**\n - delay-seconds **10.2.3**\n - DIGIT **2.1**\n - DQUOTE **2.1**\n - entity-tag **8.8.3**\n - ETag **8.8.3**\n - etagc **8.8.3**\n - Expect **10.1.1**\n - field-content **5.5**\n - field-name **5.1** , 6.6.2\n - field-value **5.5**\n - field-vchar **5.5**\n - first-pos **14.1.1** , 14.4\n - From **10.1.2**\n - GMT **5.6.7**\n - HEXDIG **2.1**\n - Host **7.2**\n - hour **5.6.7**\n - HTAB **2.1**\n - HTTP-date **5.6.7**\n - http-URI **4.2.1**\n - https-URI **4.2.2**\n - If-Match **13.1.1**\n - If-Modified-Since **13.1.3**\n - If-None-Match **13.1.2**\n - If-Range **13.1.5**\n - If-Unmodified-Since **13.1.4**\n - IMF-fixdate **5.6.7**\n - incl-range **14.4**\n - int-range **14.1.1**\n - language-range **12.5.4**\n - language-tag **8.5.1**\n - Last-Modified **8.8.2**\n - last-pos **14.1.1** , 14.4\n - LF **2.1**\n - Location **10.2.2**\n - Max-Forwards **7.6.2**\n - media-range **12.5.1**\n - media-type **8.3.1**\n - method **9.1**\n - minute **5.6.7**\n - month **5.6.7**\n - obs-date **5.6.7**\n - obs-text **5.5**\n - OCTET **2.1**\n - opaque-tag **8.8.3**\n - other-range **14.1.1**\n - OWS **5.6.3**\n - parameter **5.6.6**\n - parameter-name **5.6.6**\n - parameter-value **5.6.6**\n - parameters **5.6.6**\n - partial-URI **4.1**\n - port **4.1**\n - product **10.1.5**\n - product-version **10.1.5**\n - protocol-name **7.6.3**\n - protocol-version **7.6.3**\n - Proxy-Authenticate **11.7.1**\n - Proxy-Authentication-Info **11.7.3**\n - Proxy-Authorization **11.7.2**\n - pseudonym **7.6.3**\n - qdtext **5.6.4**\n - query **4.1**\n - quoted-pair **5.6.4**\n - quoted-string **5.6.4**\n - qvalue **12.4.2**\n - Range **14.2**\n - range-resp **14.4**\n - range-set **14.1.1**\n - range-spec **14.1.1**\n - range-unit **14.1**\n - ranges-specifier **14.1.1**\n - received-by **7.6.3**\n - received-protocol **7.6.3**\n - Referer **10.1.3**\n - Retry-After **10.2.3**\n - rfc850-date **5.6.7**\n - RWS **5.6.3**\n - second **5.6.7**\n - segment **4.1**\n - Server **10.2.4**\n - SP **2.1**\n - subtype **8.3.1**\n - suffix-length **14.1.1**\n - suffix-range **14.1.1**\n - t-codings **10.1.4**\n - tchar **5.6.2**\n - TE **10.1.4**\n - time-of-day **5.6.7**\n - token **5.6.2**\n - token68 **11.2**\n - Trailer **6.6.2**\n - transfer-coding **10.1.4**\n - transfer-parameter **10.1.4**\n - type **8.3.1**\n - unsatisfied-range **14.4**\n - Upgrade **7.8**\n - uri-host **4.1**\n - URI-reference **4.1**\n - User-Agent **10.1.5**\n - Vary **12.5.5**\n - VCHAR **2.1**\n - Via **7.6.3**\n - weak **8.8.3**\n - weight **12.4.2**\n - WWW-Authenticate **11.6.1**\n - year **5.6.7**\n - gzip (Coding Format) 8.4.1.3\n - gzip (content coding) **8.4.1**\n- **H**\n - HEAD method 6 , 6.4.1 , 8.6 , 8.7 , 9.1 , 9.2.1 , **9.3.2** , 18.2 , B.3\n - Header Fields\n - Accept 5.6.6 , 8.3.1 , 12.3 , **12.5.1** , 15.5.16 , 18.4 , 18.8 , B.3\n - Accept-Charset **12.5.2** , 18.4 , B.3\n - Accept-Encoding 8.4.1 , 8.8.3.3 , 12.3 , **12.5.3** , 15.5.16 , 18.4 , 18.6\n - Accept-Language 8.5.1 , **12.5.4** , 18.4\n - Accept-Ranges 14.1 , **14.3** , 18.4 , 18.7 , B.3\n - Allow 9.1 , **10.2.1** , 18.4\n - Authentication-Info **11.6.3** , 18.4\n - Authorization **11.6.2** , 11.6.3 , 12.5.5 , 15.5.2 , 18.4\n - Connection 5.1 , 7.6 , **7.6.1** , 7.8 , 10.1.4 , 15.4 , 16.3.2 , 18.4\n - Content-Encoding **8.4** , 8.4.1 , 18.4\n - Content-Language **8.5** , 18.4\n - Content-Length **8.6** , 15.5.12 , 18.4\n - Content-Location **8.7** , 9.3.3 , 10.2.2 , 18.4\n - Content-MD5 **18.4**\n - Content-Range 9.3.4 , 14.1 , **14.4** , 14.5 , 14.5 , 15.5.17 , 18.4 , B.3 , B.5\n - Content-Type 5.5 , **8.3** , 8.3.1 , 18.4\n - Date 5.1 , 6.4.1 , **6.6.1** , 8.8.2.1 , 18.4\n - ETag 8.8 , **8.8.3** , 18.4\n - Expect 7.8 , **10.1.1** , 15.2.1 , 15.5.18 , 18.4 , B.3\n - From **10.1.2** , 18.4\n - Host 4.3.3 , 7.1 , **7.2** , 18.4 , B.2\n - If-Match **13.1.1** , 13.2.2 , 18.4 , B.4\n - If-Modified-Since **13.1.3** , 18.4\n - If-None-Match **13.1.2** , 18.4\n - If-Range 13.1.1 , 13.1.4 , **13.1.5** , 14.2 , 18.4\n - If-Unmodified-Since **13.1.4** , 13.2.2 , 18.4 , B.4 , B.4\n - Last-Modified 8.8 , **8.8.2** , 18.4\n - Location 9.3.3 , **10.2.2** , 15.4 , 17.11 , 18.4\n - Max-Forwards **7.6.2** , 9.3.7 , 9.3.8 , 18.4\n - Proxy-Authenticate **11.7.1** , 15.5.8 , 18.4\n - Proxy-Authentication-Info **11.7.3** , 18.4\n - Proxy-Authorization **11.7.2** , 11.7.3 , 15.5.8 , 18.4\n - Range 9.3.1 , 14.1 , **14.2** , 15.5.17 , 16.1.2 , 18.4 , B.5\n - Referer **10.1.3** , 17.9 , 18.4\n - Retry-After **10.2.3** , 15.6.4 , 18.4\n - Server **10.2.4** , 17.12 , 18.4\n - TE 6.5.1 , 7.6.1 , **10.1.4** , 18.4\n - Trailer 6.5.2 , **6.6.2** , 18.4\n - Upgrade 3.3 , 7.6.1 , 7.6.3 , **7.8** , 15.2.2 , 15.5.22 , 18.4\n - User-Agent **10.1.5** , 10.2.4 , 17.12 , 18.4\n - Vary 12.1 , **12.5.5** , 16.3.2 , 18.4 , 18.4 , 18.4 , B.3\n - Via 6.2 , **7.6.3** , 9.3.8 , 17.12 , 18.4 , B.2\n - WWW-Authenticate **11.6.1** , 11.7.1 , 15.5.2 , 18.4\n - header section **6.3**\n - Host header field 4.3.3 , 7.1 , **7.2** , 18.4 , B.2\n - *HPACK* 17.6 , **19.2**\n - http URI scheme **4.2.1**\n - *HTTP/1.0* 1.2 , 15.4 , **19.2** , \"Acknowledgements\"\n - *Section 9.3* 15.4\n - *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\n - *Section 3.2.1* 7.7\n - *Section 3.2.4* 7.7\n - *Section 6* 6.4\n - *Section 6.1* 7.6.1 , 8.4 , 16\n - *Section 6.2* 8.6\n - *Section 7* 7.7 , 8.8.3.3 , 10.1.4\n - *Section 7.1.2* 6.5.1\n - *Section 9.5* 7.5\n - *Section 9.6* 10.1.1\n - *Section 10.1* 9.3.8\n - *Section 11* 17\n - *Section 11.2* 5.4 , 9.3.1 , 9.3.2 , 9.3.5 , 17.10\n - *Appendix C.2.2* 7.6.1\n - *HTTP/2* 1.2 , 6.2 , 7.2 , 7.5 , 16 , **19.2**\n - *HTTP/3* 1.2 , 6.2 , 7.2 , **19.2**\n - https URI scheme **4.2.2**\n- **I**\n - idempotent **9.2.2**\n - If-Match header field **13.1.1** , 13.2.2 , 18.4 , B.4\n - If-Modified-Since header field **13.1.3** , 18.4\n - If-None-Match header field **13.1.2** , 18.4\n - If-Range header field 13.1.1 , 13.1.4 , **13.1.5** , 14.2 , 18.4\n - If-Unmodified-Since header field **13.1.4** , 13.2.2 , 18.4 , B.4 , B.4\n - inbound **3.7**\n - incomplete **6.1**\n - interception proxy **3.7**\n - intermediary **3.7**\n - *ISO-8859-1* 5.5 , **19.2**\n- **K**\n - *Kri2001* 5.3 , **19.2**\n- **L**\n - Last-Modified header field 8.8 , **8.8.2** , 18.4\n - list-based field 5.5\n - Location header field 9.3.3 , **10.2.2** , 15.4 , 17.11 , 18.4\n- **M**\n - Max-Forwards header field **7.6.2** , 9.3.7 , 9.3.8 , 18.4\n - Media Type\n - multipart/byteranges **14.6**\n - multipart/x-byteranges 14.6\n - message 3.4 , **6**\n - message abstraction **6**\n - messages **3.4**\n - metadata **8.8**\n - Method\n - * **18.2**\n - CONNECT 3.3 , 6.4.1 , 7.1 , 8.6 , 9.1 , **9.3.6** , 16 , 16.1.2 , 18.2\n - DELETE 9.1 , 9.2.2 , **9.3.5** , 18.2 , B.3\n - 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\n - HEAD 6 , 6.4.1 , 8.6 , 8.7 , 9.1 , 9.2.1 , **9.3.2** , 18.2 , B.3\n - OPTIONS 7.1 , 7.6.2 , 9.1 , 9.2.1 , **9.3.7** , 16.1.2 , 18.2 , B.3\n - POST 6.4.1 , 8.7 , 9.1 , 9.3.1 , **9.3.3** , 18.2\n - 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\n - TRACE 7.6.2 , 9.1 , 9.2.1 , **9.3.8** , 18.2 , B.3\n - multipart/byteranges Media Type **14.6**\n - multipart/x-byteranges Media Type 14.6\n- **N**\n - non-transforming proxy **7.7**\n- **O**\n - OPTIONS method 7.1 , 7.6.2 , 9.1 , 9.2.1 , **9.3.7** , 16.1.2 , 18.2 , B.3\n - origin **4.3.1** , 11.5\n - origin server **3.6**\n - outbound **3.7**\n - *OWASP* 17 , 17.16 , **19.2**\n- **P**\n - phishing **17.1**\n - POST method 6.4.1 , 8.7 , 9.1 , 9.3.1 , **9.3.3** , 18.2\n - Protection Space 11.5\n - proxy **3.7**\n - Proxy-Authenticate header field **11.7.1** , 15.5.8 , 18.4\n - Proxy-Authentication-Info header field **11.7.3** , 18.4\n - Proxy-Authorization header field **11.7.2** , 11.7.3 , 15.5.8 , 18.4\n - 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\n- **R**\n - Range header field 9.3.1 , 14.1 , **14.2** , 15.5.17 , 16.1.2 , 18.4 , B.5\n - Realm 11.5\n - recipient **3.4**\n - Referer header field **10.1.3** , 17.9 , 18.4\n - representation **3.2**\n - request **3.4**\n - request target **7.1**\n - resource **3.1** , 4\n - response **3.4**\n - *REST* 3.2 , 9.1 , **19.2**\n - Retry-After header field **10.2.3** , 15.6.4 , 18.4\n - reverse proxy **3.7**\n - *RFC1919* 3.7 , **19.2**\n - *RFC1950* 8.4.1.2 , 18.6 , **19.1**\n - *RFC1951* 8.4.1.2 , 18.6 , **19.1**\n - *RFC1952* 8.4.1.3 , 18.6 , **19.1**\n - *RFC2046* 8.3 , 8.3.1 , 8.3.1 , 8.3.3 , 14.6 , 14.6 , **19.1**\n - *Section 4.1.2* 8.3.1\n - *Section 4.5.1* 8.3\n - *Section 5.1* 14.6\n - *Section 5.1.1* 8.3.3\n - *RFC2047* 5.5 , **19.2**\n - *RFC2068* 1.2 , 7.6.1 , 15.4 , **19.2** , \"Acknowledgements\"\n - *Section 10.3* 15.4\n - *Section 19.7.1* 7.6.1\n - *RFC2119* 2.2 , **19.1**\n - *RFC2145* **19.2** , \"Acknowledgements\"\n - *RFC2295* 12 , **19.2**\n - *RFC2324* 15.5.19 , **19.2**\n - *RFC2557* 8.7 , **19.2**\n - *Section 4* 8.7\n - *RFC2616* 1.2 , 8.8.3 , 12.5.4 , 18.4 , **19.2** , \"Acknowledgements\"\n - *Section 3.11* 8.8.3\n - *Section 14.4* 12.5.4\n - *Section 14.15* 18.4\n - *RFC2617* **19.2** , \"Acknowledgements\"\n - *RFC2774* 16.1.2 , **19.2**\n - *RFC2818* 1.4 , **19.2** , \"Acknowledgements\"\n - *RFC2978* 8.3.2 , 8.3.2 , **19.2**\n - *Section 2* 8.3.2\n - *Section 2.3* 8.3.2\n - *RFC3040* 3.7 , **19.2**\n - *RFC3864* 18.4 , **19.2**\n - *RFC3875* 17.10 , **19.2**\n - *Section 4.1.18* 17.10\n - *RFC4033* 17.1 , **19.2**\n - *RFC4289* **§**\n - *RFC4559* 3.3 , **19.2**\n - *RFC4647* 12.5.4 , 12.5.4 , 12.5.4 , 12.5.4 , **19.1** , A\n - *Section 2.1* 12.5.4 , A\n - *Section 2.3* 12.5.4\n - *Section 3* 12.5.4\n - *Section 3.3.1* 12.5.4\n - *RFC4648* 11.2 , **19.1**\n - *RFC5234* 2.1 , 2.1 , 5.5 , 5.6.1 , **19.1**\n - *Appendix B.1* 2.1\n - *RFC5280* 4.3.5 , **19.1**\n - *Section 4.2.1.6* 4.3.5\n - *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\n - *Section 3.3* 5.6.7 , 5.6.7\n - *Section 3.4* 10.1.2 , 10.1.2 , A\n - *Section 3.6.1* 6.6.1\n - *Section 3.6.7* 7.6.3\n - *RFC5646* 8.5.1 , 8.5.1 , 8.5.1 , **19.1** , A\n - *Section 2.1* 8.5.1 , A\n - *RFC5789* 12.3 , 14.5 , **19.2**\n - *Section 3.1* 12.3\n - *RFC5905* 5.6.7 , **19.2**\n - *RFC6125* 4.3.4 , 4.3.4 , **19.1**\n - *Section 6* 4.3.4\n - *Section 6.2.1* 4.3.4\n - *RFC6365* 2.1 , 8.3.2 , **19.1**\n - *RFC6454* 4.3.1 , **19.2**\n - *RFC6585* 17.5 , **19.2**\n - *RFC6648* **§**\n - *RFC6838* **§**\n - *RFC7230* 1.2 , 1.4 , 1.4 , 1.4 , **19.2** , \"Acknowledgements\"\n - *RFC7231* 1.4 , 15.4.6 , 18.4 , **19.2** , \"Acknowledgements\"\n - *Appendix B* 15.4.6 , 18.4\n - *RFC7232* 1.4 , **19.2** , \"Acknowledgements\"\n - *RFC7233* 1.4 , **19.2** , \"Acknowledgements\"\n - *RFC7234* **19.2** , \"Acknowledgements\"\n - *RFC7235* 1.2 , 1.4 , **19.2** , \"Acknowledgements\"\n - *RFC7405* 2.1 , **19.1**\n - *RFC7538* 1.4 , 15.4 , 15.4.9 , **19.2** , B.3\n - *Section 4* 15.4.9\n - *RFC7540* **19.2** , B.3\n - *RFC7578* 8.3.3 , **19.2**\n - *RFC7595* **§**\n - *RFC7615* 1.4 , **19.2**\n - *RFC7616* 11.1 , 11.6.3 , **19.2**\n - *Section 3.5* 11.6.3\n - *RFC7617* 11.1 , **19.2**\n - *RFC7694* 1.4 , **19.2** , B.3 , B.9\n - *RFC8126* 16.1.1 , 16.2.1 , 16.3.1 , 16.4.1 , 16.5.1 , 16.6.1 , 16.7 , **19.2**\n - *Section 4.4* 16.7\n - *Section 4.6* 16.3.1\n - *Section 4.8* 16.1.1 , 16.2.1 , 16.4.1 , 16.5.1 , 16.6.1\n - *RFC8174* 2.2 , **19.1**\n - *RFC8187* 5.5 , **19.2**\n - *RFC8246* 13.2.1 , **19.2**\n - *RFC8288* 15.4.1 , **19.2**\n - *RFC8336* 4.3.3 , 17.1 , **19.2**\n - *RFC8615* 16.3 , **19.2**\n - *RFC8941* 16.3.2.2 , 16.3.2.2 , **19.2**\n- **S**\n - safe **9.2.1**\n - satisfiable range **14.1.1**\n - secured **4.2.2**\n - selected representation **3.2** , 8.8 , 13.1\n - self-descriptive **6**\n - sender **3.4**\n - server **3.3**\n - Server header field **10.2.4** , 17.12 , 18.4\n - singleton field 5.5\n - *Sniffing* 8.3 , **19.2**\n - spider **3.5**\n - Status Code 15\n - Status Codes\n - Final 15\n - Informational 15\n - Interim 15\n - Status Codes Classes\n - 1xx Informational **15.2**\n - 2xx Successful **15.3**\n - 3xx Redirection 7.8 , **15.4** , 16.3.2 , B.3\n - 4xx Client Error **15.5**\n - 5xx Server Error **15.6**\n- **T**\n - target resource **7.1**\n - target URI **7.1**\n - *TCP* 4.2.1 , **19.1**\n - TE header field 6.5.1 , 7.6.1 , **10.1.4** , 18.4\n - *TLS13* 3.7 , 4.2.2 , 9.3.6 , **19.1**\n - TRACE method 7.6.2 , 9.1 , 9.2.1 , **9.3.8** , 18.2 , B.3\n - Trailer Fields **6.5**\n - ETag 8.8 , **8.8.3** , 18.4\n - Trailer header field 6.5.2 , **6.6.2** , 18.4\n - trailer section **6.5**\n - trailers **6.5**\n - transforming proxy **7.7**\n - transparent proxy **3.7**\n - tunnel **3.7**\n- **U**\n - unsatisfiable range **14.1.1**\n - Upgrade header field 3.3 , 7.6.1 , 7.6.3 , **7.8** , 15.2.2 , 15.5.22 , 18.4\n - upstream **3.7**\n - URI **4**\n - origin **4.3.1**\n - *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\n - *Section 2.1* 4.2.3\n - *Section 2.2* 4.2.3\n - *Section 3.2* 4.1 , A\n - *Section 3.2.1* 4.2.4\n - *Section 3.2.2* 4.1 , 4.2.1 , 4.2.2 , 4.3.5 , A\n - *Section 3.2.3* 4.1 , 4.2.1 , 4.2.2 , A\n - *Section 3.3* 4.1 , 4.1 , A , A\n - *Section 3.4* 4.1 , A\n - *Section 3.5* 4.2.5 , 7.1\n - *Section 4.1* 4.1 , A\n - *Section 4.2* 4.1 , 10.2.2 , A\n - *Section 4.3* 4.1 , 4.2.5 , A\n - *Section 5* 8.7 , 10.1.3 , 10.2.2\n - *Section 6* 4.2.3\n - *Section 6.2* 4.2.3\n - *Section 6.2.3* 4.2.3\n - *Section 7* 17\n - URI reference **4.1**\n - URI scheme\n - http **4.2.1**\n - https **4.2.2**\n - *USASCII* 5.5 , **19.1**\n - user agent **3.5**\n - User-Agent header field **10.1.5** , 10.2.4 , 17.12 , 18.4\n- **V**\n - validator **8.8**\n - strong **8.8.1**\n - weak **8.8.1**\n - Vary header field 12.1 , **12.5.5** , 16.3.2 , 18.4 , 18.4 , 18.4 , B.3\n - Via header field 6.2 , **7.6.3** , 9.3.8 , 17.12 , 18.4 , B.2\n- **W**\n - *WEBDAV* 8.8 , 13.1 , **19.2** , B.3\n - *Section 10.4* 13.1\n - *Section 11.2* B.3\n - *Welch* 8.4.1.1 , 18.6 , **19.1**\n - WWW-Authenticate header field **11.6.1** , 11.7.1 , 15.5.2 , 18.4\n- **X**\n - x-compress (content coding) **8.4.1**\n - x-gzip (content coding) **8.4.1**\n\n## Authors' Addresses\n\n**Roy T. Fielding** (editor)\nAdobe\n345 Park Ave\nSan Jose, CA 95110\nUnited States of America\nEmail: fielding@gbiv.com\nURI: [https://roy.gbiv.com/](https://roy.gbiv.com/)\n\n**Mark Nottingham** (editor)\nFastly\nPrahran\nAustralia\nEmail: mnot@mnot.net\nURI: [https://www.mnot.net/](https://www.mnot.net/)\n\n**Julian Reschke** (editor)\ngreenbytes GmbH\nHafenweg 16\n48155 MĂĽnster\nGermany\nEmail: julian.reschke@greenbytes.de\nURI: [https://greenbytes.de/tech/webdav/](https://greenbytes.de/tech/webdav/)", "znaku_textu": 460355, "slov": 70604, "odkazu": 1819, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:45", "sha256": "5313be9ca076b6470ca9e6fecc3c2deaecb1eb9f6d79cd53c51b3bd65f4fbac6", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/info/std97", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9110", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.iana.org/assignments/uri-schemes/", "https://www.rfc-editor.org/rfc/rfc6125.html", "https://www.rfc-editor.org/rfc/rfc5280.html", "https://www.rfc-editor.org/rfc/rfc5322.html", "https://www.rfc-editor.org/rfc/rfc9113.html", "https://www.rfc-editor.org/rfc/rfc2068.html", "https://www.rfc-editor.org/rfc/rfc2046.html", "https://www.rfc-editor.org/rfc/rfc6365.html", "https://www.iana.org/assignments/character-sets", "https://www.rfc-editor.org/rfc/rfc2978.html", "https://www.rfc-editor.org/rfc/rfc5646.html", "https://www.rfc-editor.org/rfc/rfc2557.html", "https://www.rfc-editor.org/rfc/rfc2616.html", "https://www.rfc-editor.org/rfc/rfc7616.html", "https://www.rfc-editor.org/rfc/rfc5789.html", "https://www.rfc-editor.org/rfc/rfc4647.html", "https://www.rfc-editor.org/rfc/rfc4918.html", "https://www.rfc-editor.org/rfc/rfc1945.html", "https://www.rfc-editor.org/rfc/rfc7231.html", "https://www.rfc-editor.org/rfc/rfc7538.html", "https://www.iana.org/assignments/http-methods", "https://www.rfc-editor.org/rfc/rfc8126.html", "https://www.iana.org/assignments/http-status-codes", "https://www.iana.org/assignments/http-fields/", "https://www.iana.org/assignments/http-authschemes", "https://www.iana.org/assignments/http-parameters", "https://www.iana.org/assignments/http-parameters/", "https://www.iana.org/assignments/http-upgrade-tokens", "https://www.rfc-editor.org/rfc/rfc3875.html", "https://www.iana.org/assignments/message-headers/", "https://www.iana.org/assignments/http-fields", "https://www.iana.org/assignments/media-types", "https://www.iana.org/assignments/service-names-port-numbers/", "https://www.rfc-editor.org/rfc/rfc9111.html", "https://www.rfc-editor.org/info/std98", "https://dx.doi.org/10.17487/RFC9111", "https://www.rfc-editor.org/rfc/rfc1950.html", "https://dx.doi.org/10.17487/RFC1950", "https://www.rfc-editor.org/info/rfc1950", "https://www.rfc-editor.org/rfc/rfc1951.html", "https://dx.doi.org/10.17487/RFC1951", "https://www.rfc-editor.org/info/rfc1951", "https://www.rfc-editor.org/rfc/rfc1952.html", "https://dx.doi.org/10.17487/RFC1952", "https://www.rfc-editor.org/info/rfc1952", "https://dx.doi.org/10.17487/RFC2046", "https://www.rfc-editor.org/info/rfc2046", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/info/bcp47", "https://dx.doi.org/10.17487/RFC4647", "https://www.rfc-editor.org/info/rfc4647", "https://www.rfc-editor.org/rfc/rfc4648.html", "https://dx.doi.org/10.17487/RFC4648", "https://www.rfc-editor.org/info/rfc4648", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "https://www.rfc-editor.org/info/rfc5234", "https://dx.doi.org/10.17487/RFC5280", "https://www.rfc-editor.org/info/rfc5280", "https://dx.doi.org/10.17487/RFC5322", "https://www.rfc-editor.org/info/rfc5322", "https://dx.doi.org/10.17487/RFC5646", "https://www.rfc-editor.org/info/rfc5646", "https://dx.doi.org/10.17487/RFC6125", "https://www.rfc-editor.org/info/rfc6125", "https://www.rfc-editor.org/info/bcp166", "https://dx.doi.org/10.17487/RFC6365", "https://www.rfc-editor.org/info/rfc6365", "https://www.rfc-editor.org/rfc/rfc7405.html", "https://dx.doi.org/10.17487/RFC7405", "https://www.rfc-editor.org/info/rfc7405", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/rfc/rfc793.html", "https://www.rfc-editor.org/info/std7", "https://dx.doi.org/10.17487/RFC0793", "https://www.rfc-editor.org/info/rfc793", "https://www.rfc-editor.org/rfc/rfc8446.html", "https://dx.doi.org/10.17487/RFC8446", "https://www.rfc-editor.org/info/rfc8446", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "https://www.rfc-editor.org/info/rfc3986", "https://ieeexplore.ieee.org/document/1659158/", "https://dx.doi.org/10.1109/MC.1984.1659158", "https://www.rfc-editor.org/rfc/rfc7838.html", "https://dx.doi.org/10.17487/RFC7838"]} {"url": "https://httpwg.org/specs/rfc9111.html", "titulek": "RFC 9111 - HTTP Caching", "h1": "HTTP Caching", "popis": "The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP caches and the associated header fields that control cache behavior or indicate cacheable response messages. This document obsoletes RFC 7234.", "klicova_slova": "Hypertext Transfer Protocol, HTTP, HTTP Caching", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9111", "og:description": "HTTP Caching", "og:url": "https://httpwg.org/specs/rfc9111.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Requirements Notation"}, {"uroven": 3, "text": "1.2. Syntax Notation"}, {"uroven": 4, "text": "1.2.1. Imported Rules"}, {"uroven": 4, "text": "1.2.2. Delta Seconds"}, {"uroven": 2, "text": "2. Overview of Cache Operation"}, {"uroven": 2, "text": "3. Storing Responses in Caches"}, {"uroven": 3, "text": "3.1. Storing Header and Trailer Fields"}, {"uroven": 3, "text": "3.2. Updating Stored Header Fields"}, {"uroven": 3, "text": "3.3. Storing Incomplete Responses"}, {"uroven": 3, "text": "3.4. Combining Partial Content"}, {"uroven": 3, "text": "3.5. Storing Responses to Authenticated Requests"}, {"uroven": 2, "text": "4. Constructing Responses from Caches"}, {"uroven": 3, "text": "4.1. Calculating Cache Keys with the Vary Header Field"}, {"uroven": 3, "text": "4.2. Freshness"}, {"uroven": 4, "text": "4.2.1. Calculating Freshness Lifetime"}, {"uroven": 4, "text": "4.2.2. Calculating Heuristic Freshness"}, {"uroven": 4, "text": "4.2.3. Calculating Age"}, {"uroven": 4, "text": "4.2.4. Serving Stale Responses"}, {"uroven": 3, "text": "4.3. Validation"}, {"uroven": 4, "text": "4.3.1. Sending a Validation Request"}, {"uroven": 4, "text": "4.3.2. Handling a Received Validation Request"}, {"uroven": 4, "text": "4.3.3. Handling a Validation Response"}, {"uroven": 4, "text": "4.3.4. Freshening Stored Responses upon Validation"}, {"uroven": 4, "text": "4.3.5. Freshening Responses with HEAD"}, {"uroven": 3, "text": "4.4. Invalidating Stored Responses"}, {"uroven": 2, "text": "5. Field Definitions"}, {"uroven": 3, "text": "5.1. Age"}, {"uroven": 3, "text": "5.2. Cache-Control"}, {"uroven": 4, "text": "5.2.1. Request Directives"}, {"uroven": 5, "text": "5.2.1.1. max-age"}, {"uroven": 5, "text": "5.2.1.2. max-stale"}, {"uroven": 5, "text": "5.2.1.3. min-fresh"}, {"uroven": 5, "text": "5.2.1.4. no-cache"}, {"uroven": 5, "text": "5.2.1.5. no-store"}, {"uroven": 5, "text": "5.2.1.6. no-transform"}, {"uroven": 5, "text": "5.2.1.7. only-if-cached"}, {"uroven": 4, "text": "5.2.2. Response Directives"}, {"uroven": 5, "text": "5.2.2.1. max-age"}, {"uroven": 5, "text": "5.2.2.2. must-revalidate"}, {"uroven": 5, "text": "5.2.2.3. must-understand"}, {"uroven": 5, "text": "5.2.2.4. no-cache"}, {"uroven": 5, "text": "5.2.2.5. no-store"}, {"uroven": 5, "text": "5.2.2.6. no-transform"}, {"uroven": 5, "text": "5.2.2.7. private"}, {"uroven": 5, "text": "5.2.2.8. proxy-revalidate"}, {"uroven": 5, "text": "5.2.2.9. public"}, {"uroven": 5, "text": "5.2.2.10. s-maxage"}, {"uroven": 4, "text": "5.2.3. Extension Directives"}, {"uroven": 4, "text": "5.2.4. Cache Directive Registry"}, {"uroven": 3, "text": "5.3. Expires"}, {"uroven": 3, "text": "5.4. Pragma"}, {"uroven": 3, "text": "5.5. Warning"}, {"uroven": 2, "text": "6. Relationship to Applications and Other Caches"}, {"uroven": 2, "text": "7. Security Considerations"}, {"uroven": 3, "text": "7.1. Cache Poisoning"}, {"uroven": 3, "text": "7.2. Timing Attacks"}, {"uroven": 3, "text": "7.3. Caching of Sensitive Information"}, {"uroven": 2, "text": "8. IANA Considerations"}, {"uroven": 3, "text": "8.1. Field Name Registration"}, {"uroven": 3, "text": "8.2. Cache Directive Registration"}, {"uroven": 3, "text": "8.3. Warn Code Registry"}, {"uroven": 2, "text": "9. References"}, {"uroven": 3, "text": "9.1. Normative References"}, {"uroven": 3, "text": "9.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Collected ABNF"}, {"uroven": 2, "text": "Appendix B. Changes from RFC 7234"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Index"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP caches and the associated header fields that control cache behavior or indicate cacheable response messages.\n\nThis document obsoletes RFC 7234.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9111](https://www.rfc-editor.org/info/rfc9111).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Requirements Notation\n - 1.2. Syntax Notation\n - 1.2.1. Imported Rules\n - 1.2.2. Delta Seconds\n- 2. Overview of Cache Operation\n- 3. Storing Responses in Caches\n - 3.1. Storing Header and Trailer Fields\n - 3.2. Updating Stored Header Fields\n - 3.3. Storing Incomplete Responses\n - 3.4. Combining Partial Content\n - 3.5. Storing Responses to Authenticated Requests\n- 4. Constructing Responses from Caches\n - 4.1. Calculating Cache Keys with the Vary Header Field\n - 4.2. Freshness\n - 4.2.1. Calculating Freshness Lifetime\n - 4.2.2. Calculating Heuristic Freshness\n - 4.2.3. Calculating Age\n - 4.2.4. Serving Stale Responses\n - 4.3. Validation\n - 4.3.1. Sending a Validation Request\n - 4.3.2. Handling a Received Validation Request\n - 4.3.3. Handling a Validation Response\n - 4.3.4. Freshening Stored Responses upon Validation\n - 4.3.5. Freshening Responses with HEAD\n - 4.4. Invalidating Stored Responses\n- 5. Field Definitions\n - 5.1. Age\n - 5.2. Cache-Control\n - 5.2.1. Request Directives\n - 5.2.1.1. max-age\n - 5.2.1.2. max-stale\n - 5.2.1.3. min-fresh\n - 5.2.1.4. no-cache\n - 5.2.1.5. no-store\n - 5.2.1.6. no-transform\n - 5.2.1.7. only-if-cached\n - 5.2.2. Response Directives\n - 5.2.2.1. max-age\n - 5.2.2.2. must-revalidate\n - 5.2.2.3. must-understand\n - 5.2.2.4. no-cache\n - 5.2.2.5. no-store\n - 5.2.2.6. no-transform\n - 5.2.2.7. private\n - 5.2.2.8. proxy-revalidate\n - 5.2.2.9. public\n - 5.2.2.10. s-maxage\n - 5.2.3. Extension Directives\n - 5.2.4. Cache Directive Registry\n - 5.3. Expires\n - 5.4. Pragma\n - 5.5. Warning\n- 6. Relationship to Applications and Other Caches\n- 7. Security Considerations\n - 7.1. Cache Poisoning\n - 7.2. Timing Attacks\n - 7.3. Caching of Sensitive Information\n- 8. IANA Considerations\n - 8.1. Field Name Registration\n - 8.2. Cache Directive Registration\n - 8.3. Warn Code Registry\n- 9. References\n - 9.1. Normative References\n - 9.2. Informative References\n- Appendix A. Collected ABNF\n- Appendix B. Changes from RFC 7234\n- Acknowledgements\n- Index\n- Authors' Addresses\n\n## 1. Introduction\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level request/response protocol that uses extensible semantics and self-descriptive messages for flexible interaction with network-based hypertext information systems. It is typically used for distributed information systems, where the use of response caches can improve performance. This document defines aspects of HTTP related to caching and reusing response messages.\n\nAn HTTP cache is a local store of response messages and the subsystem that controls storage, retrieval, and deletion of messages in it. A cache stores cacheable responses to reduce the response time and network bandwidth consumption on future equivalent requests. Any client or server *MAY* use a cache, though not when acting as a tunnel ([Section 3.7](rfc9110.html#intermediaries) of [HTTP]).\n\nA shared cache is a cache that stores responses for reuse by more than one user; shared caches are usually (but not always) deployed as a part of an intermediary. A private cache, in contrast, is dedicated to a single user; often, they are deployed as a component of a user agent.\n\nThe goal of HTTP caching is significantly improving performance by reusing a prior response message to satisfy a current request. A cache considers a stored response \"fresh\", as defined in Section 4.2, if it can be reused without \"validation\" (checking with the origin server to see if the cached response remains valid for this request). A fresh response can therefore reduce both latency and network overhead each time the cache reuses it. When a cached response is not fresh, it might still be reusable if validation can freshen it (Section 4.3) or if the origin is unavailable (Section 4.2.4).\n\nThis document obsoletes RFC 7234, with the changes being summarized in Appendix B.\n\n### 1.1. Requirements Notation\n\nThe 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.\n\n[Section 2](rfc9110.html#conformance) of [HTTP] defines conformance criteria and contains considerations regarding error handling.\n\n### 1.2. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234], extended with the notation for case-sensitivity in strings defined in [RFC7405].\n\nIt also uses a list extension, defined in [Section 5.6.1](rfc9110.html#abnf.extension) of [HTTP], 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.\n\n#### 1.2.1. Imported Rules\n\nThe following core rule is included by reference, as defined in [RFC5234], [Appendix B.1](https://www.rfc-editor.org/rfc/rfc5234.html#appendix-B.1): DIGIT (decimal 0-9).\n\n[HTTP] defines the following rules:\n\n```\n HTTP-date = \n OWS = \n field-name = \n quoted-string = \n token = \n```\n\n#### 1.2.2. Delta Seconds\n\nThe delta-seconds rule specifies a non-negative integer, representing time in seconds.\n\n```\n delta-seconds = 1*DIGIT \n```\n\nA recipient parsing a delta-seconds value and converting it to binary form ought to use an arithmetic type of at least 31 bits of non-negative integer range. If a cache receives a delta-seconds value greater than the greatest integer it can represent, or if any of its subsequent calculations overflows, the cache *MUST* consider the value to be 2147483648 (231) or the greatest positive integer it can conveniently represent.\n\n## 2. Overview of Cache Operation\n\nProper cache operation preserves the semantics of HTTP transfers while reducing the transmission of information already held in the cache. See [Section 3](rfc9110.html#terminology) of [HTTP] for the general terminology and core concepts of HTTP.\n\nAlthough caching is an entirely *OPTIONAL* feature of HTTP, it can be assumed that reusing a cached response is desirable and that such reuse is the default behavior when no requirement or local configuration prevents it. Therefore, HTTP cache requirements are focused on preventing a cache from either storing a non-reusable response or reusing a stored response inappropriately, rather than mandating that caches always store and reuse particular responses.\n\nThe cache key is the information a cache uses to choose a response and is composed from, at a minimum, the request method and target URI used to retrieve the stored response; the method determines under which circumstances that response can be used to satisfy a subsequent request. However, many HTTP caches in common use today only cache GET responses and therefore only use the URI as the cache key.\n\nA cache might store multiple responses for a request target that is subject to content negotiation. Caches differentiate these responses by incorporating some of the original request's header fields into the cache key as well, using information in the [Vary](rfc9110.html#field.vary) response header field, as per Section 4.1.\n\nCaches might incorporate additional material into the cache key. For example, user agent caches might include the referring site's identity, thereby \"double keying\" the cache to avoid some privacy risks (see Section 7.2).\n\nMost commonly, caches store the successful result of a retrieval request: i.e., a [200 (OK)](rfc9110.html#status.200) response to a GET request, which contains a representation of the target resource ([Section 9.3.1](rfc9110.html#GET) of [HTTP]). However, it is also possible to store redirects, negative results (e.g., [404 (Not Found)](rfc9110.html#status.404)), incomplete results (e.g., [206 (Partial Content)](rfc9110.html#status.206)), and responses to methods other than GET if the method's definition allows such caching and defines something suitable for use as a cache key.\n\nA cache is disconnected when it cannot contact the origin server or otherwise find a forward path for a request. A disconnected cache can serve stale responses in some circumstances (Section 4.2.4).\n\n## 3. Storing Responses in Caches\n\nA cache *MUST NOT* store a response to a request unless:\n\n- the request method is understood by the cache;\n- the response status code is final (see [Section 15](rfc9110.html#status.codes) of [HTTP]);\n- if the response status code is 206 or 304, or the must-understand cache directive (see Section 5.2.2.3) is present: the cache understands the response status code;\n- the no-store cache directive is not present in the response (see Section 5.2.2.5);\n- if the cache is shared: the private response directive is either not present or allows a shared cache to store a modified response; see Section 5.2.2.7);\n- if the cache is shared: the [Authorization](rfc9110.html#field.authorization) header field is not present in the request (see [Section 11.6.2](rfc9110.html#field.authorization) of [HTTP]) or a response directive is present that explicitly allows shared caching (see Section 3.5); and\n- the response contains at least one of the following: a public response directive (see Section 5.2.2.9);a private response directive, if the cache is not shared (see Section 5.2.2.7);an Expires header field (see Section 5.3);a max-age response directive (see Section 5.2.2.1);if the cache is shared: an s-maxage response directive (see Section 5.2.2.10);a cache extension that allows it to be cached (see Section 5.2.3); ora status code that is defined as heuristically cacheable (see Section 4.2.2).\n\nNote that a cache extension can override any of the requirements listed; see Section 5.2.3.\n\nIn this context, a cache has \"understood\" a request method or a response status code if it recognizes it and implements all specified caching-related behavior.\n\nNote that, in normal operation, some caches will not store a response that has neither a cache validator nor an explicit expiration time, as such responses are not usually useful to store. However, caches are not prohibited from storing such responses.\n\n### 3.1. Storing Header and Trailer Fields\n\nCaches *MUST* include all received response header fields — including unrecognized ones — when storing a response; this assures that new HTTP header fields can be successfully deployed. However, the following exceptions are made:\n\n- The Connection header field and fields whose names are listed in it are required by [Section 7.6.1](rfc9110.html#field.connection) of [HTTP] to be removed before forwarding the message. This *MAY* be implemented by doing so before storage.\n- Likewise, some fields' semantics require them to be removed before forwarding the message, and this *MAY* be implemented by doing so before storage; see [Section 7.6.1](rfc9110.html#field.connection) of [HTTP] for some examples.\n- The no-cache ( Section 5.2.2.4 ) and private ( Section 5.2.2.7 ) cache directives can have arguments that prevent storage of header fields by all caches and shared caches, respectively.\n- Header fields that are specific to the proxy that a cache uses when forwarding a request *MUST NOT* be stored, unless the cache incorporates the identity of the proxy into the cache key. Effectively, this is limited to Proxy-Authenticate ( [Section 11.7.1](rfc9110.html#field.proxy-authenticate) of [HTTP] ), Proxy-Authentication-Info ( [Section 11.7.3](rfc9110.html#field.proxy-authentication-info) of [HTTP] ), and Proxy-Authorization ( [Section 11.7.2](rfc9110.html#field.proxy-authorization) of [HTTP] ).\n\nCaches *MAY* either store trailer fields separate from header fields or discard them. Caches *MUST NOT* combine trailer fields with header fields.\n\n### 3.2. Updating Stored Header Fields\n\nCaches are required to update a stored response's header fields from another (typically newer) response in several situations; for example, see Sections 3.4, 4.3.4, and 4.3.5.\n\nWhen doing so, the cache *MUST* add each header field in the provided response to the stored response, replacing field values that are already present, with the following exceptions:\n\n- Header fields excepted from storage in Section 3.1 ,\n- Header fields that the cache's stored response depends upon, as described below,\n- Header fields that are automatically processed and removed by the recipient, as described below, and\n- The [Content-Length](rfc9110.html#field.content-length) header field.\n\nIn some cases, caches (especially in user agents) store the results of processing the received response, rather than the response itself, and updating header fields that affect that processing can result in inconsistent behavior and security issues. Caches in this situation *MAY* omit these header fields from updating stored responses on an exceptional basis but *SHOULD* limit such omission to those fields necessary to assure integrity of the stored response.\n\nFor example, a browser might decode the content coding of a response while it is being received, creating a disconnect between the data it has stored and the response's original metadata. Updating that stored metadata with a different [Content-Encoding](rfc9110.html#field.content-encoding) header field would be problematic. Likewise, a browser might store a post-parse HTML tree rather than the content received in the response; updating the [Content-Type](rfc9110.html#field.content-type) header field would not be workable in this case because any assumptions about the format made in parsing would now be invalid.\n\nFurthermore, some fields are automatically processed and removed by the HTTP implementation, such as the [Content-Range](rfc9110.html#field.content-range) header field. Implementations *MAY* automatically omit such header fields from updates, even when the processing does not actually occur.\n\nNote that the Content-* prefix is not a signal that a header field is omitted from update; it is a convention for MIME header fields, not HTTP.\n\n### 3.3. Storing Incomplete Responses\n\nIf the request method is GET, the response status code is [200\n (OK)](rfc9110.html#status.200), and the entire response header section has been received, a cache *MAY* store a response that is not complete ([Section 6.1](rfc9110.html#message.framing) of [HTTP]) provided that the stored response is recorded as being incomplete. Likewise, a [206 (Partial\n Content)](rfc9110.html#status.206) response *MAY* be stored as if it were an incomplete [200 (OK)](rfc9110.html#status.200) response. However, a cache *MUST NOT* store incomplete or partial-content responses if it does not support the [Range](rfc9110.html#field.range) and [Content-Range](rfc9110.html#field.content-range) header fields or if it does not understand the range units used in those fields.\n\nA cache *MAY* complete a stored incomplete response by making a subsequent range request ([Section 14.2](rfc9110.html#field.range) of [HTTP]) and combining the successful response with the stored response, as defined in Section 3.4. A cache *MUST NOT* use an incomplete response to answer requests unless the response has been made complete, or the request is partial and specifies a range wholly within the incomplete response. A cache *MUST NOT* send a partial response to a client without explicitly marking it using the [206 (Partial Content)](rfc9110.html#status.206) status code.\n\n### 3.4. Combining Partial Content\n\nA response might transfer only a partial representation if the connection closed prematurely or if the request used one or more Range specifiers ([Section 14.2](rfc9110.html#field.range) of [HTTP]). After several such transfers, a cache might have received several ranges of the same representation. A cache *MAY* combine these ranges into a single stored response, and reuse that response to satisfy later requests, if they all share the same strong validator and the cache complies with the client requirements in [Section 15.3.7.3](rfc9110.html#combining.byte.ranges) of [HTTP].\n\nWhen combining the new response with one or more stored responses, a cache *MUST* update the stored response header fields using the header fields provided in the new response, as per Section 3.2.\n\n### 3.5. Storing Responses to Authenticated Requests\n\nA shared cache *MUST NOT* use a cached response to a request with an [Authorization](rfc9110.html#field.authorization) header field ([Section 11.6.2](rfc9110.html#field.authorization) of [HTTP]) to satisfy any subsequent request unless the response contains a Cache-Control field with a response directive (Section 5.2.2) that allows it to be stored by a shared cache, and the cache conforms to the requirements of that directive for that response.\n\nIn this specification, the following response directives have such an effect: must-revalidate (Section 5.2.2.2), public (Section 5.2.2.9), and s-maxage (Section 5.2.2.10).\n\n## 4. Constructing Responses from Caches\n\nWhen presented with a request, a cache *MUST NOT* reuse a stored response unless:\n\n- the presented target URI ([Section 7.1](rfc9110.html#target.resource) of [HTTP]) and that of the stored response match, and\n- the request method associated with the stored response allows it to be used for the presented request, and\n- request header fields nominated by the stored response (if any) match those presented (see Section 4.1), and\n- the stored response does not contain the no-cache directive (Section 5.2.2.4), unless it is successfully validated (Section 4.3), and\n- the stored response is one of the following: fresh (see Section 4.2), orallowed to be served stale (see Section 4.2.4), orsuccessfully validated (see Section 4.3).\n\nNote that a cache extension can override any of the requirements listed; see Section 5.2.3.\n\nWhen a stored response is used to satisfy a request without validation, a cache *MUST* generate an Age header field (Section 5.1), replacing any present in the response with a value equal to the stored response's current_age; see Section 4.2.3.\n\nA cache *MUST* write through requests with methods that are unsafe ([Section 9.2.1](rfc9110.html#safe.methods) of [HTTP]) to the origin server; i.e., a cache is not allowed to generate a reply to such a request before having forwarded the request and having received a corresponding response.\n\nAlso, note that unsafe requests might invalidate already-stored responses; see Section 4.4.\n\nA cache can use a response that is stored or storable to satisfy multiple requests, provided that it is allowed to reuse that response for the requests in question. This enables a cache to collapse requests — or combine multiple incoming requests into a single forward request upon a cache miss — thereby reducing load on the origin server and network. Note, however, that if the cache cannot use the returned response for some or all of the collapsed requests, it will need to forward the requests in order to satisfy them, potentially introducing additional latency.\n\nWhen more than one suitable response is stored, a cache *MUST* use the most recent one (as determined by the [Date](rfc9110.html#field.date) header field). It can also forward the request with \"Cache-Control: max-age=0\" or \"Cache-Control: no-cache\" to disambiguate which response to use.\n\nA cache without a clock ([Section 5.6.7](rfc9110.html#http.date) of [HTTP]) *MUST* revalidate stored responses upon every use.\n\n### 4.1. Calculating Cache Keys with the Vary Header Field\n\nWhen a cache receives a request that can be satisfied by a stored response and that stored response contains a [Vary](rfc9110.html#field.vary) header field ([Section 12.5.5](rfc9110.html#field.vary) of [HTTP]), the cache *MUST NOT* use that stored response without revalidation unless all the presented request header fields nominated by that Vary field value match those fields in the original request (i.e., the request that caused the cached response to be stored).\n\nThe header fields from two requests are defined to match if and only if those in the first request can be transformed to those in the second request by applying any of the following:\n\n- adding or removing whitespace, where allowed in the header field's syntax\n- combining multiple header field lines with the same field name (see [Section 5.2](rfc9110.html#field.lines) of [HTTP] )\n- normalizing both header field values in a way that is known to have identical semantics, according to the header field's specification (e.g., reordering field values when order is not significant; case-normalization, where values are defined to be case-insensitive)\n\nIf (after any normalization that might take place) a header field is absent from a request, it can only match another request if it is also absent there.\n\nA stored response with a [Vary](rfc9110.html#field.vary) header field value containing a member \"*\" always fails to match.\n\nIf multiple stored responses match, the cache will need to choose one to use. When a nominated request header field has a known mechanism for ranking preference (e.g., qvalues on [Accept](rfc9110.html#field.accept) and similar request header fields), that mechanism *MAY* be used to choose a preferred response. If such a mechanism is not available, or leads to equally preferred responses, the most recent response (as determined by the [Date](rfc9110.html#field.date) header field) is chosen, as per Section 4.\n\nSome resources mistakenly omit the Vary header field from their default response (i.e., the one sent when the request does not express any preferences), with the effect of choosing it for subsequent requests to that resource even when more preferable responses are available. When a cache has multiple stored responses for a target URI and one or more omits the Vary header field, the cache *SHOULD* choose the most recent (see Section 4.2.3) stored response with a valid Vary field value.\n\nIf no stored response matches, the cache cannot satisfy the presented request. Typically, the request is forwarded to the origin server, potentially with preconditions added to describe what responses the cache has already stored (Section 4.3).\n\n### 4.2. Freshness\n\nA fresh response is one whose age has not yet exceeded its freshness lifetime. Conversely, a stale response is one where it has.\n\nA response's freshness lifetime is the length of time between its generation by the origin server and its expiration time. An explicit expiration time is the time at which the origin server intends that a stored response can no longer be used by a cache without further validation, whereas a heuristic expiration time is assigned by a cache when no explicit expiration time is available.\n\nA response's age is the time that has passed since it was generated by, or successfully validated with, the origin server.\n\nWhen a response is fresh, it can be used to satisfy subsequent requests without contacting the origin server, thereby improving efficiency.\n\nThe primary mechanism for determining freshness is for an origin server to provide an explicit expiration time in the future, using either the Expires header field (Section 5.3) or the max-age response directive (Section 5.2.2.1). Generally, origin servers will assign future explicit expiration times to responses in the belief that the representation is not likely to change in a semantically significant way before the expiration time is reached.\n\nIf an origin server wishes to force a cache to validate every request, it can assign an explicit expiration time in the past to indicate that the response is already stale. Compliant caches will normally validate a stale cached response before reusing it for subsequent requests (see Section 4.2.4).\n\nSince origin servers do not always provide explicit expiration times, caches are also allowed to use a heuristic to determine an expiration time under certain circumstances (see Section 4.2.2).\n\nThe calculation to determine if a response is fresh is:\n\n```\n response_is_fresh = (freshness_lifetime > current_age)\n```\n\nfreshness_lifetime is defined in Section 4.2.1; current_age is defined in Section 4.2.3.\n\nClients can send the max-age or min-fresh request directives (Section 5.2.1) to suggest limits on the freshness calculations for the corresponding response. However, caches are not required to honor them.\n\nWhen calculating freshness, to avoid common problems in date parsing:\n\n- Although all date formats are specified to be case-sensitive, a cache recipient *SHOULD* match the field value case-insensitively.\n- If a cache recipient's internal implementation of time has less resolution than the value of an HTTP-date, the recipient *MUST* internally represent a parsed Expires date as the nearest time equal to or earlier than the received value.\n- A cache recipient *MUST NOT* allow local time zones to influence the calculation or comparison of an age or expiration time.\n- A cache recipient *SHOULD* consider a date with a zone abbreviation other than \"GMT\" to be invalid for calculating expiration.\n\nNote that freshness applies only to cache operation; it cannot be used to force a user agent to refresh its display or reload a resource. See Section 6 for an explanation of the difference between caches and history mechanisms.\n\n#### 4.2.1. Calculating Freshness Lifetime\n\nA cache can calculate the freshness lifetime (denoted as freshness_lifetime) of a response by evaluating the following rules and using the first match:\n\n- If the cache is shared and the s-maxage response directive ( Section 5.2.2.10 ) is present, use its value, or\n- If the max-age response directive ( Section 5.2.2.1 ) is present, use its value, or\n- If the Expires response header field ( Section 5.3 ) is present, use its value minus the value of the [Date](rfc9110.html#field.date) response header field (using the time the message was received if it is not present, as per [Section 6.6.1](rfc9110.html#field.date) of [HTTP] ), or\n- Otherwise, no explicit expiration time is present in the response. A heuristic freshness lifetime might be applicable; see Section 4.2.2 .\n\nNote that this calculation is intended to reduce clock skew by using the clock information provided by the origin server whenever possible.\n\nWhen there is more than one value present for a given directive (e.g., two Expires header field lines or multiple Cache-Control: max-age directives), either the first occurrence should be used or the response should be considered stale. If directives conflict (e.g., both max-age and no-cache are present), the most restrictive directive should be honored. Caches are encouraged to consider responses that have invalid freshness information (e.g., a max-age directive with non-integer content) to be stale.\n\n#### 4.2.2. Calculating Heuristic Freshness\n\nSince origin servers do not always provide explicit expiration times, a cache *MAY* assign a heuristic expiration time when an explicit time is not specified, employing algorithms that use other field values (such as the [Last-Modified](rfc9110.html#field.last-modified) time) to estimate a plausible expiration time. This specification does not provide specific algorithms, but it does impose worst-case constraints on their results.\n\nA cache *MUST NOT* use heuristics to determine freshness when an explicit expiration time is present in the stored response. Because of the requirements in Section 3, heuristics can only be used on responses without explicit freshness whose status codes are defined as heuristically cacheable (e.g., see [Section 15.1](rfc9110.html#overview.of.status.codes) of [HTTP]) and on responses without explicit freshness that have been marked as explicitly cacheable (e.g., with a public response directive).\n\nNote that in previous specifications, heuristically cacheable response status codes were called \"cacheable by default\".\n\nIf the response has a [Last-Modified](rfc9110.html#field.last-modified) header field ([Section 8.8.2](rfc9110.html#field.last-modified) of [HTTP]), caches are encouraged to use a heuristic expiration value that is no more than some fraction of the interval since that time. A typical setting of this fraction might be 10%.\n\n#### 4.2.3. Calculating Age\n\nThe Age header field is used to convey an estimated age of the response message when obtained from a cache. The Age field value is the cache's estimate of the number of seconds since the origin server generated or validated the response. The Age value is therefore the sum of the time that the response has been resident in each of the caches along the path from the origin server, plus the time it has been in transit along network paths.\n\nAge calculation uses the following data:\n\nage_value\n\nThe term \"age_value\" denotes the value of the Age header field (Section 5.1), in a form appropriate for arithmetic operation; or 0, if not available.\n\ndate_value\n\nThe term \"date_value\" denotes the value of the Date header field, in a form appropriate for arithmetic operations. See [Section 6.6.1](rfc9110.html#field.date) of [HTTP] for the definition of the Date header field and for requirements regarding responses without it.\n\nnow\n\nThe term \"now\" means the current value of this implementation's clock ([Section 5.6.7](rfc9110.html#http.date) of [HTTP]).\n\nrequest_time\n\nThe value of the clock at the time of the request that resulted in the stored response.\n\nresponse_time\n\nThe value of the clock at the time the response was received.\n\nA response's age can be calculated in two entirely independent ways:\n\n1. the \"apparent_age\": response_time minus date_value, if the implementation's clock is reasonably well synchronized to the origin server's clock. If the result is negative, the result is replaced by zero.\n2. the \"corrected_age_value\", if all of the caches along the response path implement HTTP/1.1 or greater. A cache *MUST* interpret this value relative to the time the request was initiated, not the time that the response was received.\n\n```\n apparent_age = max(0, response_time - date_value);\n\n response_delay = response_time - request_time;\n corrected_age_value = age_value + response_delay;\n```\n\nThe corrected_age_value *MAY* be used as the corrected_initial_age. In circumstances where very old cache implementations that might not correctly insert Age are present, corrected_initial_age can be calculated more conservatively as\n\n```\n corrected_initial_age = max(apparent_age, corrected_age_value);\n```\n\nThe current_age of a stored response can then be calculated by adding the time (in seconds) since the stored response was last validated by the origin server to the corrected_initial_age.\n\n```\n resident_time = now - response_time;\n current_age = corrected_initial_age + resident_time;\n```\n\n#### 4.2.4. Serving Stale Responses\n\nA \"stale\" response is one that either has explicit expiry information or is allowed to have heuristic expiry calculated, but is not fresh according to the calculations in Section 4.2.\n\nA cache *MUST NOT* generate a stale response if it is prohibited by an explicit in-protocol directive (e.g., by a no-cache response directive, a must-revalidate response directive, or an applicable s-maxage or proxy-revalidate response directive; see Section 5.2.2).\n\nA cache *MUST NOT* generate a stale response unless it is disconnected or doing so is explicitly permitted by the client or origin server (e.g., by the max-stale request directive in Section 5.2.1, extension directives such as those defined in [RFC5861], or configuration in accordance with an out-of-band contract).\n\n### 4.3. Validation\n\nWhen a cache has one or more stored responses for a requested URI, but cannot serve any of them (e.g., because they are not fresh, or one cannot be chosen; see Section 4.1), it can use the conditional request mechanism ([Section 13](rfc9110.html#conditional.requests) of [HTTP]) in the forwarded request to give the next inbound server an opportunity to choose a valid stored response to use, updating the stored metadata in the process, or to replace the stored response(s) with a new response. This process is known as validating or revalidating the stored response.\n\n#### 4.3.1. Sending a Validation Request\n\nWhen generating a conditional request for validation, a cache either starts with a request it is attempting to satisfy or — if it is initiating the request independently — synthesizes a request using a stored response by copying the method, target URI, and request header fields identified by the Vary header field (Section 4.1).\n\nIt then updates that request with one or more precondition header fields. These contain validator metadata sourced from a stored response(s) that has the same URI. Typically, this will include only the stored response(s) that has the same cache key, although a cache is allowed to validate a response that it cannot choose with the request header fields it is sending (see Section 4.1).\n\nThe precondition header fields are then compared by recipients to determine whether any stored response is equivalent to a current representation of the resource.\n\nOne such validator is the timestamp given in a [Last-Modified](rfc9110.html#field.last-modified) header field ([Section 8.8.2](rfc9110.html#field.last-modified) of [HTTP]), which can be used in an [If-Modified-Since](rfc9110.html#field.if-modified-since) header field for response validation, or in an [If-Unmodified-Since](rfc9110.html#field.if-unmodified-since) or [If-Range](rfc9110.html#field.if-range) header field for representation selection (i.e., the client is referring specifically to a previously obtained representation with that timestamp).\n\nAnother validator is the entity tag given in an [ETag](rfc9110.html#field.etag) field ([Section 8.8.3](rfc9110.html#field.etag) of [HTTP]). One or more entity tags, indicating one or more stored responses, can be used in an [If-None-Match](rfc9110.html#field.if-none-match) header field for response validation, or in an [If-Match](rfc9110.html#field.if-match) or [If-Range](rfc9110.html#field.if-range) header field for representation selection (i.e., the client is referring specifically to one or more previously obtained representations with the listed entity tags).\n\nWhen generating a conditional request for validation, a cache:\n\n- *MUST* send the relevant entity tags (using [If-Match](rfc9110.html#field.if-match) , [If-None-Match](rfc9110.html#field.if-none-match) , or [If-Range](rfc9110.html#field.if-range) ) if the entity tags were provided in the stored response(s) being validated.\n- *SHOULD* send the [Last-Modified](rfc9110.html#field.last-modified) value (using [If-Modified-Since](rfc9110.html#field.if-modified-since) ) if the request is not for a subrange, a single stored response is being validated, and that response contains a Last-Modified value.\n- *MAY* send the [Last-Modified](rfc9110.html#field.last-modified) value (using [If-Unmodified-Since](rfc9110.html#field.if-unmodified-since) or [If-Range](rfc9110.html#field.if-range) ) if the request is for a subrange, a single stored response is being validated, and that response contains only a Last-Modified value (not an entity tag).\n\nIn most cases, both validators are generated in cache validation requests, even when entity tags are clearly superior, to allow old intermediaries that do not understand entity tag preconditions to respond appropriately.\n\n#### 4.3.2. Handling a Received Validation Request\n\nEach client in the request chain may have its own cache, so it is common for a cache at an intermediary to receive conditional requests from other (outbound) caches. Likewise, some user agents make use of conditional requests to limit data transfers to recently modified representations or to complete the transfer of a partially retrieved representation.\n\nIf a cache receives a request that can be satisfied by reusing a stored [200 (OK)](rfc9110.html#status.200) or [206 (Partial Content)](rfc9110.html#status.206) response, as per Section 4, the cache *SHOULD* evaluate any applicable conditional header field preconditions received in that request with respect to the corresponding validators contained within the stored response.\n\nA cache *MUST NOT* evaluate conditional header fields that only apply to an origin server, occur in a request with semantics that cannot be satisfied with a cached response, or occur in a request with a target resource for which it has no stored responses; such preconditions are likely intended for some other (inbound) server.\n\nThe proper evaluation of conditional requests by a cache depends on the received precondition header fields and their precedence. In summary, the [If-Match](rfc9110.html#field.if-match) and [If-Unmodified-Since](rfc9110.html#field.if-unmodified-since) conditional header fields are not applicable to a cache, and [If-None-Match](rfc9110.html#field.if-none-match) takes precedence over [If-Modified-Since](rfc9110.html#field.if-modified-since). See [Section 13.2.2](rfc9110.html#precedence) of [HTTP] for a complete specification of precondition precedence.\n\nA request containing an [If-None-Match](rfc9110.html#field.if-none-match) header field ([Section 13.1.2](rfc9110.html#field.if-none-match) of [HTTP]) indicates that the client wants to validate one or more of its own stored responses in comparison to the stored response chosen by the cache (as per Section 4).\n\nIf an [If-None-Match](rfc9110.html#field.if-none-match) header field is not present, a request containing an [If-Modified-Since](rfc9110.html#field.if-modified-since) header field ([Section 13.1.3](rfc9110.html#field.if-modified-since) of [HTTP]) indicates that the client wants to validate one or more of its own stored responses by modification date.\n\nIf a request contains an [If-Modified-Since](rfc9110.html#field.if-modified-since) header field and the [Last-Modified](rfc9110.html#field.last-modified) header field is not present in a stored response, a cache *SHOULD* use the stored response's [Date](rfc9110.html#field.date) field value (or, if no Date field is present, the time that the stored response was received) to evaluate the conditional.\n\nA cache that implements partial responses to range requests, as defined in [Section 14.2](rfc9110.html#field.range) of [HTTP], also needs to evaluate a received [If-Range](rfc9110.html#field.if-range) header field ([Section 13.1.5](rfc9110.html#field.if-range) of [HTTP]) with respect to the cache's chosen response.\n\nWhen a cache decides to forward a request to revalidate its own stored responses for a request that contains an [If-None-Match](rfc9110.html#field.if-none-match) list of entity tags, the cache *MAY* combine the received list with a list of entity tags from its own stored set of responses (fresh or stale) and send the union of the two lists as a replacement [If-None-Match](rfc9110.html#field.if-none-match) header field value in the forwarded request. If a stored response contains only partial content, the cache *MUST NOT* include its entity tag in the union unless the request is for a range that would be fully satisfied by that partial stored response. If the response to the forwarded request is [304 (Not Modified)](rfc9110.html#status.304) and has an ETag field value with an entity tag that is not in the client's list, the cache *MUST* generate a [200 (OK)](rfc9110.html#status.200) response for the client by reusing its corresponding stored response, as updated by the 304 response metadata (Section 4.3.4).\n\n#### 4.3.3. Handling a Validation Response\n\nCache handling of a response to a conditional request depends upon its status code:\n\n- A [304 (Not Modified)](rfc9110.html#status.304) response status code indicates that the stored response can be updated and reused; see Section 4.3.4 .\n- A full response (i.e., one containing content) indicates that none of the stored responses nominated in the conditional request are suitable. Instead, the cache *MUST* use the full response to satisfy the request. The cache *MAY* store such a full response, subject to its constraints (see Section 3 ).\n- However, if a cache receives a [5xx (Server Error)](rfc9110.html#status.5xx) response while attempting to validate a response, it can either forward this response to the requesting client or act as if the server failed to respond. In the latter case, the cache can send a previously stored response, subject to its constraints on doing so (see Section 4.2.4 ), or retry the validation request.\n\n#### 4.3.4. Freshening Stored Responses upon Validation\n\nWhen a cache receives a [304 (Not Modified)](rfc9110.html#status.304) response, it needs to identify stored responses that are suitable for updating with the new information provided, and then do so.\n\nThe initial set of stored responses to update are those that could have been chosen for that request — i.e., those that meet the requirements in Section 4, except the last requirement to be fresh, able to be served stale, or just validated.\n\nThen, that initial set of stored responses is further filtered by the first match of:\n\n- If the new response contains one or more strong validators (see [Section 8.8.1](rfc9110.html#weak.and.strong.validators) of [HTTP] ), then each of those strong validators identifies a selected representation for update. All the stored responses in the initial set with one of those same strong validators are identified for update. If none of the initial set contains at least one of the same strong validators, then the cache *MUST NOT* use the new response to update any stored responses.\n- If the new response contains no strong validators but does contain one or more weak validators , and those validators correspond to one of the initial set's stored responses, then the most recent of those matching stored responses is identified for update.\n- If the new response does not include any form of validator (such as where a client generates an [If-Modified-Since](rfc9110.html#field.if-modified-since) request from a source other than the [Last-Modified](rfc9110.html#field.last-modified) response header field), and there is only one stored response in the initial set, and that stored response also lacks a validator, then that stored response is identified for update.\n\nFor each stored response identified, the cache *MUST* update its header fields with the header fields provided in the [304 (Not\n Modified)](rfc9110.html#status.304) response, as per Section 3.2.\n\n#### 4.3.5. Freshening Responses with HEAD\n\nA response to the HEAD method is identical to what an equivalent request made with a GET would have been, without sending the content. This property of HEAD responses can be used to invalidate or update a cached GET response if the more efficient conditional GET request mechanism is not available (due to no validators being present in the stored response) or if transmission of the content is not desired even if it has changed.\n\nWhen a cache makes an inbound HEAD request for a target URI and receives a [200 (OK)](rfc9110.html#status.200) response, the cache *SHOULD* update or invalidate each of its stored GET responses that could have been chosen for that request (see Section 4.1).\n\nFor each of the stored responses that could have been chosen, if the stored response and HEAD response have matching values for any received validator fields ([ETag](rfc9110.html#field.etag) and [Last-Modified](rfc9110.html#field.last-modified)) and, if the HEAD response has a [Content-Length](rfc9110.html#field.content-length) header field, the value of [Content-Length](rfc9110.html#field.content-length) matches that of the stored response, the cache *SHOULD* update the stored response as described below; otherwise, the cache *SHOULD* consider the stored response to be stale.\n\nIf a cache updates a stored response with the metadata provided in a HEAD response, the cache *MUST* use the header fields provided in the HEAD response to update the stored response (see Section 3.2).\n\n### 4.4. Invalidating Stored Responses\n\nBecause unsafe request methods ([Section 9.2.1](rfc9110.html#safe.methods) of [HTTP]) such as PUT, POST, or DELETE have the potential for changing state on the origin server, intervening caches are required to invalidate stored responses to keep their contents up to date.\n\nA cache *MUST* invalidate the target URI ([Section 7.1](rfc9110.html#target.resource) of [HTTP]) when it receives a non-error status code in response to an unsafe request method (including methods whose safety is unknown).\n\nA cache *MAY* invalidate other URIs when it receives a non-error status code in response to an unsafe request method (including methods whose safety is unknown). In particular, the URI(s) in the [Location](rfc9110.html#field.location) and [Content-Location](rfc9110.html#field.content-location) response header fields (if present) are candidates for invalidation; other URIs might be discovered through mechanisms not specified in this document. However, a cache *MUST NOT* trigger an invalidation under these conditions if the origin ([Section 4.3.1](rfc9110.html#origin) of [HTTP]) of the URI to be invalidated differs from that of the target URI ([Section 7.1](rfc9110.html#target.resource) of [HTTP]). This helps prevent denial-of-service attacks.\n\nInvalidate means that the cache will either remove all stored responses whose target URI matches the given URI or mark them as \"invalid\" and in need of a mandatory validation before they can be sent in response to a subsequent request.\n\nA \"non-error response\" is one with a [2xx (Successful)](rfc9110.html#status.2xx) or [3xx (Redirection)](rfc9110.html#status.3xx) status code.\n\nNote that this does not guarantee that all appropriate responses are invalidated globally; a state-changing request would only invalidate responses in the caches it travels through.\n\n## 5. Field Definitions\n\nThis section defines the syntax and semantics of HTTP fields related to caching.\n\n### 5.1. Age\n\nThe \"Age\" response header field conveys the sender's estimate of the time since the response was generated or successfully validated at the origin server. Age values are calculated as specified in Section 4.2.3.\n\n```\n Age = delta-seconds \n```\n\nThe Age field value is a non-negative integer, representing time in seconds (see Section 1.2.2).\n\nAlthough it is defined as a singleton header field, a cache encountering a message with a list-based Age field value *SHOULD* use the first member of the field value, discarding subsequent ones.\n\nIf the field value (after discarding additional members, as per above) is invalid (e.g., it contains something other than a non-negative integer), a cache *SHOULD* ignore the field.\n\nThe presence of an Age header field implies that the response was not generated or validated by the origin server for this request. However, lack of an Age header field does not imply the origin was contacted.\n\n### 5.2. Cache-Control\n\nThe \"Cache-Control\" header field is used to list directives for caches along the request/response chain. Cache directives are unidirectional, in that the presence of a directive in a request does not imply that the same directive is present or copied in the response.\n\nSee Section 5.2.3 for information about how Cache-Control directives defined elsewhere are handled.\n\nA proxy, whether or not it implements a cache, *MUST* pass cache directives through in forwarded messages, regardless of their significance to that application, since the directives might apply to all recipients along the request/response chain. It is not possible to target a directive to a specific cache.\n\nCache directives are identified by a token, to be compared case-insensitively, and have an optional argument that can use both token and quoted-string syntax. For the directives defined below that define arguments, recipients ought to accept both forms, even if a specific form is required for generation.\n\n```\n Cache-Control = #cache-directive cache-directive = token [ \"=\" ( token / quoted-string ) ]\n```\n\nFor the cache directives defined below, no argument is defined (nor allowed) unless stated otherwise.\n\n#### 5.2.1. Request Directives\n\nThis section defines cache request directives. They are advisory; caches *MAY* implement them, but are not required to.\n\n##### 5.2.1.1. max-age\n\nArgument syntax:\n\n- delta-seconds (see Section 1.2.2 )\n\nThe max-age request directive indicates that the client prefers a response whose age is less than or equal to the specified number of seconds. Unless the max-stale request directive is also present, the client does not wish to receive a stale response.\n\nThis directive uses the token form of the argument syntax: e.g., 'max-age=5' not 'max-age=\"5\"'. A sender *MUST NOT* generate the quoted-string form.\n\n##### 5.2.1.2. max-stale\n\nArgument syntax:\n\n- delta-seconds (see Section 1.2.2 )\n\nThe max-stale request directive indicates that the client will accept a response that has exceeded its freshness lifetime. If a value is present, then the client is willing to accept a response that has exceeded its freshness lifetime by no more than the specified number of seconds. If no value is assigned to max-stale, then the client will accept a stale response of any age.\n\nThis directive uses the token form of the argument syntax: e.g., 'max-stale=10' not 'max-stale=\"10\"'. A sender *MUST NOT* generate the quoted-string form.\n\n##### 5.2.1.3. min-fresh\n\nArgument syntax:\n\n- delta-seconds (see Section 1.2.2 )\n\nThe min-fresh request directive indicates that the client prefers a response whose freshness lifetime is no less than its current age plus the specified time in seconds. That is, the client wants a response that will still be fresh for at least the specified number of seconds.\n\nThis directive uses the token form of the argument syntax: e.g., 'min-fresh=20' not 'min-fresh=\"20\"'. A sender *MUST NOT* generate the quoted-string form.\n\n##### 5.2.1.4. no-cache\n\nThe no-cache request directive indicates that the client prefers a stored response not be used to satisfy the request without successful validation on the origin server.\n\n##### 5.2.1.5. no-store\n\nThe no-store request directive indicates that a cache *MUST NOT* store any part of either this request or any response to it. This directive applies to both private and shared caches. \"MUST NOT store\" in this context means that the cache *MUST NOT* intentionally store the information in non-volatile storage and *MUST* make a best-effort attempt to remove the information from volatile storage as promptly as possible after forwarding it.\n\nThis directive is not a reliable or sufficient mechanism for ensuring privacy. In particular, malicious or compromised caches might not recognize or obey this directive, and communications networks might be vulnerable to eavesdropping.\n\nNote that if a request containing this directive is satisfied from a cache, the no-store request directive does not apply to the already stored response.\n\n##### 5.2.1.6. no-transform\n\nThe no-transform request directive indicates that the client is asking for intermediaries to avoid transforming the content, as defined in [Section 7.7](rfc9110.html#message.transformations) of [HTTP].\n\n##### 5.2.1.7. only-if-cached\n\nThe only-if-cached request directive indicates that the client only wishes to obtain a stored response. Caches that honor this request directive *SHOULD*, upon receiving it, respond with either a stored response consistent with the other constraints of the request or a [504 (Gateway Timeout)](rfc9110.html#status.504) status code.\n\n#### 5.2.2. Response Directives\n\nThis section defines cache response directives. A cache *MUST* obey the Cache-Control directives defined in this section.\n\n##### 5.2.2.1. max-age\n\nArgument syntax:\n\n- delta-seconds (see Section 1.2.2 )\n\nThe max-age response directive indicates that the response is to be considered stale after its age is greater than the specified number of seconds.\n\nThis directive uses the token form of the argument syntax: e.g., 'max-age=5' not 'max-age=\"5\"'. A sender *MUST NOT* generate the quoted-string form.\n\n##### 5.2.2.2. must-revalidate\n\nThe must-revalidate response directive indicates that once the response has become stale, a cache *MUST NOT* reuse that response to satisfy another request until it has been successfully validated by the origin, as defined by Section 4.3.\n\nThe must-revalidate directive is necessary to support reliable operation for certain protocol features. In all circumstances, a cache *MUST NOT* ignore the must-revalidate directive; in particular, if a cache is disconnected, the cache *MUST* generate an error response rather than reuse the stale response. The generated status code *SHOULD* be [504 (Gateway Timeout)](rfc9110.html#status.504) unless another error status code is more applicable.\n\nThe must-revalidate directive ought to be used by servers if and only if failure to validate a request could cause incorrect operation, such as a silently unexecuted financial transaction.\n\nThe must-revalidate directive also permits a shared cache to reuse a response to a request containing an [Authorization](rfc9110.html#field.authorization) header field ([Section 11.6.2](rfc9110.html#field.authorization) of [HTTP]), subject to the above requirement on revalidation (Section 3.5).\n\n##### 5.2.2.3. must-understand\n\nThe must-understand response directive limits caching of the response to a cache that understands and conforms to the requirements for that response's status code.\n\nA response that contains the must-understand directive *SHOULD* also contain the no-store directive. When a cache that implements the must-understand directive receives a response that includes it, the cache *SHOULD* ignore the no-store directive if it understands and implements the status code's caching requirements.\n\n##### 5.2.2.4. no-cache\n\nArgument syntax:\n\n- # field-name\n\nThe no-cache response directive, in its unqualified form (without an argument), indicates that the response *MUST NOT* be used to satisfy any other request without forwarding it for validation and receiving a successful response; see Section 4.3.\n\nThis allows an origin server to prevent a cache from using the response to satisfy a request without contacting it, even by caches that have been configured to send stale responses.\n\nThe qualified form of the no-cache response directive, with an argument that lists one or more field names, indicates that a cache *MAY* use the response to satisfy a subsequent request, subject to any other restrictions on caching, if the listed header fields are excluded from the subsequent response or the subsequent response has been successfully revalidated with the origin server (updating or removing those fields). This allows an origin server to prevent the reuse of certain header fields in a response, while still allowing caching of the rest of the response.\n\nThe field names given are not limited to the set of header fields defined by this specification. Field names are case-insensitive.\n\nThis directive uses the quoted-string form of the argument syntax. A sender *SHOULD NOT* generate the token form (even if quoting appears not to be needed for single-entry lists).\n\n##### 5.2.2.5. no-store\n\nThe no-store response directive indicates that a cache *MUST NOT* store any part of either the immediate request or the response and *MUST NOT* use the response to satisfy any other request.\n\nThis directive applies to both private and shared caches. \"MUST NOT store\" in this context means that the cache *MUST NOT* intentionally store the information in non-volatile storage and *MUST* make a best-effort attempt to remove the information from volatile storage as promptly as possible after forwarding it.\n\nThis directive is not a reliable or sufficient mechanism for ensuring privacy. In particular, malicious or compromised caches might not recognize or obey this directive, and communications networks might be vulnerable to eavesdropping.\n\nNote that the must-understand cache directive overrides no-store in certain circumstances; see Section 5.2.2.3.\n\n##### 5.2.2.6. no-transform\n\nThe no-transform response directive indicates that an intermediary (regardless of whether it implements a cache) *MUST NOT* transform the content, as defined in [Section 7.7](rfc9110.html#message.transformations) of [HTTP].\n\n##### 5.2.2.7. private\n\nArgument syntax:\n\n- # field-name\n\nThe unqualified private response directive indicates that a shared cache *MUST NOT* store the response (i.e., the response is intended for a single user). It also indicates that a private cache *MAY* store the response, subject to the constraints defined in Section 3, even if the response would not otherwise be heuristically cacheable by a private cache.\n\nIf a qualified private response directive is present, with an argument that lists one or more field names, then only the listed header fields are limited to a single user: a shared cache *MUST NOT* store the listed header fields if they are present in the original response but *MAY* store the remainder of the response message without those header fields, subject the constraints defined in Section 3.\n\nThe field names given are not limited to the set of header fields defined by this specification. Field names are case-insensitive.\n\nThis directive uses the quoted-string form of the argument syntax. A sender *SHOULD NOT* generate the token form (even if quoting appears not to be needed for single-entry lists).\n\n##### 5.2.2.8. proxy-revalidate\n\nThe proxy-revalidate response directive indicates that once the response has become stale, a shared cache *MUST NOT* reuse that response to satisfy another request until it has been successfully validated by the origin, as defined by Section 4.3. This is analogous to must-revalidate (Section 5.2.2.2), except that proxy-revalidate does not apply to private caches.\n\nNote that proxy-revalidate on its own does not imply that a response is cacheable. For example, it might be combined with the public directive (Section 5.2.2.9), allowing the response to be cached while requiring only a shared cache to revalidate when stale.\n\n##### 5.2.2.9. public\n\nThe public response directive indicates that a cache *MAY* store the response even if it would otherwise be prohibited, subject to the constraints defined in Section 3. In other words, public explicitly marks the response as cacheable. For example, public permits a shared cache to reuse a response to a request containing an Authorization header field (Section 3.5).\n\nNote that it is unnecessary to add the public directive to a response that is already cacheable according to Section 3.\n\nIf a response with the public directive has no explicit freshness information, it is heuristically cacheable (Section 4.2.2).\n\n##### 5.2.2.10. s-maxage\n\nArgument syntax:\n\n- delta-seconds (see Section 1.2.2 )\n\nThe s-maxage response directive indicates that, for a shared cache, the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the Expires header field.\n\nThe s-maxage directive incorporates the semantics of the proxy-revalidate response directive (Section 5.2.2.8) for a shared cache. A shared cache *MUST NOT* reuse a stale response with s-maxage to satisfy another request until it has been successfully validated by the origin, as defined by Section 4.3. This directive also permits a shared cache to reuse a response to a request containing an Authorization header field, subject to the above requirements on maximum age and revalidation (Section 3.5).\n\nThis directive uses the token form of the argument syntax: e.g., 's-maxage=10' not 's-maxage=\"10\"'. A sender *MUST NOT* generate the quoted-string form.\n\n#### 5.2.3. Extension Directives\n\nThe Cache-Control header field can be extended through the use of one or more extension cache directives. A cache *MUST* ignore unrecognized cache directives.\n\nInformational extensions (those that do not require a change in cache behavior) can be added without changing the semantics of other directives.\n\nBehavioral extensions are designed to work by acting as modifiers to the existing base of cache directives. Both the new directive and the old directive are supplied, such that applications that do not understand the new directive will default to the behavior specified by the old directive, and those that understand the new directive will recognize it as modifying the requirements associated with the old directive. In this way, extensions to the existing cache directives can be made without breaking deployed caches.\n\nFor example, consider a hypothetical new response directive called \"community\" that acts as a modifier to the private directive: in addition to private caches, only a cache that is shared by members of the named community is allowed to cache the response. An origin server wishing to allow the UCI community to use an otherwise private response in their shared cache(s) could do so by including\n\n```\nCache-Control: private, community=\"UCI\"\n```\n\nA cache that recognizes such a community cache directive could broaden its behavior in accordance with that extension. A cache that does not recognize the community cache directive would ignore it and adhere to the private directive.\n\nNew extension directives ought to consider defining:\n\n- What it means for a directive to be specified multiple times,\n- When the directive does not take an argument, what it means when an argument is present,\n- When the directive requires an argument, what it means when it is missing, and\n- Whether the directive is specific to requests, specific to responses, or able to be used in either.\n\n#### 5.2.4. Cache Directive Registry\n\nThe \"Hypertext Transfer Protocol (HTTP) Cache Directive Registry\" defines the namespace for the cache directives. It has been created and is now maintained at [https://www.iana.org/assignments/http-cache-directives](https://www.iana.org/assignments/http-cache-directives).\n\nA registration *MUST* include the following fields:\n\n- Cache Directive Name\n- Pointer to specification text\n\nValues to be added to this namespace require IETF Review (see [RFC8126], [Section 4.8](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.8)).\n\n### 5.3. Expires\n\nThe \"Expires\" response header field gives the date/time after which the response is considered stale. See Section 4.2 for further discussion of the freshness model.\n\nThe presence of an Expires header field does not imply that the original resource will change or cease to exist at, before, or after that time.\n\nThe Expires field value is an HTTP-date timestamp, as defined in [Section 5.6.7](rfc9110.html#http.date) of [HTTP]. See also Section 4.2 for parsing requirements specific to caches.\n\n```\n Expires = HTTP-date \n```\n\nFor example\n\n```\nExpires: Thu, 01 Dec 1994 16:00:00 GMT\n```\n\nA cache recipient *MUST* interpret invalid date formats, especially the value \"0\", as representing a time in the past (i.e., \"already expired\").\n\nIf a response includes a Cache-Control header field with the max-age directive (Section 5.2.2.1), a recipient *MUST* ignore the Expires header field. Likewise, if a response includes the s-maxage directive (Section 5.2.2.10), a shared cache recipient *MUST* ignore the Expires header field. In both these cases, the value in Expires is only intended for recipients that have not yet implemented the Cache-Control header field.\n\nAn origin server without a clock ([Section 5.6.7](rfc9110.html#http.date) of [HTTP]) *MUST NOT* generate an Expires header field unless its value represents a fixed time in the past (always expired) or its value has been associated with the resource by a system with a clock.\n\nHistorically, HTTP required the Expires field value to be no more than a year in the future. While longer freshness lifetimes are no longer prohibited, extremely large values have been demonstrated to cause problems (e.g., clock overflows due to use of 32-bit integers for time values), and many caches will evict a response far sooner than that.\n\n### 5.4. Pragma\n\nThe \"Pragma\" request header field was defined for HTTP/1.0 caches, so that clients could specify a \"no-cache\" request (as Cache-Control was not defined until HTTP/1.1).\n\nHowever, support for Cache-Control is now widespread. As a result, this specification deprecates Pragma.\n\n### 5.5. Warning\n\nThe \"Warning\" header field was used to carry additional information about the status or transformation of a message that might not be reflected in the status code. This specification obsoletes it, as it is not widely generated or surfaced to users. The information it carried can be gleaned from examining other header fields, such as Age.\n\n## 6. Relationship to Applications and Other Caches\n\nApplications using HTTP often specify additional forms of caching. For example, Web browsers often have history mechanisms such as \"Back\" buttons that can be used to redisplay a representation retrieved earlier in a session.\n\nLikewise, some Web browsers implement caching of images and other assets within a page view; they may or may not honor HTTP caching semantics.\n\nThe requirements in this specification do not necessarily apply to how applications use data after it is retrieved from an HTTP cache. For example, a history mechanism can display a previous representation even if it has expired, and an application can use cached data in other ways beyond its freshness lifetime.\n\nThis specification does not prohibit the application from taking HTTP caching into account; for example, a history mechanism might tell the user that a view is stale, or it might honor cache directives (e.g., Cache-Control: no-store).\n\nHowever, when an application caches data and does not make this apparent to or easily controllable by the user, it is strongly encouraged to define its operation with respect to HTTP cache directives so as not to surprise authors who expect caching semantics to be honored. For example, while it might be reasonable to define an application cache \"above\" HTTP that allows a response containing Cache-Control: no-store to be reused for requests that are directly related to the request that fetched it (such as those created during the same page load), it would likely be surprising and confusing to users and authors if it were allowed to be reused for requests unrelated in any way to the one from which it was obtained.\n\n## 7. Security Considerations\n\nThis section is meant to inform developers, information providers, and users of known security concerns specific to HTTP caching. More general security considerations are addressed in \"HTTP/1.1\" ([Section 11](rfc9112.html#security.considerations) of [HTTP/1.1]) and \"HTTP Semantics\" ([Section 17](rfc9110.html#security.considerations) of [HTTP]).\n\nCaches expose an additional attack surface because the contents of the cache represent an attractive target for malicious exploitation. Since cache contents persist after an HTTP request is complete, an attack on the cache can reveal information long after a user believes that the information has been removed from the network. Therefore, cache contents need to be protected as sensitive information.\n\nIn particular, because private caches are restricted to a single user, they can be used to reconstruct a user's activity. As a result, it is important for user agents to allow end users to control them, for example, by allowing stored responses to be removed for some or all origin servers.\n\n### 7.1. Cache Poisoning\n\nStoring malicious content in a cache can extend the reach of an attacker to affect multiple users. Such \"cache poisoning\" attacks happen when an attacker uses implementation flaws, elevated privileges, or other techniques to insert a response into a cache. This is especially effective when shared caches are used to distribute malicious content to many clients.\n\nOne common attack vector for cache poisoning is to exploit differences in message parsing on proxies and in user agents; see [Section 6.3](rfc9112.html#message.body.length) of [HTTP/1.1] for the relevant requirements regarding HTTP/1.1.\n\n### 7.2. Timing Attacks\n\nBecause one of the primary uses of a cache is to optimize performance, its use can \"leak\" information about which resources have been previously requested.\n\nFor example, if a user visits a site and their browser caches some of its responses and then navigates to a second site, that site can attempt to load responses it knows exist on the first site. If they load quickly, it can be assumed that the user has visited that site, or even a specific page on it.\n\nSuch \"timing attacks\" can be mitigated by adding more information to the cache key, such as the identity of the referring site (to prevent the attack described above). This is sometimes called \"double keying\".\n\n### 7.3. Caching of Sensitive Information\n\nImplementation and deployment flaws (often led to by the misunderstanding of cache operation) might lead to the caching of sensitive information (e.g., authentication credentials) that is thought to be private, exposing it to unauthorized parties.\n\nNote that the Set-Cookie response header field [COOKIE] does not inhibit caching; a cacheable response with a Set-Cookie header field can be (and often is) used to satisfy subsequent requests to caches. Servers that wish to control caching of these responses are encouraged to emit appropriate Cache-Control response header fields.\n\n## 8. IANA Considerations\n\nThe change controller for the following registrations is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n### 8.1. Field Name Registration\n\nIANA has updated the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" at [https://www.iana.org/assignments/http-fields](https://www.iana.org/assignments/http-fields), as described in [Section 18.4](rfc9110.html#field.name.registration) of [HTTP], with the field names listed in the table below:\n\n| Field Name | Status | Section | Comments |\n| --- | --- | --- | --- |\n| Age | permanent | 5.1 | |\n| Cache-Control | permanent | 5.2 | |\n| Expires | permanent | 5.3 | |\n| Pragma | deprecated | 5.4 | |\n| Warning | obsoleted | 5.5 | |\n\n### 8.2. Cache Directive Registration\n\nIANA has updated the \"Hypertext Transfer Protocol (HTTP) Cache Directive Registry\" at [https://www.iana.org/assignments/http-cache-directives](https://www.iana.org/assignments/http-cache-directives) with the registration procedure per Section 5.2.4 and the cache directive names summarized in the table below.\n\n| Cache Directive | Section |\n| --- | --- |\n| max-age | 5.2.1.1, 5.2.2.1 |\n| max-stale | 5.2.1.2 |\n| min-fresh | 5.2.1.3 |\n| must-revalidate | 5.2.2.2 |\n| must-understand | 5.2.2.3 |\n| no-cache | 5.2.1.4, 5.2.2.4 |\n| no-store | 5.2.1.5, 5.2.2.5 |\n| no-transform | 5.2.1.6, 5.2.2.6 |\n| only-if-cached | 5.2.1.7 |\n| private | 5.2.2.7 |\n| proxy-revalidate | 5.2.2.8 |\n| public | 5.2.2.9 |\n| s-maxage | 5.2.2.10 |\n\n### 8.3. Warn Code Registry\n\nIANA has added the following note to the \"Hypertext Transfer Protocol (HTTP) Warn Codes\" registry at [https://www.iana.org/assignments/http-warn-codes](https://www.iana.org/assignments/http-warn-codes) stating that \"Warning\" has been obsoleted:\n\n> The Warning header field (and the warn codes that it uses) has been obsoleted for HTTP per [RFC9111].\n\n## 9. References\n\n### 9.1. Normative References\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC7405]\n\nKyzivat, P., “[Case-Sensitive String Support in ABNF](https://www.rfc-editor.org/rfc/rfc7405.html)”, RFC 7405, [DOI 10.17487/RFC7405](https://dx.doi.org/10.17487/RFC7405), December 2014, <[https://www.rfc-editor.org/info/rfc7405](https://www.rfc-editor.org/info/rfc7405)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n### 9.2. Informative References\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, [DOI 10.17487/RFC6265](https://dx.doi.org/10.17487/RFC6265), April 2011, <[https://www.rfc-editor.org/info/rfc6265](https://www.rfc-editor.org/info/rfc6265)>.\n\n[HTTP/1.1]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html)”, [STD 99](https://www.rfc-editor.org/info/std99), RFC 9112, [DOI 10.17487/RFC9112](https://dx.doi.org/10.17487/RFC9112), June 2022.\n\n[RFC2616]\n\nFielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2616.html)”, RFC 2616, [DOI 10.17487/RFC2616](https://dx.doi.org/10.17487/RFC2616), June 1999, <[https://www.rfc-editor.org/info/rfc2616](https://www.rfc-editor.org/info/rfc2616)>.\n\n[RFC5861]\n\nNottingham, M., “[HTTP Cache-Control Extensions for Stale Content](https://www.rfc-editor.org/rfc/rfc5861.html)”, RFC 5861, [DOI 10.17487/RFC5861](https://dx.doi.org/10.17487/RFC5861), May 2010, <[https://www.rfc-editor.org/info/rfc5861](https://www.rfc-editor.org/info/rfc5861)>.\n\n[RFC7234]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Caching](https://www.rfc-editor.org/rfc/rfc7234.html)”, RFC 7234, [DOI 10.17487/RFC7234](https://dx.doi.org/10.17487/RFC7234), June 2014, <[https://www.rfc-editor.org/info/rfc7234](https://www.rfc-editor.org/info/rfc7234)>.\n\n[RFC8126]\n\nCotton, M., Leiba, B., and T. Narten, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc8126.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 8126, [DOI 10.17487/RFC8126](https://dx.doi.org/10.17487/RFC8126), June 2017, <[https://www.rfc-editor.org/info/rfc8126](https://www.rfc-editor.org/info/rfc8126)>.\n\n## Appendix A. Collected ABNF\n\nIn the collected ABNF below, list rules are expanded per [Section 5.6.1](rfc9110.html#abnf.extension) of [HTTP].\n\n```\nAge = delta-seconds\n\nCache-Control = [ cache-directive *( OWS \",\" OWS cache-directive ) ]\n\nExpires = HTTP-date\n\nHTTP-date = \n\nOWS = \n\ncache-directive = token [ \"=\" ( token / quoted-string ) ]\n\ndelta-seconds = 1*DIGIT\n\nfield-name = \n\nquoted-string = \n\ntoken = \n```\n\n## Appendix B. Changes from RFC 7234\n\nHandling of duplicate and conflicting cache directives has been clarified. (Section 4.2.1)\n\nCache invalidation of the URIs in the Location and Content-Location header fields is no longer required but is still allowed. (Section 4.4)\n\nCache invalidation of the URIs in the Location and Content-Location header fields is disallowed when the origin is different; previously, it was the host. (Section 4.4)\n\nHandling invalid and multiple Age header field values has been clarified. (Section 5.1)\n\nSome cache directives defined by this specification now have stronger prohibitions against generating the quoted form of their values, since this has been found to create interoperability problems. Consumers of extension cache directives are no longer required to accept both token and quoted-string forms, but they still need to parse them properly for unknown extensions. (Section 5.2)\n\nThe public and private cache directives were clarified, so that they do not make responses reusable under any condition. (Section 5.2.2)\n\nThe must-understand cache directive was introduced; caches are no longer required to understand the semantics of new response status codes unless it is present. (Section 5.2.2.3)\n\nThe Warning response header was obsoleted. Much of the information supported by Warning could be gleaned by examining the response, and the remaining information — although potentially useful — was entirely advisory. In practice, Warning was not added by caches or intermediaries. (Section 5.5)\n\n## Acknowledgements\n\nSee [Appendix \"Acknowledgements\"](rfc9110.html#acks) of [HTTP], which applies to this document as well.\n\n## Index\n\nA C E F G H M N O P R S V W\n\n- **A**\n - age 4.2\n - Age header field 4 , 4.2.3 , **5.1** , 8.1 , B\n- **C**\n - cache 1\n - cache key 2 , 2\n - Cache-Control header field **5.2** , 8.1 , B\n - collapsed requests 4\n - *COOKIE* 7.3 , **9.2**\n- **E**\n - Expires header field 3 , 4.2 , 4.2.1 , **5.3** , 8.1\n - explicit expiration time 4.2\n- **F**\n - Fields\n - Age 4 , 4.2.3 , **5.1** , **5.1** , 8.1 , B\n - Cache-Control **5.2** , 8.1 , B\n - Expires 3 , 4.2 , 4.2.1 , **5.3** , **5.3** , 8.1\n - Pragma **5.4** , **5.4** , 8.1\n - Warning **5.5** , 8.1 , B\n - fresh 4.2\n - freshness lifetime 4.2\n- **G**\n - Grammar\n - Age **5.1**\n - Cache-Control **5.2**\n - cache-directive **5.2**\n - delta-seconds **1.2.2**\n - DIGIT **1.2**\n - Expires **5.3**\n- **H**\n - Header Fields\n - Age 4 , 4.2.3 , **5.1** , **5.1** , 8.1 , B\n - Cache-Control **5.2** , 8.1 , B\n - Expires 3 , 4.2 , 4.2.1 , **5.3** , **5.3** , 8.1\n - Pragma **5.4** , **5.4** , 8.1\n - Warning **5.5** , 8.1 , B\n - heuristic expiration time 4.2\n - heuristically cacheable 4.2.2\n - *HTTP* 1 , 1.1 , 1.2 , 1.2.1 , 1.2.1 , 1.2.1 , 1.2.1 , 1.2.1 , 1.2.1 , 2 , 2 , 3 , 3 , 3.1 , 3.1 , 3.1 , 3.1 , 3.1 , 3.3 , 3.3 , 3.4 , 3.4 , 3.5 , 4 , 4 , 4 , 4.1 , 4.1 , 4.2.1 , 4.2.2 , 4.2.2 , 4.2.3 , 4.2.3 , 4.3 , 4.3.1 , 4.3.1 , 4.3.2 , 4.3.2 , 4.3.2 , 4.3.2 , 4.3.2 , 4.3.4 , 4.4 , 4.4 , 4.4 , 4.4 , 5.2.1.6 , 5.2.2.2 , 5.2.2.6 , 5.3 , 5.3 , 7 , 8.1 , **9.1** , A , A , A , A , A , A , \"Acknowledgements\"\n - *Section 5.1* A\n - *Section 5.6.2* A\n - *Section 5.6.3* A\n - *Section 5.6.4* A\n - *Section 5.6.7* A\n - *Section 2* 1.1\n - *Section 3* 2\n - *Section 3.7* 1\n - *Section 4.3.1* 4.4\n - *Section 5.1* 1.2.1\n - *Section 5.2* 4.1\n - *Section 5.6.1* 1.2 , A\n - *Section 5.6.2* 1.2.1\n - *Section 5.6.3* 1.2.1\n - *Section 5.6.4* 1.2.1\n - *Section 5.6.7* 1.2.1 , 4 , 4.2.3 , 5.3 , 5.3\n - *Section 6.1* 3.3\n - *Section 6.6.1* 4.2.1 , 4.2.3\n - *Section 7.1* 4 , 4.4 , 4.4\n - *Section 7.6.1* 3.1 , 3.1\n - *Section 7.7* 5.2.1.6 , 5.2.2.6\n - *Section 8.8.1* 4.3.4\n - *Section 8.8.2* 4.2.2 , 4.3.1\n - *Section 8.8.3* 4.3.1\n - *Section 9.2.1* 4 , 4.4\n - *Section 9.3.1* 2\n - *Section 11.6.2* 3 , 3.5 , 5.2.2.2\n - *Section 11.7.1* 3.1\n - *Section 11.7.2* 3.1\n - *Section 11.7.3* 3.1\n - *Section 12.5.5* 4.1\n - *Section 13* 4.3\n - *Section 13.1.2* 4.3.2\n - *Section 13.1.3* 4.3.2\n - *Section 13.1.5* 4.3.2\n - *Section 13.2.2* 4.3.2\n - *Section 14.2* 3.3 , 3.4 , 4.3.2\n - *Section 15* 3\n - *Section 15.1* 4.2.2\n - *Section 15.3.7.3* 3.4\n - *Section 17* 7\n - *Section 18.4* 8.1\n - *Acknowledgements* \"Acknowledgements\"\n - *HTTP/1.1* 7 , 7.1 , **9.2**\n - *Section 6.3* 7.1\n - *Section 11* 7\n- **M**\n - max-age (cache directive) **5.2.1.1** , **5.2.2.1**\n - max-stale (cache directive) **5.2.1.2**\n - min-fresh (cache directive) **5.2.1.3**\n - must-revalidate (cache directive) **5.2.2.2**\n - must-understand (cache directive) **5.2.2.3**\n- **N**\n - no-cache (cache directive) **5.2.1.4** , **5.2.2.4**\n - no-store (cache directive) **5.2.1.5** , **5.2.2.5**\n - no-transform (cache directive) **5.2.1.6** , **5.2.2.6**\n- **O**\n - only-if-cached (cache directive) **5.2.1.7**\n- **P**\n - Pragma header field **5.4** , 8.1\n - private (cache directive) **5.2.2.7**\n - private cache 1\n - proxy-revalidate (cache directive) **5.2.2.8**\n - public (cache directive) **5.2.2.9**\n- **R**\n - *RFC2119* 1.1 , **9.1**\n - *RFC2616* 4.2.2 , **9.2**\n - *Section 13.9* 4.2.2\n - *RFC5234* 1.2 , 1.2.1 , **9.1**\n - *Appendix B.1* 1.2.1\n - *RFC5861* 4.2.4 , **9.2**\n - *RFC7234* 1 , **9.2**\n - *RFC7405* 1.2 , **9.1**\n - *RFC8126* 5.2.4 , **9.2**\n - *Section 4.8* 5.2.4\n - *RFC8174* 1.1 , **9.1**\n- **S**\n - s-maxage (cache directive) **5.2.2.10**\n - shared cache 1\n - stale 4.2\n- **V**\n - validator 4.3.1\n- **W**\n - Warning header field **5.5** , 8.1 , B\n\n## Authors' Addresses\n\n**Roy T. Fielding** (editor)\nAdobe\n345 Park Ave\nSan Jose, CA 95110\nUnited States of America\nEmail: fielding@gbiv.com\nURI: [https://roy.gbiv.com/](https://roy.gbiv.com/)\n\n**Mark Nottingham** (editor)\nFastly\nPrahran\nAustralia\nEmail: mnot@mnot.net\nURI: [https://www.mnot.net/](https://www.mnot.net/)\n\n**Julian Reschke** (editor)\ngreenbytes GmbH\nHafenweg 16\n48155 Münster\nGermany\nEmail: julian.reschke@greenbytes.de\nURI: [https://greenbytes.de/tech/webdav/](https://greenbytes.de/tech/webdav/)", "znaku_textu": 81871, "slov": 12360, "odkazu": 392, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:47", "sha256": "999f401328ed8991d172aeb1cd4ab048630928437af2401d3e39552c4a073f64", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/info/std98", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9111", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/rfc/rfc2616.html", "https://www.iana.org/assignments/http-cache-directives", "https://www.rfc-editor.org/rfc/rfc8126.html", "https://www.iana.org/assignments/http-fields", "https://www.iana.org/assignments/http-warn-codes", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "https://www.rfc-editor.org/info/rfc5234", "https://www.rfc-editor.org/rfc/rfc7405.html", "https://dx.doi.org/10.17487/RFC7405", "https://www.rfc-editor.org/info/rfc7405", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://dx.doi.org/10.17487/RFC6265", "https://www.rfc-editor.org/info/rfc6265", "https://www.rfc-editor.org/rfc/rfc9112.html", "https://www.rfc-editor.org/info/std99", "https://dx.doi.org/10.17487/RFC9112", "https://dx.doi.org/10.17487/RFC2616", "https://www.rfc-editor.org/info/rfc2616", "https://www.rfc-editor.org/rfc/rfc5861.html", "https://dx.doi.org/10.17487/RFC5861", "https://www.rfc-editor.org/info/rfc5861", "https://www.rfc-editor.org/rfc/rfc7234.html", "https://dx.doi.org/10.17487/RFC7234", "https://www.rfc-editor.org/info/rfc7234", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC8126", "https://www.rfc-editor.org/info/rfc8126", "https://roy.gbiv.com/", "https://www.mnot.net/", "https://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc9112.html", "titulek": "RFC 9112 - HTTP/1.1", "h1": "HTTP/1.1", "popis": "The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document specifies the HTTP/1.1 message syntax, message parsing, connection management, and related security concerns. This document obsoletes portions of RFC 7230.", "klicova_slova": "Hypertext Transfer Protocol, HTTP, HTTP message format", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9112", "og:description": "HTTP/1.1", "og:url": "https://httpwg.org/specs/rfc9112.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Requirements Notation"}, {"uroven": 3, "text": "1.2. Syntax Notation"}, {"uroven": 2, "text": "2. Message"}, {"uroven": 3, "text": "2.1. Message Format"}, {"uroven": 3, "text": "2.2. Message Parsing"}, {"uroven": 3, "text": "2.3. HTTP Version"}, {"uroven": 2, "text": "3. Request Line"}, {"uroven": 3, "text": "3.1. Method"}, {"uroven": 3, "text": "3.2. Request Target"}, {"uroven": 4, "text": "3.2.1. origin-form"}, {"uroven": 4, "text": "3.2.2. absolute-form"}, {"uroven": 4, "text": "3.2.3. authority-form"}, {"uroven": 4, "text": "3.2.4. asterisk-form"}, {"uroven": 3, "text": "3.3. Reconstructing the Target URI"}, {"uroven": 2, "text": "4. Status Line"}, {"uroven": 2, "text": "5. Field Syntax"}, {"uroven": 3, "text": "5.1. Field Line Parsing"}, {"uroven": 3, "text": "5.2. Obsolete Line Folding"}, {"uroven": 2, "text": "6. Message Body"}, {"uroven": 3, "text": "6.1. Transfer-Encoding"}, {"uroven": 3, "text": "6.2. Content-Length"}, {"uroven": 3, "text": "6.3. Message Body Length"}, {"uroven": 2, "text": "7. Transfer Codings"}, {"uroven": 3, "text": "7.1. Chunked Transfer Coding"}, {"uroven": 4, "text": "7.1.1. Chunk Extensions"}, {"uroven": 4, "text": "7.1.2. Chunked Trailer Section"}, {"uroven": 4, "text": "7.1.3. Decoding Chunked"}, {"uroven": 3, "text": "7.2. Transfer Codings for Compression"}, {"uroven": 3, "text": "7.3. Transfer Coding Registry"}, {"uroven": 3, "text": "7.4. Negotiating Transfer Codings"}, {"uroven": 2, "text": "8. Handling Incomplete Messages"}, {"uroven": 2, "text": "9. Connection Management"}, {"uroven": 3, "text": "9.1. Establishment"}, {"uroven": 3, "text": "9.2. Associating a Response to a Request"}, {"uroven": 3, "text": "9.3. Persistence"}, {"uroven": 4, "text": "9.3.1. Retrying Requests"}, {"uroven": 4, "text": "9.3.2. Pipelining"}, {"uroven": 3, "text": "9.4. Concurrency"}, {"uroven": 3, "text": "9.5. Failures and Timeouts"}, {"uroven": 3, "text": "9.6. Tear-down"}, {"uroven": 3, "text": "9.7. TLS Connection Initiation"}, {"uroven": 3, "text": "9.8. TLS Connection Closure"}, {"uroven": 2, "text": "10. Enclosing Messages as Data"}, {"uroven": 3, "text": "10.1. Media Type message/http"}, {"uroven": 3, "text": "10.2. Media Type application/http"}, {"uroven": 2, "text": "11. Security Considerations"}, {"uroven": 3, "text": "11.1. Response Splitting"}, {"uroven": 3, "text": "11.2. Request Smuggling"}, {"uroven": 3, "text": "11.3. Message Integrity"}, {"uroven": 3, "text": "11.4. Message Confidentiality"}, {"uroven": 2, "text": "12. IANA Considerations"}, {"uroven": 3, "text": "12.1. Field Name Registration"}, {"uroven": 3, "text": "12.2. Media Type Registration"}, {"uroven": 3, "text": "12.3. Transfer Coding Registration"}, {"uroven": 3, "text": "12.4. ALPN Protocol ID Registration"}, {"uroven": 2, "text": "13. References"}, {"uroven": 3, "text": "13.1. Normative References"}, {"uroven": 3, "text": "13.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Collected ABNF"}, {"uroven": 2, "text": "Appendix B. Differences between HTTP and MIME"}, {"uroven": 3, "text": "B.1. MIME-Version"}, {"uroven": 3, "text": "B.2. Conversion to Canonical Form"}, {"uroven": 3, "text": "B.3. Conversion of Date Formats"}, {"uroven": 3, "text": "B.4. Conversion of Content-Encoding"}, {"uroven": 3, "text": "B.5. Conversion of Content-Transfer-Encoding"}, {"uroven": 3, "text": "B.6. MHTML and Line Length Limitations"}, {"uroven": 2, "text": "Appendix C. Changes from Previous RFCs"}, {"uroven": 3, "text": "C.1. Changes from HTTP/0.9"}, {"uroven": 3, "text": "C.2. Changes from HTTP/1.0"}, {"uroven": 4, "text": "C.2.1. Multihomed Web Servers"}, {"uroven": 4, "text": "C.2.2. Keep-Alive Connections"}, {"uroven": 4, "text": "C.2.3. Introduction of Transfer-Encoding"}, {"uroven": 3, "text": "C.3. Changes from RFC 7230"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Index"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document specifies the HTTP/1.1 message syntax, message parsing, connection management, and related security concerns.\n\nThis document obsoletes portions of RFC 7230.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9112](https://www.rfc-editor.org/info/rfc9112).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\nThis document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.\n\n- 1. Introduction\n - 1.1. Requirements Notation\n - 1.2. Syntax Notation\n- 2. Message\n - 2.1. Message Format\n - 2.2. Message Parsing\n - 2.3. HTTP Version\n- 3. Request Line\n - 3.1. Method\n - 3.2. Request Target\n - 3.2.1. origin-form\n - 3.2.2. absolute-form\n - 3.2.3. authority-form\n - 3.2.4. asterisk-form\n - 3.3. Reconstructing the Target URI\n- 4. Status Line\n- 5. Field Syntax\n - 5.1. Field Line Parsing\n - 5.2. Obsolete Line Folding\n- 6. Message Body\n - 6.1. Transfer-Encoding\n - 6.2. Content-Length\n - 6.3. Message Body Length\n- 7. Transfer Codings\n - 7.1. Chunked Transfer Coding\n - 7.1.1. Chunk Extensions\n - 7.1.2. Chunked Trailer Section\n - 7.1.3. Decoding Chunked\n - 7.2. Transfer Codings for Compression\n - 7.3. Transfer Coding Registry\n - 7.4. Negotiating Transfer Codings\n- 8. Handling Incomplete Messages\n- 9. Connection Management\n - 9.1. Establishment\n - 9.2. Associating a Response to a Request\n - 9.3. Persistence\n - 9.3.1. Retrying Requests\n - 9.3.2. Pipelining\n - 9.4. Concurrency\n - 9.5. Failures and Timeouts\n - 9.6. Tear-down\n - 9.7. TLS Connection Initiation\n - 9.8. TLS Connection Closure\n- 10. Enclosing Messages as Data\n - 10.1. Media Type message/http\n - 10.2. Media Type application/http\n- 11. Security Considerations\n - 11.1. Response Splitting\n - 11.2. Request Smuggling\n - 11.3. Message Integrity\n - 11.4. Message Confidentiality\n- 12. IANA Considerations\n - 12.1. Field Name Registration\n - 12.2. Media Type Registration\n - 12.3. Transfer Coding Registration\n - 12.4. ALPN Protocol ID Registration\n- 13. References\n - 13.1. Normative References\n - 13.2. Informative References\n- Appendix A. Collected ABNF\n- Appendix B. Differences between HTTP and MIME\n - B.1. MIME-Version\n - B.2. Conversion to Canonical Form\n - B.3. Conversion of Date Formats\n - B.4. Conversion of Content-Encoding\n - B.5. Conversion of Content-Transfer-Encoding\n - B.6. MHTML and Line Length Limitations\n- Appendix C. Changes from Previous RFCs\n - C.1. Changes from HTTP/0.9\n - C.2. Changes from HTTP/1.0\n - C.2.1. Multihomed Web Servers\n - C.2.2. Keep-Alive Connections\n - C.2.3. Introduction of Transfer-Encoding\n - C.3. Changes from RFC 7230\n- Acknowledgements\n- Index\n- Authors' Addresses\n\n## 1. Introduction\n\nThe Hypertext Transfer Protocol (HTTP) is a stateless application-level request/response protocol that uses extensible semantics and self-descriptive messages for flexible interaction with network-based hypertext information systems. HTTP/1.1 is defined by:\n\n- This document\n- \"HTTP Semantics\" [HTTP]\n- \"HTTP Caching\" [CACHING]\n\nThis document specifies how HTTP semantics are conveyed using the HTTP/1.1 message syntax, framing, and connection management mechanisms. Its goal is to define the complete set of requirements for HTTP/1.1 message parsers and message-forwarding intermediaries.\n\nThis document obsoletes the portions of RFC 7230 related to HTTP/1.1 messaging and connection management, with the changes being summarized in Appendix C.3. The other parts of RFC 7230 are obsoleted by \"HTTP Semantics\" [HTTP].\n\n### 1.1. Requirements Notation\n\nThe 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.\n\nConformance criteria and considerations regarding error handling are defined in [Section 2](rfc9110.html#conformance) of [HTTP].\n\n### 1.2. Syntax Notation\n\nThis specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234], extended with the notation for case-sensitivity in strings defined in [RFC7405].\n\nIt also uses a list extension, defined in [Section 5.6.1](rfc9110.html#abnf.extension) of [HTTP], 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.\n\nAs a convention, ABNF rule names prefixed with \"obs-\" denote obsolete grammar rules that appear for historical reasons.\n\nThe following core rules are included by reference, as defined in [RFC5234], [Appendix B.1](https://www.rfc-editor.org/rfc/rfc5234.html#appendix-B.1): ALPHA (letters), CR (carriage return), CRLF (CR LF), CTL (controls), DIGIT (decimal 0-9), DQUOTE (double quote), HEXDIG (hexadecimal 0-9/A-F/a-f), HTAB (horizontal tab), LF (line feed), OCTET (any 8-bit sequence of data), SP (space), and VCHAR (any visible [USASCII] character).\n\nThe rules below are defined in [HTTP]:\n\n```\n BWS = \n OWS = \n RWS = \n absolute-path = \n field-name = \n field-value = \n obs-text = \n quoted-string = \n token = \n transfer-coding =\n \n```\n\nThe rules below are defined in [URI]:\n\n```\n absolute-URI = \n authority = \n uri-host = \n port = \n query = \n```\n\n## 2. Message\n\nHTTP/1.1 clients and servers communicate by sending messages. See [Section 3](rfc9110.html#terminology) of [HTTP] for the general terminology and core concepts of HTTP.\n\n### 2.1. Message Format\n\nAn HTTP/1.1 message consists of a start-line followed by a CRLF and a sequence of octets in a format similar to the Internet Message Format [RFC5322]: zero or more header field lines (collectively referred to as the \"headers\" or the \"header section\"), an empty line indicating the end of the header section, and an optional message body.\n\n```\n HTTP-message = start-line CRLF\n *( field-line CRLF )\n CRLF\n [ message-body ]\n```\n\nA message can be either a request from client to server or a response from server to client. Syntactically, the two types of messages differ only in the start-line, which is either a request-line (for requests) or a status-line (for responses), and in the algorithm for determining the length of the message body (Section 6).\n\n```\n start-line = request-line / status-line \n```\n\nIn theory, a client could receive requests and a server could receive responses, distinguishing them by their different start-line formats. In practice, servers are implemented to only expect a request (a response is interpreted as an unknown or invalid request method), and clients are implemented to only expect a response.\n\nHTTP makes use of some protocol elements similar to the Multipurpose Internet Mail Extensions (MIME) [RFC2045]. See Appendix B for the differences between HTTP and MIME messages.\n\n### 2.2. Message Parsing\n\nThe normal procedure for parsing an HTTP message is to read the start-line into a structure, read each header field line into a hash table by field name until the empty line, and then use the parsed data to determine if a message body is expected. If a message body has been indicated, then it is read as a stream until an amount of octets equal to the message body length is read or the connection is closed.\n\nA recipient *MUST* parse an HTTP message as a sequence of octets in an encoding that is a superset of US-ASCII [USASCII]. Parsing an HTTP message as a stream of Unicode characters, without regard for the specific encoding, creates security vulnerabilities due to the varying ways that string processing libraries handle invalid multibyte character sequences that contain the octet LF (%x0A). String-based parsers can only be safely used within protocol elements after the element has been extracted from the message, such as within a header field line value after message parsing has delineated the individual field lines.\n\nAlthough the line terminator for the start-line and fields is the sequence CRLF, a recipient *MAY* recognize a single LF as a line terminator and ignore any preceding CR.\n\nA sender *MUST NOT* generate a bare CR (a CR character not immediately followed by LF) within any protocol elements other than the content. A recipient of such a bare CR *MUST* consider that element to be invalid or replace each bare CR with SP before processing the element or forwarding the message.\n\nOlder HTTP/1.0 user agent implementations might send an extra CRLF after a POST request as a workaround for some early server applications that failed to read message body content that was not terminated by a line-ending. An HTTP/1.1 user agent *MUST NOT* preface or follow a request with an extra CRLF. If terminating the request message body with a line-ending is desired, then the user agent *MUST* count the terminating CRLF octets as part of the message body length.\n\nIn the interest of robustness, a server that is expecting to receive and parse a request-line *SHOULD* ignore at least one empty line (CRLF) received prior to the request-line.\n\nA sender *MUST NOT* send whitespace between the start-line and the first header field.\n\nA recipient that receives whitespace between the start-line and the first header field *MUST* either reject the message as invalid or consume each whitespace-preceded line without further processing of it (i.e., ignore the entire line, along with any subsequent lines preceded by whitespace, until a properly formed header field is received or the header section is terminated). Rejection or removal of invalid whitespace-preceded lines is necessary to prevent their misinterpretation by downstream recipients that might be vulnerable to request smuggling (Section 11.2) or response splitting (Section 11.1) attacks.\n\nWhen a server listening only for HTTP request messages, or processing what appears from the start-line to be an HTTP request message, receives a sequence of octets that does not match the HTTP-message grammar aside from the robustness exceptions listed above, the server *SHOULD* respond with a [400 (Bad Request)](rfc9110.html#status.400) response and close the connection.\n\n### 2.3. HTTP Version\n\nHTTP uses a \".\" numbering scheme to indicate versions of the protocol. This specification defines version \"1.1\". [Section 2.5](rfc9110.html#protocol.version) of [HTTP] specifies the semantics of HTTP version numbers.\n\nThe version of an HTTP/1.x message is indicated by an HTTP-version field in the start-line. HTTP-version is case-sensitive.\n\n```\n HTTP-version = HTTP-name \"/\" DIGIT \".\" DIGIT HTTP-name = %s\"HTTP\"\n```\n\nWhen an HTTP/1.1 message is sent to an HTTP/1.0 recipient [HTTP/1.0] or a recipient whose version is unknown, the HTTP/1.1 message is constructed such that it can be interpreted as a valid HTTP/1.0 message if all of the newer features are ignored. This specification places recipient-version requirements on some new features so that a conformant sender will only use compatible features until it has determined, through configuration or the receipt of a message, that the recipient supports HTTP/1.1.\n\nIntermediaries that process HTTP messages (i.e., all intermediaries other than those acting as tunnels) *MUST* send their own HTTP-version in forwarded messages, unless it is purposefully downgraded as a workaround for an upstream issue. In other words, an intermediary is not allowed to blindly forward the start-line without ensuring that the protocol version in that message matches a version to which that intermediary is conformant for both the receiving and sending of messages. Forwarding an HTTP message without rewriting the HTTP-version might result in communication errors when downstream recipients use the message sender's version to determine what features are safe to use for later communication with that sender.\n\nA server *MAY* send an HTTP/1.0 response to an HTTP/1.1 request if it is known or suspected that the client incorrectly implements the HTTP specification and is incapable of correctly processing later version responses, such as when a client fails to parse the version number correctly or when an intermediary is known to blindly forward the HTTP-version even when it doesn't conform to the given minor version of the protocol. Such protocol downgrades *SHOULD NOT* be performed unless triggered by specific client attributes, such as when one or more of the request header fields (e.g., [User-Agent](rfc9110.html#field.user-agent)) uniquely match the values sent by a client known to be in error.\n\n## 3. Request Line\n\nA request-line begins with a method token, followed by a single space (SP), the request-target, and another single space (SP), and ends with the protocol version.\n\n```\n request-line = method SP request-target SP HTTP-version \n```\n\nAlthough the request-line grammar rule requires that each of the component elements be separated by a single SP octet, recipients *MAY* instead parse on whitespace-delimited word boundaries and, aside from the CRLF terminator, treat any form of whitespace as the SP separator while ignoring preceding or trailing whitespace; such whitespace includes one or more of the following octets: SP, HTAB, VT (%x0B), FF (%x0C), or bare CR. However, lenient parsing can result in request smuggling security vulnerabilities if there are multiple recipients of the message and each has its own unique interpretation of robustness (see Section 11.2).\n\nHTTP does not place a predefined limit on the length of a request-line, as described in [Section 2.3](rfc9110.html#length.requirements) of [HTTP]. A server that receives a method longer than any that it implements *SHOULD* respond with a [501 (Not Implemented)](rfc9110.html#status.501) status code. A server that receives a request-target longer than any URI it wishes to parse *MUST* respond with a [414 (URI Too Long)](rfc9110.html#status.414) status code (see [Section 15.5.15](rfc9110.html#status.414) of [HTTP]).\n\nVarious ad hoc limitations on request-line length are found in practice. It is *RECOMMENDED* that all HTTP senders and recipients support, at a minimum, request-line lengths of 8000 octets.\n\n### 3.1. Method\n\nThe method token indicates the request method to be performed on the target resource. The request method is case-sensitive.\n\n```\n method = token \n```\n\nThe request methods defined by this specification can be found in [Section 9](rfc9110.html#methods) of [HTTP], along with information regarding the HTTP method registry and considerations for defining new methods.\n\n### 3.2. Request Target\n\nThe request-target identifies the target resource upon which to apply the request. The client derives a request-target from its desired target URI. There are four distinct formats for the request-target, depending on both the method being requested and whether the request is to a proxy.\n\n```\n request-target = origin-form\n / absolute-form\n / authority-form\n / asterisk-form \n```\n\nNo whitespace is allowed in the request-target. Unfortunately, some user agents fail to properly encode or exclude whitespace found in hypertext references, resulting in those disallowed characters being sent as the request-target in a malformed request-line.\n\nRecipients of an invalid request-line *SHOULD* respond with either a [400 (Bad Request)](rfc9110.html#status.400) error or a [301 (Moved Permanently)](rfc9110.html#status.301) redirect with the request-target properly encoded. A recipient *SHOULD NOT* attempt to autocorrect and then process the request without a redirect, since the invalid request-line might be deliberately crafted to bypass security filters along the request chain.\n\nA client *MUST* send a [Host](rfc9110.html#field.host) header field ([Section 7.2](rfc9110.html#field.host) of [HTTP]) in all HTTP/1.1 request messages. If the target URI includes an authority component, then a client *MUST* send a field value for Host that is identical to that authority component, excluding any userinfo subcomponent and its \"@\" delimiter ([Section 4.2](rfc9110.html#uri.schemes) of [HTTP]). If the authority component is missing or undefined for the target URI, then a client *MUST* send a Host header field with an empty field value.\n\nA server *MUST* respond with a [400 (Bad Request)](rfc9110.html#status.400) status code to any HTTP/1.1 request message that lacks a Host header field and to any request message that contains more than one Host header field line or a Host header field with an invalid field value.\n\n#### 3.2.1. origin-form\n\nThe most common form of request-target is the origin-form.\n\n```\n origin-form = absolute-path [ \"?\" query ]\n```\n\nWhen making a request directly to an origin server, other than a CONNECT or server-wide OPTIONS request (as detailed below), a client *MUST* send only the absolute path and query components of the target URI as the request-target. If the target URI's path component is empty, the client *MUST* send \"/\" as the path within the origin-form of request-target. A [Host](rfc9110.html#field.host) header field is also sent, as defined in [Section 7.2](rfc9110.html#field.host) of [HTTP].\n\nFor example, a client wishing to retrieve a representation of the resource identified as\n\n```\nhttp://www.example.org/where?q=now\n```\n\ndirectly from the origin server would open (or reuse) a TCP connection to port 80 of the host \"www.example.org\" and send the lines:\n\n```\nGET /where?q=now HTTP/1.1\nHost: www.example.org\n```\n\nfollowed by the remainder of the request message.\n\n#### 3.2.2. absolute-form\n\nWhen making a request to a proxy, other than a CONNECT or server-wide OPTIONS request (as detailed below), a client *MUST* send the target URI in absolute-form as the request-target.\n\n```\n absolute-form = absolute-URI \n```\n\nThe proxy is requested to either service that request from a valid cache, if possible, or make the same request on the client's behalf either to the next inbound proxy server or directly to the origin server indicated by the request-target. Requirements on such \"forwarding\" of messages are defined in [Section 7.6](rfc9110.html#message.forwarding) of [HTTP].\n\nAn example absolute-form of request-line would be:\n\n```\nGET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1\n```\n\nA client *MUST* send a Host header field in an HTTP/1.1 request even if the request-target is in the absolute-form, since this allows the Host information to be forwarded through ancient HTTP/1.0 proxies that might not have implemented Host.\n\nWhen a proxy receives a request with an absolute-form of request-target, the proxy *MUST* ignore the received Host header field (if any) and instead replace it with the host information of the request-target. A proxy that forwards such a request *MUST* generate a new Host field value based on the received request-target rather than forward the received Host field value.\n\nWhen an origin server receives a request with an absolute-form of request-target, the origin server *MUST* ignore the received Host header field (if any) and instead use the host information of the request-target. Note that if the request-target does not have an authority component, an empty Host header field will be sent in this case.\n\nA server *MUST* accept the absolute-form in requests even though most HTTP/1.1 clients will only send the absolute-form to a proxy.\n\n#### 3.2.3. authority-form\n\nThe authority-form of request-target is only used for CONNECT requests ([Section 9.3.6](rfc9110.html#CONNECT) of [HTTP]). It consists of only the [uri-host](rfc9110.html#uri.references) and [port](rfc9110.html#uri.references) number of the tunnel destination, separated by a colon (\":\").\n\n```\n authority-form = uri-host \":\" port \n```\n\nWhen making a CONNECT request to establish a tunnel through one or more proxies, a client *MUST* send only the host and port of the tunnel destination as the request-target. The client obtains the host and port from the target URI's authority component, except that it sends the scheme's default port if the target URI elides the port. For example, a CONNECT request to \"http://www.example.com\" looks like the following:\n\n```\nCONNECT www.example.com:80 HTTP/1.1\nHost: www.example.com\n```\n\n#### 3.2.4. asterisk-form\n\nThe asterisk-form of request-target is only used for a server-wide OPTIONS request ([Section 9.3.7](rfc9110.html#OPTIONS) of [HTTP]).\n\n```\n asterisk-form = \"*\"\n```\n\nWhen a client wishes to request OPTIONS for the server as a whole, as opposed to a specific named resource of that server, the client *MUST* send only \"*\" (%x2A) as the request-target. For example,\n\n```\nOPTIONS * HTTP/1.1\n```\n\nIf a proxy receives an OPTIONS request with an absolute-form of request-target in which the URI has an empty path and no query component, then the last proxy on the request chain *MUST* send a request-target of \"*\" when it forwards the request to the indicated origin server.\n\nFor example, the request\n\n```\nOPTIONS http://www.example.org:8001 HTTP/1.1\n```\n\nwould be forwarded by the final proxy as\n\n```\nOPTIONS * HTTP/1.1\nHost: www.example.org:8001\n```\n\nafter connecting to port 8001 of host \"www.example.org\".\n\n### 3.3. Reconstructing the Target URI\n\nThe target URI is the request-target when the request-target is in absolute-form. In that case, a server will parse the URI into its generic components for further evaluation.\n\nOtherwise, the server reconstructs the target URI from the connection context and various parts of the request message in order to identify the target resource ([Section 7.1](rfc9110.html#target.resource) of [HTTP]):\n\n- If the server's configuration provides for a fixed URI scheme, or a scheme is provided by a trusted outbound gateway, that scheme is used for the target URI. This is common in large-scale deployments because a gateway server will receive the client's connection context and replace that with their own connection to the inbound server. Otherwise, if the request is received over a secured connection, the target URI's scheme is \"https\"; if not, the scheme is \"http\".\n- If the request-target is in authority-form , the target URI's authority component is the request-target. Otherwise, the target URI's authority component is the field value of the [Host](rfc9110.html#field.host) header field. If there is no [Host](rfc9110.html#field.host) header field or if its field value is empty or invalid, the target URI's authority component is empty.\n- If the request-target is in authority-form or asterisk-form , the target URI's combined [path](rfc9110.html#uri.references) and query component is empty. Otherwise, the target URI's combined [path](rfc9110.html#uri.references) and query component is the request-target.\n- The components of a reconstructed target URI, once determined as above, can be recombined into absolute-URI form by concatenating the scheme, \"://\", authority, and combined path and query component.\n\nExample 1: The following message received over a secure connection\n\n```\nGET /pub/WWW/TheProject.html HTTP/1.1\nHost: www.example.org\n```\n\nhas a target URI of\n\n```\nhttps://www.example.org/pub/WWW/TheProject.html\n```\n\nExample 2: The following message received over an insecure connection\n\n```\nOPTIONS * HTTP/1.1\nHost: www.example.org:8080\n```\n\nhas a target URI of\n\n```\nhttp://www.example.org:8080\n```\n\nIf the target URI's authority component is empty and its URI scheme requires a non-empty authority (as is the case for \"http\" and \"https\"), the server can reject the request or determine whether a configured default applies that is consistent with the incoming connection's context. Context might include connection details like address and port, what security has been applied, and locally defined information specific to that server's configuration. An empty authority is replaced with the configured default before further processing of the request.\n\nSupplying a default name for authority within the context of a secured connection is inherently unsafe if there is any chance that the user agent's intended authority might differ from the default. A server that can uniquely identify an authority from the request context *MAY* use that identity as a default without this risk. Alternatively, it might be better to redirect the request to a safe resource that explains how to obtain a new client.\n\nNote that reconstructing the client's target URI is only half of the process for identifying a target resource. The other half is determining whether that target URI identifies a resource for which the server is willing and able to send a response, as defined in [Section 7.4](rfc9110.html#routing.reject) of [HTTP].\n\n## 4. Status Line\n\nThe first line of a response message is the status-line, consisting of the protocol version, a space (SP), the status code, and another space and ending with an *OPTIONAL* textual phrase describing the status code.\n\n```\n status-line = HTTP-version SP status-code SP [ reason-phrase ]\n```\n\nAlthough the status-line grammar rule requires that each of the component elements be separated by a single SP octet, recipients *MAY* instead parse on whitespace-delimited word boundaries and, aside from the line terminator, treat any form of whitespace as the SP separator while ignoring preceding or trailing whitespace; such whitespace includes one or more of the following octets: SP, HTAB, VT (%x0B), FF (%x0C), or bare CR. However, lenient parsing can result in response splitting security vulnerabilities if there are multiple recipients of the message and each has its own unique interpretation of robustness (see Section 11.1).\n\nThe status-code element is a 3-digit integer code describing the result of the server's attempt to understand and satisfy the client's corresponding request. A recipient parses and interprets the remainder of the response message in light of the semantics defined for that status code, if the status code is recognized by that recipient, or in accordance with the class of that status code when the specific code is unrecognized.\n\n```\n status-code = 3DIGIT \n```\n\nHTTP's core status codes are defined in [Section 15](rfc9110.html#status.codes) of [HTTP], along with the classes of status codes, considerations for the definition of new status codes, and the IANA registry for collecting such definitions.\n\nThe reason-phrase element exists for the sole purpose of providing a textual description associated with the numeric status code, mostly out of deference to earlier Internet application protocols that were more frequently used with interactive text clients.\n\n```\n reason-phrase = 1*( HTAB / SP / VCHAR / obs-text )\n```\n\nA client *SHOULD* ignore the reason-phrase content because it is not a reliable channel for information (it might be translated for a given locale, overwritten by intermediaries, or discarded when the message is forwarded via other versions of HTTP). A server *MUST* send the space that separates the status-code from the reason-phrase even when the reason-phrase is absent (i.e., the status-line would end with the space).\n\n## 5. Field Syntax\n\nEach field line consists of a case-insensitive field name followed by a colon (\":\"), optional leading whitespace, the field line value, and optional trailing whitespace.\n\n```\n field-line = field-name \":\" OWS field-value OWS \n```\n\nRules for parsing within field values are defined in [Section 5.5](rfc9110.html#fields.values) of [HTTP]. This section covers the generic syntax for header field inclusion within, and extraction from, HTTP/1.1 messages.\n\n### 5.1. Field Line Parsing\n\nMessages are parsed using a generic algorithm, independent of the individual field names. The contents within a given field line value are not parsed until a later stage of message interpretation (usually after the message's entire field section has been processed).\n\nNo whitespace is allowed between the field name and colon. In the past, differences in the handling of such whitespace have led to security vulnerabilities in request routing and response handling. A server *MUST* reject, with a response status code of [400 (Bad Request)](rfc9110.html#status.400), any received request message that contains whitespace between a header field name and colon. A proxy *MUST* remove any such whitespace from a response message before forwarding the message downstream.\n\nA field line value might be preceded and/or followed by optional whitespace (OWS); a single SP preceding the field line value is preferred for consistent readability by humans. The field line value does not include that leading or trailing whitespace: OWS occurring before the first non-whitespace octet of the field line value, or after the last non-whitespace octet of the field line value, is excluded by parsers when extracting the field line value from a field line.\n\n### 5.2. Obsolete Line Folding\n\nHistorically, HTTP/1.x field values could be extended over multiple lines by preceding each extra line with at least one space or horizontal tab (obs-fold). This specification deprecates such line folding except within the \"message/http\" media type (Section 10.1).\n\n```\n obs-fold = OWS CRLF RWS\n ; obsolete line folding\n```\n\nA sender *MUST NOT* generate a message that includes line folding (i.e., that has any field line value that contains a match to the obs-fold rule) unless the message is intended for packaging within the \"message/http\" media type.\n\nA server that receives an obs-fold in a request message that is not within a \"message/http\" container *MUST* either reject the message by sending a [400 (Bad Request)](rfc9110.html#status.400), preferably with a representation explaining that obsolete line folding is unacceptable, or replace each received obs-fold with one or more SP octets prior to interpreting the field value or forwarding the message downstream.\n\nA proxy or gateway that receives an obs-fold in a response message that is not within a \"message/http\" container *MUST* either discard the message and replace it with a [502 (Bad Gateway)](rfc9110.html#status.502) response, preferably with a representation explaining that unacceptable line folding was received, or replace each received obs-fold with one or more SP octets prior to interpreting the field value or forwarding the message downstream.\n\nA user agent that receives an obs-fold in a response message that is not within a \"message/http\" container *MUST* replace each received obs-fold with one or more SP octets prior to interpreting the field value.\n\n## 6. Message Body\n\nThe message body (if any) of an HTTP/1.1 message is used to carry content ([Section 6.4](rfc9110.html#content) of [HTTP]) for the request or response. The message body is identical to the content unless a transfer coding has been applied, as described in Section 6.1.\n\n```\n message-body = *OCTET\n```\n\nThe rules for determining when a message body is present in an HTTP/1.1 message differ for requests and responses.\n\nThe presence of a message body in a request is signaled by a Content-Length or Transfer-Encoding header field. Request message framing is independent of method semantics.\n\nThe presence of a message body in a response, as detailed in Section 6.3, depends on both the request method to which it is responding and the response status code. This corresponds to when response content is allowed by HTTP semantics ([Section 6.4.1](rfc9110.html#content.semantics) of [HTTP]).\n\n### 6.1. Transfer-Encoding\n\nThe Transfer-Encoding header field lists the transfer coding names corresponding to the sequence of transfer codings that have been (or will be) applied to the content in order to form the message body. Transfer codings are defined in Section 7.\n\n```\n Transfer-Encoding = #transfer-coding\n ; defined in [HTTP], Section 10.1.4 \n```\n\nTransfer-Encoding is analogous to the Content-Transfer-Encoding field of MIME, which was designed to enable safe transport of binary data over a 7-bit transport service ([RFC2045], [Section 6](https://www.rfc-editor.org/rfc/rfc2045.html#section-6)). However, safe transport has a different focus for an 8bit-clean transfer protocol. In HTTP's case, Transfer-Encoding is primarily intended to accurately delimit dynamically generated content. It also serves to distinguish encodings that are only applied in transit from the encodings that are a characteristic of the selected representation.\n\nA recipient *MUST* be able to parse the chunked transfer coding (Section 7.1) because it plays a crucial role in framing messages when the content size is not known in advance. A sender *MUST NOT* apply the chunked transfer coding more than once to a message body (i.e., chunking an already chunked message is not allowed). If any transfer coding other than chunked is applied to a request's content, the sender *MUST* apply chunked as the final transfer coding to ensure that the message is properly framed. If any transfer coding other than chunked is applied to a response's content, the sender *MUST* either apply chunked as the final transfer coding or terminate the message by closing the connection.\n\nFor example,\n\n```\nTransfer-Encoding: gzip, chunked\n```\n\nindicates that the content has been compressed using the gzip coding and then chunked using the chunked coding while forming the message body.\n\nUnlike [Content-Encoding](rfc9110.html#field.content-encoding) ([Section 8.4.1](rfc9110.html#content.codings) of [HTTP]), Transfer-Encoding is a property of the message, not of the representation. Any recipient along the request/response chain *MAY* decode the received transfer coding(s) or apply additional transfer coding(s) to the message body, assuming that corresponding changes are made to the Transfer-Encoding field value. Additional information about the encoding parameters can be provided by other header fields not defined by this specification.\n\nTransfer-Encoding *MAY* be sent in a response to a HEAD request or in a [304 (Not Modified)](rfc9110.html#status.304) response ([Section 15.4.5](rfc9110.html#status.304) of [HTTP]) to a GET request, neither of which includes a message body, to indicate that the origin server would have applied a transfer coding to the message body if the request had been an unconditional GET. This indication is not required, however, because any recipient on the response chain (including the origin server) can remove transfer codings when they are not needed.\n\nA server *MUST NOT* send a Transfer-Encoding header field in any response with a status code of [1xx (Informational)](rfc9110.html#status.1xx) or [204 (No Content)](rfc9110.html#status.204). A server *MUST NOT* send a Transfer-Encoding header field in any [2xx (Successful)](rfc9110.html#status.2xx) response to a CONNECT request ([Section 9.3.6](rfc9110.html#CONNECT) of [HTTP]).\n\nA server that receives a request message with a transfer coding it does not understand *SHOULD* respond with [501 (Not Implemented)](rfc9110.html#status.501).\n\nTransfer-Encoding was added in HTTP/1.1. It is generally assumed that implementations advertising only HTTP/1.0 support will not understand how to process transfer-encoded content, and that an HTTP/1.0 message received with a Transfer-Encoding is likely to have been forwarded without proper handling of the chunked transfer coding in transit.\n\nA client *MUST NOT* send a request containing Transfer-Encoding unless it knows the server will handle HTTP/1.1 requests (or later minor revisions); such knowledge might be in the form of specific user configuration or by remembering the version of a prior received response. A server *MUST NOT* send a response containing Transfer-Encoding unless the corresponding request indicates HTTP/1.1 (or later minor revisions).\n\nEarly implementations of Transfer-Encoding would occasionally send both a chunked transfer coding for message framing and an estimated Content-Length header field for use by progress bars. This is why Transfer-Encoding is defined as overriding Content-Length, as opposed to them being mutually incompatible. Unfortunately, forwarding such a message can lead to vulnerabilities regarding request smuggling (Section 11.2) or response splitting (Section 11.1) attacks if any downstream recipient fails to parse the message according to this specification, particularly when a downstream recipient only implements HTTP/1.0.\n\nA server *MAY* reject a request that contains both Content-Length and Transfer-Encoding or process such a request in accordance with the Transfer-Encoding alone. Regardless, the server *MUST* close the connection after responding to such a request to avoid the potential attacks.\n\nA server or client that receives an HTTP/1.0 message containing a Transfer-Encoding header field *MUST* treat the message as if the framing is faulty, even if a Content-Length is present, and close the connection after processing the message. The message sender might have retained a portion of the message, in buffer, that could be misinterpreted by further use of the connection.\n\n### 6.2. Content-Length\n\nWhen a message does not have a Transfer-Encoding header field, a Content-Length header field ([Section 8.6](rfc9110.html#field.content-length) of [HTTP]) can provide the anticipated size, as a decimal number of octets, for potential content. For messages that do include content, the Content-Length field value provides the framing information necessary for determining where the data (and message) ends. For messages that do not include content, the Content-Length indicates the size of the selected representation ([Section 8.6](rfc9110.html#field.content-length) of [HTTP]).\n\nA sender *MUST NOT* send a Content-Length header field in any message that contains a Transfer-Encoding header field.\n\n### 6.3. Message Body Length\n\nThe length of a message body is determined by one of the following (in order of precedence):\n\n1. Any response to a HEAD request and any response with a [1xx (Informational)](rfc9110.html#status.1xx), [204 (No Content)](rfc9110.html#status.204), or [304 (Not Modified)](rfc9110.html#status.304) status code is always terminated by the first empty line after the header fields, regardless of the header fields present in the message, and thus cannot contain a message body or trailer section.\n2. Any [2xx (Successful)](rfc9110.html#status.2xx) response to a CONNECT request implies that the connection will become a tunnel immediately after the empty line that concludes the header fields. A client *MUST* ignore any Content-Length or Transfer-Encoding header fields received in such a message.\n3. If a message is received with both a Transfer-Encoding and a Content-Length header field, the Transfer-Encoding overrides the Content-Length. Such a message might indicate an attempt to perform request smuggling (Section 11.2) or response splitting (Section 11.1) and ought to be handled as an error. An intermediary that chooses to forward the message *MUST* first remove the received Content-Length field and process the Transfer-Encoding (as described below) prior to forwarding the message downstream.\n4. If a Transfer-Encoding header field is present and the chunked transfer coding (Section 7.1) is the final encoding, the message body length is determined by reading and decoding the chunked data until the transfer coding indicates the data is complete. If a Transfer-Encoding header field is present in a response and the chunked transfer coding is not the final encoding, the message body length is determined by reading the connection until it is closed by the server. If a Transfer-Encoding header field is present in a request and the chunked transfer coding is not the final encoding, the message body length cannot be determined reliably; the server *MUST* respond with the [400 (Bad Request)](rfc9110.html#status.400) status code and then close the connection.\n5. If a message is received without Transfer-Encoding and with an invalid Content-Length header field, then the message framing is invalid and the recipient *MUST* treat it as an unrecoverable error, unless the field value can be successfully parsed as a comma-separated list ([Section 5.6.1](rfc9110.html#abnf.extension) of [HTTP]), all values in the list are valid, and all values in the list are the same (in which case, the message is processed with that single value used as the Content-Length field value). If the unrecoverable error is in a request message, the server *MUST* respond with a [400 (Bad Request)](rfc9110.html#status.400) status code and then close the connection. If it is in a response message received by a proxy, the proxy *MUST* close the connection to the server, discard the received response, and send a [502 (Bad Gateway)](rfc9110.html#status.502) response to the client. If it is in a response message received by a user agent, the user agent *MUST* close the connection to the server and discard the received response.\n6. If a valid Content-Length header field is present without Transfer-Encoding, its decimal value defines the expected message body length in octets. If the sender closes the connection or the recipient times out before the indicated number of octets are received, the recipient *MUST* consider the message to be incomplete and close the connection.\n7. If this is a request message and none of the above are true, then the message body length is zero (no message body is present).\n8. Otherwise, this is a response message without a declared message body length, so the message body length is determined by the number of octets received prior to the server closing the connection.\n\nSince there is no way to distinguish a successfully completed, close-delimited response message from a partially received message interrupted by network failure, a server *SHOULD* generate encoding or length-delimited messages whenever possible. The close-delimiting feature exists primarily for backwards compatibility with HTTP/1.0.\n\nA server *MAY* reject a request that contains a message body but not a Content-Length by responding with [411 (Length Required)](rfc9110.html#status.411).\n\nUnless a transfer coding other than chunked has been applied, a client that sends a request containing a message body *SHOULD* use a valid Content-Length header field if the message body length is known in advance, rather than the chunked transfer coding, since some existing services respond to chunked with a [411 (Length Required)](rfc9110.html#status.411) status code even though they understand the chunked transfer coding. This is typically because such services are implemented via a gateway that requires a content length in advance of being called, and the server is unable or unwilling to buffer the entire request before processing.\n\nA user agent that sends a request that contains a message body *MUST* send either a valid Content-Length header field or use the chunked transfer coding. A client *MUST NOT* use the chunked transfer coding unless it knows the server will handle HTTP/1.1 (or later) requests; such knowledge can be in the form of specific user configuration or by remembering the version of a prior received response.\n\nIf the final response to the last request on a connection has been completely received and there remains additional data to read, a user agent *MAY* discard the remaining data or attempt to determine if that data belongs as part of the prior message body, which might be the case if the prior message's Content-Length value is incorrect. A client *MUST NOT* process, cache, or forward such extra data as a separate response, since such behavior would be vulnerable to cache poisoning.\n\n## 7. Transfer Codings\n\nTransfer coding names are used to indicate an encoding transformation that has been, can be, or might need to be applied to a message's content in order to ensure \"safe transport\" through the network. This differs from a content coding in that the transfer coding is a property of the message rather than a property of the representation that is being transferred.\n\nAll transfer-coding names are case-insensitive and ought to be registered within the HTTP Transfer Coding registry, as defined in Section 7.3. They are used in the Transfer-Encoding (Section 6.1) and [TE](rfc9110.html#field.te) ([Section 10.1.4](rfc9110.html#field.te) of [HTTP]) header fields (the latter also defining the \"transfer-coding\" grammar).\n\n### 7.1. Chunked Transfer Coding\n\nThe chunked transfer coding wraps content in order to transfer it as a series of chunks, each with its own size indicator, followed by an *OPTIONAL* trailer section containing trailer fields. Chunked enables content streams of unknown size to be transferred as a sequence of length-delimited buffers, which enables the sender to retain connection persistence and the recipient to know when it has received the entire message.\n\n```\n chunked-body = *chunk last-chunk trailer-section CRLF chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF chunk-size = 1*HEXDIG last-chunk = 1*(\"0\") [ chunk-ext ] CRLF chunk-data = 1*OCTET ; a sequence of chunk-size octets\n```\n\nThe chunk-size field is a string of hex digits indicating the size of the chunk-data in octets. The chunked transfer coding is complete when a chunk with a chunk-size of zero is received, possibly followed by a trailer section, and finally terminated by an empty line.\n\nA recipient *MUST* be able to parse and decode the chunked transfer coding.\n\nHTTP/1.1 does not define any means to limit the size of a chunked response such that an intermediary can be assured of buffering the entire response. Additionally, very large chunk sizes may cause overflows or loss of precision if their values are not represented accurately in a receiving implementation. Therefore, recipients *MUST* anticipate potentially large hexadecimal numerals and prevent parsing errors due to integer conversion overflows or precision loss due to integer representation.\n\nThe chunked coding does not define any parameters. Their presence *SHOULD* be treated as an error.\n\n#### 7.1.1. Chunk Extensions\n\nThe chunked coding allows each chunk to include zero or more chunk extensions, immediately following the chunk-size, for the sake of supplying per-chunk metadata (such as a signature or hash), mid-message control information, or randomization of message body size.\n\n```\n chunk-ext = *( BWS \";\" BWS chunk-ext-name\n [ BWS \"=\" BWS chunk-ext-val ] )\n\n chunk-ext-name = token chunk-ext-val = token / quoted-string \n```\n\nThe chunked coding is specific to each connection and is likely to be removed or recoded by each recipient (including intermediaries) before any higher-level application would have a chance to inspect the extensions. Hence, the use of chunk extensions is generally limited to specialized HTTP services such as \"long polling\" (where client and server can have shared expectations regarding the use of chunk extensions) or for padding within an end-to-end secured connection.\n\nA recipient *MUST* ignore unrecognized chunk extensions. A server ought to limit the total length of chunk extensions received in a request to an amount reasonable for the services provided, in the same way that it applies length limitations and timeouts for other parts of a message, and generate an appropriate [4xx (Client Error)](rfc9110.html#status.4xx) response if that amount is exceeded.\n\n#### 7.1.2. Chunked Trailer Section\n\nA trailer section allows the sender to include additional fields at the end of a chunked message in order to supply metadata that might be dynamically generated while the content is sent, such as a message integrity check, digital signature, or post-processing status. The proper use and limitations of trailer fields are defined in [Section 6.5](rfc9110.html#trailer.fields) of [HTTP].\n\n```\n trailer-section = *( field-line CRLF )\n```\n\nA recipient that removes the chunked coding from a message *MAY* selectively retain or discard the received trailer fields. A recipient that retains a received trailer field *MUST* either store/forward the trailer field separately from the received header fields or merge the received trailer field into the header section. A recipient *MUST NOT* merge a received trailer field into the header section unless its corresponding header field definition explicitly permits and instructs how the trailer field value can be safely merged.\n\n#### 7.1.3. Decoding Chunked\n\nA process for decoding the chunked transfer coding can be represented in pseudo-code as:\n\n```\n length := 0\n read chunk-size, chunk-ext (if any), and CRLF\n while (chunk-size > 0) {\n read chunk-data and CRLF\n append chunk-data to content\n length := length + chunk-size\n read chunk-size, chunk-ext (if any), and CRLF\n }\n read trailer field\n while (trailer field is not empty) {\n if (trailer fields are stored/forwarded separately) {\n append trailer field to existing trailer fields\n }\n else if (trailer field is understood and defined as mergeable) {\n merge trailer field with existing header fields\n }\n else {\n discard trailer field\n }\n read trailer field\n }\n Content-Length := length\n Remove \"chunked\" from Transfer-Encoding\n```\n\n### 7.2. Transfer Codings for Compression\n\nThe following transfer coding names for compression are defined by the same algorithm as their corresponding content coding:\n\ncompress (and x-compress)\n\nSee [Section 8.4.1.1](rfc9110.html#compress.coding) of [HTTP].\n\ndeflate\n\nSee [Section 8.4.1.2](rfc9110.html#deflate.coding) of [HTTP].\n\ngzip (and x-gzip)\n\nSee [Section 8.4.1.3](rfc9110.html#gzip.coding) of [HTTP].\n\nThe compression codings do not define any parameters. The presence of parameters with any of these compression codings *SHOULD* be treated as an error.\n\n### 7.3. Transfer Coding Registry\n\nThe \"HTTP Transfer Coding Registry\" defines the namespace for transfer coding names. It is maintained at [https://www.iana.org/assignments/http-parameters](https://www.iana.org/assignments/http-parameters).\n\nRegistrations *MUST* include the following fields:\n\n- Name\n- Description\n- Pointer to specification text\n\nNames of transfer codings *MUST NOT* overlap with names of content codings ([Section 8.4.1](rfc9110.html#content.codings) of [HTTP]) unless the encoding transformation is identical, as is the case for the compression codings defined in Section 7.2.\n\nThe [TE](rfc9110.html#field.te) header field ([Section 10.1.4](rfc9110.html#field.te) of [HTTP]) uses a pseudo-parameter named \"q\" as the rank value when multiple transfer codings are acceptable. Future registrations of transfer codings *SHOULD NOT* define parameters called \"q\" (case-insensitively) in order to avoid ambiguities.\n\nValues to be added to this namespace require IETF Review (see [Section 4.8](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.8) of [RFC8126]) and *MUST* conform to the purpose of transfer coding defined in this specification.\n\nUse of program names for the identification of encoding formats is not desirable and is discouraged for future encodings.\n\n### 7.4. Negotiating Transfer Codings\n\nThe TE field ([Section 10.1.4](rfc9110.html#field.te) of [HTTP]) is used in HTTP/1.1 to indicate what transfer codings, besides chunked, the client is willing to accept in the response and whether the client is willing to preserve trailer fields in a chunked transfer coding.\n\nA client *MUST NOT* send the chunked transfer coding name in TE; chunked is always acceptable for HTTP/1.1 recipients.\n\nThree examples of TE use are below.\n\n```\nTE: deflate\nTE:\nTE: trailers, deflate;q=0.5\n```\n\nWhen multiple transfer codings are acceptable, the client *MAY* rank the codings by preference using a case-insensitive \"q\" parameter (similar to the qvalues used in content negotiation fields; see [Section 12.4.2](rfc9110.html#quality.values) of [HTTP]). The rank value is a real number in the range 0 through 1, where 0.001 is the least preferred and 1 is the most preferred; a value of 0 means \"not acceptable\".\n\nIf the TE field value is empty or if no TE field is present, the only acceptable transfer coding is chunked. A message with no transfer coding is always acceptable.\n\nThe keyword \"trailers\" indicates that the sender will not discard trailer fields, as described in [Section 6.5](rfc9110.html#trailer.fields) of [HTTP].\n\nSince the TE header field only applies to the immediate connection, a sender of TE *MUST* also send a \"TE\" connection option within the [Connection](rfc9110.html#field.connection) header field ([Section 7.6.1](rfc9110.html#field.connection) of [HTTP]) in order to prevent the TE header field from being forwarded by intermediaries that do not support its semantics.\n\n## 8. Handling Incomplete Messages\n\nA server that receives an incomplete request message, usually due to a canceled request or a triggered timeout exception, *MAY* send an error response prior to closing the connection.\n\nA client that receives an incomplete response message, which can occur when a connection is closed prematurely or when decoding a supposedly chunked transfer coding fails, *MUST* record the message as incomplete. Cache requirements for incomplete responses are defined in [Section 3.3](rfc9111.html#incomplete.responses) of [CACHING].\n\nIf a response terminates in the middle of the header section (before the empty line is received) and the status code might rely on header fields to convey the full meaning of the response, then the client cannot assume that meaning has been conveyed; the client might need to repeat the request in order to determine what action to take next.\n\nA message body that uses the chunked transfer coding is incomplete if the zero-sized chunk that terminates the encoding has not been received. A message that uses a valid Content-Length is incomplete if the size of the message body received (in octets) is less than the value given by Content-Length. A response that has neither chunked transfer coding nor Content-Length is terminated by closure of the connection and, if the header section was received intact, is considered complete unless an error was indicated by the underlying connection (e.g., an \"incomplete close\" in TLS would leave the response incomplete, as described in Section 9.8).\n\n## 9. Connection Management\n\nHTTP messaging is independent of the underlying transport- or session-layer connection protocol(s). HTTP only presumes a reliable transport with in-order delivery of requests and the corresponding in-order delivery of responses. The mapping of HTTP request and response structures onto the data units of an underlying transport protocol is outside the scope of this specification.\n\nAs described in [Section 7.3](rfc9110.html#routing.inbound) of [HTTP], the specific connection protocols to be used for an HTTP interaction are determined by client configuration and the [target URI](rfc9110.html#target.resource). For example, the \"http\" URI scheme ([Section 4.2.1](rfc9110.html#http.uri) of [HTTP]) indicates a default connection of TCP over IP, with a default TCP port of 80, but the client might be configured to use a proxy via some other connection, port, or protocol.\n\nHTTP implementations are expected to engage in connection management, which includes maintaining the state of current connections, establishing a new connection or reusing an existing connection, processing messages received on a connection, detecting connection failures, and closing each connection. Most clients maintain multiple connections in parallel, including more than one connection per server endpoint. Most servers are designed to maintain thousands of concurrent connections, while controlling request queues to enable fair use and detect denial-of-service attacks.\n\n### 9.1. Establishment\n\nIt is beyond the scope of this specification to describe how connections are established via various transport- or session-layer protocols. Each HTTP connection maps to one underlying transport connection.\n\n### 9.2. Associating a Response to a Request\n\nHTTP/1.1 does not include a request identifier for associating a given request message with its corresponding one or more response messages. Hence, it relies on the order of response arrival to correspond exactly to the order in which requests are made on the same connection. More than one response message per request only occurs when one or more informational responses ([1xx](rfc9110.html#status.1xx); see [Section 15.2](rfc9110.html#status.1xx) of [HTTP]) precede a final response to the same request.\n\nA client that has more than one outstanding request on a connection *MUST* maintain a list of outstanding requests in the order sent and *MUST* associate each received response message on that connection to the first outstanding request that has not yet received a final (non-[1xx](rfc9110.html#status.1xx)) response.\n\nIf a client receives data on a connection that doesn't have outstanding requests, the client *MUST NOT* consider that data to be a valid response; the client *SHOULD* close the connection, since message delimitation is now ambiguous, unless the data consists only of one or more CRLF (which can be discarded per Section 2.2).\n\n### 9.3. Persistence\n\nHTTP/1.1 defaults to the use of persistent connections, allowing multiple requests and responses to be carried over a single connection. HTTP implementations *SHOULD* support persistent connections.\n\nA recipient determines whether a connection is persistent or not based on the protocol version and [Connection](rfc9110.html#field.connection) header field ([Section 7.6.1](rfc9110.html#field.connection) of [HTTP]) in the most recently received message, if any:\n\n- If the \" close \" connection option is present ( Section 9.6 ), the connection will not persist after the current response; else,\n- If the received protocol is HTTP/1.1 (or later), the connection will persist after the current response; else,\n- If the received protocol is HTTP/1.0, the \"keep-alive\" connection option is present, either the recipient is not a proxy or the message is a response, and the recipient wishes to honor the HTTP/1.0 \"keep-alive\" mechanism, the connection will persist after the current response; otherwise,\n- The connection will close after the current response.\n\nA client that does not support persistent connections *MUST* send the \"close\" connection option in every request message.\n\nA server that does not support persistent connections *MUST* send the \"close\" connection option in every response message that does not have a [1xx (Informational)](rfc9110.html#status.1xx) status code.\n\nA client *MAY* send additional requests on a persistent connection until it sends or receives a \"close\" connection option or receives an HTTP/1.0 response without a \"keep-alive\" connection option.\n\nIn order to remain persistent, all messages on a connection need to have a self-defined message length (i.e., one not defined by closure of the connection), as described in Section 6. A server *MUST* read the entire request message body or close the connection after sending its response; otherwise, the remaining data on a persistent connection would be misinterpreted as the next request. Likewise, a client *MUST* read the entire response message body if it intends to reuse the same connection for a subsequent request.\n\nA proxy server *MUST NOT* maintain a persistent connection with an HTTP/1.0 client (see Appendix C.2.2 for information and discussion of the problems with the Keep-Alive header field implemented by many HTTP/1.0 clients).\n\nSee Appendix C.2.2 for more information on backwards compatibility with HTTP/1.0 clients.\n\n#### 9.3.1. Retrying Requests\n\nConnections can be closed at any time, with or without intention. Implementations ought to anticipate the need to recover from asynchronous close events. The conditions under which a client can automatically retry a sequence of outstanding requests are defined in [Section 9.2.2](rfc9110.html#idempotent.methods) of [HTTP].\n\n#### 9.3.2. Pipelining\n\nA client that supports persistent connections *MAY* pipeline its requests (i.e., send multiple requests without waiting for each response). A server *MAY* process a sequence of pipelined requests in parallel if they all have safe methods ([Section 9.2.1](rfc9110.html#safe.methods) of [HTTP]), but it *MUST* send the corresponding responses in the same order that the requests were received.\n\nA client that pipelines requests *SHOULD* retry unanswered requests if the connection closes before it receives all of the corresponding responses. When retrying pipelined requests after a failed connection (a connection not explicitly closed by the server in its last complete response), a client *MUST NOT* pipeline immediately after connection establishment, since the first remaining request in the prior pipeline might have caused an error response that can be lost again if multiple requests are sent on a prematurely closed connection (see the TCP reset problem described in Section 9.6).\n\nIdempotent methods ([Section 9.2.2](rfc9110.html#idempotent.methods) of [HTTP]) are significant to pipelining because they can be automatically retried after a connection failure. A user agent *SHOULD NOT* pipeline requests after a non-idempotent method, until the final response status code for that method has been received, unless the user agent has a means to detect and recover from partial failure conditions involving the pipelined sequence.\n\nAn intermediary that receives pipelined requests *MAY* pipeline those requests when forwarding them inbound, since it can rely on the outbound user agent(s) to determine what requests can be safely pipelined. If the inbound connection fails before receiving a response, the pipelining intermediary *MAY* attempt to retry a sequence of requests that have yet to receive a response if the requests all have idempotent methods; otherwise, the pipelining intermediary *SHOULD* forward any received responses and then close the corresponding outbound connection(s) so that the outbound user agent(s) can recover accordingly.\n\n### 9.4. Concurrency\n\nA client ought to limit the number of simultaneous open connections that it maintains to a given server.\n\nPrevious revisions of HTTP gave a specific number of connections as a ceiling, but this was found to be impractical for many applications. As a result, this specification does not mandate a particular maximum number of connections but, instead, encourages clients to be conservative when opening multiple connections.\n\nMultiple connections are typically used to avoid the \"head-of-line blocking\" problem, wherein a request that takes significant server-side processing and/or transfers very large content would block subsequent requests on the same connection. However, each connection consumes server resources.\n\nFurthermore, using multiple connections can cause undesirable side effects in congested networks. Using larger numbers of connections can also cause side effects in otherwise uncongested networks, because their aggregate and initially synchronized sending behavior can cause congestion that would not have been present if fewer parallel connections had been used.\n\nNote that a server might reject traffic that it deems abusive or characteristic of a denial-of-service attack, such as an excessive number of open connections from a single client.\n\n### 9.5. Failures and Timeouts\n\nServers will usually have some timeout value beyond which they will no longer maintain an inactive connection. Proxy servers might make this a higher value since it is likely that the client will be making more connections through the same proxy server. The use of persistent connections places no requirements on the length (or existence) of this timeout for either the client or the server.\n\nA client or server that wishes to time out *SHOULD* issue a graceful close on the connection. Implementations *SHOULD* constantly monitor open connections for a received closure signal and respond to it as appropriate, since prompt closure of both sides of a connection enables allocated system resources to be reclaimed.\n\nA client, server, or proxy *MAY* close the transport connection at any time. For example, a client might have started to send a new request at the same time that the server has decided to close the \"idle\" connection. From the server's point of view, the connection is being closed while it was idle, but from the client's point of view, a request is in progress.\n\nA server *SHOULD* sustain persistent connections, when possible, and allow the underlying transport's flow-control mechanisms to resolve temporary overloads rather than terminate connections with the expectation that clients will retry. The latter technique can exacerbate network congestion or server load.\n\nA client sending a message body *SHOULD* monitor the network connection for an error response while it is transmitting the request. If the client sees a response that indicates the server does not wish to receive the message body and is closing the connection, the client *SHOULD* immediately cease transmitting the body and close its side of the connection.\n\n### 9.6. Tear-down\n\nThe \"close\" connection option is defined as a signal that the sender will close this connection after completion of the response. A sender *SHOULD* send a [Connection](rfc9110.html#field.connection) header field ([Section 7.6.1](rfc9110.html#field.connection) of [HTTP]) containing the \"close\" connection option when it intends to close a connection. For example,\n\n```\nConnection: close\n```\n\nas a request header field indicates that this is the last request that the client will send on this connection, while in a response, the same field indicates that the server is going to close this connection after the response message is complete.\n\nNote that the field name \"Close\" is reserved, since using that name as a header field might conflict with the \"close\" connection option.\n\nA client that sends a \"close\" connection option *MUST NOT* send further requests on that connection (after the one containing the \"close\") and *MUST* close the connection after reading the final response message corresponding to this request.\n\nA server that receives a \"close\" connection option *MUST* initiate closure of the connection (see below) after it sends the final response to the request that contained the \"close\" connection option. The server *SHOULD* send a \"close\" connection option in its final response on that connection. The server *MUST NOT* process any further requests received on that connection.\n\nA server that sends a \"close\" connection option *MUST* initiate closure of the connection (see below) after it sends the response containing the \"close\" connection option. The server *MUST NOT* process any further requests received on that connection.\n\nA client that receives a \"close\" connection option *MUST* cease sending requests on that connection and close the connection after reading the response message containing the \"close\" connection option; if additional pipelined requests had been sent on the connection, the client *SHOULD NOT* assume that they will be processed by the server.\n\nIf a server performs an immediate close of a TCP connection, there is a significant risk that the client will not be able to read the last HTTP response. If the server receives additional data from the client on a fully closed connection, such as another request sent by the client before receiving the server's response, the server's TCP stack will send a reset packet to the client; unfortunately, the reset packet might erase the client's unacknowledged input buffers before they can be read and interpreted by the client's HTTP parser.\n\nTo avoid the TCP reset problem, servers typically close a connection in stages. First, the server performs a half-close by closing only the write side of the read/write connection. The server then continues to read from the connection until it receives a corresponding close by the client, or until the server is reasonably certain that its own TCP stack has received the client's acknowledgement of the packet(s) containing the server's last response. Finally, the server fully closes the connection.\n\nIt is unknown whether the reset problem is exclusive to TCP or might also be found in other transport connection protocols.\n\nNote that a TCP connection that is half-closed by the client does not delimit a request message, nor does it imply that the client is no longer interested in a response. In general, transport signals cannot be relied upon to signal edge cases, since HTTP/1.1 is independent of transport.\n\n### 9.7. TLS Connection Initiation\n\nConceptually, HTTP/TLS is simply sending HTTP messages over a connection secured via TLS [TLS13].\n\nThe HTTP client also acts as the TLS client. It initiates a connection to the server on the appropriate port and sends the TLS ClientHello to begin the TLS handshake. When the TLS handshake has finished, the client may then initiate the first HTTP request. All HTTP data *MUST* be sent as TLS \"application data\" but is otherwise treated like a normal connection for HTTP (including potential reuse as a persistent connection).\n\n### 9.8. TLS Connection Closure\n\nTLS uses an exchange of closure alerts prior to (non-error) connection closure to provide secure connection closure; see [Section 6.1](https://www.rfc-editor.org/rfc/rfc8446.html#section-6.1) of [TLS13]. When a valid closure alert is received, an implementation can be assured that no further data will be received on that connection.\n\nWhen an implementation knows that it has sent or received all the message data that it cares about, typically by detecting HTTP message boundaries, it might generate an \"incomplete close\" by sending a closure alert and then closing the connection without waiting to receive the corresponding closure alert from its peer.\n\nAn incomplete close does not call into question the security of the data already received, but it could indicate that subsequent data might have been truncated. As TLS is not directly aware of HTTP message framing, it is necessary to examine the HTTP data itself to determine whether messages are complete. Handling of incomplete messages is defined in Section 8.\n\nWhen encountering an incomplete close, a client *SHOULD* treat as completed all requests for which it has received either\n\n1. as much data as specified in the Content-Length header field or\n2. the terminal zero-length chunk (when Transfer-Encoding of chunked is used).\n\nA response that has neither chunked transfer coding nor Content-Length is complete only if a valid closure alert has been received. Treating an incomplete message as complete could expose implementations to attack.\n\nA client detecting an incomplete close *SHOULD* recover gracefully.\n\nClients *MUST* send a closure alert before closing the connection. Clients that do not expect to receive any more data *MAY* choose not to wait for the server's closure alert and simply close the connection, thus generating an incomplete close on the server side.\n\nServers *SHOULD* be prepared to receive an incomplete close from the client, since the client can often locate the end of server data.\n\nServers *MUST* attempt to initiate an exchange of closure alerts with the client before closing the connection. Servers *MAY* close the connection after sending the closure alert, thus generating an incomplete close on the client side.\n\n## 10. Enclosing Messages as Data\n\n### 10.1. Media Type message/http\n\nThe \"message/http\" media type can be used to enclose a single HTTP request or response message, provided that it obeys the MIME restrictions for all \"message\" types regarding line length and encodings. Because of the line length limitations, field values within \"message/http\" are allowed to use line folding (obs-fold), as described in Section 5.2, to convey the field value over multiple lines. A recipient of \"message/http\" data *MUST* replace any obsolete line folding with one or more SP characters when the message is consumed.\n\nType name:\n\nmessage\n\nSubtype name:\n\nhttp\n\nRequired parameters:\n\nN/A\n\nOptional parameters:\n\nversion, msgtypeversion:The HTTP-version number of the enclosed message (e.g., \"1.1\"). If not present, the version can be determined from the first line of the body.msgtype:The message type — \"request\" or \"response\". If not present, the type can be determined from the first line of the body.\n\nEncoding considerations:\n\nonly \"7bit\", \"8bit\", or \"binary\" are permitted\n\nSecurity considerations:\n\nsee Section 11\n\nInteroperability considerations:\n\nN/A\n\nPublished specification:\n\nRFC 9112 (see Section 10.1).\n\nApplications that use this media type:\n\nN/A\n\nFragment identifier considerations:\n\nN/A\n\nAdditional information:\n\nMagic number(s):N/ADeprecated alias names for this type:N/AFile extension(s):N/AMacintosh file type code(s):N/A\n\nPerson and email address to contact for further information:\n\nSee Authors' Addresses section.\n\nIntended usage:\n\nCOMMON\n\nRestrictions on usage:\n\nN/A\n\nAuthor:\n\nSee Authors' Addresses section.\n\nChange controller:\n\nIESG\n\n### 10.2. Media Type application/http\n\nThe \"application/http\" media type can be used to enclose a pipeline of one or more HTTP request or response messages (not intermixed).\n\nType name:\n\napplication\n\nSubtype name:\n\nhttp\n\nRequired parameters:\n\nN/A\n\nOptional parameters:\n\nversion, msgtypeversion:The HTTP-version number of the enclosed messages (e.g., \"1.1\"). If not present, the version can be determined from the first line of the body.msgtype:The message type — \"request\" or \"response\". If not present, the type can be determined from the first line of the body.\n\nEncoding considerations:\n\nHTTP messages enclosed by this type are in \"binary\" format; use of an appropriate Content-Transfer-Encoding is required when transmitted via email.\n\nSecurity considerations:\n\nsee Section 11\n\nInteroperability considerations:\n\nN/A\n\nPublished specification:\n\nRFC 9112 (see Section 10.2).\n\nApplications that use this media type:\n\nN/A\n\nFragment identifier considerations:\n\nN/A\n\nAdditional information:\n\nDeprecated alias names for this type:N/AMagic number(s):N/AFile extension(s):N/AMacintosh file type code(s):N/A\n\nPerson and email address to contact for further information:\n\nSee Authors' Addresses section.\n\nIntended usage:\n\nCOMMON\n\nRestrictions on usage:\n\nN/A\n\nAuthor:\n\nSee Authors' Addresses section.\n\nChange controller:\n\nIESG\n\n## 11. Security Considerations\n\nThis section is meant to inform developers, information providers, and users about known security considerations relevant to HTTP message syntax and parsing. Security considerations about HTTP semantics, content, and routing are addressed in [HTTP].\n\n### 11.1. Response Splitting\n\nResponse splitting (a.k.a. CRLF injection) is a common technique, used in various attacks on Web usage, that exploits the line-based nature of HTTP message framing and the ordered association of requests to responses on persistent connections [Klein]. This technique can be particularly damaging when the requests pass through a shared cache.\n\nResponse splitting exploits a vulnerability in servers (usually within an application server) where an attacker can send encoded data within some parameter of the request that is later decoded and echoed within any of the response header fields of the response. If the decoded data is crafted to look like the response has ended and a subsequent response has begun, the response has been split, and the content within the apparent second response is controlled by the attacker. The attacker can then make any other request on the same persistent connection and trick the recipients (including intermediaries) into believing that the second half of the split is an authoritative answer to the second request.\n\nFor example, a parameter within the request-target might be read by an application server and reused within a redirect, resulting in the same parameter being echoed in the [Location](rfc9110.html#field.location) header field of the response. If the parameter is decoded by the application and not properly encoded when placed in the response field, the attacker can send encoded CRLF octets and other content that will make the application's single response look like two or more responses.\n\nA common defense against response splitting is to filter requests for data that looks like encoded CR and LF (e.g., \"%0D\" and \"%0A\"). However, that assumes the application server is only performing URI decoding rather than more obscure data transformations like charset transcoding, XML entity translation, base64 decoding, sprintf reformatting, etc. A more effective mitigation is to prevent anything other than the server's core protocol libraries from sending a CR or LF within the header section, which means restricting the output of header fields to APIs that filter for bad octets and not allowing application servers to write directly to the protocol stream.\n\n### 11.2. Request Smuggling\n\nRequest smuggling ([Linhart]) is a technique that exploits differences in protocol parsing among various recipients to hide additional requests (which might otherwise be blocked or disabled by policy) within an apparently harmless request. Like response splitting, request smuggling can lead to a variety of attacks on HTTP usage.\n\nThis specification has introduced new requirements on request parsing, particularly with regard to message framing in Section 6.3, to reduce the effectiveness of request smuggling.\n\n### 11.3. Message Integrity\n\nHTTP does not define a specific mechanism for ensuring message integrity, instead relying on the error-detection ability of underlying transport protocols and the use of length or chunk-delimited framing to detect completeness. Historically, the lack of a single integrity mechanism has been justified by the informal nature of most HTTP communication. However, the prevalence of HTTP as an information access mechanism has resulted in its increasing use within environments where verification of message integrity is crucial.\n\nThe mechanisms provided with the \"https\" scheme, such as authenticated encryption, provide protection against modification of messages. Care is needed, however, to ensure that connection closure cannot be used to truncate messages (see Section 9.8). User agents might refuse to accept incomplete messages or treat them specially. For example, a browser being used to view medical history or drug interaction information needs to indicate to the user when such information is detected by the protocol to be incomplete, expired, or corrupted during transfer. Such mechanisms might be selectively enabled via user agent extensions or the presence of message integrity metadata in a response.\n\nThe \"http\" scheme provides no protection against accidental or malicious modification of messages.\n\nExtensions to the protocol might be used to mitigate the risk of unwanted modification of messages by intermediaries, even when the \"https\" scheme is used. Integrity might be assured by using message authentication codes or digital signatures that are selectively added to messages via extensible metadata fields.\n\n### 11.4. Message Confidentiality\n\nHTTP relies on underlying transport protocols to provide message confidentiality when that is desired. HTTP has been specifically designed to be independent of the transport protocol, such that it can be used over many forms of encrypted connection, with the selection of such transports being identified by the choice of URI scheme or within user agent configuration.\n\nThe \"https\" scheme can be used to identify resources that require a confidential connection, as described in [Section 4.2.2](rfc9110.html#https.uri) of [HTTP].\n\n## 12. IANA Considerations\n\nThe change controller for the following registrations is: \"IETF (iesg@ietf.org) - Internet Engineering Task Force\".\n\n### 12.1. Field Name Registration\n\nIANA has added the following field names to the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" at [https://www.iana.org/assignments/http-fields](https://www.iana.org/assignments/http-fields), as described in [Section 18.4](rfc9110.html#field.name.registration) of [HTTP].\n\n| Field Name | Status | Section | Comments |\n| --- | --- | --- | --- |\n| Close | permanent | 9.6 | (reserved) |\n| MIME-Version | permanent | B.1 | |\n| Transfer-Encoding | permanent | 6.1 | |\n\n### 12.2. Media Type Registration\n\nIANA has updated the \"Media Types\" registry at [https://www.iana.org/assignments/media-types](https://www.iana.org/assignments/media-types) with the registration information in Sections 10.1 and 10.2 for the media types \"message/http\" and \"application/http\", respectively.\n\n### 12.3. Transfer Coding Registration\n\nIANA has updated the \"HTTP Transfer Coding Registry\" at [https://www.iana.org/assignments/http-parameters/](https://www.iana.org/assignments/http-parameters/) with the registration procedure of Section 7.3 and the content coding names summarized in the table below.\n\n| Name | Description | Section |\n| --- | --- | --- |\n| chunked | Transfer in a series of chunks | 7.1 |\n| compress | UNIX \"compress\" data format [Welch] | 7.2 |\n| deflate | \"deflate\" compressed data ([RFC1951]) inside the \"zlib\" data format ([RFC1950]) | 7.2 |\n| gzip | GZIP file format [RFC1952] | 7.2 |\n| trailers | (reserved) | 12.3 |\n| x-compress | Deprecated (alias for compress) | 7.2 |\n| x-gzip | Deprecated (alias for gzip) | 7.2 |\n\n### 12.4. ALPN Protocol ID Registration\n\nIANA has updated the \"TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs\" registry at [https://www.iana.org/assignments/tls-extensiontype-values/](https://www.iana.org/assignments/tls-extensiontype-values/) with the registration below:\n\n| Protocol | Identification Sequence | Reference |\n| --- | --- | --- |\n| HTTP/1.1 | 0x68 0x74 0x74 0x70 0x2f 0x31 0x2e 0x31 (\"http/1.1\") | RFC 9112 |\n\n## 13. References\n\n### 13.1. Normative References\n\n[CACHING]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html)”, [STD 98](https://www.rfc-editor.org/info/std98), RFC 9111, [DOI 10.17487/RFC9111](https://dx.doi.org/10.17487/RFC9111), June 2022.\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022.\n\n[RFC1950]\n\nDeutsch, P. and J-L. Gailly, “[ZLIB Compressed Data Format Specification version 3.3](https://www.rfc-editor.org/rfc/rfc1950.html)”, RFC 1950, [DOI 10.17487/RFC1950](https://dx.doi.org/10.17487/RFC1950), May 1996, <[https://www.rfc-editor.org/info/rfc1950](https://www.rfc-editor.org/info/rfc1950)>.\n\n[RFC1951]\n\nDeutsch, P., “[DEFLATE Compressed Data Format Specification version 1.3](https://www.rfc-editor.org/rfc/rfc1951.html)”, RFC 1951, [DOI 10.17487/RFC1951](https://dx.doi.org/10.17487/RFC1951), May 1996, <[https://www.rfc-editor.org/info/rfc1951](https://www.rfc-editor.org/info/rfc1951)>.\n\n[RFC1952]\n\nDeutsch, P., “[GZIP file format specification version 4.3](https://www.rfc-editor.org/rfc/rfc1952.html)”, RFC 1952, [DOI 10.17487/RFC1952](https://dx.doi.org/10.17487/RFC1952), May 1996, <[https://www.rfc-editor.org/info/rfc1952](https://www.rfc-editor.org/info/rfc1952)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC7405]\n\nKyzivat, P., “[Case-Sensitive String Support in ABNF](https://www.rfc-editor.org/rfc/rfc7405.html)”, RFC 7405, [DOI 10.17487/RFC7405](https://dx.doi.org/10.17487/RFC7405), December 2014, <[https://www.rfc-editor.org/info/rfc7405](https://www.rfc-editor.org/info/rfc7405)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[TLS13]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n[URI]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[https://www.rfc-editor.org/info/rfc3986](https://www.rfc-editor.org/info/rfc3986)>.\n\n[USASCII]\n\nAmerican National Standards Institute, “Coded Character Set -- 7-bit American Standard Code for Information Interchange”, ANSI X3.4, 1986.\n\n[Welch]\n\nWelch, T., “[A Technique for High-Performance Data Compression](https://ieeexplore.ieee.org/document/1659158/)”, IEEE Computer 17(6), [DOI 10.1109/MC.1984.1659158](https://dx.doi.org/10.1109/MC.1984.1659158), June 1984, <[https://ieeexplore.ieee.org/document/1659158/](https://ieeexplore.ieee.org/document/1659158/)>.\n\n### 13.2. Informative References\n\n[HTTP/1.0]\n\nBerners-Lee, T., Fielding, R., and H. Frystyk, “[Hypertext Transfer Protocol -- HTTP/1.0](https://www.rfc-editor.org/rfc/rfc1945.html)”, RFC 1945, [DOI 10.17487/RFC1945](https://dx.doi.org/10.17487/RFC1945), May 1996, <[https://www.rfc-editor.org/info/rfc1945](https://www.rfc-editor.org/info/rfc1945)>.\n\n[Klein]\n\nKlein, A., “[Divide and Conquer - HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics](https://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf)”, March 2004, <[https://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf](https://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf)>.\n\n[Linhart]\n\nLinhart, C., Klein, A., Heled, R., and S. Orrin, “[HTTP Request Smuggling](https://www.cgisecurity.com/lib/HTTP-Request-Smuggling.pdf)”, June 2005, <[https://www.cgisecurity.com/lib/HTTP-Request-Smuggling.pdf](https://www.cgisecurity.com/lib/HTTP-Request-Smuggling.pdf)>.\n\n[RFC2045]\n\nFreed, N. and N. Borenstein, “[Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies](https://www.rfc-editor.org/rfc/rfc2045.html)”, RFC 2045, [DOI 10.17487/RFC2045](https://dx.doi.org/10.17487/RFC2045), November 1996, <[https://www.rfc-editor.org/info/rfc2045](https://www.rfc-editor.org/info/rfc2045)>.\n\n[RFC2046]\n\nFreed, N. and N. Borenstein, “[Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types](https://www.rfc-editor.org/rfc/rfc2046.html)”, RFC 2046, [DOI 10.17487/RFC2046](https://dx.doi.org/10.17487/RFC2046), November 1996, <[https://www.rfc-editor.org/info/rfc2046](https://www.rfc-editor.org/info/rfc2046)>.\n\n[RFC2049]\n\nFreed, N. and N. Borenstein, “[Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples](https://www.rfc-editor.org/rfc/rfc2049.html)”, RFC 2049, [DOI 10.17487/RFC2049](https://dx.doi.org/10.17487/RFC2049), November 1996, <[https://www.rfc-editor.org/info/rfc2049](https://www.rfc-editor.org/info/rfc2049)>.\n\n[RFC2068]\n\nFielding, R., Gettys, J., Mogul, J., Frystyk, H., and T. Berners-Lee, “[Hypertext Transfer Protocol -- HTTP/1.1](https://www.rfc-editor.org/rfc/rfc2068.html)”, RFC 2068, [DOI 10.17487/RFC2068](https://dx.doi.org/10.17487/RFC2068), January 1997, <[https://www.rfc-editor.org/info/rfc2068](https://www.rfc-editor.org/info/rfc2068)>.\n\n[RFC2557]\n\nPalme, J., Hopmann, A., and N. Shelness, “[MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)](https://www.rfc-editor.org/rfc/rfc2557.html)”, RFC 2557, [DOI 10.17487/RFC2557](https://dx.doi.org/10.17487/RFC2557), March 1999, <[https://www.rfc-editor.org/info/rfc2557](https://www.rfc-editor.org/info/rfc2557)>.\n\n[RFC5322]\n\nResnick, P., Ed., “[Internet Message Format](https://www.rfc-editor.org/rfc/rfc5322.html)”, RFC 5322, [DOI 10.17487/RFC5322](https://dx.doi.org/10.17487/RFC5322), October 2008, <[https://www.rfc-editor.org/info/rfc5322](https://www.rfc-editor.org/info/rfc5322)>.\n\n[RFC7230]\n\nFielding, R., Ed. and J. Reschke, Ed., “[Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing](https://www.rfc-editor.org/rfc/rfc7230.html)”, RFC 7230, [DOI 10.17487/RFC7230](https://dx.doi.org/10.17487/RFC7230), June 2014, <[https://www.rfc-editor.org/info/rfc7230](https://www.rfc-editor.org/info/rfc7230)>.\n\n[RFC8126]\n\nCotton, M., Leiba, B., and T. Narten, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc8126.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 8126, [DOI 10.17487/RFC8126](https://dx.doi.org/10.17487/RFC8126), June 2017, <[https://www.rfc-editor.org/info/rfc8126](https://www.rfc-editor.org/info/rfc8126)>.\n\n## Appendix A. Collected ABNF\n\nIn the collected ABNF below, list rules are expanded per [Section 5.6.1](rfc9110.html#abnf.extension) of [HTTP].\n\n```\nBWS = \n\nHTTP-message = start-line CRLF *( field-line CRLF ) CRLF [\n message-body ]\nHTTP-name = %x48.54.54.50 ; HTTP\nHTTP-version = HTTP-name \"/\" DIGIT \".\" DIGIT\n\nOWS = \n\nRWS = \n\nTransfer-Encoding = [ transfer-coding *( OWS \",\" OWS transfer-coding\n ) ]\n\nabsolute-URI = \nabsolute-form = absolute-URI\nabsolute-path = \nasterisk-form = \"*\"\nauthority = \nauthority-form = uri-host \":\" port\n\nchunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF\nchunk-data = 1*OCTET\nchunk-ext = *( BWS \";\" BWS chunk-ext-name [ BWS \"=\" BWS chunk-ext-val\n ] )\nchunk-ext-name = token\nchunk-ext-val = token / quoted-string\nchunk-size = 1*HEXDIG\nchunked-body = *chunk last-chunk trailer-section CRLF\n\nfield-line = field-name \":\" OWS field-value OWS\nfield-name = \nfield-value = \n\nlast-chunk = 1*\"0\" [ chunk-ext ] CRLF\n\nmessage-body = *OCTET\nmethod = token\n\nobs-fold = OWS CRLF RWS\nobs-text = \norigin-form = absolute-path [ \"?\" query ]\n\nport = \n\nquery = \nquoted-string = \n\nreason-phrase = 1*( HTAB / SP / VCHAR / obs-text )\nrequest-line = method SP request-target SP HTTP-version\nrequest-target = origin-form / absolute-form / authority-form /\n asterisk-form\n\nstart-line = request-line / status-line\nstatus-code = 3DIGIT\nstatus-line = HTTP-version SP status-code SP [ reason-phrase ]\n\ntoken = \ntrailer-section = *( field-line CRLF )\ntransfer-coding = \n\nuri-host = \n```\n\n## Appendix B. Differences between HTTP and MIME\n\nHTTP/1.1 uses many of the constructs defined for the Internet Message Format [RFC5322] and Multipurpose Internet Mail Extensions (MIME) [RFC2045] to allow a message body to be transmitted in an open variety of representations and with extensible fields. However, some of these constructs have been reinterpreted to better fit the needs of interactive communication, leading to some differences in how MIME constructs are used within HTTP. These differences were carefully chosen to optimize performance over binary connections, allow greater freedom in the use of new media types, ease date comparisons, and accommodate common implementations.\n\nThis appendix describes specific areas where HTTP differs from MIME. Proxies and gateways to and from strict MIME environments need to be aware of these differences and provide the appropriate conversions where necessary.\n\n### B.1. MIME-Version\n\nHTTP is not a MIME-compliant protocol. However, messages can include a single MIME-Version header field to indicate what version of the MIME protocol was used to construct the message. Use of the MIME-Version header field indicates that the message is in full conformance with the MIME protocol (as defined in [RFC2045]). Senders are responsible for ensuring full conformance (where possible) when exporting HTTP messages to strict MIME environments.\n\n### B.2. Conversion to Canonical Form\n\nMIME requires that an Internet mail body part be converted to canonical form prior to being transferred, as described in [Section 4](https://www.rfc-editor.org/rfc/rfc2049.html#section-4) of [RFC2049], and that content with a type of \"text\" represents line breaks as CRLF, forbidding the use of CR or LF outside of line break sequences [RFC2046]. In contrast, HTTP does not care whether CRLF, bare CR, or bare LF are used to indicate a line break within content.\n\nA proxy or gateway from HTTP to a strict MIME environment ought to translate all line breaks within text media types to the RFC 2049 canonical form of CRLF. Note, however, this might be complicated by the presence of a [Content-Encoding](rfc9110.html#field.content-encoding) and by the fact that HTTP allows the use of some charsets that do not use octets 13 and 10 to represent CR and LF, respectively.\n\nConversion will break any cryptographic checksums applied to the original content unless the original content is already in canonical form. Therefore, the canonical form is recommended for any content that uses such checksums in HTTP.\n\n### B.3. Conversion of Date Formats\n\nHTTP/1.1 uses a restricted set of date formats ([Section 5.6.7](rfc9110.html#http.date) of [HTTP]) to simplify the process of date comparison. Proxies and gateways from other protocols ought to ensure that any [Date](rfc9110.html#field.date) header field present in a message conforms to one of the HTTP/1.1 formats and rewrite the date if necessary.\n\n### B.4. Conversion of Content-Encoding\n\nMIME does not include any concept equivalent to HTTP's [Content-Encoding](rfc9110.html#field.content-encoding) header field. Since this acts as a modifier on the media type, proxies and gateways from HTTP to MIME-compliant protocols ought to either change the value of the [Content-Type](rfc9110.html#field.content-type) header field or decode the representation before forwarding the message. (Some experimental applications of Content-Type for Internet mail have used a media-type parameter of \";conversions=\" to perform a function equivalent to Content-Encoding. However, this parameter is not part of the MIME standards.)\n\n### B.5. Conversion of Content-Transfer-Encoding\n\nHTTP does not use the Content-Transfer-Encoding field of MIME. Proxies and gateways from MIME-compliant protocols to HTTP need to remove any Content-Transfer-Encoding prior to delivering the response message to an HTTP client.\n\nProxies and gateways from HTTP to MIME-compliant protocols are responsible for ensuring that the message is in the correct format and encoding for safe transport on that protocol, where \"safe transport\" is defined by the limitations of the protocol being used. Such a proxy or gateway ought to transform and label the data with an appropriate Content-Transfer-Encoding if doing so will improve the likelihood of safe transport over the destination protocol.\n\n### B.6. MHTML and Line Length Limitations\n\nHTTP implementations that share code with MHTML [RFC2557] implementations need to be aware of MIME line length limitations. Since HTTP does not have this limitation, HTTP does not fold long lines. MHTML messages being transported by HTTP follow all conventions of MHTML, including line length limitations and folding, canonicalization, etc., since HTTP transfers message-bodies without modification and, aside from the \"multipart/byteranges\" type ([Section 14.6](rfc9110.html#multipart.byteranges) of [HTTP]), does not interpret the content or any MIME header lines that might be contained therein.\n\n## Appendix C. Changes from Previous RFCs\n\n### C.1. Changes from HTTP/0.9\n\nSince HTTP/0.9 did not support header fields in a request, there is no mechanism for it to support name-based virtual hosts (selection of resource by inspection of the [Host](rfc9110.html#field.host) header field). Any server that implements name-based virtual hosts ought to disable support for HTTP/0.9. Most requests that appear to be HTTP/0.9 are, in fact, badly constructed HTTP/1.x requests caused by a client failing to properly encode the request-target.\n\n### C.2. Changes from HTTP/1.0\n\n#### C.2.1. Multihomed Web Servers\n\nThe requirements that clients and servers support the [Host](rfc9110.html#field.host) header field ([Section 7.2](rfc9110.html#field.host) of [HTTP]), report an error if it is missing from an HTTP/1.1 request, and accept absolute URIs (Section 3.2) are among the most important changes defined by HTTP/1.1.\n\nOlder HTTP/1.0 clients assumed a one-to-one relationship of IP addresses and servers; there was no established mechanism for distinguishing the intended server of a request other than the IP address to which that request was directed. The [Host](rfc9110.html#field.host) header field was introduced during the development of HTTP/1.1 and, though it was quickly implemented by most HTTP/1.0 browsers, additional requirements were placed on all HTTP/1.1 requests in order to ensure complete adoption. At the time of this writing, most HTTP-based services are dependent upon the Host header field for targeting requests.\n\n#### C.2.2. Keep-Alive Connections\n\nIn HTTP/1.0, each connection is established by the client prior to the request and closed by the server after sending the response. However, some implementations implement the explicitly negotiated (\"Keep-Alive\") version of persistent connections described in [Section 19.7.1](https://www.rfc-editor.org/rfc/rfc2068.html#section-19.7.1) of [RFC2068].\n\nSome clients and servers might wish to be compatible with these previous approaches to persistent connections, by explicitly negotiating for them with a \"Connection: keep-alive\" request header field. However, some experimental implementations of HTTP/1.0 persistent connections are faulty; for example, if an HTTP/1.0 proxy server doesn't understand [Connection](rfc9110.html#field.connection), it will erroneously forward that header field to the next inbound server, which would result in a hung connection.\n\nOne attempted solution was the introduction of a Proxy-Connection header field, targeted specifically at proxies. In practice, this was also unworkable, because proxies are often deployed in multiple layers, bringing about the same problem discussed above.\n\nAs a result, clients are encouraged not to send the Proxy-Connection header field in any requests.\n\nClients are also encouraged to consider the use of \"Connection: keep-alive\" in requests carefully; while they can enable persistent connections with HTTP/1.0 servers, clients using them will need to monitor the connection for \"hung\" requests (which indicate that the client ought to stop sending the header field), and this mechanism ought not be used by clients at all when a proxy is being used.\n\n#### C.2.3. Introduction of Transfer-Encoding\n\nHTTP/1.1 introduces the Transfer-Encoding header field (Section 6.1). Transfer codings need to be decoded prior to forwarding an HTTP message over a MIME-compliant protocol.\n\n### C.3. Changes from RFC 7230\n\nMost of the sections introducing HTTP's design goals, history, architecture, conformance criteria, protocol versioning, URIs, message routing, and header fields have been moved to [HTTP]. This document has been reduced to just the messaging syntax and connection management requirements specific to HTTP/1.1.\n\nBare CRs have been prohibited outside of content. (Section 2.2)\n\nThe ABNF definition of authority-form has changed from the more general authority component of a URI (in which port is optional) to the specific host:port format that is required by CONNECT. (Section 3.2.3)\n\nRecipients are required to avoid smuggling/splitting attacks when processing an ambiguous message framing. (Section 6.1)\n\nIn the ABNF for chunked extensions, (bad) whitespace around \";\" and \"=\" has been reintroduced. Whitespace was removed in [RFC7230], but that change was found to break existing implementations. (Section 7.1.1)\n\nTrailer field semantics now transcend the specifics of chunked transfer coding. The decoding algorithm for chunked (Section 7.1.3) has been updated to encourage storage/forwarding of trailer fields separately from the header section, to only allow merging into the header section if the recipient knows the corresponding field definition permits and defines how to merge, and otherwise to discard the trailer fields instead of merging. The trailer part is now called the trailer section to be more consistent with the header section and more distinct from a body part. (Section 7.1.2)\n\nTransfer coding parameters called \"q\" are disallowed in order to avoid conflicts with the use of ranks in the [TE](rfc9110.html#field.te) header field. (Section 7.3)\n\n## Acknowledgements\n\nSee [Appendix \"Acknowledgements\"](rfc9110.html#acks) of [HTTP], which applies to this document as well.\n\n## Index\n\nA C D F G H K L M O R T U W X\n\n- **A**\n - absolute-form (of request-target) 3.2.2\n - application/http Media Type **10.2**\n - asterisk-form (of request-target) 3.2.4\n - authority-form (of request-target) 3.2.3\n- **C**\n - *CACHING* 1 , 8 , **13.1**\n - *Section 3.3* 8\n - chunked (Coding Format) 6.1 , 6.3\n - chunked (transfer coding) **7.1**\n - close 9.3 , 9.3 , 9.3.2 , **9.6** , 12.1\n - compress (transfer coding) **7.2**\n - Connection header field 9.3 , 9.3.2 , 9.6 , 12.1\n - Content-Length header field 6.2\n - Content-Transfer-Encoding header field B.5\n- **D**\n - deflate (transfer coding) **7.2**\n- **F**\n - Fields\n - Close **9.6**\n - MIME-Version 12.1 , **B.1**\n - Transfer-Encoding 6 , **6.1** , 7 , 12.1 , C.2.3 , C.3\n- **G**\n - Grammar\n - absolute-form 3.2 , **3.2.2**\n - ALPHA **1.2**\n - asterisk-form 3.2 , **3.2.4**\n - authority-form 3.2 , **3.2.3**\n - chunk **7.1**\n - chunk-data **7.1**\n - chunk-ext 7.1 , **7.1.1**\n - chunk-ext-name **7.1.1**\n - chunk-ext-val **7.1.1**\n - chunk-size **7.1**\n - chunked-body **7.1**\n - CR **1.2**\n - CRLF **1.2**\n - CTL **1.2**\n - DIGIT **1.2**\n - DQUOTE **1.2**\n - field-line **5** , 7.1.2\n - field-name 5\n - field-value 5\n - HEXDIG **1.2**\n - HTAB **1.2**\n - HTTP-message **2.1**\n - HTTP-name **2.3**\n - HTTP-version **2.3**\n - last-chunk **7.1**\n - LF **1.2**\n - message-body **6**\n - method **3.1**\n - obs-fold **5.2**\n - OCTET **1.2**\n - origin-form 3.2 , **3.2.1**\n - reason-phrase **4**\n - request-line **3**\n - request-target **3.2**\n - SP **1.2**\n - start-line **2.1**\n - status-code **4**\n - status-line **4**\n - trailer-section 7.1 , **7.1.2**\n - Transfer-Encoding **6.1**\n - VCHAR **1.2**\n - gzip (transfer coding) **7.2**\n- **H**\n - Header Fields\n - MIME-Version 12.1 , **B.1**\n - Transfer-Encoding 6 , **6.1** , 7 , 12.1 , C.2.3 , C.3\n - header line 2.1\n - header section 2.1\n - headers 2.1\n - *HTTP* 1 , 1 , 1.1 , 1.2 , 1.2 , 1.2 , 1.2 , 1.2 , 1.2 , 1.2 , 1.2 , 1.2 , 1.2 , 1.2 , 1.2 , 2 , 2.3 , 3 , 3 , 3.1 , 3.2 , 3.2 , 3.2.1 , 3.2.2 , 3.2.3 , 3.2.4 , 3.3 , 3.3 , 4 , 5 , 6 , 6 , 6.1 , 6.1 , 6.1 , 6.1 , 6.2 , 6.2 , 6.3 , 7 , 7.1.2 , 7.2 , 7.2 , 7.2 , 7.3 , 7.3 , 7.4 , 7.4 , 7.4 , 7.4 , 9 , 9 , 9.2 , 9.3 , 9.3.1 , 9.3.2 , 9.3.2 , 9.6 , 11 , 11.4 , 12.1 , 12.3 , **13.1** , A , A , A , A , A , A , A , A , A , A , A , B.3 , B.6 , C.2.1 , C.3 , \"Acknowledgements\"\n - *Section 4.1* A\n - *Section 5.1* A\n - *Section 5.5* A\n - *Section 5.6.2* A\n - *Section 5.6.3* A , A , A\n - *Section 5.6.4* A , A\n - *Section 10.1.4* A\n - *Section 2* 1.1\n - *Section 2.3* 3\n - *Section 2.5* 2.3\n - *Section 3* 2\n - *Section 4.1* 1.2\n - *Section 4.2* 3.2\n - *Section 4.2.1* 9\n - *Section 4.2.2* 11.4\n - *Section 5.1* 1.2\n - *Section 5.5* 1.2 , 5\n - *Section 5.6.1* 1.2 , 6.3 , A\n - *Section 5.6.2* 1.2\n - *Section 5.6.3* 1.2 , 1.2 , 1.2\n - *Section 5.6.4* 1.2 , 1.2\n - *Section 5.6.7* B.3\n - *Section 6.4* 6\n - *Section 6.4.1* 6\n - *Section 6.5* 7.1.2 , 7.4\n - *Section 7.1* 3.3\n - *Section 7.2* 3.2 , 3.2.1 , C.2.1\n - *Section 7.3* 9\n - *Section 7.4* 3.3\n - *Section 7.6* 3.2.2\n - *Section 7.6.1* 7.4 , 9.3 , 9.6\n - *Section 8.4.1* 6.1 , 7.3\n - *Section 8.4.1.1* 7.2\n - *Section 8.4.1.2* 7.2\n - *Section 8.4.1.3* 7.2\n - *Section 8.6* 6.2 , 6.2\n - *Section 9* 3.1\n - *Section 9.2.1* 9.3.2\n - *Section 9.2.2* 9.3.1 , 9.3.2\n - *Section 9.3.6* 3.2.3 , 6.1\n - *Section 9.3.7* 3.2.4\n - *Section 10.1.4* 1.2 , 6.1 , 7 , 7.3 , 7.4 , 12.3\n - *Section 12.4.2* 7.4\n - *Section 14.6* B.6\n - *Section 15* 4\n - *Section 15.2* 9.2\n - *Section 15.4.5* 6.1\n - *Section 15.5.15* 3\n - *Section 18.4* 12.1\n - *Acknowledgements* \"Acknowledgements\"\n - *HTTP/1.0* 2.3 , **13.2**\n- **K**\n - *Klein* 11.1 , **13.2**\n- **L**\n - *Linhart* 11.2 , **13.2**\n- **M**\n - Media Type\n - application/http **10.2**\n - message/http **10.1**\n - message/http Media Type **10.1**\n - method **3.1**\n - MIME-Version header field 12.1 , **B.1**\n- **O**\n - origin-form (of request-target) 3.2.1\n- **R**\n - request-target **3.2**\n - *RFC1950* 12.3 , **13.1**\n - *RFC1951* 12.3 , **13.1**\n - *RFC1952* 12.3 , **13.1**\n - *RFC2045* 2.1 , 6.1 , **13.2** , B , B.1\n - *Section 6* 6.1\n - *RFC2046* **13.2** , B.2\n - *RFC2049* **13.2** , B.2\n - *Section 4* B.2\n - *RFC2068* **13.2** , C.2.2\n - *Section 19.7.1* C.2.2\n - *RFC2119* 1.1 , **13.1**\n - *RFC2557* **13.2** , B.6\n - *RFC5234* 1.2 , 1.2 , **13.1**\n - *Appendix B.1* 1.2\n - *RFC5322* 2.1 , **13.2** , B\n - *RFC7230* 1 , 1 , **13.2** , C.3\n - *RFC7405* 1.2 , **13.1**\n - *RFC8126* 7.3 , **13.2**\n - *Section 4.8* 7.3\n - *RFC8174* 1.1 , **13.1**\n- **T**\n - *TLS13* 9.7 , 9.8 , **13.1**\n - Transfer-Encoding header field 6 , **6.1** , 7 , 12.1 , C.2.3 , C.3\n- **U**\n - *URI* 1.2 , 1.2 , 1.2 , 1.2 , 1.2 , 1.2 , **13.1** , A , A , A , A , A\n - *Section 3.2* 1.2 , A\n - *Section 3.2.2* 1.2 , A\n - *Section 3.2.3* 1.2 , A\n - *Section 3.4* 1.2 , A\n - *Section 4.3* 1.2 , A\n - *USASCII* 1.2 , 2.2 , **13.1**\n- **W**\n - *Welch* 12.3 , **13.1**\n- **X**\n - x-compress (transfer coding) **7.2**\n - x-gzip (transfer coding) **7.2**\n\n## Authors' Addresses\n\n**Roy T. Fielding** (editor)\nAdobe\n345 Park Ave\nSan Jose, CA 95110\nUnited States of America\nEmail: fielding@gbiv.com\nURI: [https://roy.gbiv.com/](https://roy.gbiv.com/)\n\n**Mark Nottingham** (editor)\nFastly\nPrahran\nAustralia\nEmail: mnot@mnot.net\nURI: [https://www.mnot.net/](https://www.mnot.net/)\n\n**Julian Reschke** (editor)\ngreenbytes GmbH\nHafenweg 16\n48155 MĂĽnster\nGermany\nEmail: julian.reschke@greenbytes.de\nURI: [https://greenbytes.de/tech/webdav/](https://greenbytes.de/tech/webdav/)", "znaku_textu": 107088, "slov": 16047, "odkazu": 530, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:48", "sha256": "a4fd5d774f526625b1472aa98901452d62c5a8f8a447214e7b9f29053c81d563", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/info/std99", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9112", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/rfc/rfc2045.html", "https://www.iana.org/assignments/http-parameters", "https://www.rfc-editor.org/rfc/rfc8126.html", "https://www.rfc-editor.org/rfc/rfc8446.html", "https://www.iana.org/assignments/http-fields", "https://www.iana.org/assignments/media-types", "https://www.iana.org/assignments/http-parameters/", "https://www.iana.org/assignments/tls-extensiontype-values/", "https://www.rfc-editor.org/rfc/rfc9111.html", "https://www.rfc-editor.org/info/std98", "https://dx.doi.org/10.17487/RFC9111", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/rfc/rfc1950.html", "https://dx.doi.org/10.17487/RFC1950", "https://www.rfc-editor.org/info/rfc1950", "https://www.rfc-editor.org/rfc/rfc1951.html", "https://dx.doi.org/10.17487/RFC1951", "https://www.rfc-editor.org/info/rfc1951", "https://www.rfc-editor.org/rfc/rfc1952.html", "https://dx.doi.org/10.17487/RFC1952", "https://www.rfc-editor.org/info/rfc1952", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "https://www.rfc-editor.org/info/rfc5234", "https://www.rfc-editor.org/rfc/rfc7405.html", "https://dx.doi.org/10.17487/RFC7405", "https://www.rfc-editor.org/info/rfc7405", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC8446", "https://www.rfc-editor.org/info/rfc8446", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "https://www.rfc-editor.org/info/rfc3986", "https://ieeexplore.ieee.org/document/1659158/", "https://dx.doi.org/10.1109/MC.1984.1659158", "https://www.rfc-editor.org/rfc/rfc1945.html", "https://dx.doi.org/10.17487/RFC1945", "https://www.rfc-editor.org/info/rfc1945", "https://packetstormsecurity.com/papers/general/whitepaper_httpresponse.pdf", "https://www.cgisecurity.com/lib/HTTP-Request-Smuggling.pdf", "https://dx.doi.org/10.17487/RFC2045", "https://www.rfc-editor.org/info/rfc2045", "https://www.rfc-editor.org/rfc/rfc2046.html", "https://dx.doi.org/10.17487/RFC2046", "https://www.rfc-editor.org/info/rfc2046", "https://www.rfc-editor.org/rfc/rfc2049.html", "https://dx.doi.org/10.17487/RFC2049", "https://www.rfc-editor.org/info/rfc2049", "https://www.rfc-editor.org/rfc/rfc2068.html", "https://dx.doi.org/10.17487/RFC2068", "https://www.rfc-editor.org/info/rfc2068", "https://www.rfc-editor.org/rfc/rfc2557.html", "https://dx.doi.org/10.17487/RFC2557", "https://www.rfc-editor.org/info/rfc2557", "https://www.rfc-editor.org/rfc/rfc5322.html", "https://dx.doi.org/10.17487/RFC5322", "https://www.rfc-editor.org/info/rfc5322", "https://www.rfc-editor.org/rfc/rfc7230.html", "https://dx.doi.org/10.17487/RFC7230", "https://www.rfc-editor.org/info/rfc7230", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC8126", "https://www.rfc-editor.org/info/rfc8126", "https://roy.gbiv.com/", "https://www.mnot.net/", "https://greenbytes.de/tech/webdav/"]} {"url": "https://httpwg.org/specs/rfc9113.html", "titulek": "RFC 9113 - HTTP/2", "h1": "HTTP/2", "popis": "This specification describes an optimized expression of the semantics of the Hypertext Transfer Protocol (HTTP), referred to as HTTP version 2 (HTTP/2). HTTP/2 enables a more efficient use of network resources and a reduced latency by introducing field compression and allowing multiple concurrent exchanges on the same connection.This document obsoletes RFCs 7540 and 8740.", "klicova_slova": "HTTP, SPDY, Web", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9113", "og:description": "HTTP/2", "og:url": "https://httpwg.org/specs/rfc9113.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. HTTP/2 Protocol Overview"}, {"uroven": 3, "text": "2.1. Document Organization"}, {"uroven": 3, "text": "2.2. Conventions and Terminology"}, {"uroven": 2, "text": "3. Starting HTTP/2"}, {"uroven": 3, "text": "3.1. HTTP/2 Version Identification"}, {"uroven": 3, "text": "3.2. Starting HTTP/2 for \"https\" URIs"}, {"uroven": 3, "text": "3.3. Starting HTTP/2 with Prior Knowledge"}, {"uroven": 3, "text": "3.4. HTTP/2 Connection Preface"}, {"uroven": 2, "text": "4. HTTP Frames"}, {"uroven": 3, "text": "4.1. Frame Format"}, {"uroven": 3, "text": "4.2. Frame Size"}, {"uroven": 3, "text": "4.3. Field Section Compression and Decompression"}, {"uroven": 4, "text": "4.3.1. Compression State"}, {"uroven": 2, "text": "5. Streams and Multiplexing"}, {"uroven": 3, "text": "5.1. Stream States"}, {"uroven": 4, "text": "5.1.1. Stream Identifiers"}, {"uroven": 4, "text": "5.1.2. Stream Concurrency"}, {"uroven": 3, "text": "5.2. Flow Control"}, {"uroven": 4, "text": "5.2.1. Flow-Control Principles"}, {"uroven": 4, "text": "5.2.2. Appropriate Use of Flow Control"}, {"uroven": 4, "text": "5.2.3. Flow-Control Performance"}, {"uroven": 3, "text": "5.3. Prioritization"}, {"uroven": 4, "text": "5.3.1. Background on Priority in RFC 7540"}, {"uroven": 4, "text": "5.3.2. Priority Signaling in This Document"}, {"uroven": 3, "text": "5.4. Error Handling"}, {"uroven": 4, "text": "5.4.1. Connection Error Handling"}, {"uroven": 4, "text": "5.4.2. Stream Error Handling"}, {"uroven": 4, "text": "5.4.3. Connection Termination"}, {"uroven": 3, "text": "5.5. Extending HTTP/2"}, {"uroven": 2, "text": "6. Frame Definitions"}, {"uroven": 3, "text": "6.1. DATA"}, {"uroven": 3, "text": "6.2. HEADERS"}, {"uroven": 3, "text": "6.3. PRIORITY"}, {"uroven": 3, "text": "6.4. RST_STREAM"}, {"uroven": 3, "text": "6.5. SETTINGS"}, {"uroven": 4, "text": "6.5.1. SETTINGS Format"}, {"uroven": 4, "text": "6.5.2. Defined Settings"}, {"uroven": 4, "text": "6.5.3. Settings Synchronization"}, {"uroven": 3, "text": "6.6. PUSH_PROMISE"}, {"uroven": 3, "text": "6.7. PING"}, {"uroven": 3, "text": "6.8. GOAWAY"}, {"uroven": 3, "text": "6.9. WINDOW_UPDATE"}, {"uroven": 4, "text": "6.9.1. The Flow-Control Window"}, {"uroven": 4, "text": "6.9.2. Initial Flow-Control Window Size"}, {"uroven": 4, "text": "6.9.3. Reducing the Stream Window Size"}, {"uroven": 3, "text": "6.10. CONTINUATION"}, {"uroven": 2, "text": "7. Error Codes"}, {"uroven": 2, "text": "8. Expressing HTTP Semantics in HTTP/2"}, {"uroven": 3, "text": "8.1. HTTP Message Framing"}, {"uroven": 4, "text": "8.1.1. Malformed Messages"}, {"uroven": 3, "text": "8.2. HTTP Fields"}, {"uroven": 4, "text": "8.2.1. Field Validity"}, {"uroven": 4, "text": "8.2.2. Connection-Specific Header Fields"}, {"uroven": 4, "text": "8.2.3. Compressing the Cookie Header Field"}, {"uroven": 3, "text": "8.3. HTTP Control Data"}, {"uroven": 4, "text": "8.3.1. Request Pseudo-Header Fields"}, {"uroven": 4, "text": "8.3.2. Response Pseudo-Header Fields"}, {"uroven": 3, "text": "8.4. Server Push"}, {"uroven": 4, "text": "8.4.1. Push Requests"}, {"uroven": 4, "text": "8.4.2. Push Responses"}, {"uroven": 3, "text": "8.5. The CONNECT Method"}, {"uroven": 3, "text": "8.6. The Upgrade Header Field"}, {"uroven": 3, "text": "8.7. Request Reliability"}, {"uroven": 3, "text": "8.8. Examples"}, {"uroven": 4, "text": "8.8.1. Simple Request"}, {"uroven": 4, "text": "8.8.2. Simple Response"}, {"uroven": 4, "text": "8.8.3. Complex Request"}, {"uroven": 4, "text": "8.8.4. Response with Body"}, {"uroven": 4, "text": "8.8.5. Informational Responses"}, {"uroven": 2, "text": "9. HTTP/2 Connections"}, {"uroven": 3, "text": "9.1. Connection Management"}, {"uroven": 4, "text": "9.1.1. Connection Reuse"}, {"uroven": 3, "text": "9.2. Use of TLS Features"}, {"uroven": 4, "text": "9.2.1. TLS 1.2 Features"}, {"uroven": 4, "text": "9.2.2. TLS 1.2 Cipher Suites"}, {"uroven": 4, "text": "9.2.3. TLS 1.3 Features"}, {"uroven": 2, "text": "10. Security Considerations"}, {"uroven": 3, "text": "10.1. Server Authority"}, {"uroven": 3, "text": "10.2. Cross-Protocol Attacks"}, {"uroven": 3, "text": "10.3. Intermediary Encapsulation Attacks"}, {"uroven": 3, "text": "10.4. Cacheability of Pushed Responses"}, {"uroven": 3, "text": "10.5. Denial-of-Service Considerations"}, {"uroven": 4, "text": "10.5.1. Limits on Field Block Size"}, {"uroven": 4, "text": "10.5.2. CONNECT Issues"}, {"uroven": 3, "text": "10.6. Use of Compression"}, {"uroven": 3, "text": "10.7. Use of Padding"}, {"uroven": 3, "text": "10.8. Privacy Considerations"}, {"uroven": 3, "text": "10.9. Remote Timing Attacks"}, {"uroven": 2, "text": "11. IANA Considerations"}, {"uroven": 3, "text": "11.1. HTTP2-Settings Header Field Registration"}, {"uroven": 3, "text": "11.2. The h2c Upgrade Token"}, {"uroven": 2, "text": "12. References"}, {"uroven": 3, "text": "12.1. Normative References"}, {"uroven": 3, "text": "12.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Prohibited TLS 1.2 Cipher Suites"}, {"uroven": 2, "text": "Appendix B. Changes from RFC 7540"}, {"uroven": 2, "text": "Acknowledgments"}, {"uroven": 2, "text": "Contributors"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis specification describes an optimized expression of the semantics of the Hypertext Transfer Protocol (HTTP), referred to as HTTP version 2 (HTTP/2). HTTP/2 enables a more efficient use of network resources and a reduced latency by introducing field compression and allowing multiple concurrent exchanges on the same connection.\n\nThis document obsoletes RFCs 7540 and 8740.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9113](https://www.rfc-editor.org/info/rfc9113).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n- 2. HTTP/2 Protocol Overview\n - 2.1. Document Organization\n - 2.2. Conventions and Terminology\n- 3. Starting HTTP/2\n - 3.1. HTTP/2 Version Identification\n - 3.2. Starting HTTP/2 for \"https\" URIs\n - 3.3. Starting HTTP/2 with Prior Knowledge\n - 3.4. HTTP/2 Connection Preface\n- 4. HTTP Frames\n - 4.1. Frame Format\n - 4.2. Frame Size\n - 4.3. Field Section Compression and Decompression\n - 4.3.1. Compression State\n- 5. Streams and Multiplexing\n - 5.1. Stream States\n - 5.1.1. Stream Identifiers\n - 5.1.2. Stream Concurrency\n - 5.2. Flow Control\n - 5.2.1. Flow-Control Principles\n - 5.2.2. Appropriate Use of Flow Control\n - 5.2.3. Flow-Control Performance\n - 5.3. Prioritization\n - 5.3.1. Background on Priority in RFC 7540\n - 5.3.2. Priority Signaling in This Document\n - 5.4. Error Handling\n - 5.4.1. Connection Error Handling\n - 5.4.2. Stream Error Handling\n - 5.4.3. Connection Termination\n - 5.5. Extending HTTP/2\n- 6. Frame Definitions\n - 6.1. DATA\n - 6.2. HEADERS\n - 6.3. PRIORITY\n - 6.4. RST_STREAM\n - 6.5. SETTINGS\n - 6.5.1. SETTINGS Format\n - 6.5.2. Defined Settings\n - 6.5.3. Settings Synchronization\n - 6.6. PUSH_PROMISE\n - 6.7. PING\n - 6.8. GOAWAY\n - 6.9. WINDOW_UPDATE\n - 6.9.1. The Flow-Control Window\n - 6.9.2. Initial Flow-Control Window Size\n - 6.9.3. Reducing the Stream Window Size\n - 6.10. CONTINUATION\n- 7. Error Codes\n- 8. Expressing HTTP Semantics in HTTP/2\n - 8.1. HTTP Message Framing\n - 8.1.1. Malformed Messages\n - 8.2. HTTP Fields\n - 8.2.1. Field Validity\n - 8.2.2. Connection-Specific Header Fields\n - 8.2.3. Compressing the Cookie Header Field\n - 8.3. HTTP Control Data\n - 8.3.1. Request Pseudo-Header Fields\n - 8.3.2. Response Pseudo-Header Fields\n - 8.4. Server Push\n - 8.4.1. Push Requests\n - 8.4.2. Push Responses\n - 8.5. The CONNECT Method\n - 8.6. The Upgrade Header Field\n - 8.7. Request Reliability\n - 8.8. Examples\n - 8.8.1. Simple Request\n - 8.8.2. Simple Response\n - 8.8.3. Complex Request\n - 8.8.4. Response with Body\n - 8.8.5. Informational Responses\n- 9. HTTP/2 Connections\n - 9.1. Connection Management\n - 9.1.1. Connection Reuse\n - 9.2. Use of TLS Features\n - 9.2.1. TLS 1.2 Features\n - 9.2.2. TLS 1.2 Cipher Suites\n - 9.2.3. TLS 1.3 Features\n- 10. Security Considerations\n - 10.1. Server Authority\n - 10.2. Cross-Protocol Attacks\n - 10.3. Intermediary Encapsulation Attacks\n - 10.4. Cacheability of Pushed Responses\n - 10.5. Denial-of-Service Considerations\n - 10.5.1. Limits on Field Block Size\n - 10.5.2. CONNECT Issues\n - 10.6. Use of Compression\n - 10.7. Use of Padding\n - 10.8. Privacy Considerations\n - 10.9. Remote Timing Attacks\n- 11. IANA Considerations\n - 11.1. HTTP2-Settings Header Field Registration\n - 11.2. The h2c Upgrade Token\n- 12. References\n - 12.1. Normative References\n - 12.2. Informative References\n- Appendix A. Prohibited TLS 1.2 Cipher Suites\n- Appendix B. Changes from RFC 7540\n- Acknowledgments\n- Contributors\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nThe performance of applications using the Hypertext Transfer Protocol (HTTP, [HTTP]) is linked to how each version of HTTP uses the underlying transport, and the conditions under which the transport operates.\n\nMaking multiple concurrent requests can reduce latency and improve application performance. HTTP/1.0 allowed only one request to be outstanding at a time on a given TCP [TCP] connection. HTTP/1.1 [HTTP/1.1] added request pipelining, but this only partially addressed request concurrency and still suffers from application-layer head-of-line blocking. Therefore, HTTP/1.0 and HTTP/1.1 clients use multiple connections to a server to make concurrent requests.\n\nFurthermore, HTTP fields are often repetitive and verbose, causing unnecessary network traffic as well as causing the initial TCP congestion window to quickly fill. This can result in excessive latency when multiple requests are made on a new TCP connection.\n\nHTTP/2 addresses these issues by defining an optimized mapping of HTTP's semantics to an underlying connection. Specifically, it allows interleaving of messages on the same connection and uses an efficient coding for HTTP fields. It also allows prioritization of requests, letting more important requests complete more quickly, further improving performance.\n\nThe resulting protocol is more friendly to the network because fewer TCP connections can be used in comparison to HTTP/1.x. This means less competition with other flows and longer-lived connections, which in turn lead to better utilization of available network capacity. Note, however, that TCP head-of-line blocking is not addressed by this protocol.\n\nFinally, HTTP/2 also enables more efficient processing of messages through use of binary message framing.\n\nThis document obsoletes RFCs 7540 and 8740. Appendix B lists notable changes.\n\n---\n\n## 2. HTTP/2 Protocol Overview\n\nHTTP/2 provides an optimized transport for HTTP semantics. HTTP/2 supports all of the core features of HTTP but aims to be more efficient than HTTP/1.1.\n\nHTTP/2 is a connection-oriented application-layer protocol that runs over a TCP connection ([TCP]). The client is the TCP connection initiator.\n\nThe basic protocol unit in HTTP/2 is a frame (Section 4.1). Each frame type serves a different purpose. For example, HEADERS and DATA frames form the basis of HTTP requests and responses (Section 8.1); other frame types like SETTINGS, WINDOW_UPDATE, and PUSH_PROMISE are used in support of other HTTP/2 features.\n\nMultiplexing of requests is achieved by having each HTTP request/response exchange associated with its own stream (Section 5). Streams are largely independent of each other, so a blocked or stalled request or response does not prevent progress on other streams.\n\nEffective use of multiplexing depends on flow control and prioritization. Flow control (Section 5.2) ensures that it is possible to efficiently use multiplexed streams by restricting data that is transmitted to what the receiver is able to handle. Prioritization (Section 5.3) ensures that limited resources are used most effectively. This revision of HTTP/2 deprecates the priority signaling scheme from [RFC7540].\n\nBecause HTTP fields used in a connection can contain large amounts of redundant data, frames that contain them are compressed (Section 4.3). This has especially advantageous impact upon request sizes in the common case, allowing many requests to be compressed into one packet.\n\nFinally, HTTP/2 adds a new, optional interaction mode whereby a server can push responses to a client (Section 8.4). This is intended to allow a server to speculatively send data to a client that the server anticipates the client will need, trading off some network usage against a potential latency gain. The server does this by synthesizing a request, which it sends as a PUSH_PROMISE frame. The server is then able to send a response to the synthetic request on a separate stream.\n\n### 2.1. Document Organization\n\nThe HTTP/2 specification is split into four parts:\n\n- Starting HTTP/2 ( Section 3 ) covers how an HTTP/2 connection is initiated.\n- The frame ( Section 4 ) and stream ( Section 5 ) layers describe the way HTTP/2 frames are structured and formed into multiplexed streams.\n- Frame ( Section 6 ) and error ( Section 7 ) definitions include details of the frame and error types used in HTTP/2.\n- HTTP mappings ( Section 8 ) and additional requirements ( Section 9 ) describe how HTTP semantics are expressed using frames and streams.\n\nWhile some of the frame- and stream-layer concepts are isolated from HTTP, this specification does not define a completely generic frame layer. The frame and stream layers are tailored to the needs of HTTP.\n\n### 2.2. Conventions and Terminology\n\nThe 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.\n\nAll numeric values are in network byte order. Values are unsigned unless otherwise indicated. Literal values are provided in decimal or hexadecimal as appropriate. Hexadecimal literals are prefixed with \"0x\" to distinguish them from decimal literals.\n\nThis specification describes binary formats using the conventions described in [Section 1.3](https://www.rfc-editor.org/rfc/rfc9000.html#section-1.3) of RFC 9000 [QUIC]. Note that this format uses network byte order and that high-valued bits are listed before low-valued bits.\n\nThe following terms are used:\n\nclient:\n\nThe endpoint that initiates an HTTP/2 connection. Clients send HTTP requests and receive HTTP responses.\n\nconnection:\n\nA transport-layer connection between two endpoints.\n\nconnection error:\n\nAn error that affects the entire HTTP/2 connection.\n\nendpoint:\n\nEither the client or server of the connection.\n\nframe:\n\nThe smallest unit of communication within an HTTP/2 connection, consisting of a header and a variable-length sequence of octets structured according to the frame type.\n\npeer:\n\nAn endpoint. When discussing a particular endpoint, \"peer\" refers to the endpoint that is remote to the primary subject of discussion.\n\nreceiver:\n\nAn endpoint that is receiving frames.\n\nsender:\n\nAn endpoint that is transmitting frames.\n\nserver:\n\nThe endpoint that accepts an HTTP/2 connection. Servers receive HTTP requests and send HTTP responses.\n\nstream:\n\nA bidirectional flow of frames within the HTTP/2 connection.\n\nstream error:\n\nAn error on the individual HTTP/2 stream.\n\nFinally, the terms \"gateway\", \"intermediary\", \"proxy\", and \"tunnel\" are defined in [Section 3.7](https://www.rfc-editor.org/rfc/rfc9110.html#section-3.7) of [HTTP]. Intermediaries act as both client and server at different times.\n\nThe term \"content\" as it applies to message bodies is defined in [Section 6.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.4) of [HTTP].\n\n---\n\n## 3. Starting HTTP/2\n\nImplementations that generate HTTP requests need to discover whether a server supports HTTP/2.\n\nHTTP/2 uses the \"http\" and \"https\" URI schemes defined in [Section 4.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.2) of [HTTP], with the same default port numbers as HTTP/1.1 [HTTP/1.1]. These URIs do not include any indication about what HTTP versions an upstream server (the immediate peer to which the client wishes to establish a connection) supports.\n\nThe means by which support for HTTP/2 is determined is different for \"http\" and \"https\" URIs. Discovery for \"https\" URIs is described in Section 3.2. HTTP/2 support for \"http\" URIs can only be discovered by out-of-band means and requires prior knowledge of the support as described in Section 3.3.\n\n### 3.1. HTTP/2 Version Identification\n\nThe protocol defined in this document has two identifiers. Creating a connection based on either implies the use of the transport, framing, and message semantics described in this document.\n\n- The string \"h2\" identifies the protocol where HTTP/2 uses Transport Layer Security (TLS); see Section 9.2. This identifier is used in the TLS Application-Layer Protocol Negotiation (ALPN) extension [TLS-ALPN] field and in any place where HTTP/2 over TLS is identified. The \"h2\" string is serialized into an ALPN protocol identifier as the two-octet sequence: 0x68, 0x32.\n- The \"h2c\" string was previously used as a token for use in the HTTP Upgrade mechanism's Upgrade header field ([Section 7.8](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.8) of [HTTP]). This usage was never widely deployed and is deprecated by this document. The same applies to the HTTP2-Settings header field, which was used with the upgrade to \"h2c\".\n\n### 3.2. Starting HTTP/2 for \"https\" URIs\n\nA client that makes a request to an \"https\" URI uses TLS [TLS13] with the ALPN extension [TLS-ALPN].\n\nHTTP/2 over TLS uses the \"h2\" protocol identifier. The \"h2c\" protocol identifier *MUST NOT* be sent by a client or selected by a server; the \"h2c\" protocol identifier describes a protocol that does not use TLS.\n\nOnce TLS negotiation is complete, both the client and the server *MUST* send a connection preface (Section 3.4).\n\n### 3.3. Starting HTTP/2 with Prior Knowledge\n\nA client can learn that a particular server supports HTTP/2 by other means. For example, a client could be configured with knowledge that a server supports HTTP/2.\n\nA client that knows that a server supports HTTP/2 can establish a TCP connection and send the connection preface (Section 3.4) followed by HTTP/2 frames. Servers can identify these connections by the presence of the connection preface. This only affects the establishment of HTTP/2 connections over cleartext TCP; HTTP/2 connections over TLS *MUST* use protocol negotiation in TLS [TLS-ALPN].\n\nLikewise, the server *MUST* send a connection preface (Section 3.4).\n\nWithout additional information, prior support for HTTP/2 is not a strong signal that a given server will support HTTP/2 for future connections. For example, it is possible for server configurations to change, for configurations to differ between instances in clustered servers, or for network conditions to change.\n\n### 3.4. HTTP/2 Connection Preface\n\nIn HTTP/2, each endpoint is required to send a connection preface as a final confirmation of the protocol in use and to establish the initial settings for the HTTP/2 connection. The client and server each send a different connection preface.\n\nThe client connection preface starts with a sequence of 24 octets, which in hex notation is:\n\n```\n 0x505249202a20485454502f322e300d0a0d0a534d0d0a0d0a\n```\n\nThat is, the connection preface starts with the string \"PRI * HTTP/2.0\\r\\n\\r\\nSM\\r\\n\\r\\n\". This sequence *MUST* be followed by a SETTINGS frame (Section 6.5), which *MAY* be empty. The client sends the client connection preface as the first application data octets of a connection.\n\nThe server connection preface consists of a potentially empty SETTINGS frame (Section 6.5) that *MUST* be the first frame the server sends in the HTTP/2 connection.\n\nThe SETTINGS frames received from a peer as part of the connection preface *MUST* be acknowledged (see Section 6.5.3) after sending the connection preface.\n\nTo avoid unnecessary latency, clients are permitted to send additional frames to the server immediately after sending the client connection preface, without waiting to receive the server connection preface. It is important to note, however, that the server connection preface SETTINGS frame might include settings that necessarily alter how a client is expected to communicate with the server. Upon receiving the SETTINGS frame, the client is expected to honor any settings established. In some configurations, it is possible for the server to transmit SETTINGS before the client sends additional frames, providing an opportunity to avoid this issue.\n\nClients and servers *MUST* treat an invalid connection preface as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. A GOAWAY frame (Section 6.8) *MAY* be omitted in this case, since an invalid preface indicates that the peer is not using HTTP/2.\n\n---\n\n## 4. HTTP Frames\n\nOnce the HTTP/2 connection is established, endpoints can begin exchanging frames.\n\n### 4.1. Frame Format\n\nAll frames begin with a fixed 9-octet header followed by a variable-length frame payload.\n\n```\nHTTP Frame {\n Length (24),\n Type (8),\n\n Flags (8),\n\n Reserved (1),\n Stream Identifier (31),\n\n Frame Payload (..),\n}\n```\n\nFigure 1: Frame Layout\n\nThe fields of the frame header are defined as:\n\nLength:\n\nThe length of the frame payload expressed as an unsigned 24-bit integer in units of octets. Values greater than 214 (16,384) *MUST NOT* be sent unless the receiver has set a larger value for SETTINGS_MAX_FRAME_SIZE.The 9 octets of the frame header are not included in this value.\n\nType:\n\nThe 8-bit type of the frame. The frame type determines the format and semantics of the frame. Frames defined in this document are listed in Section 6. Implementations *MUST* ignore and discard frames of unknown types.\n\nFlags:\n\nAn 8-bit field reserved for boolean flags specific to the frame type.Flags are assigned semantics specific to the indicated frame type. Unused flags are those that have no defined semantics for a particular frame type. Unused flags *MUST* be ignored on receipt and *MUST* be left unset (0x00) when sending.\n\nReserved:\n\nA reserved 1-bit field. The semantics of this bit are undefined, and the bit *MUST* remain unset (0x00) when sending and *MUST* be ignored when receiving.\n\nStream Identifier:\n\nA stream identifier (see Section 5.1.1) expressed as an unsigned 31-bit integer. The value 0x00 is reserved for frames that are associated with the connection as a whole as opposed to an individual stream.\n\nThe structure and content of the frame payload are dependent entirely on the frame type.\n\n### 4.2. Frame Size\n\nThe size of a frame payload is limited by the maximum size that a receiver advertises in the SETTINGS_MAX_FRAME_SIZE setting. This setting can have any value between 214 (16,384) and 224-1 (16,777,215) octets, inclusive.\n\nAll implementations *MUST* be capable of receiving and minimally processing frames up to 214 octets in length, plus the 9-octet frame header (Section 4.1). The size of the frame header is not included when describing frame sizes.\n\nAn endpoint *MUST* send an error code of FRAME_SIZE_ERROR if a frame exceeds the size defined in SETTINGS_MAX_FRAME_SIZE, exceeds any limit defined for the frame type, or is too small to contain mandatory frame data. A frame size error in a frame that could alter the state of the entire connection *MUST* be treated as a connection error (Section 5.4.1); this includes any frame carrying a field block (Section 4.3) (that is, HEADERS, PUSH_PROMISE, and CONTINUATION), a SETTINGS frame, and any frame with a stream identifier of 0.\n\nEndpoints are not obligated to use all available space in a frame. Responsiveness can be improved by using frames that are smaller than the permitted maximum size. Sending large frames can result in delays in sending time-sensitive frames (such as RST_STREAM, WINDOW_UPDATE, or PRIORITY), which, if blocked by the transmission of a large frame, could affect performance.\n\n### 4.3. Field Section Compression and Decompression\n\nField section compression is the process of compressing a set of field lines ([Section 5.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.2) of [HTTP]) to form a field block. Field section decompression is the process of decoding a field block into a set of field lines. Details of HTTP/2 field section compression and decompression are defined in [COMPRESSION], which, for historical reasons, refers to these processes as header compression and decompression.\n\nEach field block carries all of the compressed field lines of a single field section. Header sections also include control data associated with the message in the form of pseudo-header fields (Section 8.3) that use the same format as a field line.\n\nField blocks carry control data and header sections for requests, responses, promised requests, and pushed responses (see Section 8.4). All these messages, except for interim responses and requests contained in PUSH_PROMISE (Section 6.6) frames, can optionally include a field block that carries a trailer section.\n\nA field section is a collection of field lines. Each of the field lines in a field block carries a single value. The serialized field block is then divided into one or more octet sequences, called field block fragments. The first field block fragment is transmitted within the frame payload of HEADERS (Section 6.2) or PUSH_PROMISE (Section 6.6), each of which could be followed by CONTINUATION (Section 6.10) frames to carry subsequent field block fragments.\n\nThe Cookie header field [COOKIE] is treated specially by the HTTP mapping (see Section 8.2.3).\n\nA receiving endpoint reassembles the field block by concatenating its fragments and then decompresses the block to reconstruct the field section.\n\nA complete field section consists of either:\n\n- a single HEADERS or PUSH_PROMISE frame, with the END_HEADERS flag set, or\n- a HEADERS or PUSH_PROMISE frame with the END_HEADERS flag unset and one or more CONTINUATION frames, where the last CONTINUATION frame has the END_HEADERS flag set.\n\nEach field block is processed as a discrete unit. Field blocks *MUST* be transmitted as a contiguous sequence of frames, with no interleaved frames of any other type or from any other stream. The last frame in a sequence of HEADERS or CONTINUATION frames has the END_HEADERS flag set. The last frame in a sequence of PUSH_PROMISE or CONTINUATION frames has the END_HEADERS flag set. This allows a field block to be logically equivalent to a single frame.\n\nField block fragments can only be sent as the frame payload of HEADERS, PUSH_PROMISE, or CONTINUATION frames because these frames carry data that can modify the compression context maintained by a receiver. An endpoint receiving HEADERS, PUSH_PROMISE, or CONTINUATION frames needs to reassemble field blocks and perform decompression even if the frames are to be discarded. A receiver *MUST* terminate the connection with a connection error (Section 5.4.1) of type COMPRESSION_ERROR if it does not decompress a field block.\n\nA decoding error in a field block *MUST* be treated as a connection error (Section 5.4.1) of type COMPRESSION_ERROR.\n\n#### 4.3.1. Compression State\n\nField compression is stateful. Each endpoint has an HPACK encoder context and an HPACK decoder context that are used for encoding and decoding all field blocks on a connection. [Section 4](https://www.rfc-editor.org/rfc/rfc7541.html#section-4) of [COMPRESSION] defines the dynamic table, which is the primary state for each context.\n\nThe dynamic table has a maximum size that is set by an HPACK decoder. An endpoint communicates the size chosen by its HPACK decoder context using the SETTINGS_HEADER_TABLE_SIZE setting; see Section 6.5.2. When a connection is established, the dynamic table size for the HPACK decoder and encoder at both endpoints starts at 4,096 bytes, the initial value of the SETTINGS_HEADER_TABLE_SIZE setting.\n\nAny change to the maximum value set using SETTINGS_HEADER_TABLE_SIZE takes effect when the endpoint acknowledges settings (Section 6.5.3). The HPACK encoder at that endpoint can set the dynamic table to any size up to the maximum value set by the decoder. An HPACK encoder declares the size of the dynamic table with a Dynamic Table Size Update instruction ([Section 6.3](https://www.rfc-editor.org/rfc/rfc7541.html#section-6.3) of [COMPRESSION]).\n\nOnce an endpoint acknowledges a change to SETTINGS_HEADER_TABLE_SIZE that reduces the maximum below the current size of the dynamic table, its HPACK encoder *MUST* start the next field block with a Dynamic Table Size Update instruction that sets the dynamic table to a size that is less than or equal to the reduced maximum; see [Section 4.2](https://www.rfc-editor.org/rfc/rfc7541.html#section-4.2) of [COMPRESSION]. An endpoint *MUST* treat a field block that follows an acknowledgment of the reduction to the maximum dynamic table size as a connection error (Section 5.4.1) of type COMPRESSION_ERROR if it does not start with a conformant Dynamic Table Size Update instruction.\n\n---\n\n## 5. Streams and Multiplexing\n\nA \"stream\" is an independent, bidirectional sequence of frames exchanged between the client and server within an HTTP/2 connection. Streams have several important characteristics:\n\n- A single HTTP/2 connection can contain multiple concurrently open streams, with either endpoint interleaving frames from multiple streams.\n- Streams can be established and used unilaterally or shared by either endpoint.\n- Streams can be closed by either endpoint.\n- The order in which frames are sent is significant. Recipients process frames in the order they are received. In particular, the order of HEADERS and DATA frames is semantically significant.\n- Streams are identified by an integer. Stream identifiers are assigned to streams by the endpoint initiating the stream.\n\n### 5.1. Stream States\n\nThe lifecycle of a stream is shown in Figure 2.\n\nFigure 2: Stream States\n\nsend:\n\nendpoint sends this frame\n\nrecv:\n\nendpoint receives this frame\n\nH:\n\nHEADERS frame (with implied CONTINUATION frames)\n\nES:\n\nEND_STREAM flag\n\nR:\n\nRST_STREAM frame\n\nPP:\n\nPUSH_PROMISE frame (with implied CONTINUATION frames); state transitions are for the promised stream\n\nNote that this diagram shows stream state transitions and the frames and flags that affect those transitions only. In this regard, CONTINUATION frames do not result in state transitions; they are effectively part of the HEADERS or PUSH_PROMISE that they follow. For the purpose of state transitions, the END_STREAM flag is processed as a separate event to the frame that bears it; a HEADERS frame with the END_STREAM flag set can cause two state transitions.\n\nBoth endpoints have a subjective view of the state of a stream that could be different when frames are in transit. Endpoints do not coordinate the creation of streams; they are created unilaterally by either endpoint. The negative consequences of a mismatch in states are limited to the \"closed\" state after sending RST_STREAM, where frames might be received for some time after closing.\n\nStreams have the following states:\n\nidle:\n\nAll streams start in the \"idle\" state.The following transitions are valid from this state:Sending a HEADERS frame as a client, or receiving a HEADERS frame as a server, causes the stream to become \"open\". The stream identifier is selected as described in Section 5.1.1. The same HEADERS frame can also cause a stream to immediately become \"half-closed\".Sending a PUSH_PROMISE frame on another stream reserves the idle stream that is identified for later use. The stream state for the reserved stream transitions to \"reserved (local)\". Only a server may send PUSH_PROMISE frames.Receiving a PUSH_PROMISE frame on another stream reserves an idle stream that is identified for later use. The stream state for the reserved stream transitions to \"reserved (remote)\". Only a client may receive PUSH_PROMISE frames.Note that the PUSH_PROMISE frame is not sent on the idle stream but references the newly reserved stream in the Promised Stream ID field.Opening a stream with a higher-valued stream identifier causes the stream to transition immediately to a \"closed\" state; note that this transition is not shown in the diagram.Receiving any frame other than HEADERS or PRIORITY on a stream in this state *MUST* be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. If this stream is initiated by the server, as described in Section 5.1.1, then receiving a HEADERS frame *MUST* also be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nreserved (local):\n\nA stream in the \"reserved (local)\" state is one that has been promised by sending a PUSH_PROMISE frame. A PUSH_PROMISE frame reserves an idle stream by associating the stream with an open stream that was initiated by the remote peer (see Section 8.4).In this state, only the following transitions are possible:The endpoint can send a HEADERS frame. This causes the stream to open in a \"half-closed (remote)\" state.Either endpoint can send a RST_STREAM frame to cause the stream to become \"closed\". This releases the stream reservation.An endpoint *MUST NOT* send any type of frame other than HEADERS, RST_STREAM, or PRIORITY in this state.A PRIORITY or WINDOW_UPDATE frame *MAY* be received in this state. Receiving any type of frame other than RST_STREAM, PRIORITY, or WINDOW_UPDATE on a stream in this state *MUST* be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nreserved (remote):\n\nA stream in the \"reserved (remote)\" state has been reserved by a remote peer.In this state, only the following transitions are possible:Receiving a HEADERS frame causes the stream to transition to \"half-closed (local)\".Either endpoint can send a RST_STREAM frame to cause the stream to become \"closed\". This releases the stream reservation.An endpoint *MUST NOT* send any type of frame other than RST_STREAM, WINDOW_UPDATE, or PRIORITY in this state.Receiving any type of frame other than HEADERS, RST_STREAM, or PRIORITY on a stream in this state *MUST* be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nopen:\n\nA stream in the \"open\" state may be used by both peers to send frames of any type. In this state, sending peers observe advertised stream-level flow-control limits (Section 5.2).From this state, either endpoint can send a frame with an END_STREAM flag set, which causes the stream to transition into one of the \"half-closed\" states. An endpoint sending an END_STREAM flag causes the stream state to become \"half-closed (local)\"; an endpoint receiving an END_STREAM flag causes the stream state to become \"half-closed (remote)\".Either endpoint can send a RST_STREAM frame from this state, causing it to transition immediately to \"closed\".\n\nhalf-closed (local):\n\nA stream that is in the \"half-closed (local)\" state cannot be used for sending frames other than WINDOW_UPDATE, PRIORITY, and RST_STREAM.A stream transitions from this state to \"closed\" when a frame is received with the END_STREAM flag set or when either peer sends a RST_STREAM frame.An endpoint can receive any type of frame in this state. Providing flow-control credit using WINDOW_UPDATE frames is necessary to continue receiving flow-controlled frames. In this state, a receiver can ignore WINDOW_UPDATE frames, which might arrive for a short period after a frame with the END_STREAM flag set is sent.PRIORITY frames can be received in this state.\n\nhalf-closed (remote):\n\nA stream that is \"half-closed (remote)\" is no longer being used by the peer to send frames. In this state, an endpoint is no longer obligated to maintain a receiver flow-control window.If an endpoint receives additional frames, other than WINDOW_UPDATE, PRIORITY, or RST_STREAM, for a stream that is in this state, it *MUST* respond with a stream error (Section 5.4.2) of type STREAM_CLOSED.A stream that is \"half-closed (remote)\" can be used by the endpoint to send frames of any type. In this state, the endpoint continues to observe advertised stream-level flow-control limits (Section 5.2).A stream can transition from this state to \"closed\" by sending a frame with the END_STREAM flag set or when either peer sends a RST_STREAM frame.\n\nclosed:\n\nThe \"closed\" state is the terminal state.A stream enters the \"closed\" state after an endpoint both sends and receives a frame with an END_STREAM flag set. A stream also enters the \"closed\" state after an endpoint either sends or receives a RST_STREAM frame.An endpoint *MUST NOT* send frames other than PRIORITY on a closed stream. An endpoint *MAY* treat receipt of any other type of frame on a closed stream as a connection error (Section 5.4.1) of type STREAM_CLOSED, except as noted below.An endpoint that sends a frame with the END_STREAM flag set or a RST_STREAM frame might receive a WINDOW_UPDATE or RST_STREAM frame from its peer in the time before the peer receives and processes the frame that closes the stream.An endpoint that sends a RST_STREAM frame on a stream that is in the \"open\" or \"half-closed (local)\" state could receive any type of frame. The peer might have sent or enqueued for sending these frames before processing the RST_STREAM frame. An endpoint *MUST* minimally process and then discard any frames it receives in this state. This means updating header compression state for HEADERS and PUSH_PROMISE frames. Receiving a PUSH_PROMISE frame also causes the promised stream to become \"reserved (remote)\", even when the PUSH_PROMISE frame is received on a closed stream. Additionally, the content of DATA frames counts toward the connection flow-control window.An endpoint can perform this minimal processing for all streams that are in the \"closed\" state. Endpoints *MAY* use other signals to detect that a peer has received the frames that caused the stream to enter the \"closed\" state and treat receipt of any frame other than PRIORITY as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. Endpoints can use frames that indicate that the peer has received the closing signal to drive this. Endpoints *SHOULD NOT* use timers for this purpose. For example, an endpoint that sends a SETTINGS frame after closing a stream can safely treat receipt of a DATA frame on that stream as an error after receiving an acknowledgment of the settings. Other things that might be used are PING frames, receiving data on streams that were created after closing the stream, or responses to requests created after closing the stream.\n\nIn the absence of more specific rules, implementations *SHOULD* treat the receipt of a frame that is not expressly permitted in the description of a state as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. Note that PRIORITY can be sent and received in any stream state.\n\nThe rules in this section only apply to frames defined in this document. Receipt of frames for which the semantics are unknown cannot be treated as an error, as the conditions for sending and receiving those frames are also unknown; see Section 5.5.\n\nAn example of the state transitions for an HTTP request/response exchange can be found in Section 8.8. An example of the state transitions for server push can be found in Sections 8.4.1 and 8.4.2.\n\n#### 5.1.1. Stream Identifiers\n\nStreams are identified by an unsigned 31-bit integer. Streams initiated by a client *MUST* use odd-numbered stream identifiers; those initiated by the server *MUST* use even-numbered stream identifiers. A stream identifier of zero (0x00) is used for connection control messages; the stream identifier of zero cannot be used to establish a new stream.\n\nThe identifier of a newly established stream *MUST* be numerically greater than all streams that the initiating endpoint has opened or reserved. This governs streams that are opened using a HEADERS frame and streams that are reserved using PUSH_PROMISE. An endpoint that receives an unexpected stream identifier *MUST* respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nA HEADERS frame will transition the client-initiated stream identified by the stream identifier in the frame header from \"idle\" to \"open\". A PUSH_PROMISE frame will transition the server-initiated stream identified by the Promised Stream ID field in the frame payload from \"idle\" to \"reserved (local)\" or \"reserved (remote)\". When a stream transitions out of the \"idle\" state, all streams in the \"idle\" state that might have been opened by the peer with a lower-valued stream identifier immediately transition to \"closed\". That is, an endpoint may skip a stream identifier, with the effect being that the skipped stream is immediately closed.\n\nStream identifiers cannot be reused. Long-lived connections can result in an endpoint exhausting the available range of stream identifiers. A client that is unable to establish a new stream identifier can establish a new connection for new streams. A server that is unable to establish a new stream identifier can send a GOAWAY frame so that the client is forced to open a new connection for new streams.\n\n#### 5.1.2. Stream Concurrency\n\nA peer can limit the number of concurrently active streams using the SETTINGS_MAX_CONCURRENT_STREAMS parameter (see Section 6.5.2) within a SETTINGS frame. The maximum concurrent streams setting is specific to each endpoint and applies only to the peer that receives the setting. That is, clients specify the maximum number of concurrent streams the server can initiate, and servers specify the maximum number of concurrent streams the client can initiate.\n\nStreams that are in the \"open\" state or in either of the \"half-closed\" states count toward the maximum number of streams that an endpoint is permitted to open. Streams in any of these three states count toward the limit advertised in the SETTINGS_MAX_CONCURRENT_STREAMS setting. Streams in either of the \"reserved\" states do not count toward the stream limit.\n\nEndpoints *MUST NOT* exceed the limit set by their peer. An endpoint that receives a HEADERS frame that causes its advertised concurrent stream limit to be exceeded *MUST* treat this as a stream error (Section 5.4.2) of type PROTOCOL_ERROR or REFUSED_STREAM. The choice of error code determines whether the endpoint wishes to enable automatic retry (see Section 8.7 for details).\n\nAn endpoint that wishes to reduce the value of SETTINGS_MAX_CONCURRENT_STREAMS to a value that is below the current number of open streams can either close streams that exceed the new value or allow streams to complete.\n\n### 5.2. Flow Control\n\nUsing streams for multiplexing introduces contention over use of the TCP connection, resulting in blocked streams. A flow-control scheme ensures that streams on the same connection do not destructively interfere with each other. Flow control is used for both individual streams and the connection as a whole.\n\nHTTP/2 provides for flow control through use of the WINDOW_UPDATE frame (Section 6.9).\n\n#### 5.2.1. Flow-Control Principles\n\nHTTP/2 stream flow control aims to allow a variety of flow-control algorithms to be used without requiring protocol changes. Flow control in HTTP/2 has the following characteristics:\n\n1. Flow control is specific to a connection. HTTP/2 flow control operates between the endpoints of a single hop and not over the entire end-to-end path.\n2. Flow control is based on WINDOW_UPDATE frames. Receivers advertise how many octets they are prepared to receive on a stream and for the entire connection. This is a credit-based scheme.\n3. Flow control is directional with overall control provided by the receiver. A receiver *MAY* choose to set any window size that it desires for each stream and for the entire connection. A sender *MUST* respect flow-control limits imposed by a receiver. Clients, servers, and intermediaries all independently advertise their flow-control window as a receiver and abide by the flow-control limits set by their peer when sending.\n4. The initial value for the flow-control window is 65,535 octets for both new streams and the overall connection.\n5. The frame type determines whether flow control applies to a frame. Of the frames specified in this document, only DATA frames are subject to flow control; all other frame types do not consume space in the advertised flow-control window. This ensures that important control frames are not blocked by flow control.\n6. An endpoint can choose to disable its own flow control, but an endpoint cannot ignore flow-control signals from its peer.\n7. HTTP/2 defines only the format and semantics of the WINDOW_UPDATE frame ( Section 6.9 ). This document does not stipulate how a receiver decides when to send this frame or the value that it sends, nor does it specify how a sender chooses to send packets. Implementations are able to select any algorithm that suits their needs.\n\nImplementations are also responsible for prioritizing the sending of requests and responses, choosing how to avoid head-of-line blocking for requests, and managing the creation of new streams. Algorithm choices for these could interact with any flow-control algorithm.\n\n#### 5.2.2. Appropriate Use of Flow Control\n\nFlow control is defined to protect endpoints that are operating under resource constraints. For example, a proxy needs to share memory between many connections and also might have a slow upstream connection and a fast downstream one. Flow control addresses cases where the receiver is unable to process data on one stream yet wants to continue to process other streams in the same connection.\n\nDeployments that do not require this capability can advertise a flow-control window of the maximum size (231-1) and can maintain this window by sending a WINDOW_UPDATE frame when any data is received. This effectively disables flow control for that receiver. Conversely, a sender is always subject to the flow-control window advertised by the receiver.\n\nDeployments with constrained resources (for example, memory) can employ flow control to limit the amount of memory a peer can consume. Note, however, that this can lead to suboptimal use of available network resources if flow control is enabled without knowledge of the bandwidth * delay product (see [RFC7323]).\n\nEven with full awareness of the current bandwidth * delay product, implementation of flow control can be difficult. Endpoints *MUST* read and process HTTP/2 frames from the TCP receive buffer as soon as data is available. Failure to read promptly could lead to a deadlock when critical frames, such as WINDOW_UPDATE, are not read and acted upon. Reading frames promptly does not expose endpoints to resource exhaustion attacks, as HTTP/2 flow control limits resource commitments.\n\n#### 5.2.3. Flow-Control Performance\n\nIf an endpoint cannot ensure that its peer always has available flow-control window space that is greater than the peer's bandwidth * delay product on this connection, its receive throughput will be limited by HTTP/2 flow control. This will result in degraded performance.\n\nSending timely WINDOW_UPDATE frames can improve performance. Endpoints will want to balance the need to improve receive throughput with the need to manage resource exhaustion risks and should take careful note of Section 10.5 in defining their strategy to manage window sizes.\n\n### 5.3. Prioritization\n\nIn a multiplexed protocol like HTTP/2, prioritizing allocation of bandwidth and computation resources to streams can be critical to attaining good performance. A poor prioritization scheme can result in HTTP/2 providing poor performance. With no parallelism at the TCP layer, performance could be significantly worse than HTTP/1.1.\n\nA good prioritization scheme benefits from the application of contextual knowledge such as the content of resources, how resources are interrelated, and how those resources will be used by a peer. In particular, clients can possess knowledge about the priority of requests that is relevant to server prioritization. In those cases, having clients provide priority information can improve performance.\n\n#### 5.3.1. Background on Priority in RFC 7540\n\nRFC 7540 defined a rich system for signaling priority of requests. However, this system proved to be complex, and it was not uniformly implemented.\n\nThe flexible scheme meant that it was possible for clients to express priorities in very different ways, with little consistency in the approaches that were adopted. For servers, implementing generic support for the scheme was complex. Implementation of priorities was uneven in both clients and servers. Many server deployments ignored client signals when prioritizing their handling of requests.\n\nIn short, the prioritization signaling in RFC 7540 [RFC7540] was not successful.\n\n#### 5.3.2. Priority Signaling in This Document\n\nThis update to HTTP/2 deprecates the priority signaling defined in RFC 7540 [RFC7540]. The bulk of the text related to priority signals is not included in this document. The description of frame fields and some of the mandatory handling is retained to ensure that implementations of this document remain interoperable with implementations that use the priority signaling described in RFC 7540.\n\nA thorough description of the RFC 7540 priority scheme remains in [Section 5.3](https://www.rfc-editor.org/rfc/rfc7540.html#section-5.3) of [RFC7540].\n\nSignaling priority information is necessary to attain good performance in many cases. Where signaling priority information is important, endpoints are encouraged to use an alternative scheme, such as the scheme described in [HTTP-PRIORITY].\n\nThough the priority signaling from RFC 7540 was not widely adopted, the information it provides can still be useful in the absence of better information. Endpoints that receive priority signals in HEADERS or PRIORITY frames can benefit from applying that information. In particular, implementations that consume these signals would not benefit from discarding these priority signals in the absence of alternatives.\n\nServers *SHOULD* use other contextual information in determining priority of requests in the absence of any priority signals. Servers *MAY* interpret the complete absence of signals as an indication that the client has not implemented the feature. The defaults described in [Section 5.3.5](https://www.rfc-editor.org/rfc/rfc7540.html#section-5.3.5) of [RFC7540] are known to have poor performance under most conditions, and their use is unlikely to be deliberate.\n\n### 5.4. Error Handling\n\nHTTP/2 framing permits two classes of errors:\n\n- An error condition that renders the entire connection unusable is a connection error.\n- An error in an individual stream is a stream error.\n\nA list of error codes is included in Section 7.\n\nIt is possible that an endpoint will encounter frames that would cause multiple errors. Implementations *MAY* discover multiple errors during processing, but they *SHOULD* report at most one stream and one connection error as a result.\n\nThe first stream error reported for a given stream prevents any other errors on that stream from being reported. In comparison, the protocol permits multiple GOAWAY frames, though an endpoint *SHOULD* report just one type of connection error unless an error is encountered during graceful shutdown. If this occurs, an endpoint *MAY* send an additional GOAWAY frame with the new error code, in addition to any prior GOAWAY that contained NO_ERROR.\n\nIf an endpoint detects multiple different errors, it *MAY* choose to report any one of those errors. If a frame causes a connection error, that error *MUST* be reported. Additionally, an endpoint *MAY* use any applicable error code when it detects an error condition; a generic error code (such as PROTOCOL_ERROR or INTERNAL_ERROR) can always be used in place of more specific error codes.\n\n#### 5.4.1. Connection Error Handling\n\nA connection error is any error that prevents further processing of the frame layer or corrupts any connection state.\n\nAn endpoint that encounters a connection error *SHOULD* first send a GOAWAY frame (Section 6.8) with the stream identifier of the last stream that it successfully received from its peer. The GOAWAY frame includes an error code (Section 7) that indicates why the connection is terminating. After sending the GOAWAY frame for an error condition, the endpoint *MUST* close the TCP connection.\n\nIt is possible that the GOAWAY will not be reliably received by the receiving endpoint. In the event of a connection error, GOAWAY only provides a best-effort attempt to communicate with the peer about why the connection is being terminated.\n\nAn endpoint can end a connection at any time. In particular, an endpoint *MAY* choose to treat a stream error as a connection error. Endpoints *SHOULD* send a GOAWAY frame when ending a connection, providing that circumstances permit it.\n\n#### 5.4.2. Stream Error Handling\n\nA stream error is an error related to a specific stream that does not affect processing of other streams.\n\nAn endpoint that detects a stream error sends a RST_STREAM frame (Section 6.4) that contains the stream identifier of the stream where the error occurred. The RST_STREAM frame includes an error code that indicates the type of error.\n\nA RST_STREAM is the last frame that an endpoint can send on a stream. The peer that sends the RST_STREAM frame *MUST* be prepared to receive any frames that were sent or enqueued for sending by the remote peer. These frames can be ignored, except where they modify connection state (such as the state maintained for field section compression (Section 4.3) or flow control).\n\nNormally, an endpoint *SHOULD NOT* send more than one RST_STREAM frame for any stream. However, an endpoint *MAY* send additional RST_STREAM frames if it receives frames on a closed stream after more than a round-trip time. This behavior is permitted to deal with misbehaving implementations.\n\nTo avoid looping, an endpoint *MUST NOT* send a RST_STREAM in response to a RST_STREAM frame.\n\n#### 5.4.3. Connection Termination\n\nIf the TCP connection is closed or reset while streams remain in the \"open\" or \"half-closed\" states, then the affected streams cannot be automatically retried (see Section 8.7 for details).\n\n### 5.5. Extending HTTP/2\n\nHTTP/2 permits extension of the protocol. Within the limitations described in this section, protocol extensions can be used to provide additional services or alter any aspect of the protocol. Extensions are effective only within the scope of a single HTTP/2 connection.\n\nThis applies to the protocol elements defined in this document. This does not affect the existing options for extending HTTP, such as defining new methods, status codes, or fields (see [Section 16](https://www.rfc-editor.org/rfc/rfc9110.html#section-16) of [HTTP]).\n\nExtensions are permitted to use new frame types (Section 4.1), new settings (Section 6.5), or new error codes (Section 7). Registries for managing these extension points are defined in [Section 11](https://www.rfc-editor.org/rfc/rfc7540.html#section-11) of [RFC7540].\n\nImplementations *MUST* ignore unknown or unsupported values in all extensible protocol elements. Implementations *MUST* discard frames that have unknown or unsupported types. This means that any of these extension points can be safely used by extensions without prior arrangement or negotiation. However, extension frames that appear in the middle of a field block (Section 4.3) are not permitted; these *MUST* be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nExtensions *SHOULD* avoid changing protocol elements defined in this document or elements for which no extension mechanism is defined. This includes changes to the layout of frames, additions or changes to the way that frames are composed into HTTP messages (Section 8.1), the definition of pseudo-header fields, or changes to any protocol element that a compliant endpoint might treat as a connection error (Section 5.4.1).\n\nAn extension that changes existing protocol elements or state *MUST* be negotiated before being used. For example, an extension that changes the layout of the HEADERS frame cannot be used until the peer has given a positive signal that this is acceptable. In this case, it could also be necessary to coordinate when the revised layout comes into effect. For example, treating frames other than DATA frames as flow controlled requires a change in semantics that both endpoints need to understand, so this can only be done through negotiation.\n\nThis document doesn't mandate a specific method for negotiating the use of an extension but notes that a setting (Section 6.5.2) could be used for that purpose. If both peers set a value that indicates willingness to use the extension, then the extension can be used. If a setting is used for extension negotiation, the initial value *MUST* be defined in such a fashion that the extension is initially disabled.\n\n---\n\n## 6. Frame Definitions\n\nThis specification defines a number of frame types, each identified by a unique 8-bit type code. Each frame type serves a distinct purpose in the establishment and management of either the connection as a whole or individual streams.\n\nThe transmission of specific frame types can alter the state of a connection. If endpoints fail to maintain a synchronized view of the connection state, successful communication within the connection will no longer be possible. Therefore, it is important that endpoints have a shared comprehension of how the state is affected by the use of any given frame.\n\n### 6.1. DATA\n\nDATA frames (type=0x00) convey arbitrary, variable-length sequences of octets associated with a stream. One or more DATA frames are used, for instance, to carry HTTP request or response message contents.\n\nDATA frames *MAY* also contain padding. Padding can be added to DATA frames to obscure the size of messages. Padding is a security feature; see Section 10.7.\n\n```\nDATA Frame {\n Length (24),\n Type (8) = 0x00,\n\n Unused Flags (4),\n PADDED Flag (1),\n Unused Flags (2),\n END_STREAM Flag (1),\n\n Reserved (1),\n Stream Identifier (31),\n\n [Pad Length (8)],\n Data (..),\n Padding (..2040),\n}\n```\n\nFigure 3: DATA Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in Section 4. The DATA frame contains the following additional fields:\n\nPad Length:\n\nAn 8-bit field containing the length of the frame padding in units of octets. This field is conditional and is only present if the PADDED flag is set.\n\nData:\n\nApplication data. The amount of data is the remainder of the frame payload after subtracting the length of the other fields that are present.\n\nPadding:\n\nPadding octets that contain no application semantic value. Padding octets *MUST* be set to zero when sending. A receiver is not obligated to verify padding but *MAY* treat non-zero padding as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nThe DATA frame defines the following flags:\n\nPADDED (0x08):\n\nWhen set, the PADDED flag indicates that the Pad Length field and any padding that it describes are present.\n\nEND_STREAM (0x01):\n\nWhen set, the END_STREAM flag indicates that this frame is the last that the endpoint will send for the identified stream. Setting this flag causes the stream to enter one of the \"half-closed\" states or the \"closed\" state (Section 5.1).\n\nDATA frames *MUST* be associated with a stream. If a DATA frame is received whose Stream Identifier field is 0x00, the recipient *MUST* respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nDATA frames are subject to flow control and can only be sent when a stream is in the \"open\" or \"half-closed (remote)\" state. The entire DATA frame payload is included in flow control, including the Pad Length and Padding fields if present. If a DATA frame is received whose stream is not in the \"open\" or \"half-closed (local)\" state, the recipient *MUST* respond with a stream error (Section 5.4.2) of type STREAM_CLOSED.\n\nThe total number of padding octets is determined by the value of the Pad Length field. If the length of the padding is the length of the frame payload or greater, the recipient *MUST* treat this as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\n### 6.2. HEADERS\n\nThe HEADERS frame (type=0x01) is used to open a stream (Section 5.1), and additionally carries a field block fragment. Despite the name, a HEADERS frame can carry a header section or a trailer section. HEADERS frames can be sent on a stream in the \"idle\", \"reserved (local)\", \"open\", or \"half-closed (remote)\" state.\n\n```\nHEADERS Frame {\n Length (24),\n Type (8) = 0x01,\n\n Unused Flags (2),\n PRIORITY Flag (1),\n Unused Flag (1),\n PADDED Flag (1),\n END_HEADERS Flag (1),\n Unused Flag (1),\n END_STREAM Flag (1),\n\n Reserved (1),\n Stream Identifier (31),\n\n [Pad Length (8)],\n [Exclusive (1)],\n [Stream Dependency (31)],\n [Weight (8)],\n Field Block Fragment (..),\n Padding (..2040),\n}\n```\n\nFigure 4: HEADERS Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in Section 4. The HEADERS frame payload has the following additional fields:\n\nPad Length:\n\nAn 8-bit field containing the length of the frame padding in units of octets. This field is only present if the PADDED flag is set.\n\nExclusive:\n\nA single-bit flag. This field is only present if the PRIORITY flag is set. Priority signals in HEADERS frames are deprecated; see Section 5.3.2.\n\nStream Dependency:\n\nA 31-bit stream identifier. This field is only present if the PRIORITY flag is set.\n\nWeight:\n\nAn unsigned 8-bit integer. This field is only present if the PRIORITY flag is set.\n\nField Block Fragment:\n\nA field block fragment (Section 4.3).\n\nPadding:\n\nPadding octets that contain no application semantic value. Padding octets *MUST* be set to zero when sending. A receiver is not obligated to verify padding but *MAY* treat non-zero padding as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nThe HEADERS frame defines the following flags:\n\nPRIORITY (0x20):\n\nWhen set, the PRIORITY flag indicates that the Exclusive, Stream Dependency, and Weight fields are present.\n\nPADDED (0x08):\n\nWhen set, the PADDED flag indicates that the Pad Length field and any padding that it describes are present.\n\nEND_HEADERS (0x04):\n\nWhen set, the END_HEADERS flag indicates that this frame contains an entire field block (Section 4.3) and is not followed by any CONTINUATION frames.A HEADERS frame without the END_HEADERS flag set *MUST* be followed by a CONTINUATION frame for the same stream. A receiver *MUST* treat the receipt of any other type of frame or a frame on a different stream as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nEND_STREAM (0x01):\n\nWhen set, the END_STREAM flag indicates that the field block (Section 4.3) is the last that the endpoint will send for the identified stream.A HEADERS frame with the END_STREAM flag set signals the end of a stream. However, a HEADERS frame with the END_STREAM flag set can be followed by CONTINUATION frames on the same stream. Logically, the CONTINUATION frames are part of the HEADERS frame.\n\nThe frame payload of a HEADERS frame contains a field block fragment (Section 4.3). A field block that does not fit within a HEADERS frame is continued in a CONTINUATION frame (Section 6.10).\n\nHEADERS frames *MUST* be associated with a stream. If a HEADERS frame is received whose Stream Identifier field is 0x00, the recipient *MUST* respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nThe HEADERS frame changes the connection state as described in Section 4.3.\n\nThe total number of padding octets is determined by the value of the Pad Length field. If the length of the padding is the length of the frame payload or greater, the recipient *MUST* treat this as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\n### 6.3. PRIORITY\n\nThe PRIORITY frame (type=0x02) is deprecated; see Section 5.3.2. A PRIORITY frame can be sent in any stream state, including idle or closed streams.\n\n```\nPRIORITY Frame {\n Length (24) = 0x05,\n Type (8) = 0x02,\n\n Unused Flags (8),\n\n Reserved (1),\n Stream Identifier (31),\n\n Exclusive (1),\n Stream Dependency (31),\n Weight (8),\n}\n```\n\nFigure 5: PRIORITY Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in Section 4. The frame payload of a PRIORITY frame contains the following additional fields:\n\nExclusive:\n\nA single-bit flag.\n\nStream Dependency:\n\nA 31-bit stream identifier.\n\nWeight:\n\nAn unsigned 8-bit integer.\n\nThe PRIORITY frame does not define any flags.\n\nThe PRIORITY frame always identifies a stream. If a PRIORITY frame is received with a stream identifier of 0x00, the recipient *MUST* respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nSending or receiving a PRIORITY frame does not affect the state of any stream (Section 5.1). The PRIORITY frame can be sent on a stream in any state, including \"idle\" or \"closed\". A PRIORITY frame cannot be sent between consecutive frames that comprise a single field block (Section 4.3).\n\nA PRIORITY frame with a length other than 5 octets *MUST* be treated as a stream error (Section 5.4.2) of type FRAME_SIZE_ERROR.\n\n### 6.4. RST_STREAM\n\nThe RST_STREAM frame (type=0x03) allows for immediate termination of a stream. RST_STREAM is sent to request cancellation of a stream or to indicate that an error condition has occurred.\n\n```\nRST_STREAM Frame {\n Length (24) = 0x04,\n Type (8) = 0x03,\n\n Unused Flags (8),\n\n Reserved (1),\n Stream Identifier (31),\n\n Error Code (32),\n}\n```\n\nFigure 6: RST_STREAM Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in Section 4. Additionally, the RST_STREAM frame contains a single unsigned, 32-bit integer identifying the error code (Section 7). The error code indicates why the stream is being terminated.\n\nThe RST_STREAM frame does not define any flags.\n\nThe RST_STREAM frame fully terminates the referenced stream and causes it to enter the \"closed\" state. After receiving a RST_STREAM on a stream, the receiver *MUST NOT* send additional frames for that stream, except for PRIORITY. However, after sending the RST_STREAM, the sending endpoint *MUST* be prepared to receive and process additional frames sent on the stream that might have been sent by the peer prior to the arrival of the RST_STREAM.\n\nRST_STREAM frames *MUST* be associated with a stream. If a RST_STREAM frame is received with a stream identifier of 0x00, the recipient *MUST* treat this as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nRST_STREAM frames *MUST NOT* be sent for a stream in the \"idle\" state. If a RST_STREAM frame identifying an idle stream is received, the recipient *MUST* treat this as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nA RST_STREAM frame with a length other than 4 octets *MUST* be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR.\n\n### 6.5. SETTINGS\n\nThe SETTINGS frame (type=0x04) conveys configuration parameters that affect how endpoints communicate, such as preferences and constraints on peer behavior. The SETTINGS frame is also used to acknowledge the receipt of those settings. Individually, a configuration parameter from a SETTINGS frame is referred to as a \"setting\".\n\nSettings are not negotiated; they describe characteristics of the sending peer, which are used by the receiving peer. Different values for the same setting can be advertised by each peer. For example, a client might set a high initial flow-control window, whereas a server might set a lower value to conserve resources.\n\nA SETTINGS frame *MUST* be sent by both endpoints at the start of a connection and *MAY* be sent at any other time by either endpoint over the lifetime of the connection. Implementations *MUST* support all of the settings defined by this specification.\n\nEach parameter in a SETTINGS frame replaces any existing value for that parameter. Settings are processed in the order in which they appear, and a receiver of a SETTINGS frame does not need to maintain any state other than the current value of each setting. Therefore, the value of a SETTINGS parameter is the last value that is seen by a receiver.\n\nSETTINGS frames are acknowledged by the receiving peer. To enable this, the SETTINGS frame defines the ACK flag:\n\nACK (0x01):\n\nWhen set, the ACK flag indicates that this frame acknowledges receipt and application of the peer's SETTINGS frame. When this bit is set, the frame payload of the SETTINGS frame *MUST* be empty. Receipt of a SETTINGS frame with the ACK flag set and a length field value other than 0 *MUST* be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR. For more information, see Section 6.5.3 (\"Settings Synchronization\").\n\nSETTINGS frames always apply to a connection, never a single stream. The stream identifier for a SETTINGS frame *MUST* be zero (0x00). If an endpoint receives a SETTINGS frame whose Stream Identifier field is anything other than 0x00, the endpoint *MUST* respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nThe SETTINGS frame affects connection state. A badly formed or incomplete SETTINGS frame *MUST* be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nA SETTINGS frame with a length other than a multiple of 6 octets *MUST* be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR.\n\n#### 6.5.1. SETTINGS Format\n\nThe frame payload of a SETTINGS frame consists of zero or more settings, each consisting of an unsigned 16-bit setting identifier and an unsigned 32-bit value.\n\n```\nSETTINGS Frame {\n Length (24),\n Type (8) = 0x04,\n\n Unused Flags (7),\n ACK Flag (1),\n\n Reserved (1),\n Stream Identifier (31) = 0,\n\n Setting (48) ...,\n}\n\nSetting {\n Identifier (16),\n Value (32),\n}\n```\n\nFigure 7: SETTINGS Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in Section 4. The frame payload of a SETTINGS frame contains any number of Setting fields, each of which consists of:\n\nIdentifier:\n\nA 16-bit setting identifier; see Section 6.5.2.\n\nValue:\n\nA 32-bit value for the setting.\n\n#### 6.5.2. Defined Settings\n\nThe following settings are defined:\n\nThis setting allows the sender to inform the remote endpoint of the maximum size of the compression table used to decode field blocks, in units of octets. The encoder can select any size equal to or less than this value by using signaling specific to the compression format inside a field block (see [COMPRESSION]). The initial value is 4,096 octets.\n\nSETTINGS_ENABLE_PUSH (0x02):\n\nThis setting can be used to enable or disable server push. A server *MUST NOT* send a PUSH_PROMISE frame if it receives this parameter set to a value of 0; see Section 8.4. A client that has both set this parameter to 0 and had it acknowledged *MUST* treat the receipt of a PUSH_PROMISE frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.The initial value of SETTINGS_ENABLE_PUSH is 1. For a client, this value indicates that it is willing to receive PUSH_PROMISE frames. For a server, this initial value has no effect, and is equivalent to the value 0. Any value other than 0 or 1 *MUST* be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.A server *MUST NOT* explicitly set this value to 1. A server *MAY* choose to omit this setting when it sends a SETTINGS frame, but if a server does include a value, it *MUST* be 0. A client *MUST* treat receipt of a SETTINGS frame with SETTINGS_ENABLE_PUSH set to 1 as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nSETTINGS_MAX_CONCURRENT_STREAMS (0x03):\n\nThis setting indicates the maximum number of concurrent streams that the sender will allow. This limit is directional: it applies to the number of streams that the sender permits the receiver to create. Initially, there is no limit to this value. It is recommended that this value be no smaller than 100, so as to not unnecessarily limit parallelism.A value of 0 for SETTINGS_MAX_CONCURRENT_STREAMS *SHOULD NOT* be treated as special by endpoints. A zero value does prevent the creation of new streams; however, this can also happen for any limit that is exhausted with active streams. Servers *SHOULD* only set a zero value for short durations; if a server does not wish to accept requests, closing the connection is more appropriate.\n\nSETTINGS_INITIAL_WINDOW_SIZE (0x04):\n\nThis setting indicates the sender's initial window size (in units of octets) for stream-level flow control. The initial value is 216-1 (65,535) octets.This setting affects the window size of all streams (see Section 6.9.2).Values above the maximum flow-control window size of 231-1 *MUST* be treated as a connection error (Section 5.4.1) of type FLOW_CONTROL_ERROR.\n\nSETTINGS_MAX_FRAME_SIZE (0x05):\n\nThis setting indicates the size of the largest frame payload that the sender is willing to receive, in units of octets.The initial value is 214 (16,384) octets. The value advertised by an endpoint *MUST* be between this initial value and the maximum allowed frame size (224-1 or 16,777,215 octets), inclusive. Values outside this range *MUST* be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nThis advisory setting informs a peer of the maximum field section size that the sender is prepared to accept, in units of octets. The value is based on the uncompressed size of field lines, including the length of the name and value in units of octets plus an overhead of 32 octets for each field line.For any given request, a lower limit than what is advertised *MAY* be enforced. The initial value of this setting is unlimited.\n\nAn endpoint that receives a SETTINGS frame with any unknown or unsupported identifier *MUST* ignore that setting.\n\n#### 6.5.3. Settings Synchronization\n\nMost values in SETTINGS benefit from or require an understanding of when the peer has received and applied the changed parameter values. In order to provide such synchronization timepoints, the recipient of a SETTINGS frame in which the ACK flag is not set *MUST* apply the updated settings as soon as possible upon receipt. SETTINGS frames are acknowledged in the order in which they are received.\n\nThe values in the SETTINGS frame *MUST* be processed in the order they appear, with no other frame processing between values. Unsupported settings *MUST* be ignored. Once all values have been processed, the recipient *MUST* immediately emit a SETTINGS frame with the ACK flag set. Upon receiving a SETTINGS frame with the ACK flag set, the sender of the altered settings can rely on the values from the oldest unacknowledged SETTINGS frame having been applied.\n\nIf the sender of a SETTINGS frame does not receive an acknowledgment within a reasonable amount of time, it *MAY* issue a connection error (Section 5.4.1) of type SETTINGS_TIMEOUT. In setting a timeout, some allowance needs to be made for processing delays at the peer; a timeout that is solely based on the round-trip time between endpoints might result in spurious errors.\n\n### 6.6. PUSH_PROMISE\n\nThe PUSH_PROMISE frame (type=0x05) is used to notify the peer endpoint in advance of streams the sender intends to initiate. The PUSH_PROMISE frame includes the unsigned 31-bit identifier of the stream the endpoint plans to create along with a field section that provides additional context for the stream. Section 8.4 contains a thorough description of the use of PUSH_PROMISE frames.\n\n```\nPUSH_PROMISE Frame {\n Length (24),\n Type (8) = 0x05,\n\n Unused Flags (4),\n PADDED Flag (1),\n END_HEADERS Flag (1),\n Unused Flags (2),\n\n Reserved (1),\n Stream Identifier (31),\n\n [Pad Length (8)],\n Reserved (1),\n Promised Stream ID (31),\n Field Block Fragment (..),\n Padding (..2040),\n}\n```\n\nFigure 8: PUSH_PROMISE Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in Section 4. The PUSH_PROMISE frame payload has the following additional fields:\n\nPad Length:\n\nAn 8-bit field containing the length of the frame padding in units of octets. This field is only present if the PADDED flag is set.\n\nPromised Stream ID:\n\nAn unsigned 31-bit integer that identifies the stream that is reserved by the PUSH_PROMISE. The promised stream identifier *MUST* be a valid choice for the next stream sent by the sender (see \"new stream identifier\" in Section 5.1.1).\n\nField Block Fragment:\n\nA field block fragment (Section 4.3) containing the request control data and a header section.\n\nPadding:\n\nPadding octets that contain no application semantic value. Padding octets *MUST* be set to zero when sending. A receiver is not obligated to verify padding but *MAY* treat non-zero padding as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nThe PUSH_PROMISE frame defines the following flags:\n\nPADDED (0x08):\n\nWhen set, the PADDED flag indicates that the Pad Length field and any padding that it describes are present.\n\nEND_HEADERS (0x04):\n\nWhen set, the END_HEADERS flag indicates that this frame contains an entire field block (Section 4.3) and is not followed by any CONTINUATION frames.A PUSH_PROMISE frame without the END_HEADERS flag set *MUST* be followed by a CONTINUATION frame for the same stream. A receiver *MUST* treat the receipt of any other type of frame or a frame on a different stream as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nPUSH_PROMISE frames *MUST* only be sent on a peer-initiated stream that is in either the \"open\" or \"half-closed (remote)\" state. The stream identifier of a PUSH_PROMISE frame indicates the stream it is associated with. If the Stream Identifier field specifies the value 0x00, a recipient *MUST* respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nPromised streams are not required to be used in the order they are promised. The PUSH_PROMISE only reserves stream identifiers for later use.\n\nPUSH_PROMISE *MUST NOT* be sent if the SETTINGS_ENABLE_PUSH setting of the peer endpoint is set to 0. An endpoint that has set this setting and has received acknowledgment *MUST* treat the receipt of a PUSH_PROMISE frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nRecipients of PUSH_PROMISE frames can choose to reject promised streams by returning a RST_STREAM referencing the promised stream identifier back to the sender of the PUSH_PROMISE.\n\nA PUSH_PROMISE frame modifies the connection state in two ways. First, the inclusion of a field block (Section 4.3) potentially modifies the state maintained for field section compression. Second, PUSH_PROMISE also reserves a stream for later use, causing the promised stream to enter the \"reserved (local)\" or \"reserved (remote)\" state. A sender *MUST NOT* send a PUSH_PROMISE on a stream unless that stream is either \"open\" or \"half-closed (remote)\"; the sender *MUST* ensure that the promised stream is a valid choice for a new stream identifier (Section 5.1.1) (that is, the promised stream *MUST* be in the \"idle\" state).\n\nSince PUSH_PROMISE reserves a stream, ignoring a PUSH_PROMISE frame causes the stream state to become indeterminate. A receiver *MUST* treat the receipt of a PUSH_PROMISE on a stream that is neither \"open\" nor \"half-closed (local)\" as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. However, an endpoint that has sent RST_STREAM on the associated stream *MUST* handle PUSH_PROMISE frames that might have been created before the RST_STREAM frame is received and processed.\n\nA receiver *MUST* treat the receipt of a PUSH_PROMISE that promises an illegal stream identifier (Section 5.1.1) as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. Note that an illegal stream identifier is an identifier for a stream that is not currently in the \"idle\" state.\n\nThe total number of padding octets is determined by the value of the Pad Length field. If the length of the padding is the length of the frame payload or greater, the recipient *MUST* treat this as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\n### 6.7. PING\n\nThe PING frame (type=0x06) is a mechanism for measuring a minimal round-trip time from the sender, as well as determining whether an idle connection is still functional. PING frames can be sent from any endpoint.\n\n```\nPING Frame {\n Length (24) = 0x08,\n Type (8) = 0x06,\n\n Unused Flags (7),\n ACK Flag (1),\n\n Reserved (1),\n Stream Identifier (31) = 0,\n\n Opaque Data (64),\n}\n```\n\nFigure 9: PING Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in Section 4.\n\nIn addition to the frame header, PING frames *MUST* contain 8 octets of opaque data in the frame payload. A sender can include any value it chooses and use those octets in any fashion.\n\nReceivers of a PING frame that does not include an ACK flag *MUST* send a PING frame with the ACK flag set in response, with an identical frame payload. PING responses *SHOULD* be given higher priority than any other frame.\n\nThe PING frame defines the following flags:\n\nACK (0x01):\n\nWhen set, the ACK flag indicates that this PING frame is a PING response. An endpoint *MUST* set this flag in PING responses. An endpoint *MUST NOT* respond to PING frames containing this flag.\n\nPING frames are not associated with any individual stream. If a PING frame is received with a Stream Identifier field value other than 0x00, the recipient *MUST* respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nReceipt of a PING frame with a length field value other than 8 *MUST* be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR.\n\n### 6.8. GOAWAY\n\nThe GOAWAY frame (type=0x07) is used to initiate shutdown of a connection or to signal serious error conditions. GOAWAY allows an endpoint to gracefully stop accepting new streams while still finishing processing of previously established streams. This enables administrative actions, like server maintenance.\n\nThere is an inherent race condition between an endpoint starting new streams and the remote peer sending a GOAWAY frame. To deal with this case, the GOAWAY contains the stream identifier of the last peer-initiated stream that was or might be processed on the sending endpoint in this connection. For instance, if the server sends a GOAWAY frame, the identified stream is the highest-numbered stream initiated by the client.\n\nOnce the GOAWAY is sent, the sender will ignore frames sent on streams initiated by the receiver if the stream has an identifier higher than the included last stream identifier. Receivers of a GOAWAY frame *MUST NOT* open additional streams on the connection, although a new connection can be established for new streams.\n\nIf the receiver of the GOAWAY has sent data on streams with a higher stream identifier than what is indicated in the GOAWAY frame, those streams are not or will not be processed. The receiver of the GOAWAY frame can treat the streams as though they had never been created at all, thereby allowing those streams to be retried later on a new connection.\n\nEndpoints *SHOULD* always send a GOAWAY frame before closing a connection so that the remote peer can know whether a stream has been partially processed or not. For example, if an HTTP client sends a POST at the same time that a server closes a connection, the client cannot know if the server started to process that POST request if the server does not send a GOAWAY frame to indicate what streams it might have acted on.\n\nAn endpoint might choose to close a connection without sending a GOAWAY for misbehaving peers.\n\nA GOAWAY frame might not immediately precede closing of the connection; a receiver of a GOAWAY that has no more use for the connection *SHOULD* still send a GOAWAY frame before terminating the connection.\n\n```\nGOAWAY Frame {\n Length (24),\n Type (8) = 0x07,\n\n Unused Flags (8),\n\n Reserved (1),\n Stream Identifier (31) = 0,\n\n Reserved (1),\n Last-Stream-ID (31),\n Error Code (32),\n Additional Debug Data (..),\n}\n```\n\nFigure 10: GOAWAY Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in Section 4.\n\nThe GOAWAY frame does not define any flags.\n\nThe GOAWAY frame applies to the connection, not a specific stream. An endpoint *MUST* treat a GOAWAY frame with a stream identifier other than 0x00 as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nThe last stream identifier in the GOAWAY frame contains the highest-numbered stream identifier for which the sender of the GOAWAY frame might have taken some action on or might yet take action on. All streams up to and including the identified stream might have been processed in some way. The last stream identifier can be set to 0 if no streams were processed.\n\nIf a connection terminates without a GOAWAY frame, the last stream identifier is effectively the highest possible stream identifier.\n\nOn streams with lower- or equal-numbered identifiers that were not closed completely prior to the connection being closed, reattempting requests, transactions, or any protocol activity is not possible, except for idempotent actions like HTTP GET, PUT, or DELETE. Any protocol activity that uses higher-numbered streams can be safely retried using a new connection.\n\nActivity on streams numbered lower than or equal to the last stream identifier might still complete successfully. The sender of a GOAWAY frame might gracefully shut down a connection by sending a GOAWAY frame, maintaining the connection in an \"open\" state until all in-progress streams complete.\n\nAn endpoint *MAY* send multiple GOAWAY frames if circumstances change. For instance, an endpoint that sends GOAWAY with NO_ERROR during graceful shutdown could subsequently encounter a condition that requires immediate termination of the connection. The last stream identifier from the last GOAWAY frame received indicates which streams could have been acted upon. Endpoints *MUST NOT* increase the value they send in the last stream identifier, since the peers might already have retried unprocessed requests on another connection.\n\nA client that is unable to retry requests loses all requests that are in flight when the server closes the connection. This is especially true for intermediaries that might not be serving clients using HTTP/2. A server that is attempting to gracefully shut down a connection *SHOULD* send an initial GOAWAY frame with the last stream identifier set to 231-1 and a NO_ERROR code. This signals to the client that a shutdown is imminent and that initiating further requests is prohibited. After allowing time for any in-flight stream creation (at least one round-trip time), the server *MAY* send another GOAWAY frame with an updated last stream identifier. This ensures that a connection can be cleanly shut down without losing requests.\n\nAfter sending a GOAWAY frame, the sender can discard frames for streams initiated by the receiver with identifiers higher than the identified last stream. However, any frames that alter connection state cannot be completely ignored. For instance, HEADERS, PUSH_PROMISE, and CONTINUATION frames *MUST* be minimally processed to ensure that the state maintained for field section compression is consistent (see Section 4.3); similarly, DATA frames *MUST* be counted toward the connection flow-control window. Failure to process these frames can cause flow control or field section compression state to become unsynchronized.\n\nThe GOAWAY frame also contains a 32-bit error code (Section 7) that contains the reason for closing the connection.\n\nEndpoints *MAY* append opaque data to the frame payload of any GOAWAY frame. Additional debug data is intended for diagnostic purposes only and carries no semantic value. Debug information could contain security- or privacy-sensitive data. Logged or otherwise persistently stored debug data *MUST* have adequate safeguards to prevent unauthorized access.\n\n### 6.9. WINDOW_UPDATE\n\nThe WINDOW_UPDATE frame (type=0x08) is used to implement flow control; see Section 5.2 for an overview.\n\nFlow control operates at two levels: on each individual stream and on the entire connection.\n\nBoth types of flow control are hop by hop, that is, only between the two endpoints. Intermediaries do not forward WINDOW_UPDATE frames between dependent connections. However, throttling of data transfer by any receiver can indirectly cause the propagation of flow-control information toward the original sender.\n\nFlow control only applies to frames that are identified as being subject to flow control. Of the frame types defined in this document, this includes only DATA frames. Frames that are exempt from flow control *MUST* be accepted and processed, unless the receiver is unable to assign resources to handling the frame. A receiver *MAY* respond with a stream error (Section 5.4.2) or connection error (Section 5.4.1) of type FLOW_CONTROL_ERROR if it is unable to accept a frame.\n\n```\nWINDOW_UPDATE Frame {\n Length (24) = 0x04,\n Type (8) = 0x08,\n\n Unused Flags (8),\n\n Reserved (1),\n Stream Identifier (31),\n\n Reserved (1),\n Window Size Increment (31),\n}\n```\n\nFigure 11: WINDOW_UPDATE Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in Section 4. The frame payload of a WINDOW_UPDATE frame is one reserved bit plus an unsigned 31-bit integer indicating the number of octets that the sender can transmit in addition to the existing flow-control window. The legal range for the increment to the flow-control window is 1 to 231-1 (2,147,483,647) octets.\n\nThe WINDOW_UPDATE frame does not define any flags.\n\nThe WINDOW_UPDATE frame can be specific to a stream or to the entire connection. In the former case, the frame's stream identifier indicates the affected stream; in the latter, the value \"0\" indicates that the entire connection is the subject of the frame.\n\nA receiver *MUST* treat the receipt of a WINDOW_UPDATE frame with a flow-control window increment of 0 as a stream error (Section 5.4.2) of type PROTOCOL_ERROR; errors on the connection flow-control window *MUST* be treated as a connection error (Section 5.4.1).\n\nWINDOW_UPDATE can be sent by a peer that has sent a frame with the END_STREAM flag set. This means that a receiver could receive a WINDOW_UPDATE frame on a stream in a \"half-closed (remote)\" or \"closed\" state. A receiver *MUST NOT* treat this as an error (see Section 5.1).\n\nA receiver that receives a flow-controlled frame *MUST* always account for its contribution against the connection flow-control window, unless the receiver treats this as a connection error (Section 5.4.1). This is necessary even if the frame is in error. The sender counts the frame toward the flow-control window, but if the receiver does not, the flow-control window at the sender and receiver can become different.\n\nA WINDOW_UPDATE frame with a length other than 4 octets *MUST* be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR.\n\n#### 6.9.1. The Flow-Control Window\n\nFlow control in HTTP/2 is implemented using a window kept by each sender on every stream. The flow-control window is a simple integer value that indicates how many octets of data the sender is permitted to transmit; as such, its size is a measure of the buffering capacity of the receiver.\n\nTwo flow-control windows are applicable: the stream flow-control window and the connection flow-control window. The sender *MUST NOT* send a flow-controlled frame with a length that exceeds the space available in either of the flow-control windows advertised by the receiver. Frames with zero length with the END_STREAM flag set (that is, an empty DATA frame) *MAY* be sent if there is no available space in either flow-control window.\n\nFor flow-control calculations, the 9-octet frame header is not counted.\n\nAfter sending a flow-controlled frame, the sender reduces the space available in both windows by the length of the transmitted frame.\n\nThe receiver of a frame sends a WINDOW_UPDATE frame as it consumes data and frees up space in flow-control windows. Separate WINDOW_UPDATE frames are sent for the stream- and connection-level flow-control windows. Receivers are advised to have mechanisms in place to avoid sending WINDOW_UPDATE frames with very small increments; see [Section 4.2.3.3](https://www.rfc-editor.org/rfc/rfc1122.html#section-4.2.3.3) of [RFC1122].\n\nA sender that receives a WINDOW_UPDATE frame updates the corresponding window by the amount specified in the frame.\n\nA sender *MUST NOT* allow a flow-control window to exceed 231-1 octets. If a sender receives a WINDOW_UPDATE that causes a flow-control window to exceed this maximum, it *MUST* terminate either the stream or the connection, as appropriate. For streams, the sender sends a RST_STREAM with an error code of FLOW_CONTROL_ERROR; for the connection, a GOAWAY frame with an error code of FLOW_CONTROL_ERROR is sent.\n\nFlow-controlled frames from the sender and WINDOW_UPDATE frames from the receiver are completely asynchronous with respect to each other. This property allows a receiver to aggressively update the window size kept by the sender to prevent streams from stalling.\n\n#### 6.9.2. Initial Flow-Control Window Size\n\nWhen an HTTP/2 connection is first established, new streams are created with an initial flow-control window size of 65,535 octets. The connection flow-control window is also 65,535 octets. Both endpoints can adjust the initial window size for new streams by including a value for SETTINGS_INITIAL_WINDOW_SIZE in the SETTINGS frame. The connection flow-control window can only be changed using WINDOW_UPDATE frames.\n\nPrior to receiving a SETTINGS frame that sets a value for SETTINGS_INITIAL_WINDOW_SIZE, an endpoint can only use the default initial window size when sending flow-controlled frames. Similarly, the connection flow-control window is set based on the default initial window size until a WINDOW_UPDATE frame is received.\n\nIn addition to changing the flow-control window for streams that are not yet active, a SETTINGS frame can alter the initial flow-control window size for streams with active flow-control windows (that is, streams in the \"open\" or \"half-closed (remote)\" state). When the value of SETTINGS_INITIAL_WINDOW_SIZE changes, a receiver *MUST* adjust the size of all stream flow-control windows that it maintains by the difference between the new value and the old value.\n\nA change to SETTINGS_INITIAL_WINDOW_SIZE can cause the available space in a flow-control window to become negative. A sender *MUST* track the negative flow-control window and *MUST NOT* send new flow-controlled frames until it receives WINDOW_UPDATE frames that cause the flow-control window to become positive.\n\nFor example, if the client sends 60 KB immediately on connection establishment and the server sets the initial window size to be 16 KB, the client will recalculate the available flow-control window to be -44 KB on receipt of the SETTINGS frame. The client retains a negative flow-control window until WINDOW_UPDATE frames restore the window to being positive, after which the client can resume sending.\n\nA SETTINGS frame cannot alter the connection flow-control window.\n\nAn endpoint *MUST* treat a change to SETTINGS_INITIAL_WINDOW_SIZE that causes any flow-control window to exceed the maximum size as a connection error (Section 5.4.1) of type FLOW_CONTROL_ERROR.\n\n#### 6.9.3. Reducing the Stream Window Size\n\nA receiver that wishes to use a smaller flow-control window than the current size can send a new SETTINGS frame. However, the receiver *MUST* be prepared to receive data that exceeds this window size, since the sender might send data that exceeds the lower limit prior to processing the SETTINGS frame.\n\nAfter sending a SETTINGS frame that reduces the initial flow-control window size, a receiver *MAY* continue to process streams that exceed flow-control limits. Allowing streams to continue does not allow the receiver to immediately reduce the space it reserves for flow-control windows. Progress on these streams can also stall, since WINDOW_UPDATE frames are needed to allow the sender to resume sending. The receiver *MAY* instead send a RST_STREAM with an error code of FLOW_CONTROL_ERROR for the affected streams.\n\n### 6.10. CONTINUATION\n\nThe CONTINUATION frame (type=0x09) is used to continue a sequence of field block fragments (Section 4.3). Any number of CONTINUATION frames can be sent, as long as the preceding frame is on the same stream and is a HEADERS, PUSH_PROMISE, or CONTINUATION frame without the END_HEADERS flag set.\n\n```\nCONTINUATION Frame {\n Length (24),\n Type (8) = 0x09,\n\n Unused Flags (5),\n END_HEADERS Flag (1),\n Unused Flags (2),\n\n Reserved (1),\n Stream Identifier (31),\n\n Field Block Fragment (..),\n}\n```\n\nFigure 12: CONTINUATION Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in Section 4. The CONTINUATION frame payload contains a field block fragment (Section 4.3).\n\nThe CONTINUATION frame defines the following flag:\n\nEND_HEADERS (0x04):\n\nWhen set, the END_HEADERS flag indicates that this frame ends a field block (Section 4.3).If the END_HEADERS flag is not set, this frame *MUST* be followed by another CONTINUATION frame. A receiver *MUST* treat the receipt of any other type of frame or a frame on a different stream as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nThe CONTINUATION frame changes the connection state as defined in Section 4.3.\n\nCONTINUATION frames *MUST* be associated with a stream. If a CONTINUATION frame is received with a Stream Identifier field of 0x00, the recipient *MUST* respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nA CONTINUATION frame *MUST* be preceded by a HEADERS, PUSH_PROMISE or CONTINUATION frame without the END_HEADERS flag set. A recipient that observes violation of this rule *MUST* respond with a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\n---\n\n## 7. Error Codes\n\nError codes are 32-bit fields that are used in RST_STREAM and GOAWAY frames to convey the reasons for the stream or connection error.\n\nError codes share a common code space. Some error codes apply only to either streams or the entire connection and have no defined semantics in the other context.\n\nThe following error codes are defined:\n\nNO_ERROR (0x00):\n\nThe associated condition is not a result of an error. For example, a GOAWAY might include this code to indicate graceful shutdown of a connection.\n\nPROTOCOL_ERROR (0x01):\n\nThe endpoint detected an unspecific protocol error. This error is for use when a more specific error code is not available.\n\nINTERNAL_ERROR (0x02):\n\nThe endpoint encountered an unexpected internal error.\n\nFLOW_CONTROL_ERROR (0x03):\n\nThe endpoint detected that its peer violated the flow-control protocol.\n\nSETTINGS_TIMEOUT (0x04):\n\nThe endpoint sent a SETTINGS frame but did not receive a response in a timely manner. See Section 6.5.3 (\"Settings Synchronization\").\n\nSTREAM_CLOSED (0x05):\n\nThe endpoint received a frame after a stream was half-closed.\n\nFRAME_SIZE_ERROR (0x06):\n\nThe endpoint received a frame with an invalid size.\n\nREFUSED_STREAM (0x07):\n\nThe endpoint refused the stream prior to performing any application processing (see Section 8.7 for details).\n\nCANCEL (0x08):\n\nThe endpoint uses this error code to indicate that the stream is no longer needed.\n\nCOMPRESSION_ERROR (0x09):\n\nThe endpoint is unable to maintain the field section compression context for the connection.\n\nCONNECT_ERROR (0x0a):\n\nThe connection established in response to a CONNECT request (Section 8.5) was reset or abnormally closed.\n\nENHANCE_YOUR_CALM (0x0b):\n\nThe endpoint detected that its peer is exhibiting a behavior that might be generating excessive load.\n\nINADEQUATE_SECURITY (0x0c):\n\nThe underlying transport has properties that do not meet minimum security requirements (see Section 9.2).\n\nHTTP_1_1_REQUIRED (0x0d):\n\nThe endpoint requires that HTTP/1.1 be used instead of HTTP/2.\n\nUnknown or unsupported error codes *MUST NOT* trigger any special behavior. These *MAY* be treated by an implementation as being equivalent to INTERNAL_ERROR.\n\n---\n\n## 8. Expressing HTTP Semantics in HTTP/2\n\nHTTP/2 is an instantiation of the HTTP message abstraction ([Section 6](https://www.rfc-editor.org/rfc/rfc9110.html#section-6) of [HTTP]).\n\n### 8.1. HTTP Message Framing\n\nA client sends an HTTP request on a new stream, using a previously unused stream identifier (Section 5.1.1). A server sends an HTTP response on the same stream as the request.\n\nAn HTTP message (request or response) consists of:\n\n1. one HEADERS frame (followed by zero or more CONTINUATION frames) containing the header section (see [Section 6.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.3) of [HTTP] ),\n2. zero or more DATA frames containing the message content (see [Section 6.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.4) of [HTTP] ), and\n3. optionally, one HEADERS frame (followed by zero or more CONTINUATION frames) containing the trailer section, if present (see [Section 6.5](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.5) of [HTTP] ).\n\nFor a response only, a server *MAY* send any number of interim responses before the HEADERS frame containing a final response. An interim response consists of a HEADERS frame (which might be followed by zero or more CONTINUATION frames) containing the control data and header section of an interim (1xx) HTTP response (see [Section 15](https://www.rfc-editor.org/rfc/rfc9110.html#section-15) of [HTTP]). A HEADERS frame with the END_STREAM flag set that carries an informational status code is malformed (Section 8.1.1).\n\nThe last frame in the sequence bears an END_STREAM flag, noting that a HEADERS frame with the END_STREAM flag set can be followed by CONTINUATION frames that carry any remaining fragments of the field block.\n\nOther frames (from any stream) *MUST NOT* occur between the HEADERS frame and any CONTINUATION frames that might follow.\n\nHTTP/2 uses DATA frames to carry message content. The chunked transfer encoding defined in [Section 7.1](https://www.rfc-editor.org/rfc/rfc9112.html#section-7.1) of [HTTP/1.1] cannot be used in HTTP/2; see Section 8.2.2.\n\nTrailer fields are carried in a field block that also terminates the stream. That is, trailer fields comprise a sequence starting with a HEADERS frame, followed by zero or more CONTINUATION frames, where the HEADERS frame bears an END_STREAM flag. Trailers *MUST NOT* include pseudo-header fields (Section 8.3). An endpoint that receives pseudo-header fields in trailers *MUST* treat the request or response as malformed (Section 8.1.1).\n\nAn endpoint that receives a HEADERS frame without the END_STREAM flag set after receiving the HEADERS frame that opens a request or after receiving a final (non-informational) status code *MUST* treat the corresponding request or response as malformed (Section 8.1.1).\n\nAn HTTP request/response exchange fully consumes a single stream. A request starts with the HEADERS frame that puts the stream into the \"open\" state. The request ends with a frame with the END_STREAM flag set, which causes the stream to become \"half-closed (local)\" for the client and \"half-closed (remote)\" for the server. A response stream starts with zero or more interim responses in HEADERS frames, followed by a HEADERS frame containing a final status code.\n\nAn HTTP response is complete after the server sends -- or the client receives -- a frame with the END_STREAM flag set (including any CONTINUATION frames needed to complete a field block). A server can send a complete response prior to the client sending an entire request if the response does not depend on any portion of the request that has not been sent and received. When this is true, a server *MAY* request that the client abort transmission of a request without error by sending a RST_STREAM with an error code of NO_ERROR after sending a complete response (i.e., a frame with the END_STREAM flag set). Clients *MUST NOT* discard responses as a result of receiving such a RST_STREAM, though clients can always discard responses at their discretion for other reasons.\n\n#### 8.1.1. Malformed Messages\n\nA malformed request or response is one that is an otherwise valid sequence of HTTP/2 frames but is invalid due to the presence of extraneous frames, prohibited fields or pseudo-header fields, the absence of mandatory pseudo-header fields, the inclusion of uppercase field names, or invalid field names and/or values (in certain circumstances; see Section 8.2).\n\nA request or response that includes message content can include a content-length header field. A request or response is also malformed if the value of a content-length header field does not equal the sum of the DATA frame payload lengths that form the content, unless the message is defined as having no content. For example, 204 or 304 responses contain no content, as does the response to a HEAD request. A response that is defined to have no content, as described in [Section 6.4.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.4.1) of [HTTP], *MAY* have a non-zero content-length header field, even though no content is included in DATA frames.\n\nIntermediaries that process HTTP requests or responses (i.e., any intermediary not acting as a tunnel) *MUST NOT* forward a malformed request or response. Malformed requests or responses that are detected *MUST* be treated as a stream error (Section 5.4.2) of type PROTOCOL_ERROR.\n\nFor malformed requests, a server *MAY* send an HTTP response prior to closing or resetting the stream. Clients *MUST NOT* accept a malformed response.\n\nEndpoints that progressively process messages might have performed some processing before identifying a request or response as malformed. For instance, it might be possible to generate an informational or 404 status code without having received a complete request. Similarly, intermediaries might forward incomplete messages before detecting errors. A server *MAY* generate a final response before receiving an entire request when the response does not depend on the remainder of the request being correct.\n\nThese requirements are intended to protect against several types of common attacks against HTTP; they are deliberately strict because being permissive can expose implementations to these vulnerabilities.\n\n### 8.2. HTTP Fields\n\nHTTP fields ([Section 5](https://www.rfc-editor.org/rfc/rfc9110.html#section-5) of [HTTP]) are conveyed by HTTP/2 in the HEADERS, CONTINUATION, and PUSH_PROMISE frames, compressed with HPACK [COMPRESSION].\n\nField names *MUST* be converted to lowercase when constructing an HTTP/2 message.\n\n#### 8.2.1. Field Validity\n\nThe definitions of field names and values in HTTP prohibit some characters that HPACK might be able to convey. HTTP/2 implementations *SHOULD* validate field names and values according to their definitions in Sections [5.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.1) and [5.5](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.5) of [HTTP], respectively, and treat messages that contain prohibited characters as malformed (Section 8.1.1).\n\nFailure to validate fields can be exploited for request smuggling attacks. In particular, unvalidated fields might enable attacks when messages are forwarded using HTTP/1.1 [HTTP/1.1], where characters such as carriage return (CR), line feed (LF), and COLON are used as delimiters. Implementations *MUST* perform the following minimal validation of field names and values:\n\n- A field name *MUST NOT* contain characters in the ranges 0x00-0x20, 0x41-0x5a, or 0x7f-0xff (all ranges inclusive). This specifically excludes all non-visible ASCII characters, ASCII SP (0x20), and uppercase characters ('A' to 'Z', ASCII 0x41 to 0x5a).\n- With the exception of pseudo-header fields ( Section 8.3 ), which have a name that starts with a single colon, field names *MUST NOT* include a colon (ASCII COLON, 0x3a).\n- A field value *MUST NOT* contain the zero value (ASCII NUL, 0x00), line feed (ASCII LF, 0x0a), or carriage return (ASCII CR, 0x0d) at any position.\n- A field value *MUST NOT* start or end with an ASCII whitespace character (ASCII SP or HTAB, 0x20 or 0x09).\n\nA request or response that contains a field that violates any of these conditions *MUST* be treated as malformed (Section 8.1.1). In particular, an intermediary that does not process fields when forwarding messages *MUST NOT* forward fields that contain any of the values that are listed as prohibited above.\n\nWhen a request message violates one of these requirements, an implementation *SHOULD* generate a 400 (Bad Request) status code (see [Section 15.5.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.1) of [HTTP]), unless a more suitable status code is defined or the status code cannot be sent (e.g., because the error occurs in a trailer field).\n\n#### 8.2.2. Connection-Specific Header Fields\n\nHTTP/2 does not use the Connection header field ([Section 7.6.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.6.1) of [HTTP]) to indicate connection-specific header fields; in this protocol, connection-specific metadata is conveyed by other means. An endpoint *MUST NOT* generate an HTTP/2 message containing connection-specific header fields. This includes the Connection header field and those listed as having connection-specific semantics in [Section 7.6.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.6.1) of [HTTP] (that is, Proxy-Connection, Keep-Alive, Transfer-Encoding, and Upgrade). Any message containing connection-specific header fields *MUST* be treated as malformed (Section 8.1.1).\n\nThe only exception to this is the TE header field, which *MAY* be present in an HTTP/2 request; when it is, it *MUST NOT* contain any value other than \"trailers\".\n\nAn intermediary transforming an HTTP/1.x message to HTTP/2 *MUST* remove connection-specific header fields as discussed in [Section 7.6.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.6.1) of [HTTP], or their messages will be treated by other HTTP/2 endpoints as malformed (Section 8.1.1).\n\n#### 8.2.3. Compressing the Cookie Header Field\n\nThe Cookie header field [COOKIE] uses a semicolon (\";\") to delimit cookie-pairs (or \"crumbs\"). This header field contains multiple values, but does not use a COMMA (\",\") as a separator, thereby preventing cookie-pairs from being sent on multiple field lines (see [Section 5.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.2) of [HTTP]). This can significantly reduce compression efficiency, as updates to individual cookie-pairs would invalidate any field lines that are stored in the HPACK table.\n\nTo allow for better compression efficiency, the Cookie header field *MAY* be split into separate header fields, each with one or more cookie-pairs. If there are multiple Cookie header fields after decompression, these *MUST* be concatenated into a single octet string using the two-octet delimiter of 0x3b, 0x20 (the ASCII string \"; \") before being passed into a non-HTTP/2 context, such as an HTTP/1.1 connection, or a generic HTTP server application.\n\nTherefore, the following two lists of Cookie header fields are semantically equivalent.\n\n```\ncookie: a=b; c=d; e=f\n\ncookie: a=b\ncookie: c=d\ncookie: e=f\n```\n\n### 8.3. HTTP Control Data\n\nHTTP/2 uses special pseudo-header fields beginning with a ':' character (ASCII 0x3a) to convey message control data (see [Section 6.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.2) of [HTTP]).\n\nPseudo-header fields are not HTTP header fields. Endpoints *MUST NOT* generate pseudo-header fields other than those defined in this document. Note that an extension could negotiate the use of additional pseudo-header fields; see Section 5.5.\n\nPseudo-header fields are only valid in the context in which they are defined. Pseudo-header fields defined for requests *MUST NOT* appear in responses; pseudo-header fields defined for responses *MUST NOT* appear in requests. Pseudo-header fields *MUST NOT* appear in a trailer section. Endpoints *MUST* treat a request or response that contains undefined or invalid pseudo-header fields as malformed (Section 8.1.1).\n\nAll pseudo-header fields *MUST* appear in a field block before all regular field lines. Any request or response that contains a pseudo-header field that appears in a field block after a regular field line *MUST* be treated as malformed (Section 8.1.1).\n\nThe same pseudo-header field name *MUST NOT* appear more than once in a field block. A field block for an HTTP request or response that contains a repeated pseudo-header field name *MUST* be treated as malformed (Section 8.1.1).\n\n#### 8.3.1. Request Pseudo-Header Fields\n\nThe following pseudo-header fields are defined for HTTP/2 requests:\n\n- The \":method\" pseudo-header field includes the HTTP method ([Section 9](https://www.rfc-editor.org/rfc/rfc9110.html#section-9) of [HTTP]).\n- The \":scheme\" pseudo-header field includes the scheme portion of the request target. The scheme is taken from the target URI ([Section 3.1](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.1) of [RFC3986]) when generating a request directly, or from the scheme of a translated request (for example, see [Section 3.3](https://www.rfc-editor.org/rfc/rfc9112.html#section-3.3) of [HTTP/1.1]). Scheme is omitted for CONNECT requests (Section 8.5). \":scheme\" is not restricted to \"http\" and \"https\" schemed URIs. A proxy or gateway can translate requests for non-HTTP schemes, enabling the use of HTTP to interact with non-HTTP services.\n- The \":authority\" pseudo-header field conveys the authority portion ([Section 3.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2) of [RFC3986]) of the target URI ([Section 7.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1) of [HTTP]). The recipient of an HTTP/2 request *MUST NOT* use the Host header field to determine the target URI if \":authority\" is present. Clients that generate HTTP/2 requests directly *MUST* use the \":authority\" pseudo-header field to convey authority information, unless there is no authority information to convey (in which case it *MUST NOT* generate \":authority\"). Clients *MUST NOT* generate a request with a Host header field that differs from the \":authority\" pseudo-header field. A server *SHOULD* treat a request as malformed if it contains a Host header field that identifies an entity that differs from the entity in the \":authority\" pseudo-header field. The values of fields need to be normalized to compare them (see [Section 6.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-6.2) of [RFC3986]). An origin server can apply any normalization method, whereas other servers *MUST* perform scheme-based normalization (see [Section 6.2.3](https://www.rfc-editor.org/rfc/rfc3986.html#section-6.2.3) of [RFC3986]) of the two fields. An intermediary that forwards a request over HTTP/2 *MUST* construct an \":authority\" pseudo-header field using the authority information from the control data of the original request, unless the original request's target URI does not contain authority information (in which case it *MUST NOT* generate \":authority\"). Note that the Host header field is not the sole source of this information; see [Section 7.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.2) of [HTTP]. An intermediary that needs to generate a Host header field (which might be necessary to construct an HTTP/1.1 request) *MUST* use the value from the \":authority\" pseudo-header field as the value of the Host field, unless the intermediary also changes the request target. This replaces any existing Host field to avoid potential vulnerabilities in HTTP routing. An intermediary that forwards a request over HTTP/2 *MAY* retain any Host header field. Note that request targets for CONNECT or asterisk-form OPTIONS requests never include authority information; see Sections [7.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1) and [7.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.2) of [HTTP]. \":authority\" *MUST NOT* include the deprecated userinfo subcomponent for \"http\" or \"https\" schemed URIs.\n- The \":path\" pseudo-header field includes the path and query parts of the target URI (the absolute-path production and, optionally, a '?' character followed by the query production; see [Section 4.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.1) of [HTTP]). A request in asterisk form (for OPTIONS) includes the value '*' for the \":path\" pseudo-header field. This pseudo-header field *MUST NOT* be empty for \"http\" or \"https\" URIs; \"http\" or \"https\" URIs that do not contain a path component *MUST* include a value of '/'. The exceptions to this rule are: an OPTIONS request for an \"http\" or \"https\" URI that does not include a path component; these *MUST* include a \":path\" pseudo-header field with a value of '*' (see [Section 7.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1) of [HTTP]).CONNECT requests (Section 8.5), where the \":path\" pseudo-header field is omitted.\n\nAll HTTP/2 requests *MUST* include exactly one valid value for the \":method\", \":scheme\", and \":path\" pseudo-header fields, unless they are CONNECT requests (Section 8.5). An HTTP request that omits mandatory pseudo-header fields is malformed (Section 8.1.1).\n\nIndividual HTTP/2 requests do not carry an explicit indicator of protocol version. All HTTP/2 requests implicitly have a protocol version of \"2.0\" (see [Section 6.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.2) of [HTTP]).\n\n#### 8.3.2. Response Pseudo-Header Fields\n\nFor HTTP/2 responses, a single \":status\" pseudo-header field is defined that carries the HTTP status code field (see [Section 15](https://www.rfc-editor.org/rfc/rfc9110.html#section-15) of [HTTP]). This pseudo-header field *MUST* be included in all responses, including interim responses; otherwise, the response is malformed (Section 8.1.1).\n\nHTTP/2 responses implicitly have a protocol version of \"2.0\".\n\n### 8.4. Server Push\n\nHTTP/2 allows a server to preemptively send (or \"push\") responses (along with corresponding \"promised\" requests) to a client in association with a previous client-initiated request.\n\nServer push was designed to allow a server to improve client-perceived performance by predicting what requests will follow those that it receives, thereby removing a round trip for them. For example, a request for HTML is often followed by requests for stylesheets and scripts referenced by that page. When these requests are pushed, the client does not need to wait to receive the references to them in the HTML and issue separate requests.\n\nIn practice, server push is difficult to use effectively, because it requires the server to correctly anticipate the additional requests the client will make, taking into account factors such as caching, content negotiation, and user behavior. Errors in prediction can lead to performance degradation, due to the opportunity cost that the additional data on the wire represents. In particular, pushing any significant amount of data can cause contention issues with responses that are more important.\n\nA client can request that server push be disabled, though this is negotiated for each hop independently. The SETTINGS_ENABLE_PUSH setting can be set to 0 to indicate that server push is disabled.\n\nPromised requests *MUST* be safe (see [Section 9.2.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.1) of [HTTP]) and cacheable (see [Section 9.2.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.3) of [HTTP]). Promised requests cannot include any content or a trailer section. Clients that receive a promised request that is not cacheable, that is not known to be safe, or that indicates the presence of request content *MUST* reset the promised stream with a stream error (Section 5.4.2) of type PROTOCOL_ERROR. Note that this could result in the promised stream being reset if the client does not recognize a newly defined method as being safe.\n\nPushed responses that are cacheable (see [Section 3](https://www.rfc-editor.org/rfc/rfc9111.html#section-3) of [CACHING]) can be stored by the client, if it implements an HTTP cache. Pushed responses are considered successfully validated on the origin server (e.g., if the \"no-cache\" cache response directive is present; see [Section 5.2.2.4](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.4) of [CACHING]) while the stream identified by the promised stream identifier is still open.\n\nPushed responses that are not cacheable *MUST NOT* be stored by any HTTP cache. They *MAY* be made available to the application separately.\n\nThe server *MUST* include a value in the \":authority\" pseudo-header field for which the server is authoritative (see Section 10.1). A client *MUST* treat a PUSH_PROMISE for which the server is not authoritative as a stream error (Section 5.4.2) of type PROTOCOL_ERROR.\n\nAn intermediary can receive pushes from the server and choose not to forward them on to the client. In other words, how to make use of the pushed information is up to that intermediary. Equally, the intermediary might choose to make additional pushes to the client, without any action taken by the server.\n\nA client cannot push. Thus, servers *MUST* treat the receipt of a PUSH_PROMISE frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. A server cannot set the SETTINGS_ENABLE_PUSH setting to a value other than 0 (see Section 6.5.2).\n\n#### 8.4.1. Push Requests\n\nServer push is semantically equivalent to a server responding to a request; however, in this case, that request is also sent by the server, as a PUSH_PROMISE frame.\n\nThe PUSH_PROMISE frame includes a field block that contains control data and a complete set of request header fields that the server attributes to the request. It is not possible to push a response to a request that includes message content.\n\nPromised requests are always associated with an explicit request from the client. The PUSH_PROMISE frames sent by the server are sent on that explicit request's stream. The PUSH_PROMISE frame also includes a promised stream identifier, chosen from the stream identifiers available to the server (see Section 5.1.1).\n\nThe header fields in PUSH_PROMISE and any subsequent CONTINUATION frames *MUST* be a valid and complete set of request header fields (Section 8.3.1). The server *MUST* include a method in the \":method\" pseudo-header field that is safe and cacheable. If a client receives a PUSH_PROMISE that does not include a complete and valid set of header fields or the \":method\" pseudo-header field identifies a method that is not safe, it *MUST* respond on the promised stream with a stream error (Section 5.4.2) of type PROTOCOL_ERROR.\n\nThe server *SHOULD* send PUSH_PROMISE (Section 6.6) frames prior to sending any frames that reference the promised responses. This avoids a race where clients issue requests prior to receiving any PUSH_PROMISE frames.\n\nFor example, if the server receives a request for a document containing embedded links to multiple image files and the server chooses to push those additional images to the client, sending PUSH_PROMISE frames before the DATA frames that contain the image links ensures that the client is able to see that a resource will be pushed before discovering embedded links. Similarly, if the server pushes resources referenced by the field block (for instance, in Link header fields), sending a PUSH_PROMISE before sending the header ensures that clients do not request those resources.\n\nPUSH_PROMISE frames *MUST NOT* be sent by the client.\n\nPUSH_PROMISE frames can be sent by the server on any client-initiated stream, but the stream *MUST* be in either the \"open\" or \"half-closed (remote)\" state with respect to the server. PUSH_PROMISE frames are interspersed with the frames that comprise a response, though they cannot be interspersed with HEADERS and CONTINUATION frames that comprise a single field block.\n\nSending a PUSH_PROMISE frame creates a new stream and puts the stream into the \"reserved (local)\" state for the server and the \"reserved (remote)\" state for the client.\n\n#### 8.4.2. Push Responses\n\nAfter sending the PUSH_PROMISE frame, the server can begin delivering the pushed response as a response (Section 8.3.2) on a server-initiated stream that uses the promised stream identifier. The server uses this stream to transmit an HTTP response, using the same sequence of frames as that defined in Section 8.1. This stream becomes \"half-closed\" to the client (Section 5.1) after the initial HEADERS frame is sent.\n\nOnce a client receives a PUSH_PROMISE frame and chooses to accept the pushed response, the client *SHOULD NOT* issue any requests for the promised response until after the promised stream has closed.\n\nIf the client determines, for any reason, that it does not wish to receive the pushed response from the server or if the server takes too long to begin sending the promised response, the client can send a RST_STREAM frame, using either the CANCEL or REFUSED_STREAM code and referencing the pushed stream's identifier.\n\nA client can use the SETTINGS_MAX_CONCURRENT_STREAMS setting to limit the number of responses that can be concurrently pushed by a server. Advertising a SETTINGS_MAX_CONCURRENT_STREAMS value of zero prevents the server from opening the streams necessary to push responses. However, this does not prevent the server from reserving streams using PUSH_PROMISE frames, because reserved streams do not count toward the concurrent stream limit. Clients that do not wish to receive pushed resources need to reset any unwanted reserved streams or set SETTINGS_ENABLE_PUSH to 0.\n\nClients receiving a pushed response *MUST* validate that either the server is authoritative (see Section 10.1) or the proxy that provided the pushed response is configured for the corresponding request. For example, a server that offers a certificate for only the example.com DNS-ID (see [RFC6125]) is not permitted to push a response for .\n\nThe response for a PUSH_PROMISE stream begins with a HEADERS frame, which immediately puts the stream into the \"half-closed (remote)\" state for the server and \"half-closed (local)\" state for the client, and ends with a frame with the END_STREAM flag set, which places the stream in the \"closed\" state.\n\n### 8.5. The CONNECT Method\n\nThe CONNECT method ([Section 9.3.6](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.6) of [HTTP]) is used to convert an HTTP connection into a tunnel to a remote host. CONNECT is primarily used with HTTP proxies to establish a TLS session with an origin server for the purposes of interacting with \"https\" resources.\n\nIn HTTP/2, the CONNECT method establishes a tunnel over a single HTTP/2 stream to a remote host, rather than converting the entire connection to a tunnel. A CONNECT header section is constructed as defined in Section 8.3.1 (\"Request Pseudo-Header Fields\"), with a few differences. Specifically:\n\n- The \" :method \" pseudo-header field is set to CONNECT .\n- The \" :scheme \" and \" :path \" pseudo-header fields *MUST* be omitted.\n- The \" :authority \" pseudo-header field contains the host and port to connect to (equivalent to the authority-form of the request-target of CONNECT requests; see [Section 3.2.3](https://www.rfc-editor.org/rfc/rfc9112.html#section-3.2.3) of [HTTP/1.1] ).\n\nA CONNECT request that does not conform to these restrictions is malformed (Section 8.1.1).\n\nA proxy that supports CONNECT establishes a TCP connection [TCP] to the host and port identified in the \":authority\" pseudo-header field. Once this connection is successfully established, the proxy sends a HEADERS frame containing a 2xx-series status code to the client, as defined in [Section 9.3.6](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.6) of [HTTP].\n\nAfter the initial HEADERS frame sent by each peer, all subsequent DATA frames correspond to data sent on the TCP connection. The frame payload of any DATA frames sent by the client is transmitted by the proxy to the TCP server; data received from the TCP server is assembled into DATA frames by the proxy. Frame types other than DATA or stream management frames (RST_STREAM, WINDOW_UPDATE, and PRIORITY) *MUST NOT* be sent on a connected stream and *MUST* be treated as a stream error (Section 5.4.2) if received.\n\nThe TCP connection can be closed by either peer. The END_STREAM flag on a DATA frame is treated as being equivalent to the TCP FIN bit. A client is expected to send a DATA frame with the END_STREAM flag set after receiving a frame with the END_STREAM flag set. A proxy that receives a DATA frame with the END_STREAM flag set sends the attached data with the FIN bit set on the last TCP segment. A proxy that receives a TCP segment with the FIN bit set sends a DATA frame with the END_STREAM flag set. Note that the final TCP segment or DATA frame could be empty.\n\nA TCP connection error is signaled with RST_STREAM. A proxy treats any error in the TCP connection, which includes receiving a TCP segment with the RST bit set, as a stream error (Section 5.4.2) of type CONNECT_ERROR. Correspondingly, a proxy *MUST* send a TCP segment with the RST bit set if it detects an error with the stream or the HTTP/2 connection.\n\n### 8.6. The Upgrade Header Field\n\nHTTP/2 does not support the 101 (Switching Protocols) informational status code ([Section 15.2.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.2.2) of [HTTP]).\n\nThe semantics of 101 (Switching Protocols) aren't applicable to a multiplexed protocol. Similar functionality might be enabled through the use of extended CONNECT [RFC8441], and other protocols are able to use the same mechanisms that HTTP/2 uses to negotiate their use (see Section 3).\n\n### 8.7. Request Reliability\n\nIn general, an HTTP client is unable to retry a non-idempotent request when an error occurs because there is no means to determine the nature of the error (see [Section 9.2.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.2) of [HTTP]). It is possible that some server processing occurred prior to the error, which could result in undesirable effects if the request were reattempted.\n\nHTTP/2 provides two mechanisms for providing a guarantee to a client that a request has not been processed:\n\n- The GOAWAY frame indicates the highest stream number that might have been processed. Requests on streams with higher numbers are therefore guaranteed to be safe to retry.\n- The REFUSED_STREAM error code can be included in a RST_STREAM frame to indicate that the stream is being closed prior to any processing having occurred. Any request that was sent on the reset stream can be safely retried.\n\nRequests that have not been processed have not failed; clients *MAY* automatically retry them, even those with non-idempotent methods.\n\nA server *MUST NOT* indicate that a stream has not been processed unless it can guarantee that fact. If frames that are on a stream are passed to the application layer for any stream, then REFUSED_STREAM *MUST NOT* be used for that stream, and a GOAWAY frame *MUST* include a stream identifier that is greater than or equal to the given stream identifier.\n\nIn addition to these mechanisms, the PING frame provides a way for a client to easily test a connection. Connections that remain idle can become broken, because some middleboxes (for instance, network address translators or load balancers) silently discard connection bindings. The PING frame allows a client to safely test whether a connection is still active without sending a request.\n\n### 8.8. Examples\n\nThis section shows HTTP/1.1 requests and responses, with illustrations of equivalent HTTP/2 requests and responses.\n\n#### 8.8.1. Simple Request\n\nAn HTTP GET request includes control data and a request header with no message content and is therefore transmitted as a single HEADERS frame, followed by zero or more CONTINUATION frames containing the serialized block of request header fields. The HEADERS frame in the following has both the END_HEADERS and END_STREAM flags set; no CONTINUATION frames are sent.\n\n```\n GET /resource HTTP/1.1 HEADERS\n Host: example.org ==> + END_STREAM\n Accept: image/jpeg + END_HEADERS\n :method = GET\n :scheme = https\n :authority = example.org\n :path = /resource\n host = example.org\n accept = image/jpeg\n```\n\n#### 8.8.2. Simple Response\n\nSimilarly, a response that includes only control data and a response header is transmitted as a HEADERS frame (again, followed by zero or more CONTINUATION frames) containing the serialized block of response header fields.\n\n```\n HTTP/1.1 304 Not Modified HEADERS\n ETag: \"xyzzy\" ==> + END_STREAM\n Expires: Thu, 23 Jan ... + END_HEADERS\n :status = 304\n etag = \"xyzzy\"\n expires = Thu, 23 Jan ...\n```\n\n#### 8.8.3. Complex Request\n\nAn HTTP POST request that includes control data and a request header with message content is transmitted as one HEADERS frame, followed by zero or more CONTINUATION frames containing the request header, followed by one or more DATA frames, with the last CONTINUATION (or HEADERS) frame having the END_HEADERS flag set and the final DATA frame having the END_STREAM flag set:\n\n```\n POST /resource HTTP/1.1 HEADERS\n Host: example.org ==> - END_STREAM\n Content-Type: image/jpeg - END_HEADERS\n Content-Length: 123 :method = POST\n :authority = example.org\n :path = /resource\n {binary data} :scheme = https\n\n CONTINUATION\n + END_HEADERS\n content-type = image/jpeg\n host = example.org\n content-length = 123\n\n DATA\n + END_STREAM\n {binary data}\n```\n\nNote that data contributing to any given field line could be spread between field block fragments. The allocation of field lines to frames in this example is illustrative only.\n\n#### 8.8.4. Response with Body\n\nA response that includes control data and a response header with message content is transmitted as a HEADERS frame, followed by zero or more CONTINUATION frames, followed by one or more DATA frames, with the last DATA frame in the sequence having the END_STREAM flag set:\n\n```\n HTTP/1.1 200 OK HEADERS\n Content-Type: image/jpeg ==> - END_STREAM\n Content-Length: 123 + END_HEADERS\n :status = 200\n {binary data} content-type = image/jpeg\n content-length = 123\n\n DATA\n + END_STREAM\n {binary data}\n```\n\n#### 8.8.5. Informational Responses\n\nAn informational response using a 1xx status code other than 101 is transmitted as a HEADERS frame, followed by zero or more CONTINUATION frames.\n\nA trailer section is sent as a field block after both the request or response field block and all the DATA frames have been sent. The HEADERS frame starting the field block that comprises the trailer section has the END_STREAM flag set.\n\nThe following example includes both a 100 (Continue) status code, which is sent in response to a request containing a \"100-continue\" token in the Expect header field, and a trailer section:\n\n```\n HTTP/1.1 100 Continue HEADERS\n Extension-Field: bar ==> - END_STREAM\n + END_HEADERS\n :status = 100\n extension-field = bar\n\n HTTP/1.1 200 OK HEADERS\n Content-Type: image/jpeg ==> - END_STREAM\n Transfer-Encoding: chunked + END_HEADERS\n Trailer: Foo :status = 200\n content-type = image/jpeg\n 123 trailer = Foo\n {binary data}\n 0 DATA\n Foo: bar - END_STREAM\n {binary data}\n\n HEADERS\n + END_STREAM\n + END_HEADERS\n foo = bar\n```\n\n---\n\n## 9. HTTP/2 Connections\n\nThis section outlines attributes of HTTP that improve interoperability, reduce exposure to known security vulnerabilities, or reduce the potential for implementation variation.\n\n### 9.1. Connection Management\n\nHTTP/2 connections are persistent. For best performance, it is expected that clients will not close connections until it is determined that no further communication with a server is necessary (for example, when a user navigates away from a particular web page) or until the server closes the connection.\n\nClients *SHOULD NOT* open more than one HTTP/2 connection to a given host and port pair, where the host is derived from a URI, a selected alternative service [ALT-SVC], or a configured proxy.\n\nA client can create additional connections as replacements, either to replace connections that are near to exhausting the available stream identifier space (Section 5.1.1), to refresh the keying material for a TLS connection, or to replace connections that have encountered errors (Section 5.4.1).\n\nA client *MAY* open multiple connections to the same IP address and TCP port using different Server Name Indication [TLS-EXT] values or to provide different TLS client certificates but *SHOULD* avoid creating multiple connections with the same configuration.\n\nServers are encouraged to maintain open connections for as long as possible but are permitted to terminate idle connections if necessary. When either endpoint chooses to close the transport-layer TCP connection, the terminating endpoint *SHOULD* first send a GOAWAY (Section 6.8) frame so that both endpoints can reliably determine whether previously sent frames have been processed and gracefully complete or terminate any necessary remaining tasks.\n\n#### 9.1.1. Connection Reuse\n\nConnections that are made to an origin server, either directly or through a tunnel created using the CONNECT method (Section 8.5), *MAY* be reused for requests with multiple different URI authority components. A connection can be reused as long as the origin server is authoritative (Section 10.1). For TCP connections without TLS, this depends on the host having resolved to the same IP address.\n\nFor \"https\" resources, connection reuse additionally depends on having a certificate that is valid for the host in the URI. The certificate presented by the server *MUST* satisfy any checks that the client would perform when forming a new TLS connection for the host in the URI. A single certificate can be used to establish authority for multiple origins. [Section 4.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.3) of [HTTP] describes how a client determines whether a server is authoritative for a URI.\n\nIn some deployments, reusing a connection for multiple origins can result in requests being directed to the wrong origin server. For example, TLS termination might be performed by a middlebox that uses the TLS Server Name Indication [TLS-EXT] extension to select an origin server. This means that it is possible for clients to send requests to servers that might not be the intended target for the request, even though the server is otherwise authoritative.\n\nA server that does not wish clients to reuse connections can indicate that it is not authoritative for a request by sending a 421 (Misdirected Request) status code in response to the request (see [Section 15.5.20](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.20) of [HTTP]).\n\nA client that is configured to use a proxy over HTTP/2 directs requests to that proxy through a single connection. That is, all requests sent via a proxy reuse the connection to the proxy.\n\n### 9.2. Use of TLS Features\n\nImplementations of HTTP/2 *MUST* use TLS version 1.2 [TLS12] or higher for HTTP/2 over TLS. The general TLS usage guidance in [TLSBCP] *SHOULD* be followed, with some additional restrictions that are specific to HTTP/2.\n\nThe TLS implementation *MUST* support the Server Name Indication (SNI) [TLS-EXT] extension to TLS. If the server is identified by a domain name [DNS-TERMS], clients *MUST* send the server_name TLS extension unless an alternative mechanism to indicate the target host is used.\n\nRequirements for deployments of HTTP/2 that negotiate TLS 1.3 [TLS13] are included in Section 9.2.3. Deployments of TLS 1.2 are subject to the requirements in Sections 9.2.1 and 9.2.2. Implementations are encouraged to provide defaults that comply, but it is recognized that deployments are ultimately responsible for compliance.\n\n#### 9.2.1. TLS 1.2 Features\n\nThis section describes restrictions on the TLS 1.2 feature set that can be used with HTTP/2. Due to deployment limitations, it might not be possible to fail TLS negotiation when these restrictions are not met. An endpoint *MAY* immediately terminate an HTTP/2 connection that does not meet these TLS requirements with a connection error (Section 5.4.1) of type INADEQUATE_SECURITY.\n\nA deployment of HTTP/2 over TLS 1.2 *MUST* disable compression. TLS compression can lead to the exposure of information that would not otherwise be revealed [RFC3749]. Generic compression is unnecessary, since HTTP/2 provides compression features that are more aware of context and therefore likely to be more appropriate for use for performance, security, or other reasons.\n\nA deployment of HTTP/2 over TLS 1.2 *MUST* disable renegotiation. An endpoint *MUST* treat a TLS renegotiation as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. Note that disabling renegotiation can result in long-lived connections becoming unusable due to limits on the number of messages the underlying cipher suite can encipher.\n\nAn endpoint *MAY* use renegotiation to provide confidentiality protection for client credentials offered in the handshake, but any renegotiation *MUST* occur prior to sending the connection preface. A server *SHOULD* request a client certificate if it sees a renegotiation request immediately after establishing a connection.\n\nThis effectively prevents the use of renegotiation in response to a request for a specific protected resource. A future specification might provide a way to support this use case. Alternatively, a server might use an error (Section 5.4) of type HTTP_1_1_REQUIRED to request that the client use a protocol that supports renegotiation.\n\nImplementations *MUST* support ephemeral key exchange sizes of at least 2048 bits for cipher suites that use ephemeral finite field Diffie-Hellman (DHE) ([Section 8.1.2](https://www.rfc-editor.org/rfc/rfc5246.html#section-8.1.2) of [TLS12]) and 224 bits for cipher suites that use ephemeral elliptic curve Diffie-Hellman (ECDHE) [RFC8422]. Clients *MUST* accept DHE sizes of up to 4096 bits. Endpoints *MAY* treat negotiation of key sizes smaller than the lower limits as a connection error (Section 5.4.1) of type INADEQUATE_SECURITY.\n\n#### 9.2.2. TLS 1.2 Cipher Suites\n\nA deployment of HTTP/2 over TLS 1.2 *SHOULD NOT* use any of the prohibited cipher suites listed in Appendix A.\n\nEndpoints *MAY* choose to generate a connection error (Section 5.4.1) of type INADEQUATE_SECURITY if one of the prohibited cipher suites is negotiated. A deployment that chooses to use a prohibited cipher suite risks triggering a connection error unless the set of potential peers is known to accept that cipher suite.\n\nImplementations *MUST NOT* generate this error in reaction to the negotiation of a cipher suite that is not prohibited. Consequently, when clients offer a cipher suite that is not prohibited, they have to be prepared to use that cipher suite with HTTP/2.\n\nThe list of prohibited cipher suites includes the cipher suite that TLS 1.2 makes mandatory, which means that TLS 1.2 deployments could have non-intersecting sets of permitted cipher suites. To avoid this problem, which causes TLS handshake failures, deployments of HTTP/2 that use TLS 1.2 *MUST* support TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 [TLS-ECDHE] with the P-256 elliptic curve [RFC8422].\n\nNote that clients might advertise support of cipher suites that are prohibited in order to allow for connection to servers that do not support HTTP/2. This allows servers to select HTTP/1.1 with a cipher suite that is prohibited in HTTP/2. However, this can result in HTTP/2 being negotiated with a prohibited cipher suite if the application protocol and cipher suite are independently selected.\n\n#### 9.2.3. TLS 1.3 Features\n\nTLS 1.3 includes a number of features not available in earlier versions. This section discusses the use of these features.\n\nHTTP/2 servers *MUST NOT* send post-handshake TLS 1.3 CertificateRequest messages. HTTP/2 clients *MUST* treat a TLS post-handshake CertificateRequest message as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.\n\nThe prohibition on post-handshake authentication applies even if the client offered the \"post_handshake_auth\" TLS extension. Post-handshake authentication support might be advertised independently of ALPN [TLS-ALPN]. Clients might offer the capability for use in other protocols, but inclusion of the extension cannot imply support within HTTP/2.\n\n[TLS13] defines other post-handshake messages, NewSessionTicket and KeyUpdate, which can be used as they have no direct interaction with HTTP/2. Unless the use of a new type of TLS message depends on an interaction with the application-layer protocol, that TLS message can be sent after the handshake completes.\n\nTLS early data *MAY* be used to send requests, provided that the guidance in [RFC8470] is observed. Clients send requests in early data assuming initial values for all server settings.\n\n---\n\n## 10. Security Considerations\n\nThe use of TLS is necessary to provide many of the security properties of this protocol. Many of the claims in this section do not hold unless TLS is used as described in Section 9.2.\n\n### 10.1. Server Authority\n\nHTTP/2 relies on the HTTP definition of authority for determining whether a server is authoritative in providing a given response (see [Section 4.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.3) of [HTTP]). This relies on local name resolution for the \"http\" URI scheme and the authenticated server identity for the \"https\" scheme.\n\n### 10.2. Cross-Protocol Attacks\n\nIn a cross-protocol attack, an attacker causes a client to initiate a transaction in one protocol toward a server that understands a different protocol. An attacker might be able to cause the transaction to appear as a valid transaction in the second protocol. In combination with the capabilities of the web context, this can be used to interact with poorly protected servers in private networks.\n\nCompleting a TLS handshake with an ALPN identifier for HTTP/2 can be considered sufficient protection against cross-protocol attacks. ALPN provides a positive indication that a server is willing to proceed with HTTP/2, which prevents attacks on other TLS-based protocols.\n\nThe encryption in TLS makes it difficult for attackers to control the data that could be used in a cross-protocol attack on a cleartext protocol.\n\nThe cleartext version of HTTP/2 has minimal protection against cross-protocol attacks. The connection preface (Section 3.4) contains a string that is designed to confuse HTTP/1.1 servers, but no special protection is offered for other protocols.\n\n### 10.3. Intermediary Encapsulation Attacks\n\nHPACK permits encoding of field names and values that might be treated as delimiters in other HTTP versions. An intermediary that translates an HTTP/2 request or response *MUST* validate fields according to the rules in Section 8.2 before translating a message to another HTTP version. Translating a field that includes invalid delimiters could be used to cause recipients to incorrectly interpret a message, which could be exploited by an attacker.\n\nSection 8.2 does not include specific rules for validation of pseudo-header fields. If the values of these fields are used, additional validation is necessary. This is particularly important where \":scheme\", \":authority\", and \":path\" are combined to form a single URI string [RFC3986]. Similar problems might occur when that URI or just \":path\" is combined with \":method\" to construct a request line (as in [Section 3](https://www.rfc-editor.org/rfc/rfc9112.html#section-3) of [HTTP/1.1]). Simple concatenation is not secure unless the input values are fully validated.\n\nAn intermediary can reject fields that contain invalid field names or values for other reasons -- in particular, those fields that do not conform to the HTTP ABNF grammar from [Section 5](https://www.rfc-editor.org/rfc/rfc9110.html#section-5) of [HTTP]. Intermediaries that do not perform any validation of fields other than the minimum required by Section 8.2 could forward messages that contain invalid field names or values.\n\nAn intermediary that receives any fields that require removal before forwarding (see [Section 7.6.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.6.1) of [HTTP]) *MUST* remove or replace those header fields when forwarding messages. Additionally, intermediaries should take care when forwarding messages containing Content-Length fields to ensure that the message is well-formed (Section 8.1.1). This ensures that if the message is translated into HTTP/1.1 at any point, the framing will be correct.\n\n### 10.4. Cacheability of Pushed Responses\n\nPushed responses do not have an explicit request from the client; the request is provided by the server in the PUSH_PROMISE frame.\n\nCaching responses that are pushed is possible based on the guidance provided by the origin server in the Cache-Control header field. However, this can cause issues if a single server hosts more than one tenant. For example, a server might offer multiple users each a small portion of its URI space.\n\nWhere multiple tenants share space on the same server, that server *MUST* ensure that tenants are not able to push representations of resources that they do not have authority over. Failure to enforce this would allow a tenant to provide a representation that would be served out of cache, overriding the actual representation that the authoritative tenant provides.\n\nPushed responses for which an origin server is not authoritative (see Section 10.1) *MUST NOT* be used or cached.\n\n### 10.5. Denial-of-Service Considerations\n\nAn HTTP/2 connection can demand a greater commitment of resources to operate than an HTTP/1.1 connection. Both field section compression and flow control depend on a commitment of a greater amount of state. Settings for these features ensure that memory commitments for these features are strictly bounded.\n\nThe number of PUSH_PROMISE frames is not constrained in the same fashion. A client that accepts server push *SHOULD* limit the number of streams it allows to be in the \"reserved (remote)\" state. An excessive number of server push streams can be treated as a stream error (Section 5.4.2) of type ENHANCE_YOUR_CALM.\n\nA number of HTTP/2 implementations were found to be vulnerable to denial of service [NFLX-2019-002]. Below is a list of known ways that implementations might be subject to denial-of-service attacks:\n\n- Inefficient tracking of outstanding outbound frames can lead to overload if an adversary can cause large numbers of frames to be enqueued for sending. A peer could use one of several techniques to cause large numbers of frames to be generated: Providing tiny increments to flow control in WINDOW_UPDATE frames can cause a sender to generate a large number of DATA frames.An endpoint is required to respond to a PING frame.Each SETTINGS frame requires acknowledgment.An invalid request (or server push) can cause a peer to send RST_STREAM frames in response.\n- An attacker can provide large amounts of flow-control credit at the HTTP/2 layer but withhold credit at the TCP layer, preventing frames from being sent. An endpoint that constructs and remembers frames for sending without considering TCP limits might be subject to resource exhaustion.\n- Large numbers of small or empty frames can be abused to cause a peer to expend time processing frame headers. Caution is required here as some uses of small frames are entirely legitimate, such as the sending of an empty DATA or CONTINUATION frame at the end of a stream.\n- The SETTINGS frame might also be abused to cause a peer to expend additional processing time. This might be done by pointlessly changing settings, sending multiple undefined settings, or changing the same setting multiple times in the same frame.\n- Handling reprioritization with PRIORITY frames can require significant processing time and can lead to overload if many PRIORITY frames are sent.\n- Field section compression also provides opportunities for an attacker to waste processing resources; see [Section 7](https://www.rfc-editor.org/rfc/rfc7541.html#section-7) of [COMPRESSION] for more details on potential abuses.\n- Limits in SETTINGS cannot be reduced instantaneously, which leaves an endpoint exposed to behavior from a peer that could exceed the new limits. In particular, immediately after establishing a connection, limits set by a server are not known to clients and could be exceeded without being an obvious protocol violation.\n\nMost of the features that might be exploited for denial of service -- such as SETTINGS changes, small frames, field section compression -- have legitimate uses. These features become a burden only when they are used unnecessarily or to excess.\n\nAn endpoint that doesn't monitor use of these features exposes itself to a risk of denial of service. Implementations *SHOULD* track the use of these features and set limits on their use. An endpoint *MAY* treat activity that is suspicious as a connection error (Section 5.4.1) of type ENHANCE_YOUR_CALM.\n\n#### 10.5.1. Limits on Field Block Size\n\nA large field block (Section 4.3) can cause an implementation to commit a large amount of state. Field lines that are critical for routing can appear toward the end of a field block, which prevents streaming of fields to their ultimate destination. This ordering and other reasons, such as ensuring cache correctness, mean that an endpoint might need to buffer the entire field block. Since there is no hard limit to the size of a field block, some endpoints could be forced to commit a large amount of available memory for field blocks.\n\nAn endpoint can use the SETTINGS_MAX_HEADER_LIST_SIZE to advise peers of limits that might apply on the size of uncompressed field blocks. This setting is only advisory, so endpoints *MAY* choose to send field blocks that exceed this limit and risk the request or response being treated as malformed. This setting is specific to a connection, so any request or response could encounter a hop with a lower, unknown limit. An intermediary can attempt to avoid this problem by passing on values presented by different peers, but they are not obliged to do so.\n\nA server that receives a larger field block than it is willing to handle can send an HTTP 431 (Request Header Fields Too Large) status code [RFC6585]. A client can discard responses that it cannot process. The field block *MUST* be processed to ensure a consistent connection state, unless the connection is closed.\n\n#### 10.5.2. CONNECT Issues\n\nThe CONNECT method can be used to create disproportionate load on a proxy, since stream creation is relatively inexpensive when compared to the creation and maintenance of a TCP connection. A proxy might also maintain some resources for a TCP connection beyond the closing of the stream that carries the CONNECT request, since the outgoing TCP connection remains in the TIME_WAIT state. Therefore, a proxy cannot rely on SETTINGS_MAX_CONCURRENT_STREAMS alone to limit the resources consumed by CONNECT requests.\n\n### 10.6. Use of Compression\n\nCompression can allow an attacker to recover secret data when it is compressed in the same context as data under attacker control. HTTP/2 enables compression of field lines (Section 4.3); the following concerns also apply to the use of HTTP compressed content-codings ([Section 8.4.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.4.1) of [HTTP]).\n\nThere are demonstrable attacks on compression that exploit the characteristics of the Web (e.g., [BREACH]). The attacker induces multiple requests containing varying plaintext, observing the length of the resulting ciphertext in each, which reveals a shorter length when a guess about the secret is correct.\n\nImplementations communicating on a secure channel *MUST NOT* compress content that includes both confidential and attacker-controlled data unless separate compression dictionaries are used for each source of data. Compression *MUST NOT* be used if the source of data cannot be reliably determined. Generic stream compression, such as that provided by TLS, *MUST NOT* be used with HTTP/2 (see Section 9.2).\n\nFurther considerations regarding the compression of header fields are described in [COMPRESSION].\n\n### 10.7. Use of Padding\n\nPadding within HTTP/2 is not intended as a replacement for general purpose padding, such as that provided by TLS [TLS13]. Redundant padding could even be counterproductive. Correct application can depend on having specific knowledge of the data that is being padded.\n\nTo mitigate attacks that rely on compression, disabling or limiting compression might be preferable to padding as a countermeasure.\n\nPadding can be used to obscure the exact size of frame content and is provided to mitigate specific attacks within HTTP -- for example, attacks where compressed content includes both attacker-controlled plaintext and secret data (e.g., [BREACH]).\n\nUse of padding can result in less protection than might seem immediately obvious. At best, padding only makes it more difficult for an attacker to infer length information by increasing the number of frames an attacker has to observe. Incorrectly implemented padding schemes can be easily defeated. In particular, randomized padding with a predictable distribution provides very little protection; similarly, padding frame payloads to a fixed size exposes information as frame payload sizes cross the fixed-sized boundary, which could be possible if an attacker can control plaintext.\n\nIntermediaries *SHOULD* retain padding for DATA frames but *MAY* drop padding for HEADERS and PUSH_PROMISE frames. A valid reason for an intermediary to change the amount of padding of frames is to improve the protections that padding provides.\n\n### 10.8. Privacy Considerations\n\nSeveral characteristics of HTTP/2 provide an observer an opportunity to correlate actions of a single client or server over time. These include the values of settings, the manner in which flow-control windows are managed, the way priorities are allocated to streams, the timing of reactions to stimulus, and the handling of any features that are controlled by settings.\n\nAs far as these create observable differences in behavior, they could be used as a basis for fingerprinting a specific client, as defined in [Section 3.2](https://www.rfc-editor.org/rfc/rfc6973.html#section-3.2) of [PRIVACY].\n\nHTTP/2's preference for using a single TCP connection allows correlation of a user's activity on a site. Reusing connections for different origins allows tracking across those origins.\n\nBecause the PING and SETTINGS frames solicit immediate responses, they can be used by an endpoint to measure latency to their peer. This might have privacy implications in certain scenarios.\n\n### 10.9. Remote Timing Attacks\n\nRemote timing attacks extract secrets from servers by observing variations in the time that servers take when processing requests that use secrets. HTTP/2 enables concurrent request creation and processing, which can give attackers better control over when request processing commences. Multiple HTTP/2 requests can be included in the same IP packet or TLS record. HTTP/2 can therefore make remote timing attacks more efficient by eliminating variability in request delivery, leaving only request order and the delivery of responses as sources of timing variability.\n\nEnsuring that processing time is not dependent on the value of a secret is the best defense against any form of timing attack.\n\n---\n\n## 11. IANA Considerations\n\nThis revision of HTTP/2 marks the HTTP2-Settings header field and the h2c upgrade token, both defined in [RFC7540], as obsolete.\n\n[Section 11](https://www.rfc-editor.org/rfc/rfc7540.html#section-11) of [RFC7540] registered the h2 and h2c ALPN identifiers along with the PRI HTTP method. RFC 7540 also established a registry for frame types, settings, and error codes. These registrations and registries apply to HTTP/2, but are not redefined in this document.\n\nIANA has updated references to RFC 7540 in the following registries to refer to this document: \"TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs\", \"HTTP/2 Frame Type\", \"HTTP/2 Settings\", \"HTTP/2 Error Code\", and \"HTTP Method Registry\". The registration of the PRI method has been updated to refer to Section 3.4; all other section numbers have not changed.\n\nIANA has changed the policy on those portions of the \"HTTP/2 Frame Type\" and \"HTTP/2 Settings\" registries that were reserved for Experimental Use in RFC 7540. These portions of the registries shall operate on the same policy as the remainder of each registry.\n\n### 11.1. HTTP2-Settings Header Field Registration\n\nThis section marks the HTTP2-Settings header field registered by [Section 11.5](https://www.rfc-editor.org/rfc/rfc7540.html#section-11.5) of [RFC7540] in the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" as obsolete. This capability has been removed: see Section 3.1. The registration is updated to include the details as required by [Section 18.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-18.4) of [HTTP]:\n\nField Name:\n\nHTTP2-Settings\n\nStatus:\n\nobsoleted\n\nReference:\n\n[Section 3.2.1](https://www.rfc-editor.org/rfc/rfc7540.html#section-3.2.1) of [RFC7540]\n\nComments:\n\nObsolete; see Section 11.1 of this document.\n\n### 11.2. The h2c Upgrade Token\n\nThis section records the h2c upgrade token registered by [Section 11.8](https://www.rfc-editor.org/rfc/rfc7540.html#section-11.8) of [RFC7540] in the \"Hypertext Transfer Protocol (HTTP) Upgrade Token Registry\" as obsolete. This capability has been removed: see Section 3.1. The registration is updated as follows:\n\nValue:\n\nh2c\n\nDescription:\n\n(OBSOLETE) Hypertext Transfer Protocol version 2 (HTTP/2)\n\nExpected Version Tokens:\n\nNone\n\nReference:\n\nSection 3.1 of this document\n\n## 12. References\n\n### 12.1. Normative References\n\n[CACHING]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html)”, [STD 98](https://www.rfc-editor.org/info/std98), RFC 9111, [DOI 10.17487/RFC9111](https://dx.doi.org/10.17487/RFC9111), June 2022, <[https://www.rfc-editor.org/info/rfc9111](https://www.rfc-editor.org/info/rfc9111)>.\n\n[COMPRESSION]\n\nPeon, R. and H. Ruellan, “[HPACK: Header Compression for HTTP/2](https://www.rfc-editor.org/rfc/rfc7541.html)”, RFC 7541, [DOI 10.17487/RFC7541](https://dx.doi.org/10.17487/RFC7541), May 2015, <[https://www.rfc-editor.org/info/rfc7541](https://www.rfc-editor.org/info/rfc7541)>.\n\n[COOKIE]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, [DOI 10.17487/RFC6265](https://dx.doi.org/10.17487/RFC6265), April 2011, <[https://www.rfc-editor.org/info/rfc6265](https://www.rfc-editor.org/info/rfc6265)>.\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[QUIC]\n\nIyengar, J., Ed. and M. Thomson, Ed., “[QUIC: A UDP-Based Multiplexed and Secure Transport](https://www.rfc-editor.org/rfc/rfc9000.html)”, RFC 9000, [DOI 10.17487/RFC9000](https://dx.doi.org/10.17487/RFC9000), May 2021, <[https://www.rfc-editor.org/info/rfc9000](https://www.rfc-editor.org/info/rfc9000)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC3986]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[https://www.rfc-editor.org/info/rfc3986](https://www.rfc-editor.org/info/rfc3986)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[RFC8422]\n\nNir, Y., Josefsson, S., and M. Pegourie-Gonnard, “[Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS) Versions 1.2 and Earlier](https://www.rfc-editor.org/rfc/rfc8422.html)”, RFC 8422, [DOI 10.17487/RFC8422](https://dx.doi.org/10.17487/RFC8422), August 2018, <[https://www.rfc-editor.org/info/rfc8422](https://www.rfc-editor.org/info/rfc8422)>.\n\n[RFC8470]\n\nThomson, M., Nottingham, M., and W. Tarreau, “[Using Early Data in HTTP](https://www.rfc-editor.org/rfc/rfc8470.html)”, RFC 8470, [DOI 10.17487/RFC8470](https://dx.doi.org/10.17487/RFC8470), September 2018, <[https://www.rfc-editor.org/info/rfc8470](https://www.rfc-editor.org/info/rfc8470)>.\n\n[TCP]\n\nPostel, J., “[Transmission Control Protocol](https://www.rfc-editor.org/rfc/rfc793.html)”, [STD 7](https://www.rfc-editor.org/info/std7), RFC 793, [DOI 10.17487/RFC0793](https://dx.doi.org/10.17487/RFC0793), September 1981, <[https://www.rfc-editor.org/info/rfc793](https://www.rfc-editor.org/info/rfc793)>.\n\n[TLS-ALPN]\n\nFriedl, S., Popov, A., Langley, A., and E. Stephan, “[Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension](https://www.rfc-editor.org/rfc/rfc7301.html)”, RFC 7301, [DOI 10.17487/RFC7301](https://dx.doi.org/10.17487/RFC7301), July 2014, <[https://www.rfc-editor.org/info/rfc7301](https://www.rfc-editor.org/info/rfc7301)>.\n\n[TLS-ECDHE]\n\nRescorla, E., “[TLS Elliptic Curve Cipher Suites with SHA-256/384 and AES Galois Counter Mode (GCM)](https://www.rfc-editor.org/rfc/rfc5289.html)”, RFC 5289, [DOI 10.17487/RFC5289](https://dx.doi.org/10.17487/RFC5289), August 2008, <[https://www.rfc-editor.org/info/rfc5289](https://www.rfc-editor.org/info/rfc5289)>.\n\n[TLS-EXT]\n\nEastlake 3rd, D., “[Transport Layer Security (TLS) Extensions: Extension Definitions](https://www.rfc-editor.org/rfc/rfc6066.html)”, RFC 6066, [DOI 10.17487/RFC6066](https://dx.doi.org/10.17487/RFC6066), January 2011, <[https://www.rfc-editor.org/info/rfc6066](https://www.rfc-editor.org/info/rfc6066)>.\n\n[TLS12]\n\nDierks, T. and E. Rescorla, “[The Transport Layer Security (TLS) Protocol Version 1.2](https://www.rfc-editor.org/rfc/rfc5246.html)”, RFC 5246, [DOI 10.17487/RFC5246](https://dx.doi.org/10.17487/RFC5246), August 2008, <[https://www.rfc-editor.org/info/rfc5246](https://www.rfc-editor.org/info/rfc5246)>.\n\n[TLS13]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n[TLSBCP]\n\nSheffer, Y., Holz, R., and P. Saint-Andre, “[Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)](https://www.rfc-editor.org/rfc/rfc7525.html)”, [BCP 195](https://www.rfc-editor.org/info/bcp195), RFC 7525, [DOI 10.17487/RFC7525](https://dx.doi.org/10.17487/RFC7525), May 2015, <[https://www.rfc-editor.org/info/rfc7525](https://www.rfc-editor.org/info/rfc7525)>.\n\n### 12.2. Informative References\n\n[ALT-SVC]\n\nNottingham, M., McManus, P., and J. Reschke, “[HTTP Alternative Services](https://www.rfc-editor.org/rfc/rfc7838.html)”, RFC 7838, [DOI 10.17487/RFC7838](https://dx.doi.org/10.17487/RFC7838), April 2016, <[https://www.rfc-editor.org/info/rfc7838](https://www.rfc-editor.org/info/rfc7838)>.\n\n[BREACH]\n\nGluck, Y., Harris, N., and A. Prado, “[BREACH: Reviving the CRIME Attack](https://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf)”, July 2013, <[https://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf](https://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf)>.\n\n[DNS-TERMS]\n\nHoffman, P., Sullivan, A., and K. Fujiwara, “[DNS Terminology](https://www.rfc-editor.org/rfc/rfc8499.html)”, [BCP 219](https://www.rfc-editor.org/info/bcp219), RFC 8499, [DOI 10.17487/RFC8499](https://dx.doi.org/10.17487/RFC8499), January 2019, <[https://www.rfc-editor.org/info/rfc8499](https://www.rfc-editor.org/info/rfc8499)>.\n\n[HTTP-PRIORITY]\n\nOku, K. and L. Pardue, “[Extensible Prioritization Scheme for HTTP](https://www.rfc-editor.org/rfc/rfc9218.html)”, RFC 9218, [DOI 10.17487/RFC9218](https://dx.doi.org/10.17487/RFC9218), June 2022, <[https://www.rfc-editor.org/info/rfc9218](https://www.rfc-editor.org/info/rfc9218)>.\n\n[HTTP/1.1]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html)”, [STD 99](https://www.rfc-editor.org/info/std99), RFC 9112, [DOI 10.17487/RFC9112](https://dx.doi.org/10.17487/RFC9112), June 2022, <[https://www.rfc-editor.org/info/rfc9112](https://www.rfc-editor.org/info/rfc9112)>.\n\n[NFLX-2019-002]\n\nNetflix, “[HTTP/2 Denial of Service Advisory](https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-002.md)”, August 2019, <[https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-002.md](https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-002.md)>.\n\n[PRIVACY]\n\nCooper, A., Tschofenig, H., Aboba, B., Peterson, J., Morris, J., Hansen, M., and R. Smith, “[Privacy Considerations for Internet Protocols](https://www.rfc-editor.org/rfc/rfc6973.html)”, RFC 6973, [DOI 10.17487/RFC6973](https://dx.doi.org/10.17487/RFC6973), July 2013, <[https://www.rfc-editor.org/info/rfc6973](https://www.rfc-editor.org/info/rfc6973)>.\n\n[RFC1122]\n\nBraden, R., Ed., “[Requirements for Internet Hosts - Communication Layers](https://www.rfc-editor.org/rfc/rfc1122.html)”, [STD 3](https://www.rfc-editor.org/info/std3), RFC 1122, [DOI 10.17487/RFC1122](https://dx.doi.org/10.17487/RFC1122), October 1989, <[https://www.rfc-editor.org/info/rfc1122](https://www.rfc-editor.org/info/rfc1122)>.\n\n[RFC3749]\n\nHollenbeck, S., “[Transport Layer Security Protocol Compression Methods](https://www.rfc-editor.org/rfc/rfc3749.html)”, RFC 3749, [DOI 10.17487/RFC3749](https://dx.doi.org/10.17487/RFC3749), May 2004, <[https://www.rfc-editor.org/info/rfc3749](https://www.rfc-editor.org/info/rfc3749)>.\n\n[RFC6125]\n\nSaint-Andre, P. and J. Hodges, “[Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)](https://www.rfc-editor.org/rfc/rfc6125.html)”, RFC 6125, [DOI 10.17487/RFC6125](https://dx.doi.org/10.17487/RFC6125), March 2011, <[https://www.rfc-editor.org/info/rfc6125](https://www.rfc-editor.org/info/rfc6125)>.\n\n[RFC6585]\n\nNottingham, M. and R. Fielding, “[Additional HTTP Status Codes](https://www.rfc-editor.org/rfc/rfc6585.html)”, RFC 6585, [DOI 10.17487/RFC6585](https://dx.doi.org/10.17487/RFC6585), April 2012, <[https://www.rfc-editor.org/info/rfc6585](https://www.rfc-editor.org/info/rfc6585)>.\n\n[RFC7323]\n\nBorman, D., Braden, B., Jacobson, V., and R. Scheffenegger, Ed., “[TCP Extensions for High Performance](https://www.rfc-editor.org/rfc/rfc7323.html)”, RFC 7323, [DOI 10.17487/RFC7323](https://dx.doi.org/10.17487/RFC7323), September 2014, <[https://www.rfc-editor.org/info/rfc7323](https://www.rfc-editor.org/info/rfc7323)>.\n\n[RFC7540]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol Version 2 (HTTP/2)](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[https://www.rfc-editor.org/info/rfc7540](https://www.rfc-editor.org/info/rfc7540)>.\n\n[RFC8441]\n\nMcManus, P., “[Bootstrapping WebSockets with HTTP/2](https://www.rfc-editor.org/rfc/rfc8441.html)”, RFC 8441, [DOI 10.17487/RFC8441](https://dx.doi.org/10.17487/RFC8441), September 2018, <[https://www.rfc-editor.org/info/rfc8441](https://www.rfc-editor.org/info/rfc8441)>.\n\n[RFC8740]\n\nBenjamin, D., “[Using TLS 1.3 with HTTP/2](https://www.rfc-editor.org/rfc/rfc8740.html)”, RFC 8740, [DOI 10.17487/RFC8740](https://dx.doi.org/10.17487/RFC8740), February 2020, <[https://www.rfc-editor.org/info/rfc8740](https://www.rfc-editor.org/info/rfc8740)>.\n\n[TALKING]\n\nHuang, L., Chen, E., Barth, A., Rescorla, E., and C. Jackson, “[Talking to Yourself for Fun and Profit](https://www.adambarth.com/papers/2011/huang-chen-barth-rescorla-jackson.pdf)”, 2011, <[https://www.adambarth.com/papers/2011/huang-chen-barth-rescorla-jackson.pdf](https://www.adambarth.com/papers/2011/huang-chen-barth-rescorla-jackson.pdf)>.\n\n---\n\n## Appendix A. Prohibited TLS 1.2 Cipher Suites\n\nAn HTTP/2 implementation *MAY* treat the negotiation of any of the following cipher suites with TLS 1.2 as a connection error (Section 5.4.1) of type INADEQUATE_SECURITY:\n\n- TLS_NULL_WITH_NULL_NULL\n- TLS_RSA_WITH_NULL_MD5\n- TLS_RSA_WITH_NULL_SHA\n- TLS_RSA_EXPORT_WITH_RC4_40_MD5\n- TLS_RSA_WITH_RC4_128_MD5\n- TLS_RSA_WITH_RC4_128_SHA\n- TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5\n- TLS_RSA_WITH_IDEA_CBC_SHA\n- TLS_RSA_EXPORT_WITH_DES40_CBC_SHA\n- TLS_RSA_WITH_DES_CBC_SHA\n- TLS_RSA_WITH_3DES_EDE_CBC_SHA\n- TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA\n- TLS_DH_DSS_WITH_DES_CBC_SHA\n- TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA\n- TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA\n- TLS_DH_RSA_WITH_DES_CBC_SHA\n- TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA\n- TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA\n- TLS_DHE_DSS_WITH_DES_CBC_SHA\n- TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA\n- TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA\n- TLS_DHE_RSA_WITH_DES_CBC_SHA\n- TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA\n- TLS_DH_anon_EXPORT_WITH_RC4_40_MD5\n- TLS_DH_anon_WITH_RC4_128_MD5\n- TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA\n- TLS_DH_anon_WITH_DES_CBC_SHA\n- TLS_DH_anon_WITH_3DES_EDE_CBC_SHA\n- TLS_KRB5_WITH_DES_CBC_SHA\n- TLS_KRB5_WITH_3DES_EDE_CBC_SHA\n- TLS_KRB5_WITH_RC4_128_SHA\n- TLS_KRB5_WITH_IDEA_CBC_SHA\n- TLS_KRB5_WITH_DES_CBC_MD5\n- TLS_KRB5_WITH_3DES_EDE_CBC_MD5\n- TLS_KRB5_WITH_RC4_128_MD5\n- TLS_KRB5_WITH_IDEA_CBC_MD5\n- TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA\n- TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA\n- TLS_KRB5_EXPORT_WITH_RC4_40_SHA\n- TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5\n- TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5\n- TLS_KRB5_EXPORT_WITH_RC4_40_MD5\n- TLS_PSK_WITH_NULL_SHA\n- TLS_DHE_PSK_WITH_NULL_SHA\n- TLS_RSA_PSK_WITH_NULL_SHA\n- TLS_RSA_WITH_AES_128_CBC_SHA\n- TLS_DH_DSS_WITH_AES_128_CBC_SHA\n- TLS_DH_RSA_WITH_AES_128_CBC_SHA\n- TLS_DHE_DSS_WITH_AES_128_CBC_SHA\n- TLS_DHE_RSA_WITH_AES_128_CBC_SHA\n- TLS_DH_anon_WITH_AES_128_CBC_SHA\n- TLS_RSA_WITH_AES_256_CBC_SHA\n- TLS_DH_DSS_WITH_AES_256_CBC_SHA\n- TLS_DH_RSA_WITH_AES_256_CBC_SHA\n- TLS_DHE_DSS_WITH_AES_256_CBC_SHA\n- TLS_DHE_RSA_WITH_AES_256_CBC_SHA\n- TLS_DH_anon_WITH_AES_256_CBC_SHA\n- TLS_RSA_WITH_NULL_SHA256\n- TLS_RSA_WITH_AES_128_CBC_SHA256\n- TLS_RSA_WITH_AES_256_CBC_SHA256\n- TLS_DH_DSS_WITH_AES_128_CBC_SHA256\n- TLS_DH_RSA_WITH_AES_128_CBC_SHA256\n- TLS_DHE_DSS_WITH_AES_128_CBC_SHA256\n- TLS_RSA_WITH_CAMELLIA_128_CBC_SHA\n- TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA\n- TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA\n- TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA\n- TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA\n- TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA\n- TLS_DHE_RSA_WITH_AES_128_CBC_SHA256\n- TLS_DH_DSS_WITH_AES_256_CBC_SHA256\n- TLS_DH_RSA_WITH_AES_256_CBC_SHA256\n- TLS_DHE_DSS_WITH_AES_256_CBC_SHA256\n- TLS_DHE_RSA_WITH_AES_256_CBC_SHA256\n- TLS_DH_anon_WITH_AES_128_CBC_SHA256\n- TLS_DH_anon_WITH_AES_256_CBC_SHA256\n- TLS_RSA_WITH_CAMELLIA_256_CBC_SHA\n- TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA\n- TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA\n- TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA\n- TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA\n- TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA\n- TLS_PSK_WITH_RC4_128_SHA\n- TLS_PSK_WITH_3DES_EDE_CBC_SHA\n- TLS_PSK_WITH_AES_128_CBC_SHA\n- TLS_PSK_WITH_AES_256_CBC_SHA\n- TLS_DHE_PSK_WITH_RC4_128_SHA\n- TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA\n- TLS_DHE_PSK_WITH_AES_128_CBC_SHA\n- TLS_DHE_PSK_WITH_AES_256_CBC_SHA\n- TLS_RSA_PSK_WITH_RC4_128_SHA\n- TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA\n- TLS_RSA_PSK_WITH_AES_128_CBC_SHA\n- TLS_RSA_PSK_WITH_AES_256_CBC_SHA\n- TLS_RSA_WITH_SEED_CBC_SHA\n- TLS_DH_DSS_WITH_SEED_CBC_SHA\n- TLS_DH_RSA_WITH_SEED_CBC_SHA\n- TLS_DHE_DSS_WITH_SEED_CBC_SHA\n- TLS_DHE_RSA_WITH_SEED_CBC_SHA\n- TLS_DH_anon_WITH_SEED_CBC_SHA\n- TLS_RSA_WITH_AES_128_GCM_SHA256\n- TLS_RSA_WITH_AES_256_GCM_SHA384\n- TLS_DH_RSA_WITH_AES_128_GCM_SHA256\n- TLS_DH_RSA_WITH_AES_256_GCM_SHA384\n- TLS_DH_DSS_WITH_AES_128_GCM_SHA256\n- TLS_DH_DSS_WITH_AES_256_GCM_SHA384\n- TLS_DH_anon_WITH_AES_128_GCM_SHA256\n- TLS_DH_anon_WITH_AES_256_GCM_SHA384\n- TLS_PSK_WITH_AES_128_GCM_SHA256\n- TLS_PSK_WITH_AES_256_GCM_SHA384\n- TLS_RSA_PSK_WITH_AES_128_GCM_SHA256\n- TLS_RSA_PSK_WITH_AES_256_GCM_SHA384\n- TLS_PSK_WITH_AES_128_CBC_SHA256\n- TLS_PSK_WITH_AES_256_CBC_SHA384\n- TLS_PSK_WITH_NULL_SHA256\n- TLS_PSK_WITH_NULL_SHA384\n- TLS_DHE_PSK_WITH_AES_128_CBC_SHA256\n- TLS_DHE_PSK_WITH_AES_256_CBC_SHA384\n- TLS_DHE_PSK_WITH_NULL_SHA256\n- TLS_DHE_PSK_WITH_NULL_SHA384\n- TLS_RSA_PSK_WITH_AES_128_CBC_SHA256\n- TLS_RSA_PSK_WITH_AES_256_CBC_SHA384\n- TLS_RSA_PSK_WITH_NULL_SHA256\n- TLS_RSA_PSK_WITH_NULL_SHA384\n- TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256\n- TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256\n- TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256\n- TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256\n- TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256\n- TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256\n- TLS_EMPTY_RENEGOTIATION_INFO_SCSV\n- TLS_ECDH_ECDSA_WITH_NULL_SHA\n- TLS_ECDH_ECDSA_WITH_RC4_128_SHA\n- TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA\n- TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA\n- TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA\n- TLS_ECDHE_ECDSA_WITH_NULL_SHA\n- TLS_ECDHE_ECDSA_WITH_RC4_128_SHA\n- TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA\n- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA\n- TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA\n- TLS_ECDH_RSA_WITH_NULL_SHA\n- TLS_ECDH_RSA_WITH_RC4_128_SHA\n- TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA\n- TLS_ECDH_RSA_WITH_AES_128_CBC_SHA\n- TLS_ECDH_RSA_WITH_AES_256_CBC_SHA\n- TLS_ECDHE_RSA_WITH_NULL_SHA\n- TLS_ECDHE_RSA_WITH_RC4_128_SHA\n- TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA\n- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA\n- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA\n- TLS_ECDH_anon_WITH_NULL_SHA\n- TLS_ECDH_anon_WITH_RC4_128_SHA\n- TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA\n- TLS_ECDH_anon_WITH_AES_128_CBC_SHA\n- TLS_ECDH_anon_WITH_AES_256_CBC_SHA\n- TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA\n- TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA\n- TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA\n- TLS_SRP_SHA_WITH_AES_128_CBC_SHA\n- TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA\n- TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA\n- TLS_SRP_SHA_WITH_AES_256_CBC_SHA\n- TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA\n- TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA\n- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256\n- TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384\n- TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256\n- TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384\n- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256\n- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384\n- TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256\n- TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384\n- TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256\n- TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384\n- TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256\n- TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384\n- TLS_ECDHE_PSK_WITH_RC4_128_SHA\n- TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA\n- TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA\n- TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA\n- TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256\n- TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384\n- TLS_ECDHE_PSK_WITH_NULL_SHA\n- TLS_ECDHE_PSK_WITH_NULL_SHA256\n- TLS_ECDHE_PSK_WITH_NULL_SHA384\n- TLS_RSA_WITH_ARIA_128_CBC_SHA256\n- TLS_RSA_WITH_ARIA_256_CBC_SHA384\n- TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256\n- TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384\n- TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256\n- TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384\n- TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256\n- TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384\n- TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256\n- TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384\n- TLS_DH_anon_WITH_ARIA_128_CBC_SHA256\n- TLS_DH_anon_WITH_ARIA_256_CBC_SHA384\n- TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256\n- TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384\n- TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256\n- TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384\n- TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256\n- TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384\n- TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256\n- TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384\n- TLS_RSA_WITH_ARIA_128_GCM_SHA256\n- TLS_RSA_WITH_ARIA_256_GCM_SHA384\n- TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256\n- TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384\n- TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256\n- TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384\n- TLS_DH_anon_WITH_ARIA_128_GCM_SHA256\n- TLS_DH_anon_WITH_ARIA_256_GCM_SHA384\n- TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256\n- TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384\n- TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256\n- TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384\n- TLS_PSK_WITH_ARIA_128_CBC_SHA256\n- TLS_PSK_WITH_ARIA_256_CBC_SHA384\n- TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256\n- TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384\n- TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256\n- TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384\n- TLS_PSK_WITH_ARIA_128_GCM_SHA256\n- TLS_PSK_WITH_ARIA_256_GCM_SHA384\n- TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256\n- TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384\n- TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256\n- TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384\n- TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384\n- TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384\n- TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384\n- TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384\n- TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256\n- TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384\n- TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256\n- TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384\n- TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256\n- TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384\n- TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256\n- TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384\n- TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256\n- TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384\n- TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256\n- TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384\n- TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256\n- TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384\n- TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256\n- TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384\n- TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384\n- TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384\n- TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384\n- TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256\n- TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384\n- TLS_RSA_WITH_AES_128_CCM\n- TLS_RSA_WITH_AES_256_CCM\n- TLS_RSA_WITH_AES_128_CCM_8\n- TLS_RSA_WITH_AES_256_CCM_8\n- TLS_PSK_WITH_AES_128_CCM\n- TLS_PSK_WITH_AES_256_CCM\n- TLS_PSK_WITH_AES_128_CCM_8\n- TLS_PSK_WITH_AES_256_CCM_8\n\nFor more details, see Section 9.2.2.\n\n---\n\n## Appendix B. Changes from RFC 7540\n\nThis revision includes the following substantive changes:\n\n- Use of TLS 1.3 was defined based on [RFC8740] , which this document obsoletes.\n- The priority scheme defined in RFC 7540 is deprecated. Definitions for the format of the PRIORITY frame and the priority fields in the HEADERS frame have been retained, plus the rules governing when PRIORITY frames can be sent and received, but the semantics of these fields are only described in RFC 7540. The priority signaling scheme from RFC 7540 was not successful. Using the simpler signaling in [HTTP-PRIORITY] is recommended.\n- The HTTP/1.1 Upgrade mechanism is deprecated and no longer specified in this document. It was never widely deployed, with plaintext HTTP/2 users choosing to use the prior-knowledge implementation instead.\n- Validation for field names and values has been narrowed. The validation that is mandatory for intermediaries is precisely defined, and error reporting for requests has been amended to encourage sending 400-series status codes.\n- The ranges of codepoints for settings and frame types that were reserved for Experimental Use are now available for general use.\n- Connection-specific header fields -- which are prohibited -- are more precisely and comprehensively identified.\n- Host and \" :authority \" are no longer permitted to disagree.\n- Rules for sending Dynamic Table Size Update instructions after changes in settings have been clarified in Section 4.3.1 .\n\nEditorial changes are also included. In particular, changes to terminology and document structure are in response to updates to core HTTP semantics [HTTP]. Those documents now include some concepts that were first defined in RFC 7540, such as the 421 status code or connection coalescing.\n\n---\n\n## Acknowledgments\n\nCredit for non-trivial input to this document is owed to a large number of people who have contributed to the HTTP Working Group over the years. [RFC7540] contains a more extensive list of people that deserve acknowledgment for their contributions.\n\n---\n\n## Contributors\n\nMike Belshe and Roberto Peon authored the text that this document is based on.\n\n---\n\n## Authors' Addresses\n\n**Martin Thomson** (editor)\nMozilla\nAustralia\nEMail: [mt@lowentropy.net](mailto:mt@lowentropy.net)\n\n**Cory Benfield** (editor)\nApple Inc.\nEMail: [cbenfield@apple.com](mailto:cbenfield@apple.com)", "znaku_textu": 179276, "slov": 25838, "odkazu": 429, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:49", "sha256": "82697578db79b748fdbe068bd22860d9933e2799b6ccbf2c234dfffcb766d3a9", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9113", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9000.html", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc7541.html", "https://www.rfc-editor.org/rfc/rfc7540.html", "https://www.rfc-editor.org/rfc/rfc1122.html", "https://www.rfc-editor.org/rfc/rfc9112.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/rfc/rfc9111.html", "https://www.rfc-editor.org/rfc/rfc5246.html", "https://www.rfc-editor.org/rfc/rfc6973.html", "https://www.rfc-editor.org/info/std98", "https://dx.doi.org/10.17487/RFC9111", "https://www.rfc-editor.org/info/rfc9111", "https://dx.doi.org/10.17487/RFC7541", "https://www.rfc-editor.org/info/rfc7541", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://dx.doi.org/10.17487/RFC6265", "https://www.rfc-editor.org/info/rfc6265", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://dx.doi.org/10.17487/RFC9000", "https://www.rfc-editor.org/info/rfc9000", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "https://www.rfc-editor.org/info/rfc3986", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/rfc/rfc8422.html", "https://dx.doi.org/10.17487/RFC8422", "https://www.rfc-editor.org/info/rfc8422", "https://www.rfc-editor.org/rfc/rfc8470.html", "https://dx.doi.org/10.17487/RFC8470", "https://www.rfc-editor.org/info/rfc8470", "https://www.rfc-editor.org/rfc/rfc793.html", "https://www.rfc-editor.org/info/std7", "https://dx.doi.org/10.17487/RFC0793", "https://www.rfc-editor.org/info/rfc793", "https://www.rfc-editor.org/rfc/rfc7301.html", "https://dx.doi.org/10.17487/RFC7301", "https://www.rfc-editor.org/info/rfc7301", "https://www.rfc-editor.org/rfc/rfc5289.html", "https://dx.doi.org/10.17487/RFC5289", "https://www.rfc-editor.org/info/rfc5289", "https://www.rfc-editor.org/rfc/rfc6066.html", "https://dx.doi.org/10.17487/RFC6066", "https://www.rfc-editor.org/info/rfc6066", "https://dx.doi.org/10.17487/RFC5246", "https://www.rfc-editor.org/info/rfc5246", "https://www.rfc-editor.org/rfc/rfc8446.html", "https://dx.doi.org/10.17487/RFC8446", "https://www.rfc-editor.org/info/rfc8446", "https://www.rfc-editor.org/rfc/rfc7525.html", "https://www.rfc-editor.org/info/bcp195", "https://dx.doi.org/10.17487/RFC7525", "https://www.rfc-editor.org/info/rfc7525", "https://www.rfc-editor.org/rfc/rfc7838.html", "https://dx.doi.org/10.17487/RFC7838", "https://www.rfc-editor.org/info/rfc7838", "https://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf", "https://www.rfc-editor.org/rfc/rfc8499.html", "https://www.rfc-editor.org/info/bcp219", "https://dx.doi.org/10.17487/RFC8499", "https://www.rfc-editor.org/info/rfc8499", "https://www.rfc-editor.org/rfc/rfc9218.html", "https://dx.doi.org/10.17487/RFC9218", "https://www.rfc-editor.org/info/rfc9218", "https://www.rfc-editor.org/info/std99", "https://dx.doi.org/10.17487/RFC9112", "https://www.rfc-editor.org/info/rfc9112", "https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-002.md", "https://dx.doi.org/10.17487/RFC6973", "https://www.rfc-editor.org/info/rfc6973", "https://www.rfc-editor.org/info/std3", "https://dx.doi.org/10.17487/RFC1122", "https://www.rfc-editor.org/info/rfc1122", "https://www.rfc-editor.org/rfc/rfc3749.html", "https://dx.doi.org/10.17487/RFC3749", "https://www.rfc-editor.org/info/rfc3749", "https://www.rfc-editor.org/rfc/rfc6125.html", "https://dx.doi.org/10.17487/RFC6125", "https://www.rfc-editor.org/info/rfc6125", "https://www.rfc-editor.org/rfc/rfc6585.html", "https://dx.doi.org/10.17487/RFC6585", "https://www.rfc-editor.org/info/rfc6585", "https://www.rfc-editor.org/rfc/rfc7323.html", "https://dx.doi.org/10.17487/RFC7323", "https://www.rfc-editor.org/info/rfc7323", "https://dx.doi.org/10.17487/RFC7540"]} {"url": "https://httpwg.org/specs/rfc9114.html", "titulek": "RFC 9114 - HTTP/3", "h1": "HTTP/3", "popis": "The QUIC transport protocol has several features that are desirable in a transport for HTTP, such as stream multiplexing, per-stream flow control, and low-latency connection establishment. This document describes a mapping of HTTP semantics over QUIC. This document also identifies HTTP/2 features that are subsumed by QUIC and describes how HTTP/2 extensions can be ported to HTTP/3.", "klicova_slova": "HTTP/2, HPACK, QPACK, Web", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9114", "og:description": "HTTP/3", "og:url": "https://httpwg.org/specs/rfc9114.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Prior Versions of HTTP"}, {"uroven": 3, "text": "1.2. Delegation to QUIC"}, {"uroven": 2, "text": "2. HTTP/3 Protocol Overview"}, {"uroven": 3, "text": "2.1. Document Organization"}, {"uroven": 3, "text": "2.2. Conventions and Terminology"}, {"uroven": 2, "text": "3. Connection Setup and Management"}, {"uroven": 3, "text": "3.1. Discovering an HTTP/3 Endpoint"}, {"uroven": 4, "text": "3.1.1. HTTP Alternative Services"}, {"uroven": 4, "text": "3.1.2. Other Schemes"}, {"uroven": 3, "text": "3.2. Connection Establishment"}, {"uroven": 3, "text": "3.3. Connection Reuse"}, {"uroven": 2, "text": "4. Expressing HTTP Semantics in HTTP/3"}, {"uroven": 3, "text": "4.1. HTTP Message Framing"}, {"uroven": 4, "text": "4.1.1. Request Cancellation and Rejection"}, {"uroven": 4, "text": "4.1.2. Malformed Requests and Responses"}, {"uroven": 3, "text": "4.3. HTTP Control Data"}, {"uroven": 3, "text": "4.4. The CONNECT Method"}, {"uroven": 3, "text": "4.5. HTTP Upgrade"}, {"uroven": 3, "text": "4.6. Server Push"}, {"uroven": 2, "text": "5. Connection Closure"}, {"uroven": 3, "text": "5.1. Idle Connections"}, {"uroven": 3, "text": "5.2. Connection Shutdown"}, {"uroven": 3, "text": "5.3. Immediate Application Closure"}, {"uroven": 3, "text": "5.4. Transport Closure"}, {"uroven": 2, "text": "6. Stream Mapping and Usage"}, {"uroven": 3, "text": "6.1. Bidirectional Streams"}, {"uroven": 3, "text": "6.2. Unidirectional Streams"}, {"uroven": 4, "text": "6.2.1. Control Streams"}, {"uroven": 4, "text": "6.2.2. Push Streams"}, {"uroven": 4, "text": "6.2.3. Reserved Stream Types"}, {"uroven": 2, "text": "7. HTTP Framing Layer"}, {"uroven": 3, "text": "7.1. Frame Layout"}, {"uroven": 3, "text": "7.2. Frame Definitions"}, {"uroven": 4, "text": "7.2.1. DATA"}, {"uroven": 4, "text": "7.2.2. HEADERS"}, {"uroven": 4, "text": "7.2.3. CANCEL_PUSH"}, {"uroven": 4, "text": "7.2.4. SETTINGS"}, {"uroven": 5, "text": "7.2.4.1. Defined SETTINGS Parameters"}, {"uroven": 5, "text": "7.2.4.2. Initialization"}, {"uroven": 4, "text": "7.2.5. PUSH_PROMISE"}, {"uroven": 4, "text": "7.2.6. GOAWAY"}, {"uroven": 4, "text": "7.2.7. MAX_PUSH_ID"}, {"uroven": 4, "text": "7.2.8. Reserved Frame Types"}, {"uroven": 2, "text": "8. Error Handling"}, {"uroven": 3, "text": "8.1. HTTP/3 Error Codes"}, {"uroven": 2, "text": "9. Extensions to HTTP/3"}, {"uroven": 2, "text": "10. Security Considerations"}, {"uroven": 3, "text": "10.1. Server Authority"}, {"uroven": 3, "text": "10.2. Cross-Protocol Attacks"}, {"uroven": 3, "text": "10.3. Intermediary-Encapsulation Attacks"}, {"uroven": 3, "text": "10.4. Cacheability of Pushed Responses"}, {"uroven": 3, "text": "10.5. Denial-of-Service Considerations"}, {"uroven": 4, "text": "10.5.1. Limits on Field Section Size"}, {"uroven": 4, "text": "10.5.2. CONNECT Issues"}, {"uroven": 3, "text": "10.6. Use of Compression"}, {"uroven": 3, "text": "10.7. Padding and Traffic Analysis"}, {"uroven": 3, "text": "10.8. Frame Parsing"}, {"uroven": 3, "text": "10.9. Early Data"}, {"uroven": 3, "text": "10.10. Migration"}, {"uroven": 3, "text": "10.11. Privacy Considerations"}, {"uroven": 2, "text": "11. IANA Considerations"}, {"uroven": 3, "text": "11.1. Registration of HTTP/3 Identification String"}, {"uroven": 3, "text": "11.2. New Registries"}, {"uroven": 4, "text": "11.2.1. Frame Types"}, {"uroven": 4, "text": "11.2.2. Settings Parameters"}, {"uroven": 4, "text": "11.2.3. Error Codes"}, {"uroven": 4, "text": "11.2.4. Stream Types"}, {"uroven": 2, "text": "12. References"}, {"uroven": 3, "text": "12.1. Normative References"}, {"uroven": 3, "text": "12.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Considerations for Transitioning from HTTP/2"}, {"uroven": 3, "text": "A.1. Streams"}, {"uroven": 3, "text": "A.2. HTTP Frame Types"}, {"uroven": 4, "text": "A.2.1. Prioritization Differences"}, {"uroven": 4, "text": "A.2.2. Field Compression Differences"}, {"uroven": 4, "text": "A.2.3. Flow-Control Differences"}, {"uroven": 4, "text": "A.2.4. Guidance for New Frame Type Definitions"}, {"uroven": 4, "text": "A.2.5. Comparison of HTTP/2 and HTTP/3 Frame Types"}, {"uroven": 3, "text": "A.3. HTTP/2 SETTINGS Parameters"}, {"uroven": 3, "text": "A.4. HTTP/2 Error Codes"}, {"uroven": 4, "text": "A.4.1. Mapping between HTTP/2 and HTTP/3 Errors"}, {"uroven": 2, "text": "Acknowledgments"}, {"uroven": 2, "text": "Index"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThe QUIC transport protocol has several features that are desirable in a transport for HTTP, such as stream multiplexing, per-stream flow control, and low-latency connection establishment. This document describes a mapping of HTTP semantics over QUIC. This document also identifies HTTP/2 features that are subsumed by QUIC and describes how HTTP/2 extensions can be ported to HTTP/3.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9114](https://www.rfc-editor.org/info/rfc9114).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Prior Versions of HTTP\n - 1.2. Delegation to QUIC\n- 2. HTTP/3 Protocol Overview\n - 2.1. Document Organization\n - 2.2. Conventions and Terminology\n- 3. Connection Setup and Management\n - 3.1. Discovering an HTTP/3 Endpoint\n - 3.1.1. HTTP Alternative Services\n - 3.1.2. Other Schemes\n - 3.2. Connection Establishment\n - 3.3. Connection Reuse\n- 4. Expressing HTTP Semantics in HTTP/3\n - 4.1. HTTP Message Framing\n - 4.1.1. Request Cancellation and Rejection\n - 4.1.2. Malformed Requests and Responses\n - 4.2. HTTP Fields\n - 4.2.1. Field Compression\n - 4.2.2. Header Size Constraints\n - 4.3. HTTP Control Data\n - 4.3.1. Request Pseudo-Header Fields\n - 4.3.2. Response Pseudo-Header Fields\n - 4.4. The CONNECT Method\n - 4.5. HTTP Upgrade\n - 4.6. Server Push\n- 5. Connection Closure\n - 5.1. Idle Connections\n - 5.2. Connection Shutdown\n - 5.3. Immediate Application Closure\n - 5.4. Transport Closure\n- 6. Stream Mapping and Usage\n - 6.1. Bidirectional Streams\n - 6.2. Unidirectional Streams\n - 6.2.1. Control Streams\n - 6.2.2. Push Streams\n - 6.2.3. Reserved Stream Types\n- 7. HTTP Framing Layer\n - 7.1. Frame Layout\n - 7.2. Frame Definitions\n - 7.2.1. DATA\n - 7.2.2. HEADERS\n - 7.2.3. CANCEL_PUSH\n - 7.2.4. SETTINGS\n - 7.2.5. PUSH_PROMISE\n - 7.2.6. GOAWAY\n - 7.2.7. MAX_PUSH_ID\n - 7.2.8. Reserved Frame Types\n- 8. Error Handling\n - 8.1. HTTP/3 Error Codes\n- 9. Extensions to HTTP/3\n- 10. Security Considerations\n - 10.1. Server Authority\n - 10.2. Cross-Protocol Attacks\n - 10.3. Intermediary-Encapsulation Attacks\n - 10.4. Cacheability of Pushed Responses\n - 10.5. Denial-of-Service Considerations\n - 10.5.1. Limits on Field Section Size\n - 10.5.2. CONNECT Issues\n - 10.6. Use of Compression\n - 10.7. Padding and Traffic Analysis\n - 10.8. Frame Parsing\n - 10.9. Early Data\n - 10.10. Migration\n - 10.11. Privacy Considerations\n- 11. IANA Considerations\n - 11.1. Registration of HTTP/3 Identification String\n - 11.2. New Registries\n - 11.2.1. Frame Types\n - 11.2.2. Settings Parameters\n - 11.2.3. Error Codes\n - 11.2.4. Stream Types\n- 12. References\n - 12.1. Normative References\n - 12.2. Informative References\n- Appendix A. Considerations for Transitioning from HTTP/2\n - A.1. Streams\n - A.2. HTTP Frame Types\n - A.2.1. Prioritization Differences\n - A.2.2. Field Compression Differences\n - A.2.3. Flow-Control Differences\n - A.2.4. Guidance for New Frame Type Definitions\n - A.2.5. Comparison of HTTP/2 and HTTP/3 Frame Types\n - A.3. HTTP/2 SETTINGS Parameters\n - A.4. HTTP/2 Error Codes\n - A.4.1. Mapping between HTTP/2 and HTTP/3 Errors\n- Acknowledgments\n- Index\n- Author's Address\n\n---\n\n## 1. Introduction\n\nHTTP semantics ([HTTP]) are used for a broad range of services on the Internet. These semantics have most commonly been used with HTTP/1.1 and HTTP/2. HTTP/1.1 has been used over a variety of transport and session layers, while HTTP/2 has been used primarily with TLS over TCP. HTTP/3 supports the same semantics over a new transport protocol: QUIC.\n\n### 1.1. Prior Versions of HTTP\n\nHTTP/1.1 ([HTTP/1.1]) uses whitespace-delimited text fields to convey HTTP messages. While these exchanges are human readable, using whitespace for message formatting leads to parsing complexity and excessive tolerance of variant behavior.\n\nBecause HTTP/1.1 does not include a multiplexing layer, multiple TCP connections are often used to service requests in parallel. However, that has a negative impact on congestion control and network efficiency, since TCP does not share congestion control across multiple connections.\n\nHTTP/2 ([HTTP/2]) introduced a binary framing and multiplexing layer to improve latency without modifying the transport layer. However, because the parallel nature of HTTP/2's multiplexing is not visible to TCP's loss recovery mechanisms, a lost or reordered packet causes all active transactions to experience a stall regardless of whether that transaction was directly impacted by the lost packet.\n\n### 1.2. Delegation to QUIC\n\nThe QUIC transport protocol incorporates stream multiplexing and per-stream flow control, similar to that provided by the HTTP/2 framing layer. By providing reliability at the stream level and congestion control across the entire connection, QUIC has the capability to improve the performance of HTTP compared to a TCP mapping. QUIC also incorporates TLS 1.3 ([TLS]) at the transport layer, offering comparable confidentiality and integrity to running TLS over TCP, with the improved connection setup latency of TCP Fast Open ([TFO]).\n\nThis document defines HTTP/3: a mapping of HTTP semantics over the QUIC transport protocol, drawing heavily on the design of HTTP/2. HTTP/3 relies on QUIC to provide confidentiality and integrity protection of data; peer authentication; and reliable, in-order, per-stream delivery. While delegating stream lifetime and flow-control issues to QUIC, a binary framing similar to the HTTP/2 framing is used on each stream. Some HTTP/2 features are subsumed by QUIC, while other features are implemented atop QUIC.\n\nQUIC is described in [QUIC-TRANSPORT]. For a full description of HTTP/2, see [HTTP/2].\n\n---\n\n## 2. HTTP/3 Protocol Overview\n\nHTTP/3 provides a transport for HTTP semantics using the QUIC transport protocol and an internal framing layer similar to HTTP/2.\n\nOnce a client knows that an HTTP/3 server exists at a certain endpoint, it opens a QUIC connection. QUIC provides protocol negotiation, stream-based multiplexing, and flow control. Discovery of an HTTP/3 endpoint is described in Section 3.1.\n\nWithin each stream, the basic unit of HTTP/3 communication is a frame (Section 7.2). Each frame type serves a different purpose. For example, HEADERS and DATA frames form the basis of HTTP requests and responses (Section 4.1). Frames that apply to the entire connection are conveyed on a dedicated control stream.\n\nMultiplexing of requests is performed using the QUIC stream abstraction, which is described in [Section 2](https://www.rfc-editor.org/rfc/rfc9000.html#section-2) of [QUIC-TRANSPORT]. Each request-response pair consumes a single QUIC stream. Streams are independent of each other, so one stream that is blocked or suffers packet loss does not prevent progress on other streams.\n\nServer push is an interaction mode introduced in HTTP/2 ([HTTP/2]) that permits a server to push a request-response exchange to a client in anticipation of the client making the indicated request. This trades off network usage against a potential latency gain. Several HTTP/3 frames are used to manage server push, such as PUSH_PROMISE, MAX_PUSH_ID, and CANCEL_PUSH.\n\nAs in HTTP/2, request and response fields are compressed for transmission. Because HPACK ([HPACK]) relies on in-order transmission of compressed field sections (a guarantee not provided by QUIC), HTTP/3 replaces HPACK with QPACK ([QPACK]). QPACK uses separate unidirectional streams to modify and track field table state, while encoded field sections refer to the state of the table without modifying it.\n\n### 2.1. Document Organization\n\nThe following sections provide a detailed overview of the lifecycle of an HTTP/3 connection:\n\n- \" Connection Setup and Management \" ( Section 3 ) covers how an HTTP/3 endpoint is discovered and an HTTP/3 connection is established.\n- \" Expressing HTTP Semantics in HTTP/3 \" ( Section 4 ) describes how HTTP semantics are expressed using frames.\n- \" Connection Closure \" ( Section 5 ) describes how HTTP/3 connections are terminated, either gracefully or abruptly.\n\nThe details of the wire protocol and interactions with the transport are described in subsequent sections:\n\n- \" Stream Mapping and Usage \" ( Section 6 ) describes the way QUIC streams are used.\n- \" HTTP Framing Layer \" ( Section 7 ) describes the frames used on most streams.\n- \" Error Handling \" ( Section 8 ) describes how error conditions are handled and expressed, either on a particular stream or for the connection as a whole.\n\nAdditional resources are provided in the final sections:\n\n- \" Extensions to HTTP/3 \" ( Section 9 ) describes how new capabilities can be added in future documents.\n- A more detailed comparison between HTTP/2 and HTTP/3 can be found in Appendix A .\n\n### 2.2. Conventions and Terminology\n\nThe 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.\n\nThis document uses the variable-length integer encoding from [QUIC-TRANSPORT].\n\nThe following terms are used:\n\nabort:\n\nAn abrupt termination of a connection or stream, possibly due to an error condition.\n\nclient:\n\nThe endpoint that initiates an HTTP/3 connection. Clients send HTTP requests and receive HTTP responses.\n\nconnection:\n\nA transport-layer connection between two endpoints using QUIC as the transport protocol.\n\nconnection error:\n\nAn error that affects the entire HTTP/3 connection.\n\nendpoint:\n\nEither the client or server of the connection.\n\nframe:\n\nThe smallest unit of communication on a stream in HTTP/3, consisting of a header and a variable-length sequence of bytes structured according to the frame type.Protocol elements called \"frames\" exist in both this document and [QUIC-TRANSPORT]. Where frames from [QUIC-TRANSPORT] are referenced, the frame name will be prefaced with \"QUIC\". For example, \"QUIC CONNECTION_CLOSE frames\". References without this preface refer to frames defined in Section 7.2.\n\nHTTP/3 connection:\n\nA QUIC connection where the negotiated application protocol is HTTP/3.\n\npeer:\n\nAn endpoint. When discussing a particular endpoint, \"peer\" refers to the endpoint that is remote to the primary subject of discussion.\n\nreceiver:\n\nAn endpoint that is receiving frames.\n\nsender:\n\nAn endpoint that is transmitting frames.\n\nserver:\n\nThe endpoint that accepts an HTTP/3 connection. Servers receive HTTP requests and send HTTP responses.\n\nstream:\n\nA bidirectional or unidirectional bytestream provided by the QUIC transport. All streams within an HTTP/3 connection can be considered \"HTTP/3 streams\", but multiple stream types are defined within HTTP/3.\n\nstream error:\n\nAn application-level error on the individual stream.\n\nThe term \"content\" is defined in [Section 6.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.4) of [HTTP].\n\nFinally, the terms \"resource\", \"message\", \"user agent\", \"origin server\", \"gateway\", \"intermediary\", \"proxy\", and \"tunnel\" are defined in [Section 3](https://www.rfc-editor.org/rfc/rfc9110.html#section-3) of [HTTP].\n\nPacket diagrams in this document use the format defined in [Section 1.3](https://www.rfc-editor.org/rfc/rfc9000.html#section-1.3) of [QUIC-TRANSPORT] to illustrate the order and size of fields.\n\n---\n\n## 3. Connection Setup and Management\n\n### 3.1. Discovering an HTTP/3 Endpoint\n\nHTTP relies on the notion of an authoritative response: a response that has been determined to be the most appropriate response for that request given the state of the target resource at the time of response message origination by (or at the direction of) the origin server identified within the target URI. Locating an authoritative server for an HTTP URI is discussed in [Section 4.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.3) of [HTTP].\n\nThe \"https\" scheme associates authority with possession of a certificate that the client considers to be trustworthy for the host identified by the authority component of the URI. Upon receiving a server certificate in the TLS handshake, the client *MUST* verify that the certificate is an acceptable match for the URI's origin server using the process described in [Section 4.3.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.3.4) of [HTTP]. If the certificate cannot be verified with respect to the URI's origin server, the client *MUST NOT* consider the server authoritative for that origin.\n\nA client *MAY* attempt access to a resource with an \"https\" URI by resolving the host identifier to an IP address, establishing a QUIC connection to that address on the indicated port (including validation of the server certificate as described above), and sending an HTTP/3 request message targeting the URI to the server over that secured connection. Unless some other mechanism is used to select HTTP/3, the token \"h3\" is used in the Application-Layer Protocol Negotiation (ALPN; see [RFC7301]) extension during the TLS handshake.\n\nConnectivity problems (e.g., blocking UDP) can result in a failure to establish a QUIC connection; clients *SHOULD* attempt to use TCP-based versions of HTTP in this case.\n\nServers *MAY* serve HTTP/3 on any UDP port; an alternative service advertisement always includes an explicit port, and URIs contain either an explicit port or a default port associated with the scheme.\n\n#### 3.1.1. HTTP Alternative Services\n\nAn HTTP origin can advertise the availability of an equivalent HTTP/3 endpoint via the Alt-Svc HTTP response header field or the HTTP/2 ALTSVC frame ([ALTSVC]) using the \"h3\" ALPN token.\n\nFor example, an origin could indicate in an HTTP response that HTTP/3 was available on UDP port 50781 at the same hostname by including the following header field:\n\n```\nAlt-Svc: h3=\":50781\"\n```\n\nOn receipt of an Alt-Svc record indicating HTTP/3 support, a client *MAY* attempt to establish a QUIC connection to the indicated host and port; if this connection is successful, the client can send HTTP requests using the mapping described in this document.\n\n#### 3.1.2. Other Schemes\n\nAlthough HTTP is independent of the transport protocol, the \"http\" scheme associates authority with the ability to receive TCP connections on the indicated port of whatever host is identified within the authority component. Because HTTP/3 does not use TCP, HTTP/3 cannot be used for direct access to the authoritative server for a resource identified by an \"http\" URI. However, protocol extensions such as [ALTSVC] permit the authoritative server to identify other services that are also authoritative and that might be reachable over HTTP/3.\n\nPrior to making requests for an origin whose scheme is not \"https\", the client *MUST* ensure the server is willing to serve that scheme. For origins whose scheme is \"http\", an experimental method to accomplish this is described in [RFC8164]. Other mechanisms might be defined for various schemes in the future.\n\n### 3.2. Connection Establishment\n\nHTTP/3 relies on QUIC version 1 as the underlying transport. The use of other QUIC transport versions with HTTP/3 *MAY* be defined by future specifications.\n\nQUIC version 1 uses TLS version 1.3 or greater as its handshake protocol. HTTP/3 clients *MUST* support a mechanism to indicate the target host to the server during the TLS handshake. If the server is identified by a domain name ([DNS-TERMS]), clients *MUST* send the Server Name Indication (SNI; [RFC6066]) TLS extension unless an alternative mechanism to indicate the target host is used.\n\nQUIC connections are established as described in [QUIC-TRANSPORT]. During connection establishment, HTTP/3 support is indicated by selecting the ALPN token \"h3\" in the TLS handshake. Support for other application-layer protocols *MAY* be offered in the same handshake.\n\nWhile connection-level options pertaining to the core QUIC protocol are set in the initial crypto handshake, settings specific to HTTP/3 are conveyed in the SETTINGS frame. After the QUIC connection is established, a SETTINGS frame *MUST* be sent by each endpoint as the initial frame of their respective HTTP control stream.\n\n### 3.3. Connection Reuse\n\nHTTP/3 connections are persistent across multiple requests. For best performance, it is expected that clients will not close connections until it is determined that no further communication with a server is necessary (for example, when a user navigates away from a particular web page) or until the server closes the connection.\n\nOnce a connection to a server endpoint exists, this connection *MAY* be reused for requests with multiple different URI authority components. To use an existing connection for a new origin, clients *MUST* validate the certificate presented by the server for the new origin server using the process described in [Section 4.3.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.3.4) of [HTTP]. This implies that clients will need to retain the server certificate and any additional information needed to verify that certificate; clients that do not do so will be unable to reuse the connection for additional origins.\n\nIf the certificate is not acceptable with regard to the new origin for any reason, the connection *MUST NOT* be reused and a new connection *SHOULD* be established for the new origin. If the reason the certificate cannot be verified might apply to other origins already associated with the connection, the client *SHOULD* revalidate the server certificate for those origins. For instance, if validation of a certificate fails because the certificate has expired or been revoked, this might be used to invalidate all other origins for which that certificate was used to establish authority.\n\nClients *SHOULD NOT* open more than one HTTP/3 connection to a given IP address and UDP port, where the IP address and port might be derived from a URI, a selected alternative service ([ALTSVC]), a configured proxy, or name resolution of any of these. A client *MAY* open multiple HTTP/3 connections to the same IP address and UDP port using different transport or TLS configurations but *SHOULD* avoid creating multiple connections with the same configuration.\n\nServers are encouraged to maintain open HTTP/3 connections for as long as possible but are permitted to terminate idle connections if necessary. When either endpoint chooses to close the HTTP/3 connection, the terminating endpoint *SHOULD* first send a GOAWAY frame (Section 5.2) so that both endpoints can reliably determine whether previously sent frames have been processed and gracefully complete or terminate any necessary remaining tasks.\n\nA server that does not wish clients to reuse HTTP/3 connections for a particular origin can indicate that it is not authoritative for a request by sending a 421 (Misdirected Request) status code in response to the request; see [Section 7.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.4) of [HTTP].\n\n---\n\n## 4. Expressing HTTP Semantics in HTTP/3\n\n### 4.1. HTTP Message Framing\n\nA client sends an HTTP request on a request stream, which is a client-initiated bidirectional QUIC stream; see Section 6.1. A client *MUST* send only a single request on a given stream. A server sends zero or more interim HTTP responses on the same stream as the request, followed by a single final HTTP response, as detailed below. See [Section 15](https://www.rfc-editor.org/rfc/rfc9110.html#section-15) of [HTTP] for a description of interim and final HTTP responses.\n\nPushed responses are sent on a server-initiated unidirectional QUIC stream; see Section 6.2.2. A server sends zero or more interim HTTP responses, followed by a single final HTTP response, in the same manner as a standard response. Push is described in more detail in Section 4.6.\n\nOn a given stream, receipt of multiple requests or receipt of an additional HTTP response following a final HTTP response *MUST* be treated as malformed.\n\nAn HTTP message (request or response) consists of:\n\n1. the header section, including message control data, sent as a single HEADERS frame,\n2. optionally, the content, if present, sent as a series of DATA frames, and\n3. optionally, the trailer section, if present, sent as a single HEADERS frame.\n\nHeader and trailer sections are described in Sections [6.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.3) and [6.5](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.5) of [HTTP]; the content is described in [Section 6.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.4) of [HTTP].\n\nReceipt of an invalid sequence of frames *MUST* be treated as a connection error of type H3_FRAME_UNEXPECTED. In particular, a DATA frame before any HEADERS frame, or a HEADERS or DATA frame after the trailing HEADERS frame, is considered invalid. Other frame types, especially unknown frame types, might be permitted subject to their own rules; see Section 9.\n\nA server *MAY* send one or more PUSH_PROMISE frames before, after, or interleaved with the frames of a response message. These PUSH_PROMISE frames are not part of the response; see Section 4.6 for more details. PUSH_PROMISE frames are not permitted on push streams; a pushed response that includes PUSH_PROMISE frames *MUST* be treated as a connection error of type H3_FRAME_UNEXPECTED.\n\nFrames of unknown types (Section 9), including reserved frames (Section 7.2.8) *MAY* be sent on a request or push stream before, after, or interleaved with other frames described in this section.\n\nThe HEADERS and PUSH_PROMISE frames might reference updates to the QPACK dynamic table. While these updates are not directly part of the message exchange, they must be received and processed before the message can be consumed. See Section 4.2 for more details.\n\nTransfer codings (see [Section 7](https://www.rfc-editor.org/rfc/rfc9112.html#section-7) of [HTTP/1.1]) are not defined for HTTP/3; the Transfer-Encoding header field *MUST NOT* be used.\n\nA response *MAY* consist of multiple messages when and only when one or more interim responses (1xx; see [Section 15.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.2) of [HTTP]) precede a final response to the same request. Interim responses do not contain content or trailer sections.\n\nAn HTTP request/response exchange fully consumes a client-initiated bidirectional QUIC stream. After sending a request, a client *MUST* close the stream for sending. Unless using the CONNECT method (see Section 4.4), clients *MUST NOT* make stream closure dependent on receiving a response to their request. After sending a final response, the server *MUST* close the stream for sending. At this point, the QUIC stream is fully closed.\n\nWhen a stream is closed, this indicates the end of the final HTTP message. Because some messages are large or unbounded, endpoints *SHOULD* begin processing partial HTTP messages once enough of the message has been received to make progress. If a client-initiated stream terminates without enough of the HTTP message to provide a complete response, the server *SHOULD* abort its response stream with the error code H3_REQUEST_INCOMPLETE.\n\nA server can send a complete response prior to the client sending an entire request if the response does not depend on any portion of the request that has not been sent and received. When the server does not need to receive the remainder of the request, it *MAY* abort reading the request stream, send a complete response, and cleanly close the sending part of the stream. The error code H3_NO_ERROR *SHOULD* be used when requesting that the client stop sending on the request stream. Clients *MUST NOT* discard complete responses as a result of having their request terminated abruptly, though clients can always discard responses at their discretion for other reasons. If the server sends a partial or complete response but does not abort reading the request, clients *SHOULD* continue sending the content of the request and close the stream normally.\n\n#### 4.1.1. Request Cancellation and Rejection\n\nOnce a request stream has been opened, the request *MAY* be cancelled by either endpoint. Clients cancel requests if the response is no longer of interest; servers cancel requests if they are unable to or choose not to respond. When possible, it is *RECOMMENDED* that servers send an HTTP response with an appropriate status code rather than cancelling a request it has already begun processing.\n\nImplementations *SHOULD* cancel requests by abruptly terminating any directions of a stream that are still open. To do so, an implementation resets the sending parts of streams and aborts reading on the receiving parts of streams; see [Section 2.4](https://www.rfc-editor.org/rfc/rfc9000.html#section-2.4) of [QUIC-TRANSPORT].\n\nWhen the server cancels a request without performing any application processing, the request is considered \"rejected\". The server *SHOULD* abort its response stream with the error code H3_REQUEST_REJECTED. In this context, \"processed\" means that some data from the stream was passed to some higher layer of software that might have taken some action as a result. The client can treat requests rejected by the server as though they had never been sent at all, thereby allowing them to be retried later.\n\nServers *MUST NOT* use the H3_REQUEST_REJECTED error code for requests that were partially or fully processed. When a server abandons a response after partial processing, it *SHOULD* abort its response stream with the error code H3_REQUEST_CANCELLED.\n\nClient *SHOULD* use the error code H3_REQUEST_CANCELLED to cancel requests. Upon receipt of this error code, a server *MAY* abruptly terminate the response using the error code H3_REQUEST_REJECTED if no processing was performed. Clients *MUST NOT* use the H3_REQUEST_REJECTED error code, except when a server has requested closure of the request stream with this error code.\n\nIf a stream is cancelled after receiving a complete response, the client *MAY* ignore the cancellation and use the response. However, if a stream is cancelled after receiving a partial response, the response *SHOULD NOT* be used. Only idempotent actions such as GET, PUT, or DELETE can be safely retried; a client *SHOULD NOT* automatically retry a request with a non-idempotent method unless it has some means to know that the request semantics are idempotent independent of the method or some means to detect that the original request was never applied. See [Section 9.2.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.2) of [HTTP] for more details.\n\n#### 4.1.2. Malformed Requests and Responses\n\nA malformed request or response is one that is an otherwise valid sequence of frames but is invalid due to:\n\n- the presence of prohibited fields or pseudo-header fields,\n- the absence of mandatory pseudo-header fields,\n- invalid values for pseudo-header fields,\n- pseudo-header fields after fields,\n- an invalid sequence of HTTP messages,\n- the inclusion of uppercase field names, or\n- the inclusion of invalid characters in field names or values.\n\nA request or response that is defined as having content when it contains a Content-Length header field ([Section 8.6](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.6) of [HTTP]) is malformed if the value of the Content-Length header field does not equal the sum of the DATA frame lengths received. A response that is defined as never having content, even when a Content-Length is present, can have a non-zero Content-Length header field even though no content is included in DATA frames.\n\nIntermediaries that process HTTP requests or responses (i.e., any intermediary not acting as a tunnel) *MUST NOT* forward a malformed request or response. Malformed requests or responses that are detected *MUST* be treated as a stream error of type H3_MESSAGE_ERROR.\n\nFor malformed requests, a server *MAY* send an HTTP response indicating the error prior to closing or resetting the stream. Clients *MUST NOT* accept a malformed response. Note that these requirements are intended to protect against several types of common attacks against HTTP; they are deliberately strict because being permissive can expose implementations to these vulnerabilities.\n\n### 4.3. HTTP Control Data\n\nLike HTTP/2, HTTP/3 employs a series of pseudo-header fields, where the field name begins with the : character (ASCII 0x3a). These pseudo-header fields convey message control data; see [Section 6.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.2) of [HTTP].\n\nPseudo-header fields are not HTTP fields. Endpoints *MUST NOT* generate pseudo-header fields other than those defined in this document. However, an extension could negotiate a modification of this restriction; see Section 9.\n\nPseudo-header fields are only valid in the context in which they are defined. Pseudo-header fields defined for requests *MUST NOT* appear in responses; pseudo-header fields defined for responses *MUST NOT* appear in requests. Pseudo-header fields *MUST NOT* appear in trailer sections. Endpoints *MUST* treat a request or response that contains undefined or invalid pseudo-header fields as malformed.\n\nAll pseudo-header fields *MUST* appear in the header section before regular header fields. Any request or response that contains a pseudo-header field that appears in a header section after a regular header field *MUST* be treated as malformed.\n\n### 4.4. The CONNECT Method\n\nThe CONNECT method requests that the recipient establish a tunnel to the destination origin server identified by the request-target; see [Section 9.3.6](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.6) of [HTTP]. It is primarily used with HTTP proxies to establish a TLS session with an origin server for the purposes of interacting with \"https\" resources.\n\nIn HTTP/1.x, CONNECT is used to convert an entire HTTP connection into a tunnel to a remote host. In HTTP/2 and HTTP/3, the CONNECT method is used to establish a tunnel over a single stream.\n\nA CONNECT request *MUST* be constructed as follows:\n\n- The :method pseudo-header field is set to \"CONNECT\"\n- The :scheme and :path pseudo-header fields are omitted\n- The :authority pseudo-header field contains the host and port to connect to (equivalent to the authority-form of the request-target of CONNECT requests; see [Section 7.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1) of [HTTP] ).\n\nThe request stream remains open at the end of the request to carry the data to be transferred. A CONNECT request that does not conform to these restrictions is malformed.\n\nA proxy that supports CONNECT establishes a TCP connection ([RFC0793]) to the server identified in the :authority pseudo-header field. Once this connection is successfully established, the proxy sends a HEADERS frame containing a 2xx series status code to the client, as defined in [Section 15.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.3) of [HTTP].\n\nAll DATA frames on the stream correspond to data sent or received on the TCP connection. The payload of any DATA frame sent by the client is transmitted by the proxy to the TCP server; data received from the TCP server is packaged into DATA frames by the proxy. Note that the size and number of TCP segments is not guaranteed to map predictably to the size and number of HTTP DATA or QUIC STREAM frames.\n\nOnce the CONNECT method has completed, only DATA frames are permitted to be sent on the stream. Extension frames *MAY* be used if specifically permitted by the definition of the extension. Receipt of any other known frame type *MUST* be treated as a connection error of type H3_FRAME_UNEXPECTED.\n\nThe TCP connection can be closed by either peer. When the client ends the request stream (that is, the receive stream at the proxy enters the \"Data Recvd\" state), the proxy will set the FIN bit on its connection to the TCP server. When the proxy receives a packet with the FIN bit set, it will close the send stream that it sends to the client. TCP connections that remain half closed in a single direction are not invalid, but are often handled poorly by servers, so clients *SHOULD NOT* close a stream for sending while they still expect to receive data from the target of the CONNECT.\n\nA TCP connection error is signaled by abruptly terminating the stream. A proxy treats any error in the TCP connection, which includes receiving a TCP segment with the RST bit set, as a stream error of type H3_CONNECT_ERROR.\n\nCorrespondingly, if a proxy detects an error with the stream or the QUIC connection, it *MUST* close the TCP connection. If the proxy detects that the client has reset the stream or aborted reading from the stream, it *MUST* close the TCP connection. If the stream is reset or reading is aborted by the client, a proxy *SHOULD* perform the same operation on the other direction in order to ensure that both directions of the stream are cancelled. In all these cases, if the underlying TCP implementation permits it, the proxy *SHOULD* send a TCP segment with the RST bit set.\n\nSince CONNECT creates a tunnel to an arbitrary server, proxies that support CONNECT *SHOULD* restrict its use to a set of known ports or a list of safe request targets; see [Section 9.3.6](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.6) of [HTTP] for more details.\n\n### 4.5. HTTP Upgrade\n\nHTTP/3 does not support the HTTP Upgrade mechanism ([Section 7.8](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.8) of [HTTP]) or the 101 (Switching Protocols) informational status code ([Section 15.2.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.2.2) of [HTTP]).\n\n### 4.6. Server Push\n\nServer push is an interaction mode that permits a server to push a request-response exchange to a client in anticipation of the client making the indicated request. This trades off network usage against a potential latency gain. HTTP/3 server push is similar to what is described in [Section 8.2](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2) of [HTTP/2], but it uses different mechanisms.\n\nEach server push is assigned a unique push ID by the server. The push ID is used to refer to the push in various contexts throughout the lifetime of the HTTP/3 connection.\n\nThe push ID space begins at zero and ends at a maximum value set by the MAX_PUSH_ID frame. In particular, a server is not able to push until after the client sends a MAX_PUSH_ID frame. A client sends MAX_PUSH_ID frames to control the number of pushes that a server can promise. A server *SHOULD* use push IDs sequentially, beginning from zero. A client *MUST* treat receipt of a push stream as a connection error of type H3_ID_ERROR when no MAX_PUSH_ID frame has been sent or when the stream references a push ID that is greater than the maximum push ID.\n\nThe push ID is used in one or more PUSH_PROMISE frames that carry the control data and header fields of the request message. These frames are sent on the request stream that generated the push. This allows the server push to be associated with a client request. When the same push ID is promised on multiple request streams, the decompressed request field sections *MUST* contain the same fields in the same order, and both the name and the value in each field *MUST* be identical.\n\nThe push ID is then included with the push stream that ultimately fulfills those promises. The push stream identifies the push ID of the promise that it fulfills, then contains a response to the promised request as described in Section 4.1.\n\nFinally, the push ID can be used in CANCEL_PUSH frames; see Section 7.2.3. Clients use this frame to indicate they do not wish to receive a promised resource. Servers use this frame to indicate they will not be fulfilling a previous promise.\n\nNot all requests can be pushed. A server *MAY* push requests that have the following properties:\n\n- cacheable; see [Section 9.2.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.3) of [HTTP]\n- safe; see [Section 9.2.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.1) of [HTTP]\n- does not include request content or a trailer section\n\nThe server *MUST* include a value in the :authority pseudo-header field for which the server is authoritative. If the client has not yet validated the connection for the origin indicated by the pushed request, it *MUST* perform the same verification process it would do before sending a request for that origin on the connection; see Section 3.3. If this verification fails, the client *MUST NOT* consider the server authoritative for that origin.\n\nClients *SHOULD* send a CANCEL_PUSH frame upon receipt of a PUSH_PROMISE frame carrying a request that is not cacheable, is not known to be safe, that indicates the presence of request content, or for which it does not consider the server authoritative. Any corresponding responses *MUST NOT* be used or cached.\n\nEach pushed response is associated with one or more client requests. The push is associated with the request stream on which the PUSH_PROMISE frame was received. The same server push can be associated with additional client requests using a PUSH_PROMISE frame with the same push ID on multiple request streams. These associations do not affect the operation of the protocol, but they *MAY* be considered by user agents when deciding how to use pushed resources.\n\nOrdering of a PUSH_PROMISE frame in relation to certain parts of the response is important. The server *SHOULD* send PUSH_PROMISE frames prior to sending HEADERS or DATA frames that reference the promised responses. This reduces the chance that a client requests a resource that will be pushed by the server.\n\nDue to reordering, push stream data can arrive before the corresponding PUSH_PROMISE frame. When a client receives a new push stream with an as-yet-unknown push ID, both the associated client request and the pushed request header fields are unknown. The client can buffer the stream data in expectation of the matching PUSH_PROMISE. The client can use stream flow control ([Section 4.1](https://www.rfc-editor.org/rfc/rfc9000.html#section-4.1) of [QUIC-TRANSPORT]) to limit the amount of data a server may commit to the pushed stream. Clients *SHOULD* abort reading and discard data already read from push streams if no corresponding PUSH_PROMISE frame is processed in a reasonable amount of time.\n\nPush stream data can also arrive after a client has cancelled a push. In this case, the client can abort reading the stream with an error code of H3_REQUEST_CANCELLED. This asks the server not to transfer additional data and indicates that it will be discarded upon receipt.\n\nPushed responses that are cacheable (see [Section 3](https://www.rfc-editor.org/rfc/rfc9111.html#section-3) of [HTTP-CACHING]) can be stored by the client, if it implements an HTTP cache. Pushed responses are considered successfully validated on the origin server (e.g., if the \"no-cache\" cache response directive is present; see [Section 5.2.2.4](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.4) of [HTTP-CACHING]) at the time the pushed response is received.\n\nPushed responses that are not cacheable *MUST NOT* be stored by any HTTP cache. They *MAY* be made available to the application separately.\n\n---\n\n## 5. Connection Closure\n\nOnce established, an HTTP/3 connection can be used for many requests and responses over time until the connection is closed. Connection closure can happen in any of several different ways.\n\n### 5.1. Idle Connections\n\nEach QUIC endpoint declares an idle timeout during the handshake. If the QUIC connection remains idle (no packets received) for longer than this duration, the peer will assume that the connection has been closed. HTTP/3 implementations will need to open a new HTTP/3 connection for new requests if the existing connection has been idle for longer than the idle timeout negotiated during the QUIC handshake, and they *SHOULD* do so if approaching the idle timeout; see [Section 10.1](https://www.rfc-editor.org/rfc/rfc9000.html#section-10.1) of [QUIC-TRANSPORT].\n\nHTTP clients are expected to request that the transport keep connections open while there are responses outstanding for requests or server pushes, as described in [Section 10.1.2](https://www.rfc-editor.org/rfc/rfc9000.html#section-10.1.2) of [QUIC-TRANSPORT]. If the client is not expecting a response from the server, allowing an idle connection to time out is preferred over expending effort maintaining a connection that might not be needed. A gateway *MAY* maintain connections in anticipation of need rather than incur the latency cost of connection establishment to servers. Servers *SHOULD NOT* actively keep connections open.\n\n### 5.2. Connection Shutdown\n\nEven when a connection is not idle, either endpoint can decide to stop using the connection and initiate a graceful connection close. Endpoints initiate the graceful shutdown of an HTTP/3 connection by sending a GOAWAY frame. The GOAWAY frame contains an identifier that indicates to the receiver the range of requests or pushes that were or might be processed in this connection. The server sends a client-initiated bidirectional stream ID; the client sends a push ID. Requests or pushes with the indicated identifier or greater are rejected (Section 4.1.1) by the sender of the GOAWAY. This identifier *MAY* be zero if no requests or pushes were processed.\n\nThe information in the GOAWAY frame enables a client and server to agree on which requests or pushes were accepted prior to the shutdown of the HTTP/3 connection. Upon sending a GOAWAY frame, the endpoint *SHOULD* explicitly cancel (see Sections 4.1.1 and 7.2.3) any requests or pushes that have identifiers greater than or equal to the one indicated, in order to clean up transport state for the affected streams. The endpoint *SHOULD* continue to do so as more requests or pushes arrive.\n\nEndpoints *MUST NOT* initiate new requests or promise new pushes on the connection after receipt of a GOAWAY frame from the peer. Clients *MAY* establish a new connection to send additional requests.\n\nSome requests or pushes might already be in transit:\n\n- Upon receipt of a GOAWAY frame, if the client has already sent requests with a stream ID greater than or equal to the identifier contained in the GOAWAY frame, those requests will not be processed. Clients can safely retry unprocessed requests on a different HTTP connection. A client that is unable to retry requests loses all requests that are in flight when the server closes the connection. Requests on stream IDs less than the stream ID in a GOAWAY frame from the server might have been processed; their status cannot be known until a response is received, the stream is reset individually, another GOAWAY is received with a lower stream ID than that of the request in question, or the connection terminates. Servers *MAY* reject individual requests on streams below the indicated ID if these requests were not processed.\n- If a server receives a GOAWAY frame after having promised pushes with a push ID greater than or equal to the identifier contained in the GOAWAY frame, those pushes will not be accepted.\n\nServers *SHOULD* send a GOAWAY frame when the closing of a connection is known in advance, even if the advance notice is small, so that the remote peer can know whether or not a request has been partially processed. For example, if an HTTP client sends a POST at the same time that a server closes a QUIC connection, the client cannot know if the server started to process that POST request if the server does not send a GOAWAY frame to indicate what streams it might have acted on.\n\nAn endpoint *MAY* send multiple GOAWAY frames indicating different identifiers, but the identifier in each frame *MUST NOT* be greater than the identifier in any previous frame, since clients might already have retried unprocessed requests on another HTTP connection. Receiving a GOAWAY containing a larger identifier than previously received *MUST* be treated as a connection error of type H3_ID_ERROR.\n\nAn endpoint that is attempting to gracefully shut down a connection can send a GOAWAY frame with a value set to the maximum possible value (262-4 for servers, 262-1 for clients). This ensures that the peer stops creating new requests or pushes. After allowing time for any in-flight requests or pushes to arrive, the endpoint can send another GOAWAY frame indicating which requests or pushes it might accept before the end of the connection. This ensures that a connection can be cleanly shut down without losing requests.\n\nA client has more flexibility in the value it chooses for the Push ID field in a GOAWAY that it sends. A value of 262-1 indicates that the server can continue fulfilling pushes that have already been promised. A smaller value indicates the client will reject pushes with push IDs greater than or equal to this value. Like the server, the client *MAY* send subsequent GOAWAY frames so long as the specified push ID is no greater than any previously sent value.\n\nEven when a GOAWAY indicates that a given request or push will not be processed or accepted upon receipt, the underlying transport resources still exist. The endpoint that initiated these requests can cancel them to clean up transport state.\n\nOnce all accepted requests and pushes have been processed, the endpoint can permit the connection to become idle, or it *MAY* initiate an immediate closure of the connection. An endpoint that completes a graceful shutdown *SHOULD* use the H3_NO_ERROR error code when closing the connection.\n\nIf a client has consumed all available bidirectional stream IDs with requests, the server need not send a GOAWAY frame, since the client is unable to make further requests.\n\n### 5.3. Immediate Application Closure\n\nAn HTTP/3 implementation can immediately close the QUIC connection at any time. This results in sending a QUIC CONNECTION_CLOSE frame to the peer indicating that the application layer has terminated the connection. The application error code in this frame indicates to the peer why the connection is being closed. See Section 8 for error codes that can be used when closing a connection in HTTP/3.\n\nBefore closing the connection, a GOAWAY frame *MAY* be sent to allow the client to retry some requests. Including the GOAWAY frame in the same packet as the QUIC CONNECTION_CLOSE frame improves the chances of the frame being received by clients.\n\nIf there are open streams that have not been explicitly closed, they are implicitly closed when the connection is closed; see [Section 10.2](https://www.rfc-editor.org/rfc/rfc9000.html#section-10.2) of [QUIC-TRANSPORT].\n\n### 5.4. Transport Closure\n\nFor various reasons, the QUIC transport could indicate to the application layer that the connection has terminated. This might be due to an explicit closure by the peer, a transport-level error, or a change in network topology that interrupts connectivity.\n\nIf a connection terminates without a GOAWAY frame, clients *MUST* assume that any request that was sent, whether in whole or in part, might have been processed.\n\n---\n\n## 6. Stream Mapping and Usage\n\nA QUIC stream provides reliable in-order delivery of bytes, but makes no guarantees about order of delivery with regard to bytes on other streams. In version 1 of QUIC, the stream data containing HTTP frames is carried by QUIC STREAM frames, but this framing is invisible to the HTTP framing layer. The transport layer buffers and orders received stream data, exposing a reliable byte stream to the application. Although QUIC permits out-of-order delivery within a stream, HTTP/3 does not make use of this feature.\n\nQUIC streams can be either unidirectional, carrying data only from initiator to receiver, or bidirectional, carrying data in both directions. Streams can be initiated by either the client or the server. For more detail on QUIC streams, see [Section 2](https://www.rfc-editor.org/rfc/rfc9000.html#section-2) of [QUIC-TRANSPORT].\n\nWhen HTTP fields and data are sent over QUIC, the QUIC layer handles most of the stream management. HTTP does not need to do any separate multiplexing when using QUIC: data sent over a QUIC stream always maps to a particular HTTP transaction or to the entire HTTP/3 connection context.\n\n### 6.1. Bidirectional Streams\n\nAll client-initiated bidirectional streams are used for HTTP requests and responses. A bidirectional stream ensures that the response can be readily correlated with the request. These streams are referred to as request streams.\n\nThis means that the client's first request occurs on QUIC stream 0, with subsequent requests on streams 4, 8, and so on. In order to permit these streams to open, an HTTP/3 server *SHOULD* configure non-zero minimum values for the number of permitted streams and the initial stream flow-control window. So as to not unnecessarily limit parallelism, at least 100 request streams *SHOULD* be permitted at a time.\n\nHTTP/3 does not use server-initiated bidirectional streams, though an extension could define a use for these streams. Clients *MUST* treat receipt of a server-initiated bidirectional stream as a connection error of type H3_STREAM_CREATION_ERROR unless such an extension has been negotiated.\n\n### 6.2. Unidirectional Streams\n\nUnidirectional streams, in either direction, are used for a range of purposes. The purpose is indicated by a stream type, which is sent as a variable-length integer at the start of the stream. The format and structure of data that follows this integer is determined by the stream type.\n\n```\nUnidirectional Stream Header {\n Stream Type (i),\n}\n```\n\nFigure 1: Unidirectional Stream Header\n\nTwo stream types are defined in this document: control streams (Section 6.2.1) and push streams (Section 6.2.2). [QPACK] defines two additional stream types. Other stream types can be defined by extensions to HTTP/3; see Section 9 for more details. Some stream types are reserved (Section 6.2.3).\n\nThe performance of HTTP/3 connections in the early phase of their lifetime is sensitive to the creation and exchange of data on unidirectional streams. Endpoints that excessively restrict the number of streams or the flow-control window of these streams will increase the chance that the remote peer reaches the limit early and becomes blocked. In particular, implementations should consider that remote peers may wish to exercise reserved stream behavior (Section 6.2.3) with some of the unidirectional streams they are permitted to use.\n\nEach endpoint needs to create at least one unidirectional stream for the HTTP control stream. QPACK requires two additional unidirectional streams, and other extensions might require further streams. Therefore, the transport parameters sent by both clients and servers *MUST* allow the peer to create at least three unidirectional streams. These transport parameters *SHOULD* also provide at least 1,024 bytes of flow-control credit to each unidirectional stream.\n\nNote that an endpoint is not required to grant additional credits to create more unidirectional streams if its peer consumes all the initial credits before creating the critical unidirectional streams. Endpoints *SHOULD* create the HTTP control stream as well as the unidirectional streams required by mandatory extensions (such as the QPACK encoder and decoder streams) first, and then create additional streams as allowed by their peer.\n\nIf the stream header indicates a stream type that is not supported by the recipient, the remainder of the stream cannot be consumed as the semantics are unknown. Recipients of unknown stream types *MUST* either abort reading of the stream or discard incoming data without further processing. If reading is aborted, the recipient *SHOULD* use the H3_STREAM_CREATION_ERROR error code or a reserved error code (Section 8.1). The recipient *MUST NOT* consider unknown stream types to be a connection error of any kind.\n\nAs certain stream types can affect connection state, a recipient *SHOULD NOT* discard data from incoming unidirectional streams prior to reading the stream type.\n\nImplementations *MAY* send stream types before knowing whether the peer supports them. However, stream types that could modify the state or semantics of existing protocol components, including QPACK or other extensions, *MUST NOT* be sent until the peer is known to support them.\n\nA sender can close or reset a unidirectional stream unless otherwise specified. A receiver *MUST* tolerate unidirectional streams being closed or reset prior to the reception of the unidirectional stream header.\n\n#### 6.2.1. Control Streams\n\nA control stream is indicated by a stream type of 0x00. Data on this stream consists of HTTP/3 frames, as defined in Section 7.2.\n\nEach side *MUST* initiate a single control stream at the beginning of the connection and send its SETTINGS frame as the first frame on this stream. If the first frame of the control stream is any other frame type, this *MUST* be treated as a connection error of type H3_MISSING_SETTINGS. Only one control stream per peer is permitted; receipt of a second stream claiming to be a control stream *MUST* be treated as a connection error of type H3_STREAM_CREATION_ERROR. The sender *MUST NOT* close the control stream, and the receiver *MUST NOT* request that the sender close the control stream. If either control stream is closed at any point, this *MUST* be treated as a connection error of type H3_CLOSED_CRITICAL_STREAM. Connection errors are described in Section 8.\n\nBecause the contents of the control stream are used to manage the behavior of other streams, endpoints *SHOULD* provide enough flow-control credit to keep the peer's control stream from becoming blocked.\n\nA pair of unidirectional streams is used rather than a single bidirectional stream. This allows either peer to send data as soon as it is able. Depending on whether 0-RTT is available on the QUIC connection, either client or server might be able to send stream data first.\n\n#### 6.2.2. Push Streams\n\nServer push is an optional feature introduced in HTTP/2 that allows a server to initiate a response before a request has been made. See Section 4.6 for more details.\n\nA push stream is indicated by a stream type of 0x01, followed by the push ID of the promise that it fulfills, encoded as a variable-length integer. The remaining data on this stream consists of HTTP/3 frames, as defined in Section 7.2, and fulfills a promised server push by zero or more interim HTTP responses followed by a single final HTTP response, as defined in Section 4.1. Server push and push IDs are described in Section 4.6.\n\nOnly servers can push; if a server receives a client-initiated push stream, this *MUST* be treated as a connection error of type H3_STREAM_CREATION_ERROR.\n\n```\nPush Stream Header {\n Stream Type (i) = 0x01,\n Push ID (i),\n}\n```\n\nFigure 2: Push Stream Header\n\nA client *SHOULD NOT* abort reading on a push stream prior to reading the push stream header, as this could lead to disagreement between client and server on which push IDs have already been consumed.\n\nEach push ID *MUST* only be used once in a push stream header. If a client detects that a push stream header includes a push ID that was used in another push stream header, the client *MUST* treat this as a connection error of type H3_ID_ERROR.\n\n#### 6.2.3. Reserved Stream Types\n\nStream types of the format 0x1f * N + 0x21 for non-negative integer values of N are reserved to exercise the requirement that unknown types be ignored. These streams have no semantics, and they can be sent when application-layer padding is desired. They *MAY* also be sent on connections where no data is currently being transferred. Endpoints *MUST NOT* consider these streams to have any meaning upon receipt.\n\nThe payload and length of the stream are selected in any manner the sending implementation chooses. When sending a reserved stream type, the implementation *MAY* either terminate the stream cleanly or reset it. When resetting the stream, either the H3_NO_ERROR error code or a reserved error code (Section 8.1) *SHOULD* be used.\n\n---\n\n## 7. HTTP Framing Layer\n\nHTTP frames are carried on QUIC streams, as described in Section 6. HTTP/3 defines three stream types: control stream, request stream, and push stream. This section describes HTTP/3 frame formats and their permitted stream types; see Table 1 for an overview. A comparison between HTTP/2 and HTTP/3 frames is provided in Appendix A.2.\n\n| Frame | Control Stream | Request Stream | Push Stream | Section |\n| --- | --- | --- | --- | --- |\n| DATA | No | Yes | Yes | Section 7.2.1 |\n| HEADERS | No | Yes | Yes | Section 7.2.2 |\n| CANCEL_PUSH | Yes | No | No | Section 7.2.3 |\n| SETTINGS | Yes (1) | No | No | Section 7.2.4 |\n| PUSH_PROMISE | No | Yes | No | Section 7.2.5 |\n| GOAWAY | Yes | No | No | Section 7.2.6 |\n| MAX_PUSH_ID | Yes | No | No | Section 7.2.7 |\n| Reserved | Yes | Yes | Yes | Section 7.2.8 |\n\nThe SETTINGS frame can only occur as the first frame of a Control stream; this is indicated in Table 1 with a (1). Specific guidance is provided in the relevant section.\n\nNote that, unlike QUIC frames, HTTP/3 frames can span multiple packets.\n\n### 7.1. Frame Layout\n\nAll frames have the following format:\n\n```\nHTTP/3 Frame Format {\n Type (i),\n Length (i),\n Frame Payload (..),\n}\n```\n\nFigure 3: HTTP/3 Frame Format\n\nA frame includes the following fields:\n\nType:\n\nA variable-length integer that identifies the frame type.\n\nLength:\n\nA variable-length integer that describes the length in bytes of the Frame Payload.\n\nFrame Payload:\n\nA payload, the semantics of which are determined by the Type field.\n\nEach frame's payload *MUST* contain exactly the fields identified in its description. A frame payload that contains additional bytes after the identified fields or a frame payload that terminates before the end of the identified fields *MUST* be treated as a connection error of type H3_FRAME_ERROR. In particular, redundant length encodings *MUST* be verified to be self-consistent; see Section 10.8.\n\nWhen a stream terminates cleanly, if the last frame on the stream was truncated, this *MUST* be treated as a connection error of type H3_FRAME_ERROR. Streams that terminate abruptly may be reset at any point in a frame.\n\n### 7.2. Frame Definitions\n\n#### 7.2.1. DATA\n\nDATA frames (type=0x00) convey arbitrary, variable-length sequences of bytes associated with HTTP request or response content.\n\nDATA frames *MUST* be associated with an HTTP request or response. If a DATA frame is received on a control stream, the recipient *MUST* respond with a connection error of type H3_FRAME_UNEXPECTED.\n\n```\nDATA Frame {\n Type (i) = 0x00,\n Length (i),\n Data (..),\n}\n```\n\nFigure 4: DATA Frame\n\n#### 7.2.2. HEADERS\n\nThe HEADERS frame (type=0x01) is used to carry an HTTP field section that is encoded using QPACK. See [QPACK] for more details.\n\n```\nHEADERS Frame {\n Type (i) = 0x01,\n Length (i),\n Encoded Field Section (..),\n}\n```\n\nFigure 5: HEADERS Frame\n\nHEADERS frames can only be sent on request streams or push streams. If a HEADERS frame is received on a control stream, the recipient *MUST* respond with a connection error of type H3_FRAME_UNEXPECTED.\n\n#### 7.2.3. CANCEL_PUSH\n\nThe CANCEL_PUSH frame (type=0x03) is used to request cancellation of a server push prior to the push stream being received. The CANCEL_PUSH frame identifies a server push by push ID (see Section 4.6), encoded as a variable-length integer.\n\nWhen a client sends a CANCEL_PUSH frame, it is indicating that it does not wish to receive the promised resource. The server *SHOULD* abort sending the resource, but the mechanism to do so depends on the state of the corresponding push stream. If the server has not yet created a push stream, it does not create one. If the push stream is open, the server *SHOULD* abruptly terminate that stream. If the push stream has already ended, the server *MAY* still abruptly terminate the stream or *MAY* take no action.\n\nA server sends a CANCEL_PUSH frame to indicate that it will not be fulfilling a promise that was previously sent. The client cannot expect the corresponding promise to be fulfilled, unless it has already received and processed the promised response. Regardless of whether a push stream has been opened, a server *SHOULD* send a CANCEL_PUSH frame when it determines that promise will not be fulfilled. If a stream has already been opened, the server can abort sending on the stream with an error code of H3_REQUEST_CANCELLED.\n\nSending a CANCEL_PUSH frame has no direct effect on the state of existing push streams. A client *SHOULD NOT* send a CANCEL_PUSH frame when it has already received a corresponding push stream. A push stream could arrive after a client has sent a CANCEL_PUSH frame, because a server might not have processed the CANCEL_PUSH. The client *SHOULD* abort reading the stream with an error code of H3_REQUEST_CANCELLED.\n\nA CANCEL_PUSH frame is sent on the control stream. Receiving a CANCEL_PUSH frame on a stream other than the control stream *MUST* be treated as a connection error of type H3_FRAME_UNEXPECTED.\n\n```\nCANCEL_PUSH Frame {\n Type (i) = 0x03,\n Length (i),\n Push ID (i),\n}\n```\n\nFigure 6: CANCEL_PUSH Frame\n\nThe CANCEL_PUSH frame carries a push ID encoded as a variable-length integer. The Push ID field identifies the server push that is being cancelled; see Section 4.6. If a CANCEL_PUSH frame is received that references a push ID greater than currently allowed on the connection, this *MUST* be treated as a connection error of type H3_ID_ERROR.\n\nIf the client receives a CANCEL_PUSH frame, that frame might identify a push ID that has not yet been mentioned by a PUSH_PROMISE frame due to reordering. If a server receives a CANCEL_PUSH frame for a push ID that has not yet been mentioned by a PUSH_PROMISE frame, this *MUST* be treated as a connection error of type H3_ID_ERROR.\n\n#### 7.2.4. SETTINGS\n\nThe SETTINGS frame (type=0x04) conveys configuration parameters that affect how endpoints communicate, such as preferences and constraints on peer behavior. Individually, a SETTINGS parameter can also be referred to as a \"setting\"; the identifier and value of each setting parameter can be referred to as a \"setting identifier\" and a \"setting value\".\n\nSETTINGS frames always apply to an entire HTTP/3 connection, never a single stream. A SETTINGS frame *MUST* be sent as the first frame of each control stream (see Section 6.2.1) by each peer, and it *MUST NOT* be sent subsequently. If an endpoint receives a second SETTINGS frame on the control stream, the endpoint *MUST* respond with a connection error of type H3_FRAME_UNEXPECTED.\n\nSETTINGS frames *MUST NOT* be sent on any stream other than the control stream. If an endpoint receives a SETTINGS frame on a different stream, the endpoint *MUST* respond with a connection error of type H3_FRAME_UNEXPECTED.\n\nSETTINGS parameters are not negotiated; they describe characteristics of the sending peer that can be used by the receiving peer. However, a negotiation can be implied by the use of SETTINGS: each peer uses SETTINGS to advertise a set of supported values. The definition of the setting would describe how each peer combines the two sets to conclude which choice will be used. SETTINGS does not provide a mechanism to identify when the choice takes effect.\n\nDifferent values for the same parameter can be advertised by each peer. For example, a client might be willing to consume a very large response field section, while servers are more cautious about request size.\n\nThe same setting identifier *MUST NOT* occur more than once in the SETTINGS frame. A receiver *MAY* treat the presence of duplicate setting identifiers as a connection error of type H3_SETTINGS_ERROR.\n\nThe payload of a SETTINGS frame consists of zero or more parameters. Each parameter consists of a setting identifier and a value, both encoded as QUIC variable-length integers.\n\n```\nSetting {\n Identifier (i),\n Value (i),\n}\n\nSETTINGS Frame {\n Type (i) = 0x04,\n Length (i),\n Setting (..) ...,\n}\n```\n\nFigure 7: SETTINGS Frame\n\nAn implementation *MUST* ignore any parameter with an identifier it does not understand.\n\n##### 7.2.4.1. Defined SETTINGS Parameters\n\nThe following settings are defined in HTTP/3:\n\nSETTINGS_MAX_FIELD_SECTION_SIZE (0x06):\n\nThe default value is unlimited. See Section 4.2.2 for usage.\n\nSetting identifiers of the format 0x1f * N + 0x21 for non-negative integer values of N are reserved to exercise the requirement that unknown identifiers be ignored. Such settings have no defined meaning. Endpoints *SHOULD* include at least one such setting in their SETTINGS frame. Endpoints *MUST NOT* consider such settings to have any meaning upon receipt.\n\nBecause the setting has no defined meaning, the value of the setting can be any value the implementation selects.\n\nSetting identifiers that were defined in [HTTP/2] where there is no corresponding HTTP/3 setting have also been reserved (Section 11.2.2). These reserved settings *MUST NOT* be sent, and their receipt *MUST* be treated as a connection error of type H3_SETTINGS_ERROR.\n\nAdditional settings can be defined by extensions to HTTP/3; see Section 9 for more details.\n\n##### 7.2.4.2. Initialization\n\nAn HTTP implementation *MUST NOT* send frames or requests that would be invalid based on its current understanding of the peer's settings.\n\nAll settings begin at an initial value. Each endpoint *SHOULD* use these initial values to send messages before the peer's SETTINGS frame has arrived, as packets carrying the settings can be lost or delayed. When the SETTINGS frame arrives, any settings are changed to their new values.\n\nThis removes the need to wait for the SETTINGS frame before sending messages. Endpoints *MUST NOT* require any data to be received from the peer prior to sending the SETTINGS frame; settings *MUST* be sent as soon as the transport is ready to send data.\n\nFor servers, the initial value of each client setting is the default value.\n\nFor clients using a 1-RTT QUIC connection, the initial value of each server setting is the default value. 1-RTT keys will always become available prior to the packet containing SETTINGS being processed by QUIC, even if the server sends SETTINGS immediately. Clients *SHOULD NOT* wait indefinitely for SETTINGS to arrive before sending requests, but they *SHOULD* process received datagrams in order to increase the likelihood of processing SETTINGS before sending the first request.\n\nWhen a 0-RTT QUIC connection is being used, the initial value of each server setting is the value used in the previous session. Clients *SHOULD* store the settings the server provided in the HTTP/3 connection where resumption information was provided, but they *MAY* opt not to store settings in certain cases (e.g., if the session ticket is received before the SETTINGS frame). A client *MUST* comply with stored settings -- or default values if no values are stored -- when attempting 0-RTT. Once a server has provided new settings, clients *MUST* comply with those values.\n\nA server can remember the settings that it advertised or store an integrity-protected copy of the values in the ticket and recover the information when accepting 0-RTT data. A server uses the HTTP/3 settings values in determining whether to accept 0-RTT data. If the server cannot determine that the settings remembered by a client are compatible with its current settings, it *MUST NOT* accept 0-RTT data. Remembered settings are compatible if a client complying with those settings would not violate the server's current settings.\n\nA server *MAY* accept 0-RTT and subsequently provide different settings in its SETTINGS frame. If 0-RTT data is accepted by the server, its SETTINGS frame *MUST NOT* reduce any limits or alter any values that might be violated by the client with its 0-RTT data. The server *MUST* include all settings that differ from their default values. If a server accepts 0-RTT but then sends settings that are not compatible with the previously specified settings, this *MUST* be treated as a connection error of type H3_SETTINGS_ERROR. If a server accepts 0-RTT but then sends a SETTINGS frame that omits a setting value that the client understands (apart from reserved setting identifiers) that was previously specified to have a non-default value, this *MUST* be treated as a connection error of type H3_SETTINGS_ERROR.\n\n#### 7.2.5. PUSH_PROMISE\n\nThe PUSH_PROMISE frame (type=0x05) is used to carry a promised request header section from server to client on a request stream.\n\n```\nPUSH_PROMISE Frame {\n Type (i) = 0x05,\n Length (i),\n Push ID (i),\n Encoded Field Section (..),\n}\n```\n\nFigure 8: PUSH_PROMISE Frame\n\nThe payload consists of:\n\nPush ID:\n\nA variable-length integer that identifies the server push operation. A push ID is used in push stream headers (Section 4.6) and CANCEL_PUSH frames.\n\nEncoded Field Section:\n\nQPACK-encoded request header fields for the promised response. See [QPACK] for more details.\n\nA server *MUST NOT* use a push ID that is larger than the client has provided in a MAX_PUSH_ID frame (Section 7.2.7). A client *MUST* treat receipt of a PUSH_PROMISE frame that contains a larger push ID than the client has advertised as a connection error of H3_ID_ERROR.\n\nA server *MAY* use the same push ID in multiple PUSH_PROMISE frames. If so, the decompressed request header sets *MUST* contain the same fields in the same order, and both the name and the value in each field *MUST* be exact matches. Clients *SHOULD* compare the request header sections for resources promised multiple times. If a client receives a push ID that has already been promised and detects a mismatch, it *MUST* respond with a connection error of type H3_GENERAL_PROTOCOL_ERROR. If the decompressed field sections match exactly, the client *SHOULD* associate the pushed content with each stream on which a PUSH_PROMISE frame was received.\n\nAllowing duplicate references to the same push ID is primarily to reduce duplication caused by concurrent requests. A server *SHOULD* avoid reusing a push ID over a long period. Clients are likely to consume server push responses and not retain them for reuse over time. Clients that see a PUSH_PROMISE frame that uses a push ID that they have already consumed and discarded are forced to ignore the promise.\n\nIf a PUSH_PROMISE frame is received on the control stream, the client *MUST* respond with a connection error of type H3_FRAME_UNEXPECTED.\n\nA client *MUST NOT* send a PUSH_PROMISE frame. A server *MUST* treat the receipt of a PUSH_PROMISE frame as a connection error of type H3_FRAME_UNEXPECTED.\n\nSee Section 4.6 for a description of the overall server push mechanism.\n\n#### 7.2.6. GOAWAY\n\nThe GOAWAY frame (type=0x07) is used to initiate graceful shutdown of an HTTP/3 connection by either endpoint. GOAWAY allows an endpoint to stop accepting new requests or pushes while still finishing processing of previously received requests and pushes. This enables administrative actions, like server maintenance. GOAWAY by itself does not close a connection.\n\n```\nGOAWAY Frame {\n Type (i) = 0x07,\n Length (i),\n Stream ID/Push ID (i),\n}\n```\n\nFigure 9: GOAWAY Frame\n\nThe GOAWAY frame is always sent on the control stream. In the server-to-client direction, it carries a QUIC stream ID for a client-initiated bidirectional stream encoded as a variable-length integer. A client *MUST* treat receipt of a GOAWAY frame containing a stream ID of any other type as a connection error of type H3_ID_ERROR.\n\nIn the client-to-server direction, the GOAWAY frame carries a push ID encoded as a variable-length integer.\n\nThe GOAWAY frame applies to the entire connection, not a specific stream. A client *MUST* treat a GOAWAY frame on a stream other than the control stream as a connection error of type H3_FRAME_UNEXPECTED.\n\nSee Section 5.2 for more information on the use of the GOAWAY frame.\n\n#### 7.2.7. MAX_PUSH_ID\n\nThe MAX_PUSH_ID frame (type=0x0d) is used by clients to control the number of server pushes that the server can initiate. This sets the maximum value for a push ID that the server can use in PUSH_PROMISE and CANCEL_PUSH frames. Consequently, this also limits the number of push streams that the server can initiate in addition to the limit maintained by the QUIC transport.\n\nThe MAX_PUSH_ID frame is always sent on the control stream. Receipt of a MAX_PUSH_ID frame on any other stream *MUST* be treated as a connection error of type H3_FRAME_UNEXPECTED.\n\nA server *MUST NOT* send a MAX_PUSH_ID frame. A client *MUST* treat the receipt of a MAX_PUSH_ID frame as a connection error of type H3_FRAME_UNEXPECTED.\n\nThe maximum push ID is unset when an HTTP/3 connection is created, meaning that a server cannot push until it receives a MAX_PUSH_ID frame. A client that wishes to manage the number of promised server pushes can increase the maximum push ID by sending MAX_PUSH_ID frames as the server fulfills or cancels server pushes.\n\n```\nMAX_PUSH_ID Frame {\n Type (i) = 0x0d,\n Length (i),\n Push ID (i),\n}\n```\n\nFigure 10: MAX_PUSH_ID Frame\n\nThe MAX_PUSH_ID frame carries a single variable-length integer that identifies the maximum value for a push ID that the server can use; see Section 4.6. A MAX_PUSH_ID frame cannot reduce the maximum push ID; receipt of a MAX_PUSH_ID frame that contains a smaller value than previously received *MUST* be treated as a connection error of type H3_ID_ERROR.\n\n#### 7.2.8. Reserved Frame Types\n\nFrame types of the format 0x1f * N + 0x21 for non-negative integer values of N are reserved to exercise the requirement that unknown types be ignored (Section 9). These frames have no semantics, and they *MAY* be sent on any stream where frames are allowed to be sent. This enables their use for application-layer padding. Endpoints *MUST NOT* consider these frames to have any meaning upon receipt.\n\nThe payload and length of the frames are selected in any manner the implementation chooses.\n\nFrame types that were used in HTTP/2 where there is no corresponding HTTP/3 frame have also been reserved (Section 11.2.1). These frame types *MUST NOT* be sent, and their receipt *MUST* be treated as a connection error of type H3_FRAME_UNEXPECTED.\n\n---\n\n## 8. Error Handling\n\nWhen a stream cannot be completed successfully, QUIC allows the application to abruptly terminate (reset) that stream and communicate a reason; see [Section 2.4](https://www.rfc-editor.org/rfc/rfc9000.html#section-2.4) of [QUIC-TRANSPORT]. This is referred to as a \"stream error\". An HTTP/3 implementation can decide to close a QUIC stream and communicate the type of error. Wire encodings of error codes are defined in Section 8.1. Stream errors are distinct from HTTP status codes that indicate error conditions. Stream errors indicate that the sender did not transfer or consume the full request or response, while HTTP status codes indicate the result of a request that was successfully received.\n\nIf an entire connection needs to be terminated, QUIC similarly provides mechanisms to communicate a reason; see [Section 5.3](https://www.rfc-editor.org/rfc/rfc9000.html#section-5.3) of [QUIC-TRANSPORT]. This is referred to as a \"connection error\". Similar to stream errors, an HTTP/3 implementation can terminate a QUIC connection and communicate the reason using an error code from Section 8.1.\n\nAlthough the reasons for closing streams and connections are called \"errors\", these actions do not necessarily indicate a problem with the connection or either implementation. For example, a stream can be reset if the requested resource is no longer needed.\n\nAn endpoint *MAY* choose to treat a stream error as a connection error under certain circumstances, closing the entire connection in response to a condition on a single stream. Implementations need to consider the impact on outstanding requests before making this choice.\n\nBecause new error codes can be defined without negotiation (see Section 9), use of an error code in an unexpected context or receipt of an unknown error code *MUST* be treated as equivalent to H3_NO_ERROR. However, closing a stream can have other effects regardless of the error code; for example, see Section 4.1.\n\n### 8.1. HTTP/3 Error Codes\n\nThe following error codes are defined for use when abruptly terminating streams, aborting reading of streams, or immediately closing HTTP/3 connections.\n\nH3_NO_ERROR (0x0100):\n\nNo error. This is used when the connection or stream needs to be closed, but there is no error to signal.\n\nH3_GENERAL_PROTOCOL_ERROR (0x0101):\n\nPeer violated protocol requirements in a way that does not match a more specific error code or endpoint declines to use the more specific error code.\n\nH3_INTERNAL_ERROR (0x0102):\n\nAn internal error has occurred in the HTTP stack.\n\nH3_STREAM_CREATION_ERROR (0x0103):\n\nThe endpoint detected that its peer created a stream that it will not accept.\n\nH3_CLOSED_CRITICAL_STREAM (0x0104):\n\nA stream required by the HTTP/3 connection was closed or reset.\n\nH3_FRAME_UNEXPECTED (0x0105):\n\nA frame was received that was not permitted in the current state or on the current stream.\n\nH3_FRAME_ERROR (0x0106):\n\nA frame that fails to satisfy layout requirements or with an invalid size was received.\n\nH3_EXCESSIVE_LOAD (0x0107):\n\nThe endpoint detected that its peer is exhibiting a behavior that might be generating excessive load.\n\nH3_ID_ERROR (0x0108):\n\nA stream ID or push ID was used incorrectly, such as exceeding a limit, reducing a limit, or being reused.\n\nH3_SETTINGS_ERROR (0x0109):\n\nAn endpoint detected an error in the payload of a SETTINGS frame.\n\nH3_MISSING_SETTINGS (0x010a):\n\nNo SETTINGS frame was received at the beginning of the control stream.\n\nH3_REQUEST_REJECTED (0x010b):\n\nA server rejected a request without performing any application processing.\n\nH3_REQUEST_CANCELLED (0x010c):\n\nThe request or its response (including pushed response) is cancelled.\n\nH3_REQUEST_INCOMPLETE (0x010d):\n\nThe client's stream terminated without containing a fully formed request.\n\nH3_MESSAGE_ERROR (0x010e):\n\nAn HTTP message was malformed and cannot be processed.\n\nH3_CONNECT_ERROR (0x010f):\n\nThe TCP connection established in response to a CONNECT request was reset or abnormally closed.\n\nH3_VERSION_FALLBACK (0x0110):\n\nThe requested operation cannot be served over HTTP/3. The peer should retry over HTTP/1.1.\n\nError codes of the format 0x1f * N + 0x21 for non-negative integer values of N are reserved to exercise the requirement that unknown error codes be treated as equivalent to H3_NO_ERROR (Section 9). Implementations *SHOULD* select an error code from this space with some probability when they would have sent H3_NO_ERROR.\n\n---\n\n## 9. Extensions to HTTP/3\n\nHTTP/3 permits extension of the protocol. Within the limitations described in this section, protocol extensions can be used to provide additional services or alter any aspect of the protocol. Extensions are effective only within the scope of a single HTTP/3 connection.\n\nThis applies to the protocol elements defined in this document. This does not affect the existing options for extending HTTP, such as defining new methods, status codes, or fields.\n\nExtensions are permitted to use new frame types (Section 7.2), new settings (Section 7.2.4.1), new error codes (Section 8), or new unidirectional stream types (Section 6.2). Registries are established for managing these extension points: frame types (Section 11.2.1), settings (Section 11.2.2), error codes (Section 11.2.3), and stream types (Section 11.2.4).\n\nImplementations *MUST* ignore unknown or unsupported values in all extensible protocol elements. Implementations *MUST* discard data or abort reading on unidirectional streams that have unknown or unsupported types. This means that any of these extension points can be safely used by extensions without prior arrangement or negotiation. However, where a known frame type is required to be in a specific location, such as the SETTINGS frame as the first frame of the control stream (see Section 6.2.1), an unknown frame type does not satisfy that requirement and *SHOULD* be treated as an error.\n\nExtensions that could change the semantics of existing protocol components *MUST* be negotiated before being used. For example, an extension that changes the layout of the HEADERS frame cannot be used until the peer has given a positive signal that this is acceptable. Coordinating when such a revised layout comes into effect could prove complex. As such, allocating new identifiers for new definitions of existing protocol elements is likely to be more effective.\n\nThis document does not mandate a specific method for negotiating the use of an extension, but it notes that a setting (Section 7.2.4.1) could be used for that purpose. If both peers set a value that indicates willingness to use the extension, then the extension can be used. If a setting is used for extension negotiation, the default value *MUST* be defined in such a fashion that the extension is disabled if the setting is omitted.\n\n---\n\n## 10. Security Considerations\n\nThe security considerations of HTTP/3 should be comparable to those of HTTP/2 with TLS. However, many of the considerations from [Section 10](https://www.rfc-editor.org/rfc/rfc9113.html#section-10) of [HTTP/2] apply to [QUIC-TRANSPORT] and are discussed in that document.\n\n### 10.1. Server Authority\n\nHTTP/3 relies on the HTTP definition of authority. The security considerations of establishing authority are discussed in [Section 17.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-17.1) of [HTTP].\n\n### 10.2. Cross-Protocol Attacks\n\nThe use of ALPN in the TLS and QUIC handshakes establishes the target application protocol before application-layer bytes are processed. This ensures that endpoints have strong assurances that peers are using the same protocol.\n\nThis does not guarantee protection from all cross-protocol attacks. [Section 21.5](https://www.rfc-editor.org/rfc/rfc9000.html#section-21.5) of [QUIC-TRANSPORT] describes some ways in which the plaintext of QUIC packets can be used to perform request forgery against endpoints that don't use authenticated transports.\n\n### 10.3. Intermediary-Encapsulation Attacks\n\nThe HTTP/3 field encoding allows the expression of names that are not valid field names in the syntax used by HTTP ([Section 5.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.1) of [HTTP]). Requests or responses containing invalid field names *MUST* be treated as malformed. Therefore, an intermediary cannot translate an HTTP/3 request or response containing an invalid field name into an HTTP/1.1 message.\n\nSimilarly, HTTP/3 can transport field values that are not valid. While most values that can be encoded will not alter field parsing, carriage return (ASCII 0x0d), line feed (ASCII 0x0a), and the null character (ASCII 0x00) might be exploited by an attacker if they are translated verbatim. Any request or response that contains a character not permitted in a field value *MUST* be treated as malformed. Valid characters are defined by the \"field-content\" ABNF rule in [Section 5.5](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.5) of [HTTP].\n\n### 10.4. Cacheability of Pushed Responses\n\nPushed responses do not have an explicit request from the client; the request is provided by the server in the PUSH_PROMISE frame.\n\nCaching responses that are pushed is possible based on the guidance provided by the origin server in the Cache-Control header field. However, this can cause issues if a single server hosts more than one tenant. For example, a server might offer multiple users each a small portion of its URI space.\n\nWhere multiple tenants share space on the same server, that server *MUST* ensure that tenants are not able to push representations of resources that they do not have authority over. Failure to enforce this would allow a tenant to provide a representation that would be served out of cache, overriding the actual representation that the authoritative tenant provides.\n\nClients are required to reject pushed responses for which an origin server is not authoritative; see Section 4.6.\n\n### 10.5. Denial-of-Service Considerations\n\nAn HTTP/3 connection can demand a greater commitment of resources to operate than an HTTP/1.1 or HTTP/2 connection. The use of field compression and flow control depend on a commitment of resources for storing a greater amount of state. Settings for these features ensure that memory commitments for these features are strictly bounded.\n\nThe number of PUSH_PROMISE frames is constrained in a similar fashion. A client that accepts server push *SHOULD* limit the number of push IDs it issues at a time.\n\nProcessing capacity cannot be guarded as effectively as state capacity.\n\nThe ability to send undefined protocol elements that the peer is required to ignore can be abused to cause a peer to expend additional processing time. This might be done by setting multiple undefined SETTINGS parameters, unknown frame types, or unknown stream types. Note, however, that some uses are entirely legitimate, such as optional-to-understand extensions and padding to increase resistance to traffic analysis.\n\nCompression of field sections also offers some opportunities to waste processing resources; see [Section 7](https://www.rfc-editor.org/rfc/rfc9204.html#section-7) of [QPACK] for more details on potential abuses.\n\nAll these features -- i.e., server push, unknown protocol elements, field compression -- have legitimate uses. These features become a burden only when they are used unnecessarily or to excess.\n\nAn endpoint that does not monitor such behavior exposes itself to a risk of denial-of-service attack. Implementations *SHOULD* track the use of these features and set limits on their use. An endpoint *MAY* treat activity that is suspicious as a connection error of type H3_EXCESSIVE_LOAD, but false positives will result in disrupting valid connections and requests.\n\n#### 10.5.1. Limits on Field Section Size\n\nA large field section (Section 4.1) can cause an implementation to commit a large amount of state. Header fields that are critical for routing can appear toward the end of a header section, which prevents streaming of the header section to its ultimate destination. This ordering and other reasons, such as ensuring cache correctness, mean that an endpoint likely needs to buffer the entire header section. Since there is no hard limit to the size of a field section, some endpoints could be forced to commit a large amount of available memory for header fields.\n\nAn endpoint can use the SETTINGS_MAX_FIELD_SECTION_SIZE (Section 4.2.2) setting to advise peers of limits that might apply on the size of field sections. This setting is only advisory, so endpoints *MAY* choose to send field sections that exceed this limit and risk having the request or response being treated as malformed. This setting is specific to an HTTP/3 connection, so any request or response could encounter a hop with a lower, unknown limit. An intermediary can attempt to avoid this problem by passing on values presented by different peers, but they are not obligated to do so.\n\nA server that receives a larger field section than it is willing to handle can send an HTTP 431 (Request Header Fields Too Large) status code ([RFC6585]). A client can discard responses that it cannot process.\n\n#### 10.5.2. CONNECT Issues\n\nThe CONNECT method can be used to create disproportionate load on a proxy, since stream creation is relatively inexpensive when compared to the creation and maintenance of a TCP connection. Therefore, a proxy that supports CONNECT might be more conservative in the number of simultaneous requests it accepts.\n\nA proxy might also maintain some resources for a TCP connection beyond the closing of the stream that carries the CONNECT request, since the outgoing TCP connection remains in the TIME_WAIT state. To account for this, a proxy might delay increasing the QUIC stream limits for some time after a TCP connection terminates.\n\n### 10.6. Use of Compression\n\nCompression can allow an attacker to recover secret data when it is compressed in the same context as data under attacker control. HTTP/3 enables compression of fields (Section 4.2); the following concerns also apply to the use of HTTP compressed content-codings; see [Section 8.4.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.4.1) of [HTTP].\n\nThere are demonstrable attacks on compression that exploit the characteristics of the web (e.g., [BREACH]). The attacker induces multiple requests containing varying plaintext, observing the length of the resulting ciphertext in each, which reveals a shorter length when a guess about the secret is correct.\n\nImplementations communicating on a secure channel *MUST NOT* compress content that includes both confidential and attacker-controlled data unless separate compression contexts are used for each source of data. Compression *MUST NOT* be used if the source of data cannot be reliably determined.\n\nFurther considerations regarding the compression of field sections are described in [QPACK].\n\n### 10.7. Padding and Traffic Analysis\n\nPadding can be used to obscure the exact size of frame content and is provided to mitigate specific attacks within HTTP, for example, attacks where compressed content includes both attacker-controlled plaintext and secret data (e.g., [BREACH]).\n\nWhere HTTP/2 employs PADDING frames and Padding fields in other frames to make a connection more resistant to traffic analysis, HTTP/3 can either rely on transport-layer padding or employ the reserved frame and stream types discussed in Sections 7.2.8 and 6.2.3. These methods of padding produce different results in terms of the granularity of padding, how padding is arranged in relation to the information that is being protected, whether padding is applied in the case of packet loss, and how an implementation might control padding.\n\nReserved stream types can be used to give the appearance of sending traffic even when the connection is idle. Because HTTP traffic often occurs in bursts, apparent traffic can be used to obscure the timing or duration of such bursts, even to the point of appearing to send a constant stream of data. However, as such traffic is still flow controlled by the receiver, a failure to promptly drain such streams and provide additional flow-control credit can limit the sender's ability to send real traffic.\n\nTo mitigate attacks that rely on compression, disabling or limiting compression might be preferable to padding as a countermeasure.\n\nUse of padding can result in less protection than might seem immediately obvious. Redundant padding could even be counterproductive. At best, padding only makes it more difficult for an attacker to infer length information by increasing the number of frames an attacker has to observe. Incorrectly implemented padding schemes can be easily defeated. In particular, randomized padding with a predictable distribution provides very little protection; similarly, padding payloads to a fixed size exposes information as payload sizes cross the fixed-sized boundary, which could be possible if an attacker can control plaintext.\n\n### 10.8. Frame Parsing\n\nSeveral protocol elements contain nested length elements, typically in the form of frames with an explicit length containing variable-length integers. This could pose a security risk to an incautious implementer. An implementation *MUST* ensure that the length of a frame exactly matches the length of the fields it contains.\n\n### 10.9. Early Data\n\nThe use of 0-RTT with HTTP/3 creates an exposure to replay attack. The anti-replay mitigations in [HTTP-REPLAY] *MUST* be applied when using HTTP/3 with 0-RTT. When applying [HTTP-REPLAY] to HTTP/3, references to the TLS layer refer to the handshake performed within QUIC, while all references to application data refer to the contents of streams.\n\n### 10.10. Migration\n\nCertain HTTP implementations use the client address for logging or access-control purposes. Since a QUIC client's address might change during a connection (and future versions might support simultaneous use of multiple addresses), such implementations will need to either actively retrieve the client's current address or addresses when they are relevant or explicitly accept that the original address might change.\n\n### 10.11. Privacy Considerations\n\nSeveral characteristics of HTTP/3 provide an observer an opportunity to correlate actions of a single client or server over time. These include the value of settings, the timing of reactions to stimulus, and the handling of any features that are controlled by settings.\n\nAs far as these create observable differences in behavior, they could be used as a basis for fingerprinting a specific client.\n\nHTTP/3's preference for using a single QUIC connection allows correlation of a user's activity on a site. Reusing connections for different origins allows for correlation of activity across those origins.\n\nSeveral features of QUIC solicit immediate responses and can be used by an endpoint to measure latency to their peer; this might have privacy implications in certain scenarios.\n\n---\n\n## 11. IANA Considerations\n\nThis document registers a new ALPN protocol ID (Section 11.1) and creates new registries that manage the assignment of code points in HTTP/3.\n\n### 11.1. Registration of HTTP/3 Identification String\n\nThis document creates a new registration for the identification of HTTP/3 in the \"TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs\" registry established in [RFC7301].\n\nThe \"h3\" string identifies HTTP/3:\n\nProtocol:\n\nHTTP/3\n\nIdentification Sequence:\n\n0x68 0x33 (\"h3\")\n\nSpecification:\n\nThis document\n\n### 11.2. New Registries\n\nNew registries created in this document operate under the QUIC registration policy documented in [Section 22.1](https://www.rfc-editor.org/rfc/rfc9000.html#section-22.1) of [QUIC-TRANSPORT]. These registries all include the common set of fields listed in [Section 22.1.1](https://www.rfc-editor.org/rfc/rfc9000.html#section-22.1.1) of [QUIC-TRANSPORT]. These registries are collected under the \"Hypertext Transfer Protocol version 3 (HTTP/3)\" heading.\n\nThe initial allocations in these registries are all assigned permanent status and list a change controller of the IETF and a contact of the HTTP working group (ietf-http-wg@w3.org).\n\n#### 11.2.1. Frame Types\n\nThis document establishes a registry for HTTP/3 frame type codes. The \"HTTP/3 Frame Types\" registry governs a 62-bit space. This registry follows the QUIC registry policy; see Section 11.2. Permanent registrations in this registry are assigned using the Specification Required policy ([RFC8126]), except for values between 0x00 and 0x3f (in hexadecimal; inclusive), which are assigned using Standards Action or IESG Approval as defined in Sections [4.9](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.9) and [4.10](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.10) of [RFC8126].\n\nWhile this registry is separate from the \"HTTP/2 Frame Type\" registry defined in [HTTP/2], it is preferable that the assignments parallel each other where the code spaces overlap. If an entry is present in only one registry, every effort *SHOULD* be made to avoid assigning the corresponding value to an unrelated operation. Expert reviewers *MAY* reject unrelated registrations that would conflict with the same value in the corresponding registry.\n\nIn addition to common fields as described in Section 11.2, permanent registrations in this registry *MUST* include the following field:\n\nFrame Type:\n\nA name or label for the frame type.\n\nSpecifications of frame types *MUST* include a description of the frame layout and its semantics, including any parts of the frame that are conditionally present.\n\nThe entries in Table 2 are registered by this document.\n\n| Frame Type | Value | Specification |\n| --- | --- | --- |\n| DATA | 0x00 | Section 7.2.1 |\n| HEADERS | 0x01 | Section 7.2.2 |\n| Reserved | 0x02 | This document |\n| CANCEL_PUSH | 0x03 | Section 7.2.3 |\n| SETTINGS | 0x04 | Section 7.2.4 |\n| PUSH_PROMISE | 0x05 | Section 7.2.5 |\n| Reserved | 0x06 | This document |\n| GOAWAY | 0x07 | Section 7.2.6 |\n| Reserved | 0x08 | This document |\n| Reserved | 0x09 | This document |\n| MAX_PUSH_ID | 0x0d | Section 7.2.7 |\n\nEach code of the format 0x1f * N + 0x21 for non-negative integer values of N (that is, 0x21, 0x40, ..., through 0x3ffffffffffffffe) *MUST NOT* be assigned by IANA and *MUST NOT* appear in the listing of assigned values.\n\n#### 11.2.2. Settings Parameters\n\nThis document establishes a registry for HTTP/3 settings. The \"HTTP/3 Settings\" registry governs a 62-bit space. This registry follows the QUIC registry policy; see Section 11.2. Permanent registrations in this registry are assigned using the Specification Required policy ([RFC8126]), except for values between 0x00 and 0x3f (in hexadecimal; inclusive), which are assigned using Standards Action or IESG Approval as defined in Sections [4.9](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.9) and [4.10](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.10) of [RFC8126].\n\nWhile this registry is separate from the \"HTTP/2 Settings\" registry defined in [HTTP/2], it is preferable that the assignments parallel each other. If an entry is present in only one registry, every effort *SHOULD* be made to avoid assigning the corresponding value to an unrelated operation. Expert reviewers *MAY* reject unrelated registrations that would conflict with the same value in the corresponding registry.\n\nIn addition to common fields as described in Section 11.2, permanent registrations in this registry *MUST* include the following fields:\n\nSetting Name:\n\nA symbolic name for the setting. Specifying a setting name is optional.\n\nDefault:\n\nThe value of the setting unless otherwise indicated. A default *SHOULD* be the most restrictive possible value.\n\nThe entries in Table 3 are registered by this document.\n\n| Setting Name | Value | Specification | Default |\n| --- | --- | --- | --- |\n| Reserved | 0x00 | This document | N/A |\n| Reserved | 0x02 | This document | N/A |\n| Reserved | 0x03 | This document | N/A |\n| Reserved | 0x04 | This document | N/A |\n| Reserved | 0x05 | This document | N/A |\n| MAX_FIELD_SECTION_SIZE | 0x06 | Section 7.2.4.1 | Unlimited |\n\nFor formatting reasons, setting names can be abbreviated by removing the 'SETTINGS_' prefix.\n\nEach code of the format 0x1f * N + 0x21 for non-negative integer values of N (that is, 0x21, 0x40, ..., through 0x3ffffffffffffffe) *MUST NOT* be assigned by IANA and *MUST NOT* appear in the listing of assigned values.\n\n#### 11.2.3. Error Codes\n\nThis document establishes a registry for HTTP/3 error codes. The \"HTTP/3 Error Codes\" registry manages a 62-bit space. This registry follows the QUIC registry policy; see Section 11.2. Permanent registrations in this registry are assigned using the Specification Required policy ([RFC8126]), except for values between 0x00 and 0x3f (in hexadecimal; inclusive), which are assigned using Standards Action or IESG Approval as defined in Sections [4.9](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.9) and [4.10](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.10) of [RFC8126].\n\nRegistrations for error codes are required to include a description of the error code. An expert reviewer is advised to examine new registrations for possible duplication with existing error codes. Use of existing registrations is to be encouraged, but not mandated. Use of values that are registered in the \"HTTP/2 Error Code\" registry is discouraged, and expert reviewers *MAY* reject such registrations.\n\nIn addition to common fields as described in Section 11.2, this registry includes two additional fields. Permanent registrations in this registry *MUST* include the following field:\n\nName:\n\nA name for the error code.\n\nDescription:\n\nA brief description of the error code semantics.\n\nThe entries in Table 4 are registered by this document. These error codes were selected from the range that operates on a Specification Required policy to avoid collisions with HTTP/2 error codes.\n\n| Name | Value | Description | Specification |\n| --- | --- | --- | --- |\n| H3_NO_ERROR | 0x0100 | No error | Section 8.1 |\n| H3_GENERAL_PROTOCOL_ERROR | 0x0101 | General protocol error | Section 8.1 |\n| H3_INTERNAL_ERROR | 0x0102 | Internal error | Section 8.1 |\n| H3_STREAM_CREATION_ERROR | 0x0103 | Stream creation error | Section 8.1 |\n| H3_CLOSED_CRITICAL_STREAM | 0x0104 | Critical stream was closed | Section 8.1 |\n| H3_FRAME_UNEXPECTED | 0x0105 | Frame not permitted in the current state | Section 8.1 |\n| H3_FRAME_ERROR | 0x0106 | Frame violated layout or size rules | Section 8.1 |\n| H3_EXCESSIVE_LOAD | 0x0107 | Peer generating excessive load | Section 8.1 |\n| H3_ID_ERROR | 0x0108 | An identifier was used incorrectly | Section 8.1 |\n| H3_SETTINGS_ERROR | 0x0109 | SETTINGS frame contained invalid values | Section 8.1 |\n| H3_MISSING_SETTINGS | 0x010a | No SETTINGS frame received | Section 8.1 |\n| H3_REQUEST_REJECTED | 0x010b | Request not processed | Section 8.1 |\n| H3_REQUEST_CANCELLED | 0x010c | Data no longer needed | Section 8.1 |\n| H3_REQUEST_INCOMPLETE | 0x010d | Stream terminated early | Section 8.1 |\n| H3_MESSAGE_ERROR | 0x010e | Malformed message | Section 8.1 |\n| H3_CONNECT_ERROR | 0x010f | TCP reset or error on CONNECT request | Section 8.1 |\n| H3_VERSION_FALLBACK | 0x0110 | Retry over HTTP/1.1 | Section 8.1 |\n\nEach code of the format 0x1f * N + 0x21 for non-negative integer values of N (that is, 0x21, 0x40, ..., through 0x3ffffffffffffffe) *MUST NOT* be assigned by IANA and *MUST NOT* appear in the listing of assigned values.\n\n#### 11.2.4. Stream Types\n\nThis document establishes a registry for HTTP/3 unidirectional stream types. The \"HTTP/3 Stream Types\" registry governs a 62-bit space. This registry follows the QUIC registry policy; see Section 11.2. Permanent registrations in this registry are assigned using the Specification Required policy ([RFC8126]), except for values between 0x00 and 0x3f (in hexadecimal; inclusive), which are assigned using Standards Action or IESG Approval as defined in Sections [4.9](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.9) and [4.10](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.10) of [RFC8126].\n\nIn addition to common fields as described in Section 11.2, permanent registrations in this registry *MUST* include the following fields:\n\nStream Type:\n\nA name or label for the stream type.\n\nSender:\n\nWhich endpoint on an HTTP/3 connection may initiate a stream of this type. Values are \"Client\", \"Server\", or \"Both\".\n\nSpecifications for permanent registrations *MUST* include a description of the stream type, including the layout and semantics of the stream contents.\n\nThe entries in Table 5 are registered by this document.\n\n| Stream Type | Value | Specification | Sender |\n| --- | --- | --- | --- |\n| Control Stream | 0x00 | Section 6.2.1 | Both |\n| Push Stream | 0x01 | Section 4.6 | Server |\n\nEach code of the format 0x1f * N + 0x21 for non-negative integer values of N (that is, 0x21, 0x40, ..., through 0x3ffffffffffffffe) *MUST NOT* be assigned by IANA and *MUST NOT* appear in the listing of assigned values.\n\n## 12. References\n\n### 12.1. Normative References\n\n[ALTSVC]\n\nNottingham, M., McManus, P., and J. Reschke, “[HTTP Alternative Services](https://www.rfc-editor.org/rfc/rfc7838.html)”, RFC 7838, [DOI 10.17487/RFC7838](https://dx.doi.org/10.17487/RFC7838), April 2016, <[https://www.rfc-editor.org/info/rfc7838](https://www.rfc-editor.org/info/rfc7838)>.\n\n[COOKIES]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, [DOI 10.17487/RFC6265](https://dx.doi.org/10.17487/RFC6265), April 2011, <[https://www.rfc-editor.org/info/rfc6265](https://www.rfc-editor.org/info/rfc6265)>.\n\n[HTTP-CACHING]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html)”, [STD 98](https://www.rfc-editor.org/info/std98), RFC 9111, [DOI 10.17487/RFC9111](https://dx.doi.org/10.17487/RFC9111), June 2022, <[https://www.rfc-editor.org/info/rfc9111](https://www.rfc-editor.org/info/rfc9111)>.\n\n[HTTP-REPLAY]\n\nThomson, M., Nottingham, M., and W. Tarreau, “[Using Early Data in HTTP](https://www.rfc-editor.org/rfc/rfc8470.html)”, RFC 8470, [DOI 10.17487/RFC8470](https://dx.doi.org/10.17487/RFC8470), September 2018, <[https://www.rfc-editor.org/info/rfc8470](https://www.rfc-editor.org/info/rfc8470)>.\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[QPACK]\n\nKrasic, C., Bishop, M., and A. Frindell, Ed., “[QPACK: Field Compression for HTTP/3](https://www.rfc-editor.org/rfc/rfc9204.html)”, RFC 9204, [DOI 10.17487/RFC9204](https://dx.doi.org/10.17487/RFC9204), June 2022, <[https://www.rfc-editor.org/info/rfc9204](https://www.rfc-editor.org/info/rfc9204)>.\n\n[QUIC-TRANSPORT]\n\nIyengar, J., Ed. and M. Thomson, Ed., “[QUIC: A UDP-Based Multiplexed and Secure Transport](https://www.rfc-editor.org/rfc/rfc9000.html)”, RFC 9000, [DOI 10.17487/RFC9000](https://dx.doi.org/10.17487/RFC9000), May 2021, <[https://www.rfc-editor.org/info/rfc9000](https://www.rfc-editor.org/info/rfc9000)>.\n\n[RFC0793]\n\nPostel, J., “[Transmission Control Protocol](https://www.rfc-editor.org/rfc/rfc793.html)”, [STD 7](https://www.rfc-editor.org/info/std7), RFC 793, [DOI 10.17487/RFC0793](https://dx.doi.org/10.17487/RFC0793), September 1981, <[https://www.rfc-editor.org/info/rfc793](https://www.rfc-editor.org/info/rfc793)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC6066]\n\nEastlake 3rd, D., “[Transport Layer Security (TLS) Extensions: Extension Definitions](https://www.rfc-editor.org/rfc/rfc6066.html)”, RFC 6066, [DOI 10.17487/RFC6066](https://dx.doi.org/10.17487/RFC6066), January 2011, <[https://www.rfc-editor.org/info/rfc6066](https://www.rfc-editor.org/info/rfc6066)>.\n\n[RFC7301]\n\nFriedl, S., Popov, A., Langley, A., and E. Stephan, “[Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension](https://www.rfc-editor.org/rfc/rfc7301.html)”, RFC 7301, [DOI 10.17487/RFC7301](https://dx.doi.org/10.17487/RFC7301), July 2014, <[https://www.rfc-editor.org/info/rfc7301](https://www.rfc-editor.org/info/rfc7301)>.\n\n[RFC8126]\n\nCotton, M., Leiba, B., and T. Narten, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc8126.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 8126, [DOI 10.17487/RFC8126](https://dx.doi.org/10.17487/RFC8126), June 2017, <[https://www.rfc-editor.org/info/rfc8126](https://www.rfc-editor.org/info/rfc8126)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[URI]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[https://www.rfc-editor.org/info/rfc3986](https://www.rfc-editor.org/info/rfc3986)>.\n\n### 12.2. Informative References\n\n[BREACH]\n\nGluck, Y., Harris, N., and A. Prado, “[BREACH: Reviving the CRIME Attack](http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf)”, July 2013, <[http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf](http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf)>.\n\n[DNS-TERMS]\n\nHoffman, P., Sullivan, A., and K. Fujiwara, “[DNS Terminology](https://www.rfc-editor.org/rfc/rfc8499.html)”, [BCP 219](https://www.rfc-editor.org/info/bcp219), RFC 8499, [DOI 10.17487/RFC8499](https://dx.doi.org/10.17487/RFC8499), January 2019, <[https://www.rfc-editor.org/info/rfc8499](https://www.rfc-editor.org/info/rfc8499)>.\n\n[HPACK]\n\nPeon, R. and H. Ruellan, “[HPACK: Header Compression for HTTP/2](https://www.rfc-editor.org/rfc/rfc7541.html)”, RFC 7541, [DOI 10.17487/RFC7541](https://dx.doi.org/10.17487/RFC7541), May 2015, <[https://www.rfc-editor.org/info/rfc7541](https://www.rfc-editor.org/info/rfc7541)>.\n\n[HTTP/1.1]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html)”, [STD 99](https://www.rfc-editor.org/info/std99), RFC 9112, [DOI 10.17487/RFC9112](https://dx.doi.org/10.17487/RFC9112), June 2022, <[https://www.rfc-editor.org/info/rfc9112](https://www.rfc-editor.org/info/rfc9112)>.\n\n[HTTP/2]\n\nThomson, M., Ed. and C. Benfield, Ed., “[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html)”, RFC 9113, [DOI 10.17487/RFC9113](https://dx.doi.org/10.17487/RFC9113), June 2022, <[https://www.rfc-editor.org/info/rfc9113](https://www.rfc-editor.org/info/rfc9113)>.\n\n[RFC6585]\n\nNottingham, M. and R. Fielding, “[Additional HTTP Status Codes](https://www.rfc-editor.org/rfc/rfc6585.html)”, RFC 6585, [DOI 10.17487/RFC6585](https://dx.doi.org/10.17487/RFC6585), April 2012, <[https://www.rfc-editor.org/info/rfc6585](https://www.rfc-editor.org/info/rfc6585)>.\n\n[RFC8164]\n\nNottingham, M. and M. Thomson, “[Opportunistic Security for HTTP/2](https://www.rfc-editor.org/rfc/rfc8164.html)”, RFC 8164, [DOI 10.17487/RFC8164](https://dx.doi.org/10.17487/RFC8164), May 2017, <[https://www.rfc-editor.org/info/rfc8164](https://www.rfc-editor.org/info/rfc8164)>.\n\n[TFO]\n\nCheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, “[TCP Fast Open](https://www.rfc-editor.org/rfc/rfc7413.html)”, RFC 7413, [DOI 10.17487/RFC7413](https://dx.doi.org/10.17487/RFC7413), December 2014, <[https://www.rfc-editor.org/info/rfc7413](https://www.rfc-editor.org/info/rfc7413)>.\n\n[TLS]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n---\n\n## Appendix A. Considerations for Transitioning from HTTP/2\n\nHTTP/3 is strongly informed by HTTP/2, and it bears many similarities. This section describes the approach taken to design HTTP/3, points out important differences from HTTP/2, and describes how to map HTTP/2 extensions into HTTP/3.\n\nHTTP/3 begins from the premise that similarity to HTTP/2 is preferable, but not a hard requirement. HTTP/3 departs from HTTP/2 where QUIC differs from TCP, either to take advantage of QUIC features (like streams) or to accommodate important shortcomings (such as a lack of total ordering). While HTTP/3 is similar to HTTP/2 in key aspects, such as the relationship of requests and responses to streams, the details of the HTTP/3 design are substantially different from HTTP/2.\n\nSome important departures are noted in this section.\n\n### A.1. Streams\n\nHTTP/3 permits use of a larger number of streams (262-1) than HTTP/2. The same considerations about exhaustion of stream identifier space apply, though the space is significantly larger such that it is likely that other limits in QUIC are reached first, such as the limit on the connection flow-control window.\n\nIn contrast to HTTP/2, stream concurrency in HTTP/3 is managed by QUIC. QUIC considers a stream closed when all data has been received and sent data has been acknowledged by the peer. HTTP/2 considers a stream closed when the frame containing the END_STREAM bit has been committed to the transport. As a result, the stream for an equivalent exchange could remain \"active\" for a longer period of time. HTTP/3 servers might choose to permit a larger number of concurrent client-initiated bidirectional streams to achieve equivalent concurrency to HTTP/2, depending on the expected usage patterns.\n\nIn HTTP/2, only request and response bodies (the frame payload of DATA frames) are subject to flow control. All HTTP/3 frames are sent on QUIC streams, so all frames on all streams are flow controlled in HTTP/3.\n\nDue to the presence of other unidirectional stream types, HTTP/3 does not rely exclusively on the number of concurrent unidirectional streams to control the number of concurrent in-flight pushes. Instead, HTTP/3 clients use the MAX_PUSH_ID frame to control the number of pushes received from an HTTP/3 server.\n\n### A.2. HTTP Frame Types\n\nMany framing concepts from HTTP/2 can be elided on QUIC, because the transport deals with them. Because frames are already on a stream, they can omit the stream number. Because frames do not block multiplexing (QUIC's multiplexing occurs below this layer), the support for variable-maximum-length packets can be removed. Because stream termination is handled by QUIC, an END_STREAM flag is not required. This permits the removal of the Flags field from the generic frame layout.\n\nFrame payloads are largely drawn from [HTTP/2]. However, QUIC includes many features (e.g., flow control) that are also present in HTTP/2. In these cases, the HTTP mapping does not re-implement them. As a result, several HTTP/2 frame types are not required in HTTP/3. Where an HTTP/2-defined frame is no longer used, the frame ID has been reserved in order to maximize portability between HTTP/2 and HTTP/3 implementations. However, even frame types that appear in both mappings do not have identical semantics.\n\nMany of the differences arise from the fact that HTTP/2 provides an absolute ordering between frames across all streams, while QUIC provides this guarantee on each stream only. As a result, if a frame type makes assumptions that frames from different streams will still be received in the order sent, HTTP/3 will break them.\n\nSome examples of feature adaptations are described below, as well as general guidance to extension frame implementors converting an HTTP/2 extension to HTTP/3.\n\n#### A.2.1. Prioritization Differences\n\nHTTP/2 specifies priority assignments in PRIORITY frames and (optionally) in HEADERS frames. HTTP/3 does not provide a means of signaling priority.\n\nNote that, while there is no explicit signaling for priority, this does not mean that prioritization is not important for achieving good performance.\n\n#### A.2.2. Field Compression Differences\n\nHPACK was designed with the assumption of in-order delivery. A sequence of encoded field sections must arrive (and be decoded) at an endpoint in the same order in which they were encoded. This ensures that the dynamic state at the two endpoints remains in sync.\n\nBecause this total ordering is not provided by QUIC, HTTP/3 uses a modified version of HPACK, called QPACK. QPACK uses a single unidirectional stream to make all modifications to the dynamic table, ensuring a total order of updates. All frames that contain encoded fields merely reference the table state at a given time without modifying it.\n\n[QPACK] provides additional details.\n\n#### A.2.3. Flow-Control Differences\n\nHTTP/2 specifies a stream flow-control mechanism. Although all HTTP/2 frames are delivered on streams, only the DATA frame payload is subject to flow control. QUIC provides flow control for stream data and all HTTP/3 frame types defined in this document are sent on streams. Therefore, all frame headers and payload are subject to flow control.\n\n#### A.2.4. Guidance for New Frame Type Definitions\n\nFrame type definitions in HTTP/3 often use the QUIC variable-length integer encoding. In particular, stream IDs use this encoding, which allows for a larger range of possible values than the encoding used in HTTP/2. Some frames in HTTP/3 use an identifier other than a stream ID (e.g., push IDs). Redefinition of the encoding of extension frame types might be necessary if the encoding includes a stream ID.\n\nBecause the Flags field is not present in generic HTTP/3 frames, those frames that depend on the presence of flags need to allocate space for flags as part of their frame payload.\n\nOther than these issues, frame type HTTP/2 extensions are typically portable to QUIC simply by replacing stream 0 in HTTP/2 with a control stream in HTTP/3. HTTP/3 extensions will not assume ordering, but would not be harmed by ordering, and are expected to be portable to HTTP/2.\n\n#### A.2.5. Comparison of HTTP/2 and HTTP/3 Frame Types\n\nDATA (0x00):\n\nPadding is not defined in HTTP/3 frames. See Section 7.2.1.\n\nHEADERS (0x01):\n\nThe PRIORITY region of HEADERS is not defined in HTTP/3 frames. Padding is not defined in HTTP/3 frames. See Section 7.2.2.\n\nPRIORITY (0x02):\n\nAs described in Appendix A.2.1, HTTP/3 does not provide a means of signaling priority.\n\nRST_STREAM (0x03):\n\nRST_STREAM frames do not exist in HTTP/3, since QUIC provides stream lifecycle management. The same code point is used for the CANCEL_PUSH frame (Section 7.2.3).\n\nSETTINGS (0x04):\n\nSETTINGS frames are sent only at the beginning of the connection. See Section 7.2.4 and Appendix A.3.\n\nPUSH_PROMISE (0x05):\n\nThe PUSH_PROMISE frame does not reference a stream; instead, the push stream references the PUSH_PROMISE frame using a push ID. See Section 7.2.5.\n\nPING (0x06):\n\nPING frames do not exist in HTTP/3, as QUIC provides equivalent functionality.\n\nGOAWAY (0x07):\n\nGOAWAY does not contain an error code. In the client-to-server direction, it carries a push ID instead of a server-initiated stream ID. See Section 7.2.6.\n\nWINDOW_UPDATE (0x08):\n\nWINDOW_UPDATE frames do not exist in HTTP/3, since QUIC provides flow control.\n\nCONTINUATION (0x09):\n\nCONTINUATION frames do not exist in HTTP/3; instead, larger HEADERS/PUSH_PROMISE frames than HTTP/2 are permitted.\n\nFrame types defined by extensions to HTTP/2 need to be separately registered for HTTP/3 if still applicable. The IDs of frames defined in [HTTP/2] have been reserved for simplicity. Note that the frame type space in HTTP/3 is substantially larger (62 bits versus 8 bits), so many HTTP/3 frame types have no equivalent HTTP/2 code points. See Section 11.2.1.\n\n### A.3. HTTP/2 SETTINGS Parameters\n\nAn important difference from HTTP/2 is that settings are sent once, as the first frame of the control stream, and thereafter cannot change. This eliminates many corner cases around synchronization of changes.\n\nSome transport-level options that HTTP/2 specifies via the SETTINGS frame are superseded by QUIC transport parameters in HTTP/3. The HTTP-level setting that is retained in HTTP/3 has the same value as in HTTP/2. The superseded settings are reserved, and their receipt is an error. See Section 7.2.4.1 for discussion of both the retained and reserved values.\n\nBelow is a listing of how each HTTP/2 SETTINGS parameter is mapped:\n\nSETTINGS_HEADER_TABLE_SIZE (0x01):\n\nSee [QPACK].\n\nSETTINGS_ENABLE_PUSH (0x02):\n\nThis is removed in favor of the MAX_PUSH_ID frame, which provides a more granular control over server push. Specifying a setting with the identifier 0x02 (corresponding to the SETTINGS_ENABLE_PUSH parameter) in the HTTP/3 SETTINGS frame is an error.\n\nSETTINGS_MAX_CONCURRENT_STREAMS (0x03):\n\nQUIC controls the largest open stream ID as part of its flow-control logic. Specifying a setting with the identifier 0x03 (corresponding to the SETTINGS_MAX_CONCURRENT_STREAMS parameter) in the HTTP/3 SETTINGS frame is an error.\n\nSETTINGS_INITIAL_WINDOW_SIZE (0x04):\n\nQUIC requires both stream and connection flow-control window sizes to be specified in the initial transport handshake. Specifying a setting with the identifier 0x04 (corresponding to the SETTINGS_INITIAL_WINDOW_SIZE parameter) in the HTTP/3 SETTINGS frame is an error.\n\nSETTINGS_MAX_FRAME_SIZE (0x05):\n\nThis setting has no equivalent in HTTP/3. Specifying a setting with the identifier 0x05 (corresponding to the SETTINGS_MAX_FRAME_SIZE parameter) in the HTTP/3 SETTINGS frame is an error.\n\nSETTINGS_MAX_HEADER_LIST_SIZE (0x06):\n\nThis setting identifier has been renamed SETTINGS_MAX_FIELD_SECTION_SIZE.\n\nIn HTTP/3, setting values are variable-length integers (6, 14, 30, or 62 bits long) rather than fixed-length 32-bit fields as in HTTP/2. This will often produce a shorter encoding, but can produce a longer encoding for settings that use the full 32-bit space. Settings ported from HTTP/2 might choose to redefine their value to limit it to 30 bits for more efficient encoding or to make use of the 62-bit space if more than 30 bits are required.\n\nSettings need to be defined separately for HTTP/2 and HTTP/3. The IDs of settings defined in [HTTP/2] have been reserved for simplicity. Note that the settings identifier space in HTTP/3 is substantially larger (62 bits versus 16 bits), so many HTTP/3 settings have no equivalent HTTP/2 code point. See Section 11.2.2.\n\nAs QUIC streams might arrive out of order, endpoints are advised not to wait for the peers' settings to arrive before responding to other streams. See Section 7.2.4.2.\n\n### A.4. HTTP/2 Error Codes\n\nQUIC has the same concepts of \"stream\" and \"connection\" errors that HTTP/2 provides. However, the differences between HTTP/2 and HTTP/3 mean that error codes are not directly portable between versions.\n\nThe HTTP/2 error codes defined in [Section 7](https://www.rfc-editor.org/rfc/rfc9113.html#section-7) of [HTTP/2] logically map to the HTTP/3 error codes as follows:\n\nNO_ERROR (0x00):\n\nH3_NO_ERROR in Section 8.1.\n\nPROTOCOL_ERROR (0x01):\n\nThis is mapped to H3_GENERAL_PROTOCOL_ERROR except in cases where more specific error codes have been defined. Such cases include H3_FRAME_UNEXPECTED, H3_MESSAGE_ERROR, and H3_CLOSED_CRITICAL_STREAM defined in Section 8.1.\n\nINTERNAL_ERROR (0x02):\n\nH3_INTERNAL_ERROR in Section 8.1.\n\nFLOW_CONTROL_ERROR (0x03):\n\nNot applicable, since QUIC handles flow control.\n\nSETTINGS_TIMEOUT (0x04):\n\nNot applicable, since no acknowledgment of SETTINGS is defined.\n\nSTREAM_CLOSED (0x05):\n\nNot applicable, since QUIC handles stream management.\n\nFRAME_SIZE_ERROR (0x06):\n\nH3_FRAME_ERROR error code defined in Section 8.1.\n\nREFUSED_STREAM (0x07):\n\nH3_REQUEST_REJECTED (in Section 8.1) is used to indicate that a request was not processed. Otherwise, not applicable because QUIC handles stream management.\n\nCANCEL (0x08):\n\nH3_REQUEST_CANCELLED in Section 8.1.\n\nCOMPRESSION_ERROR (0x09):\n\nMultiple error codes are defined in [QPACK].\n\nCONNECT_ERROR (0x0a):\n\nH3_CONNECT_ERROR in Section 8.1.\n\nENHANCE_YOUR_CALM (0x0b):\n\nH3_EXCESSIVE_LOAD in Section 8.1.\n\nINADEQUATE_SECURITY (0x0c):\n\nNot applicable, since QUIC is assumed to provide sufficient security on all connections.\n\nHTTP_1_1_REQUIRED (0x0d):\n\nH3_VERSION_FALLBACK in Section 8.1.\n\nError codes need to be defined for HTTP/2 and HTTP/3 separately. See Section 11.2.3.\n\n#### A.4.1. Mapping between HTTP/2 and HTTP/3 Errors\n\nAn intermediary that converts between HTTP/2 and HTTP/3 may encounter error conditions from either upstream. It is useful to communicate the occurrence of errors to the downstream, but error codes largely reflect connection-local problems that generally do not make sense to propagate.\n\nAn intermediary that encounters an error from an upstream origin can indicate this by sending an HTTP status code such as 502 (Bad Gateway), which is suitable for a broad class of errors.\n\nThere are some rare cases where it is beneficial to propagate the error by mapping it to the closest matching error type to the receiver. For example, an intermediary that receives an HTTP/2 stream error of type REFUSED_STREAM from the origin has a clear signal that the request was not processed and that the request is safe to retry. Propagating this error condition to the client as an HTTP/3 stream error of type H3_REQUEST_REJECTED allows the client to take the action it deems most appropriate. In the reverse direction, the intermediary might deem it beneficial to pass on client request cancellations that are indicated by terminating a stream with H3_REQUEST_CANCELLED; see Section 4.1.1.\n\nConversion between errors is described in the logical mapping. The error codes are defined in non-overlapping spaces in order to protect against accidental conversion that could result in the use of inappropriate or unknown error codes for the target version. An intermediary is permitted to promote stream errors to connection errors but they should be aware of the cost to the HTTP/3 connection for what might be a temporary or intermittent error.\n\n---\n\n## Acknowledgments\n\nRobbie Shade and Mike Warres were the authors of draft-shade-quic-http2-mapping, a precursor of this document.\n\nThe IETF QUIC Working Group received an enormous amount of support from many people. Among others, the following people provided substantial contributions to this document:\n\n- Bence Beky\n- Daan De Meyer\n- Martin Duke\n- Roy Fielding\n- Alan Frindell\n- Alessandro Ghedini\n- Nick Harper\n- Ryan Hamilton\n- Christian Huitema\n- Subodh Iyengar\n- Robin Marx\n- Patrick McManus\n- Luca Niccolini\n- 奥 一穂 (Kazuho Oku)\n- Lucas Pardue\n- Roberto Peon\n- Julian Reschke\n- Eric Rescorla\n- Martin Seemann\n- Ben Schwartz\n- Ian Swett\n- Willy Taureau\n- Martin Thomson\n- Dmitri Tikhonov\n- Tatsuhiro Tsujikawa\n\nA portion of Mike Bishop's contribution was supported by Microsoft during his employment there.\n\n---\n\n## Index\n\nC D G H M P R S\n\n- **C**\n - CANCEL_PUSH 2 , 4.6 , 4.6 , 7 , **7.2.3** , 7.2.5 , 7.2.7 , 11.2.1 , A.2.5\n - connection error 2.2 , 4.1 , 4.1 , 4.4 , 4.4 , 4.6 , 5.2 , 6.1 , 6.2 , 6.2.1 , 6.2.1 , 6.2.1 , 6.2.2 , 6.2.2 , 7.1 , 7.1 , 7.2.1 , 7.2.2 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.4 , 7.2.4 , 7.2.4 , 7.2.4.1 , 7.2.4.2 , 7.2.4.2 , 7.2.5 , 7.2.5 , 7.2.5 , 7.2.5 , 7.2.6 , 7.2.6 , 7.2.7 , 7.2.7 , 7.2.7 , 7.2.8 , **8** , 10.5 , A.4.1\n - control stream 2 , 3.2 , 6.2 , 6.2 , 6.2 , **6.2.1** , 7 , 7.2.1 , 7.2.2 , 7.2.3 , 7.2.3 , 7.2.4 , 7.2.4 , 7.2.4 , 7.2.5 , 7.2.6 , 7.2.6 , 7.2.7 , 8.1 , 9 , A.2.4 , A.3\n- **D**\n - DATA 2 , 4.1 , 4.1 , 4.1 , 4.1.2 , 4.1.2 , 4.4 , 4.4 , 4.4 , 4.4 , 4.4 , 4.6 , 7 , **7.2.1** , 11.2.1 , A.1 , A.2.3 , A.2.5\n- **G**\n - GOAWAY 3.3 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.2 , 5.3 , 5.3 , 5.4 , 7 , **7.2.6** , 11.2.1 , A.2.5 , A.2.5\n- **H**\n - H3_CLOSED_CRITICAL_STREAM 6.2.1 , 8.1 , 11.2.3 , A.4\n - H3_CONNECT_ERROR 4.4 , 8.1 , 11.2.3 , A.4\n - H3_EXCESSIVE_LOAD 8.1 , 10.5 , 11.2.3 , A.4\n - H3_FRAME_ERROR 7.1 , 7.1 , 8.1 , 11.2.3 , A.4\n - H3_FRAME_UNEXPECTED 4.1 , 4.1 , 4.4 , 7.2.1 , 7.2.2 , 7.2.3 , 7.2.4 , 7.2.4 , 7.2.5 , 7.2.5 , 7.2.6 , 7.2.7 , 7.2.7 , 7.2.8 , 8.1 , 11.2.3 , A.4\n - H3_GENERAL_PROTOCOL_ERROR 7.2.5 , 8.1 , 11.2.3 , A.4\n - H3_ID_ERROR 4.6 , 5.2 , 6.2.2 , 7.2.3 , 7.2.3 , 7.2.5 , 7.2.6 , 7.2.7 , 8.1 , 11.2.3\n - H3_INTERNAL_ERROR 8.1 , 11.2.3 , A.4\n - H3_MESSAGE_ERROR 4.1.2 , 8.1 , 11.2.3 , A.4\n - H3_MISSING_SETTINGS 6.2.1 , 8.1 , 11.2.3\n - H3_NO_ERROR 4.1 , 5.2 , 6.2.3 , 8 , 8.1 , 8.1 , 8.1 , 11.2.3 , A.4\n - H3_REQUEST_CANCELLED 4.1.1 , 4.1.1 , 4.6 , 7.2.3 , 7.2.3 , 8.1 , 11.2.3 , A.4 , A.4.1\n - H3_REQUEST_INCOMPLETE 4.1 , 8.1 , 11.2.3\n - H3_REQUEST_REJECTED 4.1.1 , 4.1.1 , 4.1.1 , 4.1.1 , 8.1 , 11.2.3 , A.4 , A.4.1\n - H3_SETTINGS_ERROR 7.2.4 , 7.2.4.1 , 7.2.4.2 , 7.2.4.2 , 8.1 , 11.2.3\n - H3_STREAM_CREATION_ERROR 6.1 , 6.2 , 6.2.1 , 6.2.2 , 8.1 , 11.2.3\n - H3_VERSION_FALLBACK 8.1 , 11.2.3 , A.4\n - HEADERS 2 , 4.1 , 4.1 , 4.1 , 4.1 , 4.1 , 4.1 , 4.4 , 4.6 , 7 , **7.2.2** , 9 , 11.2.1 , A.2.1 , A.2.5 , A.2.5 , A.2.5\n- **M**\n - malformed 4.1 , **4.1.2** , 4.2 , 4.2 , 4.2 , 4.3 , 4.3 , 4.3.1 , 4.3.2 , 4.4 , 8.1 , 10.3 , 10.3 , 10.5.1\n - MAX_PUSH_ID 2 , 4.6 , 4.6 , 4.6 , 4.6 , 7 , 7.2.5 , **7.2.7** , 11.2.1 , A.1 , A.3\n- **P**\n - push ID **4.6** , 5.2 , 5.2 , 5.2 , 6.2.2 , 6.2.2 , 6.2.2 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.5 , 7.2.5 , 7.2.5 , 7.2.5 , 7.2.5 , 7.2.5 , 7.2.5 , 7.2.5 , 7.2.6 , 7.2.7 , 7.2.7 , 7.2.7 , 7.2.7 , 7.2.7 , 8.1 , A.2.5 , A.2.5\n - push stream 4.1 , 4.1 , 4.6 , 4.6 , 4.6 , 4.6 , 4.6 , 4.6 , 6.2 , **6.2.2** , 7 , 7.2.2 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.3 , 7.2.5 , 7.2.7 , A.2.5\n - PUSH_PROMISE 2 , 4.1 , 4.1 , 4.1 , 4.1 , 4.1 , 4.6 , 4.6 , 4.6 , 4.6 , 4.6 , 4.6 , 4.6 , 4.6 , 4.6 , 7 , 7.2.3 , 7.2.3 , **7.2.5** , 7.2.7 , 10.4 , 10.5 , 11.2.1 , A.2.5 , A.2.5 , A.2.5 , A.2.5\n- **R**\n - request stream 4.1 , 4.1 , 4.1 , 4.1.1 , 4.1.1 , 4.4 , 4.4 , 4.6 , 4.6 , 4.6 , 4.6 , **6.1** , 7 , 7.2.2 , 7.2.5\n- **S**\n - SETTINGS 3.2 , 3.2 , 6.2.1 , 7 , 7 , **7.2.4** , 8.1 , 8.1 , 9 , 10.5 , 11.2.1 , 11.2.3 , 11.2.3 , A.2.5 , A.2.5 , A.3 , A.3 , A.3 , A.3 , A.3 , A.3 , A.4\n - SETTINGS_MAX_FIELD_SECTION_SIZE 4.2.2 , 7.2.4.1 , 10.5.1 , A.3\n - stream error 2.2 , 4.1.2 , 4.4 , **8** , A.4.1 , A.4.1 , A.4.1\n\n---\n\n## Author's Address\n\n**Mike Bishop** (editor)\nAkamai\nEMail: [mbishop@evequefou.be](mailto:mbishop@evequefou.be)", "znaku_textu": 128096, "slov": 19612, "odkazu": 754, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:50", "sha256": "c58e15690acf73ba0e31ce714e1521d1d9f394650460f111fa3005692b3fbf41", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9114", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9000.html", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc9112.html", "https://www.iana.org/assignments/http-fields/", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/rfc/rfc9113.html", "https://www.rfc-editor.org/rfc/rfc9111.html", "https://www.rfc-editor.org/rfc/rfc9204.html", "https://www.rfc-editor.org/rfc/rfc8126.html", "https://www.rfc-editor.org/rfc/rfc7838.html", "https://dx.doi.org/10.17487/RFC7838", "https://www.rfc-editor.org/info/rfc7838", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://dx.doi.org/10.17487/RFC6265", "https://www.rfc-editor.org/info/rfc6265", "https://www.rfc-editor.org/info/std98", "https://dx.doi.org/10.17487/RFC9111", "https://www.rfc-editor.org/info/rfc9111", "https://www.rfc-editor.org/rfc/rfc8470.html", "https://dx.doi.org/10.17487/RFC8470", "https://www.rfc-editor.org/info/rfc8470", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://dx.doi.org/10.17487/RFC9204", "https://www.rfc-editor.org/info/rfc9204", "https://dx.doi.org/10.17487/RFC9000", "https://www.rfc-editor.org/info/rfc9000", "https://www.rfc-editor.org/rfc/rfc793.html", "https://www.rfc-editor.org/info/std7", "https://dx.doi.org/10.17487/RFC0793", "https://www.rfc-editor.org/info/rfc793", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc6066.html", "https://dx.doi.org/10.17487/RFC6066", "https://www.rfc-editor.org/info/rfc6066", "https://www.rfc-editor.org/rfc/rfc7301.html", "https://dx.doi.org/10.17487/RFC7301", "https://www.rfc-editor.org/info/rfc7301", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC8126", "https://www.rfc-editor.org/info/rfc8126", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "https://www.rfc-editor.org/info/rfc3986", "http://breachattack.com/resources/BREACH%20-%20SSL,%20gone%20in%2030%20seconds.pdf", "https://www.rfc-editor.org/rfc/rfc8499.html", "https://www.rfc-editor.org/info/bcp219", "https://dx.doi.org/10.17487/RFC8499", "https://www.rfc-editor.org/info/rfc8499", "https://www.rfc-editor.org/rfc/rfc7541.html", "https://dx.doi.org/10.17487/RFC7541", "https://www.rfc-editor.org/info/rfc7541", "https://www.rfc-editor.org/info/std99", "https://dx.doi.org/10.17487/RFC9112", "https://www.rfc-editor.org/info/rfc9112", "https://dx.doi.org/10.17487/RFC9113", "https://www.rfc-editor.org/info/rfc9113", "https://www.rfc-editor.org/rfc/rfc6585.html", "https://dx.doi.org/10.17487/RFC6585", "https://www.rfc-editor.org/info/rfc6585", "https://www.rfc-editor.org/rfc/rfc8164.html", "https://dx.doi.org/10.17487/RFC8164", "https://www.rfc-editor.org/info/rfc8164", "https://www.rfc-editor.org/rfc/rfc7413.html", "https://dx.doi.org/10.17487/RFC7413", "https://www.rfc-editor.org/info/rfc7413", "https://www.rfc-editor.org/rfc/rfc8446.html", "https://dx.doi.org/10.17487/RFC8446", "https://www.rfc-editor.org/info/rfc8446"]} {"url": "https://httpwg.org/specs/rfc9204.html", "titulek": "RFC 9204 - QPACK: Field Compression for HTTP/3", "h1": "QPACK: Field Compression for HTTP/3", "popis": "This specification defines QPACK: a compression format for efficiently representing HTTP fields that is to be used in HTTP/3. This is a variation of HPACK compression that seeks to reduce head-of-line blocking.", "klicova_slova": "compression, HTTP/3, HPACK, header, field, trailer", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9204", "og:description": "QPACK: Field Compression for HTTP/3", "og:url": "https://httpwg.org/specs/rfc9204.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Conventions and Definitions"}, {"uroven": 3, "text": "1.2. Notational Conventions"}, {"uroven": 2, "text": "2. Compression Process Overview"}, {"uroven": 3, "text": "2.1. Encoder"}, {"uroven": 4, "text": "2.1.1. Limits on Dynamic Table Insertions"}, {"uroven": 5, "text": "2.1.1.1. Avoiding Prohibited Insertions"}, {"uroven": 4, "text": "2.1.2. Blocked Streams"}, {"uroven": 4, "text": "2.1.3. Avoiding Flow-Control Deadlocks"}, {"uroven": 4, "text": "2.1.4. Known Received Count"}, {"uroven": 3, "text": "2.2. Decoder"}, {"uroven": 4, "text": "2.2.1. Blocked Decoding"}, {"uroven": 4, "text": "2.2.2. State Synchronization"}, {"uroven": 5, "text": "2.2.2.1. Completed Processing of a Field Section"}, {"uroven": 5, "text": "2.2.2.2. Abandonment of a Stream"}, {"uroven": 5, "text": "2.2.2.3. New Table Entries"}, {"uroven": 4, "text": "2.2.3. Invalid References"}, {"uroven": 2, "text": "3. Reference Tables"}, {"uroven": 2, "text": "4. Wire Format"}, {"uroven": 3, "text": "4.1. Primitives"}, {"uroven": 4, "text": "4.1.1. Prefixed Integers"}, {"uroven": 4, "text": "4.1.2. String Literals"}, {"uroven": 3, "text": "4.2. Encoder and Decoder Streams"}, {"uroven": 3, "text": "4.3. Encoder Instructions"}, {"uroven": 4, "text": "4.3.1. Set Dynamic Table Capacity"}, {"uroven": 4, "text": "4.3.2. Insert with Name Reference"}, {"uroven": 4, "text": "4.3.3. Insert with Literal Name"}, {"uroven": 4, "text": "4.3.4. Duplicate"}, {"uroven": 3, "text": "4.4. Decoder Instructions"}, {"uroven": 4, "text": "4.4.2. Stream Cancellation"}, {"uroven": 4, "text": "4.4.3. Insert Count Increment"}, {"uroven": 3, "text": "4.5. Field Line Representations"}, {"uroven": 4, "text": "4.5.2. Indexed Field Line"}, {"uroven": 4, "text": "4.5.3. Indexed Field Line with Post-Base Index"}, {"uroven": 4, "text": "4.5.4. Literal Field Line with Name Reference"}, {"uroven": 4, "text": "4.5.5. Literal Field Line with Post-Base Name Reference"}, {"uroven": 4, "text": "4.5.6. Literal Field Line with Literal Name"}, {"uroven": 2, "text": "5. Configuration"}, {"uroven": 2, "text": "6. Error Handling"}, {"uroven": 2, "text": "7. Security Considerations"}, {"uroven": 3, "text": "7.1. Probing Dynamic Table State"}, {"uroven": 4, "text": "7.1.1. Applicability to QPACK and HTTP"}, {"uroven": 4, "text": "7.1.2. Mitigation"}, {"uroven": 4, "text": "7.1.3. Never-Indexed Literals"}, {"uroven": 3, "text": "7.2. Static Huffman Encoding"}, {"uroven": 3, "text": "7.3. Memory Consumption"}, {"uroven": 3, "text": "7.4. Implementation Limits"}, {"uroven": 2, "text": "8. IANA Considerations"}, {"uroven": 3, "text": "8.1. Settings Registration"}, {"uroven": 3, "text": "8.2. Stream Type Registration"}, {"uroven": 3, "text": "8.3. Error Code Registration"}, {"uroven": 2, "text": "9. References"}, {"uroven": 3, "text": "9.1. Normative References"}, {"uroven": 3, "text": "9.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Static Table"}, {"uroven": 2, "text": "Appendix B. Encoding and Decoding Examples"}, {"uroven": 3, "text": "B.1. Literal Field Line with Name Reference"}, {"uroven": 3, "text": "B.2. Dynamic Table"}, {"uroven": 3, "text": "B.3. Speculative Insert"}, {"uroven": 3, "text": "B.4. Duplicate Instruction, Stream Cancellation"}, {"uroven": 3, "text": "B.5. Dynamic Table Insert, Eviction"}, {"uroven": 2, "text": "Appendix C. Sample Single-Pass Encoding Algorithm"}, {"uroven": 2, "text": "Acknowledgments"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis specification defines QPACK: a compression format for efficiently representing HTTP fields that is to be used in HTTP/3. This is a variation of HPACK compression that seeks to reduce head-of-line blocking.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9204](https://www.rfc-editor.org/info/rfc9204).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Conventions and Definitions\n - 1.2. Notational Conventions\n- 2. Compression Process Overview\n - 2.1. Encoder\n - 2.1.1. Limits on Dynamic Table Insertions\n - 2.1.2. Blocked Streams\n - 2.1.3. Avoiding Flow-Control Deadlocks\n - 2.1.4. Known Received Count\n - 2.2. Decoder\n - 2.2.1. Blocked Decoding\n - 2.2.2. State Synchronization\n - 2.2.3. Invalid References\n- 3. Reference Tables\n - 3.1. Static Table\n - 3.2. Dynamic Table\n - 3.2.1. Dynamic Table Size\n - 3.2.2. Dynamic Table Capacity and Eviction\n - 3.2.3. Maximum Dynamic Table Capacity\n - 3.2.4. Absolute Indexing\n - 3.2.5. Relative Indexing\n - 3.2.6. Post-Base Indexing\n- 4. Wire Format\n - 4.1. Primitives\n - 4.1.1. Prefixed Integers\n - 4.1.2. String Literals\n - 4.2. Encoder and Decoder Streams\n - 4.3. Encoder Instructions\n - 4.3.1. Set Dynamic Table Capacity\n - 4.3.2. Insert with Name Reference\n - 4.3.3. Insert with Literal Name\n - 4.3.4. Duplicate\n - 4.4. Decoder Instructions\n - 4.4.1. Section Acknowledgment\n - 4.4.2. Stream Cancellation\n - 4.4.3. Insert Count Increment\n - 4.5. Field Line Representations\n - 4.5.1. Encoded Field Section Prefix\n - 4.5.2. Indexed Field Line\n - 4.5.3. Indexed Field Line with Post-Base Index\n - 4.5.4. Literal Field Line with Name Reference\n - 4.5.5. Literal Field Line with Post-Base Name Reference\n - 4.5.6. Literal Field Line with Literal Name\n- 5. Configuration\n- 6. Error Handling\n- 7. Security Considerations\n - 7.1. Probing Dynamic Table State\n - 7.1.1. Applicability to QPACK and HTTP\n - 7.1.2. Mitigation\n - 7.1.3. Never-Indexed Literals\n - 7.2. Static Huffman Encoding\n - 7.3. Memory Consumption\n - 7.4. Implementation Limits\n- 8. IANA Considerations\n - 8.1. Settings Registration\n - 8.2. Stream Type Registration\n - 8.3. Error Code Registration\n- 9. References\n - 9.1. Normative References\n - 9.2. Informative References\n- Appendix A. Static Table\n- Appendix B. Encoding and Decoding Examples\n - B.1. Literal Field Line with Name Reference\n - B.2. Dynamic Table\n - B.3. Speculative Insert\n - B.4. Duplicate Instruction, Stream Cancellation\n - B.5. Dynamic Table Insert, Eviction\n- Appendix C. Sample Single-Pass Encoding Algorithm\n- Acknowledgments\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nThe QUIC transport protocol ([QUIC-TRANSPORT]) is designed to support HTTP semantics, and its design subsumes many of the features of HTTP/2 ([HTTP/2]). HTTP/2 uses HPACK ([RFC7541]) for compression of the header and trailer sections. If HPACK were used for HTTP/3 ([HTTP/3]), it would induce head-of-line blocking for field sections due to built-in assumptions of a total ordering across frames on all streams.\n\nQPACK reuses core concepts from HPACK, but is redesigned to allow correctness in the presence of out-of-order delivery, with flexibility for implementations to balance between resilience against head-of-line blocking and optimal compression ratio. The design goals are to closely approach the compression ratio of HPACK with substantially less head-of-line blocking under the same loss conditions.\n\n### 1.1. Conventions and Definitions\n\nThe 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.\n\nThe following terms are used in this document:\n\nHTTP fields:\n\nMetadata sent as part of an HTTP message. The term encompasses both header and trailer fields. Colloquially, the term \"headers\" has often been used to refer to HTTP header fields and trailer fields; this document uses \"fields\" for generality.\n\nHTTP field line:\n\nA name-value pair sent as part of an HTTP field section. See Sections [6.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.3) and [6.5](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.5) of [HTTP].\n\nHTTP field value:\n\nData associated with a field name, composed from all field line values with that field name in that section, concatenated together with comma separators.\n\nField section:\n\nAn ordered collection of HTTP field lines associated with an HTTP message. A field section can contain multiple field lines with the same name. It can also contain duplicate field lines. An HTTP message can include both header and trailer sections.\n\nRepresentation:\n\nAn instruction that represents a field line, possibly by reference to the dynamic and static tables.\n\nEncoder:\n\nAn implementation that encodes field sections.\n\nDecoder:\n\nAn implementation that decodes encoded field sections.\n\nAbsolute Index:\n\nA unique index for each entry in the dynamic table.\n\nBase:\n\nA reference point for relative and post-Base indices. Representations that reference dynamic table entries are relative to a Base.\n\nInsert Count:\n\nThe total number of entries inserted in the dynamic table.\n\nNote that QPACK is a name, not an abbreviation.\n\n### 1.2. Notational Conventions\n\nDiagrams in this document use the format described in [Section 3.1](https://www.rfc-editor.org/rfc/rfc2360.html#section-3.1) of [RFC2360], with the following additional conventions:\n\nx (A)\n\nIndicates that x is A bits long.\n\nx (A+)\n\nIndicates that x uses the prefixed integer encoding defined in Section 4.1.1, beginning with an A-bit prefix.\n\nx ...\n\nIndicates that x is variable length and extends to the end of the region.\n\n---\n\n## 2. Compression Process Overview\n\nLike HPACK, QPACK uses two tables for associating field lines (\"headers\") to indices. The static table (Section 3.1) is predefined and contains common header field lines (some of them with an empty value). The dynamic table (Section 3.2) is built up over the course of the connection and can be used by the encoder to index both header and trailer field lines in the encoded field sections.\n\nQPACK defines unidirectional streams for sending instructions from encoder to decoder and vice versa.\n\n### 2.1. Encoder\n\nAn encoder converts a header or trailer section into a series of representations by emitting either an indexed or a literal representation for each field line in the list; see Section 4.5. Indexed representations achieve high compression by replacing the literal name and possibly the value with an index to either the static or dynamic table. References to the static table and literal representations do not require any dynamic state and never risk head-of-line blocking. References to the dynamic table risk head-of-line blocking if the encoder has not received an acknowledgment indicating the entry is available at the decoder.\n\nAn encoder *MAY* insert any entry in the dynamic table it chooses; it is not limited to field lines it is compressing.\n\nQPACK preserves the ordering of field lines within each field section. An encoder *MUST* emit field representations in the order they appear in the input field section.\n\nQPACK is designed to place the burden of optional state tracking on the encoder, resulting in relatively simple decoders.\n\n#### 2.1.1. Limits on Dynamic Table Insertions\n\nInserting entries into the dynamic table might not be possible if the table contains entries that cannot be evicted.\n\nA dynamic table entry cannot be evicted immediately after insertion, even if it has never been referenced. Once the insertion of a dynamic table entry has been acknowledged and there are no outstanding references to the entry in unacknowledged representations, the entry becomes evictable. Note that references on the encoder stream never preclude the eviction of an entry, because those references are guaranteed to be processed before the instruction evicting the entry.\n\nIf the dynamic table does not contain enough room for a new entry without evicting other entries, and the entries that would be evicted are not evictable, the encoder *MUST NOT* insert that entry into the dynamic table (including duplicates of existing entries). In order to avoid this, an encoder that uses the dynamic table has to keep track of each dynamic table entry referenced by each field section until those representations are acknowledged by the decoder; see Section 4.4.1.\n\n##### 2.1.1.1. Avoiding Prohibited Insertions\n\nTo ensure that the encoder is not prevented from adding new entries, the encoder can avoid referencing entries that are close to eviction. Rather than reference such an entry, the encoder can emit a Duplicate instruction (Section 4.3.4) and reference the duplicate instead.\n\nDetermining which entries are too close to eviction to reference is an encoder preference. One heuristic is to target a fixed amount of available space in the dynamic table: either unused space or space that can be reclaimed by evicting non-blocking entries. To achieve this, the encoder can maintain a draining index, which is the smallest absolute index (Section 3.2.4) in the dynamic table that it will emit a reference for. As new entries are inserted, the encoder increases the draining index to maintain the section of the table that it will not reference. If the encoder does not create new references to entries with an absolute index lower than the draining index, the number of unacknowledged references to those entries will eventually become zero, allowing them to be evicted.\n\n```\n <-- Newer Entries Older Entries -->\n (Larger Indices) (Smaller Indices)\n +--------+---------------------------------+----------+\n | Unused | Referenceable | Draining |\n | Space | Entries | Entries |\n +--------+---------------------------------+----------+\n ^ ^ ^\n | | |\n Insertion Point Draining Index Dropping\n Point\n```\n\nFigure 1: Draining Dynamic Table Entries\n\n#### 2.1.2. Blocked Streams\n\nBecause QUIC does not guarantee order between data on different streams, a decoder might encounter a representation that references a dynamic table entry that it has not yet received.\n\nEach encoded field section contains a Required Insert Count (Section 4.5.1), the lowest possible value for the Insert Count with which the field section can be decoded. For a field section encoded using references to the dynamic table, the Required Insert Count is one larger than the largest absolute index of all referenced dynamic table entries. For a field section encoded with no references to the dynamic table, the Required Insert Count is zero.\n\nWhen the decoder receives an encoded field section with a Required Insert Count greater than its own Insert Count, the stream cannot be processed immediately and is considered \"blocked\"; see Section 2.2.1.\n\nThe decoder specifies an upper bound on the number of streams that can be blocked using the SETTINGS_QPACK_BLOCKED_STREAMS setting; see Section 5. An encoder *MUST* limit the number of streams that could become blocked to the value of SETTINGS_QPACK_BLOCKED_STREAMS at all times. If a decoder encounters more blocked streams than it promised to support, it *MUST* treat this as a connection error of type QPACK_DECOMPRESSION_FAILED.\n\nNote that the decoder might not become blocked on every stream that risks becoming blocked.\n\nAn encoder can decide whether to risk having a stream become blocked. If permitted by the value of SETTINGS_QPACK_BLOCKED_STREAMS, compression efficiency can often be improved by referencing dynamic table entries that are still in transit, but if there is loss or reordering, the stream can become blocked at the decoder. An encoder can avoid the risk of blocking by only referencing dynamic table entries that have been acknowledged, but this could mean using literals. Since literals make the encoded field section larger, this can result in the encoder becoming blocked on congestion or flow-control limits.\n\n#### 2.1.3. Avoiding Flow-Control Deadlocks\n\nWriting instructions on streams that are limited by flow control can produce deadlocks.\n\nA decoder might stop issuing flow-control credit on the stream that carries an encoded field section until the necessary updates are received on the encoder stream. If the granting of flow-control credit on the encoder stream (or the connection as a whole) depends on the consumption and release of data on the stream carrying the encoded field section, a deadlock might result.\n\nMore generally, a stream containing a large instruction can become deadlocked if the decoder withholds flow-control credit until the instruction is completely received.\n\nTo avoid these deadlocks, an encoder *SHOULD NOT* write an instruction unless sufficient stream and connection flow-control credit is available for the entire instruction.\n\n#### 2.1.4. Known Received Count\n\nThe Known Received Count is the total number of dynamic table insertions and duplications acknowledged by the decoder. The encoder tracks the Known Received Count in order to identify which dynamic table entries can be referenced without potentially blocking a stream. The decoder tracks the Known Received Count in order to be able to send Insert Count Increment instructions.\n\nA Section Acknowledgment instruction (Section 4.4.1) implies that the decoder has received all dynamic table state necessary to decode the field section. If the Required Insert Count of the acknowledged field section is greater than the current Known Received Count, the Known Received Count is updated to that Required Insert Count value.\n\nAn Insert Count Increment instruction (Section 4.4.3) increases the Known Received Count by its Increment parameter. See Section 2.2.2.3 for guidance.\n\n### 2.2. Decoder\n\nAs in HPACK, the decoder processes a series of representations and emits the corresponding field sections. It also processes instructions received on the encoder stream that modify the dynamic table. Note that encoded field sections and encoder stream instructions arrive on separate streams. This is unlike HPACK, where encoded field sections (header blocks) can contain instructions that modify the dynamic table, and there is no dedicated stream of HPACK instructions.\n\nThe decoder *MUST* emit field lines in the order their representations appear in the encoded field section.\n\n#### 2.2.1. Blocked Decoding\n\nUpon receipt of an encoded field section, the decoder examines the Required Insert Count. When the Required Insert Count is less than or equal to the decoder's Insert Count, the field section can be processed immediately. Otherwise, the stream on which the field section was received becomes blocked.\n\nWhile blocked, encoded field section data *SHOULD* remain in the blocked stream's flow-control window. This data is unusable until the stream becomes unblocked, and releasing the flow control prematurely makes the decoder vulnerable to memory exhaustion attacks. A stream becomes unblocked when the Insert Count becomes greater than or equal to the Required Insert Count for all encoded field sections the decoder has started reading from the stream.\n\nWhen processing encoded field sections, the decoder expects the Required Insert Count to equal the lowest possible value for the Insert Count with which the field section can be decoded, as prescribed in Section 2.1.2. If it encounters a Required Insert Count smaller than expected, it *MUST* treat this as a connection error of type QPACK_DECOMPRESSION_FAILED; see Section 2.2.3. If it encounters a Required Insert Count larger than expected, it *MAY* treat this as a connection error of type QPACK_DECOMPRESSION_FAILED.\n\n#### 2.2.2. State Synchronization\n\nThe decoder signals the following events by emitting decoder instructions (Section 4.4) on the decoder stream.\n\n##### 2.2.2.1. Completed Processing of a Field Section\n\nAfter the decoder finishes decoding a field section encoded using representations containing dynamic table references, it *MUST* emit a Section Acknowledgment instruction (Section 4.4.1). A stream may carry multiple field sections in the case of intermediate responses, trailers, and pushed requests. The encoder interprets each Section Acknowledgment instruction as acknowledging the earliest unacknowledged field section containing dynamic table references sent on the given stream.\n\n##### 2.2.2.2. Abandonment of a Stream\n\nWhen an endpoint receives a stream reset before the end of a stream or before all encoded field sections are processed on that stream, or when it abandons reading of a stream, it generates a Stream Cancellation instruction; see Section 4.4.2. This signals to the encoder that all references to the dynamic table on that stream are no longer outstanding. A decoder with a maximum dynamic table capacity (Section 3.2.3) equal to zero *MAY* omit sending Stream Cancellations, because the encoder cannot have any dynamic table references. An encoder cannot infer from this instruction that any updates to the dynamic table have been received.\n\nThe Section Acknowledgment and Stream Cancellation instructions permit the encoder to remove references to entries in the dynamic table. When an entry with an absolute index lower than the Known Received Count has zero references, then it is considered evictable; see Section 2.1.1.\n\n##### 2.2.2.3. New Table Entries\n\nAfter receiving new table entries on the encoder stream, the decoder chooses when to emit Insert Count Increment instructions; see Section 4.4.3. Emitting this instruction after adding each new dynamic table entry will provide the timeliest feedback to the encoder, but could be redundant with other decoder feedback. By delaying an Insert Count Increment instruction, the decoder might be able to coalesce multiple Insert Count Increment instructions or replace them entirely with Section Acknowledgments; see Section 4.4.1. However, delaying too long may lead to compression inefficiencies if the encoder waits for an entry to be acknowledged before using it.\n\n#### 2.2.3. Invalid References\n\nIf the decoder encounters a reference in a field line representation to a dynamic table entry that has already been evicted or that has an absolute index greater than or equal to the declared Required Insert Count (Section 4.5.1), it *MUST* treat this as a connection error of type QPACK_DECOMPRESSION_FAILED.\n\nIf the decoder encounters a reference in an encoder instruction to a dynamic table entry that has already been evicted, it *MUST* treat this as a connection error of type QPACK_ENCODER_STREAM_ERROR.\n\n---\n\n## 3. Reference Tables\n\nUnlike in HPACK, entries in the QPACK static and dynamic tables are addressed separately. The following sections describe how entries in each table are addressed.\n\n---\n\n## 4. Wire Format\n\n### 4.1. Primitives\n\n#### 4.1.1. Prefixed Integers\n\nThe prefixed integer from [Section 5.1](https://www.rfc-editor.org/rfc/rfc7541.html#section-5.1) of [RFC7541] is used heavily throughout this document. The format from [RFC7541] is used unmodified. Note, however, that QPACK uses some prefix sizes not actually used in HPACK.\n\nQPACK implementations *MUST* be able to decode integers up to and including 62 bits long.\n\n#### 4.1.2. String Literals\n\nThe string literal defined by [Section 5.2](https://www.rfc-editor.org/rfc/rfc7541.html#section-5.2) of [RFC7541] is also used throughout. This string format includes optional Huffman encoding.\n\nHPACK defines string literals to begin on a byte boundary. They begin with a single bit flag, denoted as 'H' in this document (indicating whether the string is Huffman encoded), followed by the string length encoded as a 7-bit prefix integer, and finally the indicated number of bytes of data. When Huffman encoding is enabled, the Huffman table from [Appendix B](https://www.rfc-editor.org/rfc/rfc7541.html#appendix-B) of [RFC7541] is used without modification and the indicated length is the size of the string after encoding.\n\nThis document expands the definition of string literals by permitting them to begin other than on a byte boundary. An \"N-bit prefix string literal\" begins mid-byte, with the first (8-N) bits allocated to a previous field. The string uses one bit for the Huffman flag, followed by the length of the encoded string as a (N-1)-bit prefix integer. The prefix size, N, can have a value between 2 and 8, inclusive. The remainder of the string literal is unmodified.\n\nA string literal without a prefix length noted is an 8-bit prefix string literal and follows the definitions in [RFC7541] without modification.\n\n### 4.2. Encoder and Decoder Streams\n\nQPACK defines two unidirectional stream types:\n\n- An encoder stream is a unidirectional stream of type 0x02. It carries an unframed sequence of encoder instructions from encoder to decoder.\n- A decoder stream is a unidirectional stream of type 0x03. It carries an unframed sequence of decoder instructions from decoder to encoder.\n\nHTTP/3 endpoints contain a QPACK encoder and decoder. Each endpoint *MUST* initiate, at most, one encoder stream and, at most, one decoder stream. Receipt of a second instance of either stream type *MUST* be treated as a connection error of type H3_STREAM_CREATION_ERROR.\n\nThe sender *MUST NOT* close either of these streams, and the receiver *MUST NOT* request that the sender close either of these streams. Closure of either unidirectional stream type *MUST* be treated as a connection error of type H3_CLOSED_CRITICAL_STREAM.\n\nAn endpoint *MAY* avoid creating an encoder stream if it will not be used (for example, if its encoder does not wish to use the dynamic table or if the maximum size of the dynamic table permitted by the peer is zero).\n\nAn endpoint *MAY* avoid creating a decoder stream if its decoder sets the maximum capacity of the dynamic table to zero.\n\nAn endpoint *MUST* allow its peer to create an encoder stream and a decoder stream even if the connection's settings prevent their use.\n\n### 4.3. Encoder Instructions\n\nAn encoder sends encoder instructions on the encoder stream to set the capacity of the dynamic table and add dynamic table entries. Instructions adding table entries can use existing entries to avoid transmitting redundant information. The name can be transmitted as a reference to an existing entry in the static or the dynamic table or as a string literal. For entries that already exist in the dynamic table, the full entry can also be used by reference, creating a duplicate entry.\n\n#### 4.3.1. Set Dynamic Table Capacity\n\nAn encoder informs the decoder of a change to the dynamic table capacity using an instruction that starts with the '001' 3-bit pattern. This is followed by the new dynamic table capacity represented as an integer with a 5-bit prefix; see Section 4.1.1.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 0 | 1 | Capacity (5+) |\n+---+---+---+-------------------+\n```\n\nFigure 5: Set Dynamic Table Capacity\n\nThe new capacity *MUST* be lower than or equal to the limit described in Section 3.2.3. In HTTP/3, this limit is the value of the SETTINGS_QPACK_MAX_TABLE_CAPACITY parameter (Section 5) received from the decoder. The decoder *MUST* treat a new dynamic table capacity value that exceeds this limit as a connection error of type QPACK_ENCODER_STREAM_ERROR.\n\nReducing the dynamic table capacity can cause entries to be evicted; see Section 3.2.2. This *MUST NOT* cause the eviction of entries that are not evictable; see Section 2.1.1. Changing the capacity of the dynamic table is not acknowledged as this instruction does not insert an entry.\n\n#### 4.3.2. Insert with Name Reference\n\nAn encoder adds an entry to the dynamic table where the field name matches the field name of an entry stored in the static or the dynamic table using an instruction that starts with the '1' 1-bit pattern. The second ('T') bit indicates whether the reference is to the static or dynamic table. The 6-bit prefix integer (Section 4.1.1) that follows is used to locate the table entry for the field name. When T=1, the number represents the static table index; when T=0, the number is the relative index of the entry in the dynamic table.\n\nThe field name reference is followed by the field value represented as a string literal; see Section 4.1.2.\n\n```\n 0 1 2 3 4 5 6 7\n +---+---+---+---+---+---+---+---+\n | 1 | T | Name Index (6+) |\n +---+---+-----------------------+\n | H | Value Length (7+) |\n +---+---------------------------+\n | Value String (Length bytes) |\n +-------------------------------+\n```\n\nFigure 6: Insert Field Line -- Indexed Name\n\n#### 4.3.3. Insert with Literal Name\n\nAn encoder adds an entry to the dynamic table where both the field name and the field value are represented as string literals using an instruction that starts with the '01' 2-bit pattern.\n\nThis is followed by the name represented as a 6-bit prefix string literal and the value represented as an 8-bit prefix string literal; see Section 4.1.2.\n\n```\n 0 1 2 3 4 5 6 7\n +---+---+---+---+---+---+---+---+\n | 0 | 1 | H | Name Length (5+) |\n +---+---+---+-------------------+\n | Name String (Length bytes) |\n +---+---------------------------+\n | H | Value Length (7+) |\n +---+---------------------------+\n | Value String (Length bytes) |\n +-------------------------------+\n```\n\nFigure 7: Insert Field Line -- New Name\n\n#### 4.3.4. Duplicate\n\nAn encoder duplicates an existing entry in the dynamic table using an instruction that starts with the '000' 3-bit pattern. This is followed by the relative index of the existing entry represented as an integer with a 5-bit prefix; see Section 4.1.1.\n\n```\n 0 1 2 3 4 5 6 7\n +---+---+---+---+---+---+---+---+\n | 0 | 0 | 0 | Index (5+) |\n +---+---+---+-------------------+\n```\n\nFigure 8: Duplicate\n\nThe existing entry is reinserted into the dynamic table without resending either the name or the value. This is useful to avoid adding a reference to an older entry, which might block inserting new entries.\n\n### 4.4. Decoder Instructions\n\nA decoder sends decoder instructions on the decoder stream to inform the encoder about the processing of field sections and table updates to ensure consistency of the dynamic table.\n\n#### 4.4.2. Stream Cancellation\n\nWhen a stream is reset or reading is abandoned, the decoder emits a Stream Cancellation instruction. The instruction starts with the '01' 2-bit pattern, followed by the stream ID of the affected stream encoded as a 6-bit prefix integer.\n\nThis instruction is used as described in Section 2.2.2.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 1 | Stream ID (6+) |\n+---+---+-----------------------+\n```\n\nFigure 10: Stream Cancellation\n\n#### 4.4.3. Insert Count Increment\n\nThe Insert Count Increment instruction starts with the '00' 2-bit pattern, followed by the Increment encoded as a 6-bit prefix integer. This instruction increases the Known Received Count (Section 2.1.4) by the value of the Increment parameter. The decoder should send an Increment value that increases the Known Received Count to the total number of dynamic table insertions and duplications processed so far.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 0 | Increment (6+) |\n+---+---+-----------------------+\n```\n\nFigure 11: Insert Count Increment\n\nAn encoder that receives an Increment field equal to zero, or one that increases the Known Received Count beyond what the encoder has sent, *MUST* treat this as a connection error of type QPACK_DECODER_STREAM_ERROR.\n\n### 4.5. Field Line Representations\n\nAn encoded field section consists of a prefix and a possibly empty sequence of representations defined in this section. Each representation corresponds to a single field line. These representations reference the static table or the dynamic table in a particular state, but they do not modify that state.\n\nEncoded field sections are carried in frames on streams defined by the enclosing protocol.\n\n#### 4.5.2. Indexed Field Line\n\nAn indexed field line representation identifies an entry in the static table or an entry in the dynamic table with an absolute index less than the value of the Base.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 1 | T | Index (6+) |\n+---+---+-----------------------+\n```\n\nFigure 13: Indexed Field Line\n\nThis representation starts with the '1' 1-bit pattern, followed by the 'T' bit, indicating whether the reference is into the static or dynamic table. The 6-bit prefix integer (Section 4.1.1) that follows is used to locate the table entry for the field line. When T=1, the number represents the static table index; when T=0, the number is the relative index of the entry in the dynamic table.\n\n#### 4.5.3. Indexed Field Line with Post-Base Index\n\nAn indexed field line with post-Base index representation identifies an entry in the dynamic table with an absolute index greater than or equal to the value of the Base.\n\n```\n 0 1 2 3 4 5 6 7\n+---+---+---+---+---+---+---+---+\n| 0 | 0 | 0 | 1 | Index (4+) |\n+---+---+---+---+---------------+\n```\n\nFigure 14: Indexed Field Line with Post-Base Index\n\nThis representation starts with the '0001' 4-bit pattern. This is followed by the post-Base index (Section 3.2.6) of the matching field line, represented as an integer with a 4-bit prefix; see Section 4.1.1.\n\n#### 4.5.4. Literal Field Line with Name Reference\n\nA literal field line with name reference representation encodes a field line where the field name matches the field name of an entry in the static table or the field name of an entry in the dynamic table with an absolute index less than the value of the Base.\n\n```\n 0 1 2 3 4 5 6 7\n +---+---+---+---+---+---+---+---+\n | 0 | 1 | N | T |Name Index (4+)|\n +---+---+---+---+---------------+\n | H | Value Length (7+) |\n +---+---------------------------+\n | Value String (Length bytes) |\n +-------------------------------+\n```\n\nFigure 15: Literal Field Line with Name Reference\n\nThis representation starts with the '01' 2-bit pattern. The following bit, 'N', indicates whether an intermediary is permitted to add this field line to the dynamic table on subsequent hops. When the 'N' bit is set, the encoded field line *MUST* always be encoded with a literal representation. In particular, when a peer sends a field line that it received represented as a literal field line with the 'N' bit set, it *MUST* use a literal representation to forward this field line. This bit is intended for protecting field values that are not to be put at risk by compressing them; see Section 7.1 for more details.\n\nThe fourth ('T') bit indicates whether the reference is to the static or dynamic table. The 4-bit prefix integer (Section 4.1.1) that follows is used to locate the table entry for the field name. When T=1, the number represents the static table index; when T=0, the number is the relative index of the entry in the dynamic table.\n\nOnly the field name is taken from the dynamic table entry; the field value is encoded as an 8-bit prefix string literal; see Section 4.1.2.\n\n#### 4.5.5. Literal Field Line with Post-Base Name Reference\n\nA literal field line with post-Base name reference representation encodes a field line where the field name matches the field name of a dynamic table entry with an absolute index greater than or equal to the value of the Base.\n\n```\n 0 1 2 3 4 5 6 7\n +---+---+---+---+---+---+---+---+\n | 0 | 0 | 0 | 0 | N |NameIdx(3+)|\n +---+---+---+---+---+-----------+\n | H | Value Length (7+) |\n +---+---------------------------+\n | Value String (Length bytes) |\n +-------------------------------+\n```\n\nFigure 16: Literal Field Line with Post-Base Name Reference\n\nThis representation starts with the '0000' 4-bit pattern. The fifth bit is the 'N' bit as described in Section 4.5.4. This is followed by a post-Base index of the dynamic table entry (Section 3.2.6) encoded as an integer with a 3-bit prefix; see Section 4.1.1.\n\nOnly the field name is taken from the dynamic table entry; the field value is encoded as an 8-bit prefix string literal; see Section 4.1.2.\n\n#### 4.5.6. Literal Field Line with Literal Name\n\nThe literal field line with literal name representation encodes a field name and a field value as string literals.\n\n```\n 0 1 2 3 4 5 6 7\n +---+---+---+---+---+---+---+---+\n | 0 | 0 | 1 | N | H |NameLen(3+)|\n +---+---+---+---+---+-----------+\n | Name String (Length bytes) |\n +---+---------------------------+\n | H | Value Length (7+) |\n +---+---------------------------+\n | Value String (Length bytes) |\n +-------------------------------+\n```\n\nFigure 17: Literal Field Line with Literal Name\n\nThis representation starts with the '001' 3-bit pattern. The fourth bit is the 'N' bit as described in Section 4.5.4. The name follows, represented as a 4-bit prefix string literal, then the value, represented as an 8-bit prefix string literal; see Section 4.1.2.\n\n---\n\n## 5. Configuration\n\nQPACK defines two settings for the HTTP/3 SETTINGS frame:\n\nSETTINGS_QPACK_MAX_TABLE_CAPACITY (0x01):\n\nThe default value is zero. See Section 3.2 for usage. This is the equivalent of the SETTINGS_HEADER_TABLE_SIZE from HTTP/2.\n\nSETTINGS_QPACK_BLOCKED_STREAMS (0x07):\n\nThe default value is zero. See Section 2.1.2.\n\n---\n\n## 6. Error Handling\n\nThe following error codes are defined for HTTP/3 to indicate failures of QPACK that prevent the stream or connection from continuing:\n\nQPACK_DECOMPRESSION_FAILED (0x0200):\n\nThe decoder failed to interpret an encoded field section and is not able to continue decoding that field section.\n\nQPACK_ENCODER_STREAM_ERROR (0x0201):\n\nThe decoder failed to interpret an encoder instruction received on the encoder stream.\n\nQPACK_DECODER_STREAM_ERROR (0x0202):\n\nThe encoder failed to interpret a decoder instruction received on the decoder stream.\n\n---\n\n## 7. Security Considerations\n\nThis section describes potential areas of security concern with QPACK:\n\n- Use of compression as a length-based oracle for verifying guesses about secrets that are compressed into a shared compression context.\n- Denial of service resulting from exhausting processing or memory capacity at a decoder.\n\n### 7.1. Probing Dynamic Table State\n\nQPACK reduces the encoded size of field sections by exploiting the redundancy inherent in protocols like HTTP. The ultimate goal of this is to reduce the amount of data that is required to send HTTP requests or responses.\n\nThe compression context used to encode header and trailer fields can be probed by an attacker who can both define fields to be encoded and transmitted and observe the length of those fields once they are encoded. When an attacker can do both, they can adaptively modify requests in order to confirm guesses about the dynamic table state. If a guess is compressed into a shorter length, the attacker can observe the encoded length and infer that the guess was correct.\n\nThis is possible even over the Transport Layer Security Protocol ([TLS]) and the QUIC Transport Protocol ([QUIC-TRANSPORT]), because while TLS and QUIC provide confidentiality protection for content, they only provide a limited amount of protection for the length of that content.\n\nAttacks like CRIME ([CRIME]) demonstrated the existence of these general attacker capabilities. The specific attack exploited the fact that DEFLATE ([RFC1951]) removes redundancy based on prefix matching. This permitted the attacker to confirm guesses a character at a time, reducing an exponential-time attack into a linear-time attack.\n\n#### 7.1.1. Applicability to QPACK and HTTP\n\nQPACK mitigates, but does not completely prevent, attacks modeled on CRIME ([CRIME]) by forcing a guess to match an entire field line rather than individual characters. An attacker can only learn whether a guess is correct or not, so the attacker is reduced to a brute-force guess for the field values associated with a given field name.\n\nTherefore, the viability of recovering specific field values depends on the entropy of values. As a result, values with high entropy are unlikely to be recovered successfully. However, values with low entropy remain vulnerable.\n\nAttacks of this nature are possible any time that two mutually distrustful entities control requests or responses that are placed onto a single HTTP/3 connection. If the shared QPACK compressor permits one entity to add entries to the dynamic table, and the other to refer to those entries while encoding chosen field lines, then the attacker (the second entity) can learn the state of the table by observing the length of the encoded output.\n\nFor example, requests or responses from mutually distrustful entities can occur when an intermediary either:\n\n- sends requests from multiple clients on a single connection toward an origin server, or\n- takes responses from multiple origin servers and places them on a shared connection toward a client.\n\nWeb browsers also need to assume that requests made on the same connection by different web origins ([RFC6454]) are made by mutually distrustful entities. Other scenarios involving mutually distrustful entities are also possible.\n\n#### 7.1.2. Mitigation\n\nUsers of HTTP that require confidentiality for header or trailer fields can use values with entropy sufficient to make guessing infeasible. However, this is impractical as a general solution because it forces all users of HTTP to take steps to mitigate attacks. It would impose new constraints on how HTTP is used.\n\nRather than impose constraints on users of HTTP, an implementation of QPACK can instead constrain how compression is applied in order to limit the potential for dynamic table probing.\n\nAn ideal solution segregates access to the dynamic table based on the entity that is constructing the message. Field values that are added to the table are attributed to an entity, and only the entity that created a particular value can extract that value.\n\nTo improve compression performance of this option, certain entries might be tagged as being public. For example, a web browser might make the values of the Accept-Encoding header field available in all requests.\n\nAn encoder without good knowledge of the provenance of field values might instead introduce a penalty for many field lines with the same field name and different values. This penalty could cause a large number of attempts to guess a field value to result in the field not being compared to the dynamic table entries in future messages, effectively preventing further guesses.\n\nThis response might be made inversely proportional to the length of the field value. Disabling access to the dynamic table for a given field name might occur for shorter values more quickly or with higher probability than for longer values.\n\nThis mitigation is most effective between two endpoints. If messages are re-encoded by an intermediary without knowledge of which entity constructed a given message, the intermediary could inadvertently merge compression contexts that the original encoder had specifically kept separate.\n\n#### 7.1.3. Never-Indexed Literals\n\nImplementations can also choose to protect sensitive fields by not compressing them and instead encoding their value as literals.\n\nRefusing to insert a field line into the dynamic table is only effective if doing so is avoided on all hops. The never-indexed literal bit (see Section 4.5.4) can be used to signal to intermediaries that a particular value was intentionally sent as a literal.\n\nAn intermediary *MUST NOT* re-encode a value that uses a literal representation with the 'N' bit set with another representation that would index it. If QPACK is used for re-encoding, a literal representation with the 'N' bit set *MUST* be used. If HPACK is used for re-encoding, the never-indexed literal representation (see [Section 6.2.3](https://www.rfc-editor.org/rfc/rfc7541.html#section-6.2.3) of [RFC7541]) *MUST* be used.\n\nThe choice to mark that a field value should never be indexed depends on several factors. Since QPACK does not protect against guessing an entire field value, short or low-entropy values are more readily recovered by an adversary. Therefore, an encoder might choose not to index values with low entropy.\n\nAn encoder might also choose not to index values for fields that are considered to be highly valuable or sensitive to recovery, such as the Cookie or Authorization header fields.\n\nOn the contrary, an encoder might prefer indexing values for fields that have little or no value if they were exposed. For instance, a User-Agent header field does not commonly vary between requests and is sent to any server. In that case, confirmation that a particular User-Agent value has been used provides little value.\n\nNote that these criteria for deciding to use a never-indexed literal representation will evolve over time as new attacks are discovered.\n\n### 7.2. Static Huffman Encoding\n\nThere is no currently known attack against a static Huffman encoding. A study has shown that using a static Huffman encoding table created an information leakage; however, this same study concluded that an attacker could not take advantage of this information leakage to recover any meaningful amount of information (see [PETAL]).\n\n### 7.3. Memory Consumption\n\nAn attacker can try to cause an endpoint to exhaust its memory. QPACK is designed to limit both the peak and stable amounts of memory allocated by an endpoint.\n\nQPACK uses the definition of the maximum size of the dynamic table and the maximum number of blocking streams to limit the amount of memory the encoder can cause the decoder to consume. In HTTP/3, these values are controlled by the decoder through the settings parameters SETTINGS_QPACK_MAX_TABLE_CAPACITY and SETTINGS_QPACK_BLOCKED_STREAMS, respectively (see Section 3.2.3 and Section 2.1.2). The limit on the size of the dynamic table takes into account the size of the data stored in the dynamic table, plus a small allowance for overhead. The limit on the number of blocked streams is only a proxy for the maximum amount of memory required by the decoder. The actual maximum amount of memory will depend on how much memory the decoder uses to track each blocked stream.\n\nA decoder can limit the amount of state memory used for the dynamic table by setting an appropriate value for the maximum size of the dynamic table. In HTTP/3, this is realized by setting an appropriate value for the SETTINGS_QPACK_MAX_TABLE_CAPACITY parameter. An encoder can limit the amount of state memory it uses by choosing a smaller dynamic table size than the decoder allows and signaling this to the decoder (see Section 4.3.1).\n\nA decoder can limit the amount of state memory used for blocked streams by setting an appropriate value for the maximum number of blocked streams. In HTTP/3, this is realized by setting an appropriate value for the SETTINGS_QPACK_BLOCKED_STREAMS parameter. Streams that risk becoming blocked consume no additional state memory on the encoder.\n\nAn encoder allocates memory to track all dynamic table references in unacknowledged field sections. An implementation can directly limit the amount of state memory by only using as many references to the dynamic table as it wishes to track; no signaling to the decoder is required. However, limiting references to the dynamic table will reduce compression effectiveness.\n\nThe amount of temporary memory consumed by an encoder or decoder can be limited by processing field lines sequentially. A decoder implementation does not need to retain a complete list of field lines while decoding a field section. An encoder implementation does not need to retain a complete list of field lines while encoding a field section if it is using a single-pass algorithm. Note that it might be necessary for an application to retain a complete list of field lines for other reasons; even if QPACK does not force this to occur, application constraints might make this necessary.\n\nWhile the negotiated limit on the dynamic table size accounts for much of the memory that can be consumed by a QPACK implementation, data that cannot be immediately sent due to flow control is not affected by this limit. Implementations should limit the size of unsent data, especially on the decoder stream where flexibility to choose what to send is limited. Possible responses to an excess of unsent data might include limiting the ability of the peer to open new streams, reading only from the encoder stream, or closing the connection.\n\n### 7.4. Implementation Limits\n\nAn implementation of QPACK needs to ensure that large values for integers, long encoding for integers, or long string literals do not create security weaknesses.\n\nAn implementation has to set a limit for the values it accepts for integers, as well as for the encoded length; see Section 4.1.1. In the same way, it has to set a limit to the length it accepts for string literals; see Section 4.1.2. These limits *SHOULD* be large enough to process the largest individual field the HTTP implementation can be configured to accept.\n\nIf an implementation encounters a value larger than it is able to decode, this *MUST* be treated as a stream error of type QPACK_DECOMPRESSION_FAILED if on a request stream or a connection error of the appropriate type if on the encoder or decoder stream.\n\n---\n\n## 8. IANA Considerations\n\nThis document makes multiple registrations in the registries defined by [HTTP/3]. The allocations created by this document are all assigned permanent status and list a change controller of the IETF and a contact of the HTTP working group (ietf-http-wg@w3.org).\n\n### 8.1. Settings Registration\n\nThis document specifies two settings. The entries in the following table are registered in the \"HTTP/3 Settings\" registry established in [HTTP/3].\n\n| Setting Name | Code | Specification | Default |\n| --- | --- | --- | --- |\n| QPACK_MAX_TABLE_CAPACITY | 0x01 | Section 5 | 0 |\n| QPACK_BLOCKED_STREAMS | 0x07 | Section 5 | 0 |\n\nFor formatting reasons, the setting names here are abbreviated by removing the 'SETTINGS_' prefix.\n\n### 8.2. Stream Type Registration\n\nThis document specifies two stream types. The entries in the following table are registered in the \"HTTP/3 Stream Types\" registry established in [HTTP/3].\n\n| Stream Type | Code | Specification | Sender |\n| --- | --- | --- | --- |\n| QPACK Encoder Stream | 0x02 | Section 4.2 | Both |\n| QPACK Decoder Stream | 0x03 | Section 4.2 | Both |\n\n### 8.3. Error Code Registration\n\nThis document specifies three error codes. The entries in the following table are registered in the \"HTTP/3 Error Codes\" registry established in [HTTP/3].\n\n| Name | Code | Description | Specification |\n| --- | --- | --- | --- |\n| QPACK_DECOMPRESSION_FAILED | 0x0200 | Decoding of a field section failed | Section 6 |\n| QPACK_ENCODER_STREAM_ERROR | 0x0201 | Error on the encoder stream | Section 6 |\n| QPACK_DECODER_STREAM_ERROR | 0x0202 | Error on the decoder stream | Section 6 |\n\n## 9. References\n\n### 9.1. Normative References\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[HTTP/3]\n\nBishop, M., Ed., “[HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html)”, RFC 9114, [DOI 10.17487/RFC9114](https://dx.doi.org/10.17487/RFC9114), June 2022, <[https://www.rfc-editor.org/info/rfc9114](https://www.rfc-editor.org/info/rfc9114)>.\n\n[QUIC-TRANSPORT]\n\nIyengar, J., Ed. and M. Thomson, Ed., “[QUIC: A UDP-Based Multiplexed and Secure Transport](https://www.rfc-editor.org/rfc/rfc9000.html)”, RFC 9000, [DOI 10.17487/RFC9000](https://dx.doi.org/10.17487/RFC9000), May 2021, <[https://www.rfc-editor.org/info/rfc9000](https://www.rfc-editor.org/info/rfc9000)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC2360]\n\nScott, G., “[Guide for Internet Standards Writers](https://www.rfc-editor.org/rfc/rfc2360.html)”, [BCP 22](https://www.rfc-editor.org/info/bcp22), RFC 2360, [DOI 10.17487/RFC2360](https://dx.doi.org/10.17487/RFC2360), June 1998, <[https://www.rfc-editor.org/info/rfc2360](https://www.rfc-editor.org/info/rfc2360)>.\n\n[RFC7541]\n\nPeon, R. and H. Ruellan, “[HPACK: Header Compression for HTTP/2](https://www.rfc-editor.org/rfc/rfc7541.html)”, RFC 7541, [DOI 10.17487/RFC7541](https://dx.doi.org/10.17487/RFC7541), May 2015, <[https://www.rfc-editor.org/info/rfc7541](https://www.rfc-editor.org/info/rfc7541)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n### 9.2. Informative References\n\n[CRIME]\n\nWikipedia, “[CRIME](http://en.wikipedia.org/w/index.php?title=CRIME&oldid=660948120)”, May 2015, <[http://en.wikipedia.org/w/index.php?title=CRIME&oldid=660948120](http://en.wikipedia.org/w/index.php?title=CRIME&oldid=660948120)>.\n\n[HTTP/2]\n\nThomson, M., Ed. and C. Benfield, Ed., “[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html)”, RFC 9113, [DOI 10.17487/RFC9113](https://dx.doi.org/10.17487/RFC9113), June 2022, <[https://www.rfc-editor.org/info/rfc9113](https://www.rfc-editor.org/info/rfc9113)>.\n\n[PETAL]\n\nTan, J. and J. Nahata, “[PETAL: Preset Encoding Table Information Leakage](http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-13-106.pdf)”, April 2013, <[http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-13-106.pdf](http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-13-106.pdf)>.\n\n[RFC1951]\n\nDeutsch, P., “[DEFLATE Compressed Data Format Specification version 1.3](https://www.rfc-editor.org/rfc/rfc1951.html)”, RFC 1951, [DOI 10.17487/RFC1951](https://dx.doi.org/10.17487/RFC1951), May 1996, <[https://www.rfc-editor.org/info/rfc1951](https://www.rfc-editor.org/info/rfc1951)>.\n\n[RFC6454]\n\nBarth, A., “[The Web Origin Concept](https://www.rfc-editor.org/rfc/rfc6454.html)”, RFC 6454, [DOI 10.17487/RFC6454](https://dx.doi.org/10.17487/RFC6454), December 2011, <[https://www.rfc-editor.org/info/rfc6454](https://www.rfc-editor.org/info/rfc6454)>.\n\n[TLS]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n---\n\n## Appendix A. Static Table\n\nThis table was generated by analyzing actual Internet traffic in 2018 and including the most common header fields, after filtering out some unsupported and non-standard values. Due to this methodology, some of the entries may be inconsistent or appear multiple times with similar but not identical values. The order of the entries is optimized to encode the most common header fields with the smallest number of bytes.\n\n| Index | Name | Value |\n| --- | --- | --- |\n| 0 | :authority | |\n| 1 | :path | / |\n| 2 | age | 0 |\n| 3 | content-disposition | |\n| 4 | content-length | 0 |\n| 5 | cookie | |\n| 6 | date | |\n| 7 | etag | |\n| 8 | if-modified-since | |\n| 9 | if-none-match | |\n| 10 | last-modified | |\n| 11 | link | |\n| 12 | location | |\n| 13 | referer | |\n| 14 | set-cookie | |\n| 15 | :method | CONNECT |\n| 16 | :method | DELETE |\n| 17 | :method | GET |\n| 18 | :method | HEAD |\n| 19 | :method | OPTIONS |\n| 20 | :method | POST |\n| 21 | :method | PUT |\n| 22 | :scheme | http |\n| 23 | :scheme | https |\n| 24 | :status | 103 |\n| 25 | :status | 200 |\n| 26 | :status | 304 |\n| 27 | :status | 404 |\n| 28 | :status | 503 |\n| 29 | accept | */* |\n| 30 | accept | application/dns-message |\n| 31 | accept-encoding | gzip, deflate, br |\n| 32 | accept-ranges | bytes |\n| 33 | access-control-allow-headers | cache-control |\n| 34 | access-control-allow-headers | content-type |\n| 35 | access-control-allow-origin | * |\n| 36 | cache-control | max-age=0 |\n| 37 | cache-control | max-age=2592000 |\n| 38 | cache-control | max-age=604800 |\n| 39 | cache-control | no-cache |\n| 40 | cache-control | no-store |\n| 41 | cache-control | public, max-age=31536000 |\n| 42 | content-encoding | br |\n| 43 | content-encoding | gzip |\n| 44 | content-type | application/dns-message |\n| 45 | content-type | application/javascript |\n| 46 | content-type | application/json |\n| 47 | content-type | application/x-www-form-urlencoded |\n| 48 | content-type | image/gif |\n| 49 | content-type | image/jpeg |\n| 50 | content-type | image/png |\n| 51 | content-type | text/css |\n| 52 | content-type | text/html; charset=utf-8 |\n| 53 | content-type | text/plain |\n| 54 | content-type | text/plain;charset=utf-8 |\n| 55 | range | bytes=0- |\n| 56 | strict-transport-security | max-age=31536000 |\n| 57 | strict-transport-security | max-age=31536000; includesubdomains |\n| 58 | strict-transport-security | max-age=31536000; includesubdomains; preload |\n| 59 | vary | accept-encoding |\n| 60 | vary | origin |\n| 61 | x-content-type-options | nosniff |\n| 62 | x-xss-protection | 1; mode=block |\n| 63 | :status | 100 |\n| 64 | :status | 204 |\n| 65 | :status | 206 |\n| 66 | :status | 302 |\n| 67 | :status | 400 |\n| 68 | :status | 403 |\n| 69 | :status | 421 |\n| 70 | :status | 425 |\n| 71 | :status | 500 |\n| 72 | accept-language | |\n| 73 | access-control-allow-credentials | FALSE |\n| 74 | access-control-allow-credentials | TRUE |\n| 75 | access-control-allow-headers | * |\n| 76 | access-control-allow-methods | get |\n| 77 | access-control-allow-methods | get, post, options |\n| 78 | access-control-allow-methods | options |\n| 79 | access-control-expose-headers | content-length |\n| 80 | access-control-request-headers | content-type |\n| 81 | access-control-request-method | get |\n| 82 | access-control-request-method | post |\n| 83 | alt-svc | clear |\n| 84 | authorization | |\n| 85 | content-security-policy | script-src 'none'; object-src 'none'; base-uri 'none' |\n| 86 | early-data | 1 |\n| 87 | expect-ct | |\n| 88 | forwarded | |\n| 89 | if-range | |\n| 90 | origin | |\n| 91 | purpose | prefetch |\n| 92 | server | |\n| 93 | timing-allow-origin | * |\n| 94 | upgrade-insecure-requests | 1 |\n| 95 | user-agent | |\n| 96 | x-forwarded-for | |\n| 97 | x-frame-options | deny |\n| 98 | x-frame-options | sameorigin |\n\nAny line breaks that appear within field names or values are due to formatting.\n\n---\n\n## Appendix B. Encoding and Decoding Examples\n\nThe following examples represent a series of exchanges between an encoder and a decoder. The exchanges are designed to exercise most QPACK instructions and highlight potentially common patterns and their impact on dynamic table state. The encoder sends three encoded field sections containing one field line each, as well as two speculative inserts that are not referenced.\n\nThe state of the encoder's dynamic table is shown, along with its current size. Each entry is shown with the Absolute Index of the entry (Abs), the current number of outstanding encoded field sections with references to that entry (Ref), along with the name and value. Entries above the 'acknowledged' line have been acknowledged by the decoder.\n\n### B.1. Literal Field Line with Name Reference\n\nThe encoder sends an encoded field section containing a literal representation of a field with a static name reference.\n\n```\nData | Interpretation\n | Encoder's Dynamic Table\n\nStream: 0\n0000 | Required Insert Count = 0, Base = 0\n510b 2f69 6e64 6578 | Literal Field Line with Name Reference\n2e68 746d 6c | Static Table, Index=1\n | (:path=/index.html)\n\n Abs Ref Name Value\n ^-- acknowledged --^\n Size=0\n```\n\n### B.2. Dynamic Table\n\nThe encoder sets the dynamic table capacity, inserts a header with a dynamic name reference, then sends a potentially blocking, encoded field section referencing this new entry. The decoder acknowledges processing the encoded field section, which implicitly acknowledges all dynamic table insertions up to the Required Insert Count.\n\n```\nStream: Encoder\n3fbd01 | Set Dynamic Table Capacity=220\nc00f 7777 772e 6578 | Insert With Name Reference\n616d 706c 652e 636f | Static Table, Index=0\n6d | (:authority=www.example.com)\nc10c 2f73 616d 706c | Insert With Name Reference\n652f 7061 7468 | Static Table, Index=1\n | (:path=/sample/path)\n\n Abs Ref Name Value\n ^-- acknowledged --^\n 0 0 :authority www.example.com\n 1 0 :path /sample/path\n Size=106\n\nStream: 4\n0381 | Required Insert Count = 2, Base = 0\n10 | Indexed Field Line With Post-Base Index\n | Absolute Index = Base(0) + Index(0) = 0\n | (:authority=www.example.com)\n11 | Indexed Field Line With Post-Base Index\n | Absolute Index = Base(0) + Index(1) = 1\n | (:path=/sample/path)\n\n Abs Ref Name Value\n ^-- acknowledged --^\n 0 1 :authority www.example.com\n 1 1 :path /sample/path\n Size=106\n\nStream: Decoder\n84 | Section Acknowledgment (stream=4)\n\n Abs Ref Name Value\n 0 0 :authority www.example.com\n 1 0 :path /sample/path\n ^-- acknowledged --^\n Size=106\n```\n\n### B.3. Speculative Insert\n\nThe encoder inserts a header into the dynamic table with a literal name. The decoder acknowledges receipt of the entry. The encoder does not send any encoded field sections.\n\n```\nStream: Encoder\n4a63 7573 746f 6d2d | Insert With Literal Name\n6b65 790c 6375 7374 | (custom-key=custom-value)\n6f6d 2d76 616c 7565 |\n\n Abs Ref Name Value\n 0 0 :authority www.example.com\n 1 0 :path /sample/path\n ^-- acknowledged --^\n 2 0 custom-key custom-value\n Size=160\n\nStream: Decoder\n01 | Insert Count Increment (1)\n\n Abs Ref Name Value\n 0 0 :authority www.example.com\n 1 0 :path /sample/path\n 2 0 custom-key custom-value\n ^-- acknowledged --^\n Size=160\n```\n\n### B.4. Duplicate Instruction, Stream Cancellation\n\nThe encoder duplicates an existing entry in the dynamic table, then sends an encoded field section referencing the dynamic table entries including the duplicated entry. The packet containing the encoder stream data is delayed. Before the packet arrives, the decoder cancels the stream and notifies the encoder that the encoded field section was not processed.\n\n```\nStream: Encoder\n02 | Duplicate (Relative Index = 2)\n | Absolute Index =\n | Insert Count(3) - Index(2) - 1 = 0\n\n Abs Ref Name Value\n 0 0 :authority www.example.com\n 1 0 :path /sample/path\n 2 0 custom-key custom-value\n ^-- acknowledged --^\n 3 0 :authority www.example.com\n Size=217\n\nStream: 8\n0500 | Required Insert Count = 4, Base = 4\n80 | Indexed Field Line, Dynamic Table\n | Absolute Index = Base(4) - Index(0) - 1 = 3\n | (:authority=www.example.com)\nc1 | Indexed Field Line, Static Table Index = 1\n | (:path=/)\n81 | Indexed Field Line, Dynamic Table\n | Absolute Index = Base(4) - Index(1) - 1 = 2\n | (custom-key=custom-value)\n\n Abs Ref Name Value\n 0 0 :authority www.example.com\n 1 0 :path /sample/path\n 2 1 custom-key custom-value\n ^-- acknowledged --^\n 3 1 :authority www.example.com\n Size=217\n\nStream: Decoder\n48 | Stream Cancellation (Stream=8)\n\n Abs Ref Name Value\n 0 0 :authority www.example.com\n 1 0 :path /sample/path\n 2 0 custom-key custom-value\n ^-- acknowledged --^\n 3 0 :authority www.example.com\n Size=217\n```\n\n### B.5. Dynamic Table Insert, Eviction\n\nThe encoder inserts another header into the dynamic table, which evicts the oldest entry. The encoder does not send any encoded field sections.\n\n```\nStream: Encoder\n810d 6375 7374 6f6d | Insert With Name Reference\n2d76 616c 7565 32 | Dynamic Table, Relative Index = 1\n | Absolute Index =\n | Insert Count(4) - Index(1) - 1 = 2\n | (custom-key=custom-value2)\n\n Abs Ref Name Value\n 1 0 :path /sample/path\n 2 0 custom-key custom-value\n ^-- acknowledged --^\n 3 0 :authority www.example.com\n 4 0 custom-key custom-value2\n Size=215\n```\n\n---\n\n## Appendix C. Sample Single-Pass Encoding Algorithm\n\nPseudocode for single-pass encoding, excluding handling of duplicates, non-blocking mode, available encoder stream flow control and reference tracking.\n\n```\n# Helper functions:\n# ====\n# Encode an integer with the specified prefix and length\nencodeInteger(buffer, prefix, value, prefixLength)\n\n# Encode a dynamic table insert instruction with optional static\n# or dynamic name index (but not both)\nencodeInsert(buffer, staticNameIndex, dynamicNameIndex, fieldLine)\n\n# Encode a static index reference\nencodeStaticIndexReference(buffer, staticIndex)\n\n# Encode a dynamic index reference relative to Base\nencodeDynamicIndexReference(buffer, dynamicIndex, base)\n\n# Encode a literal with an optional static name index\nencodeLiteral(buffer, staticNameIndex, fieldLine)\n\n# Encode a literal with a dynamic name index relative to Base\nencodeDynamicLiteral(buffer, dynamicNameIndex, base, fieldLine)\n\n# Encoding Algorithm\n# ====\nbase = dynamicTable.getInsertCount()\nrequiredInsertCount = 0\nfor line in fieldLines:\n staticIndex = staticTable.findIndex(line)\n if staticIndex is not None:\n encodeStaticIndexReference(streamBuffer, staticIndex)\n continue\n\n dynamicIndex = dynamicTable.findIndex(line)\n if dynamicIndex is None:\n # No matching entry. Either insert+index or encode literal\n staticNameIndex = staticTable.findName(line.name)\n if staticNameIndex is None:\n dynamicNameIndex = dynamicTable.findName(line.name)\n\n if shouldIndex(line) and dynamicTable.canIndex(line):\n encodeInsert(encoderBuffer, staticNameIndex,\n dynamicNameIndex, line)\n dynamicIndex = dynamicTable.add(line)\n\n if dynamicIndex is None:\n # Could not index it, literal\n if dynamicNameIndex is not None:\n # Encode literal with dynamic name, possibly above Base\n encodeDynamicLiteral(streamBuffer, dynamicNameIndex,\n base, line)\n requiredInsertCount = max(requiredInsertCount,\n dynamicNameIndex)\n else:\n # Encodes a literal with a static name or literal name\n encodeLiteral(streamBuffer, staticNameIndex, line)\n else:\n # Dynamic index reference\n assert(dynamicIndex is not None)\n requiredInsertCount = max(requiredInsertCount, dynamicIndex)\n # Encode dynamicIndex, possibly above Base\n encodeDynamicIndexReference(streamBuffer, dynamicIndex, base)\n\n# encode the prefix\nif requiredInsertCount == 0:\n encodeInteger(prefixBuffer, 0x00, 0, 8)\n encodeInteger(prefixBuffer, 0x00, 0, 7)\nelse:\n wireRIC = (\n requiredInsertCount\n % (2 * getMaxEntries(maxTableCapacity))\n ) + 1;\n encodeInteger(prefixBuffer, 0x00, wireRIC, 8)\n if base >= requiredInsertCount:\n encodeInteger(prefixBuffer, 0x00,\n base - requiredInsertCount, 7)\n else:\n encodeInteger(prefixBuffer, 0x80,\n requiredInsertCount - base - 1, 7)\n\nreturn encoderBuffer, prefixBuffer + streamBuffer\n```\n\n---\n\n## Acknowledgments\n\nThe IETF QUIC Working Group received an enormous amount of support from many people.\n\nThe compression design team did substantial work exploring the problem space and influencing the initial draft version of this document. The contributions of design team members Roberto Peon, Martin Thomson, and Dmitri Tikhonov are gratefully acknowledged.\n\nThe following people also provided substantial contributions to this document:\n\n- Bence Beky\n- Alessandro Ghedini\n- Ryan Hamilton\n- Robin Marx\n- Patrick McManus\n- 奥 一穂 (Kazuho Oku)\n- Lucas Pardue\n- Biren Roy\n- Ian Swett\n\nThis document draws heavily on the text of [RFC7541]. The indirect input of those authors is also gratefully acknowledged.\n\nBuck Krasic's contribution was supported by Google during his employment there.\n\nA portion of Mike Bishop's contribution was supported by Microsoft during his employment there.\n\n---\n\n## Authors' Addresses\n\n**Charles 'Buck' Krasic**\nEMail: [krasic@acm.org](mailto:krasic@acm.org)\n\n**Mike Bishop**\nAkamai Technologies\nEMail: [mbishop@evequefou.be](mailto:mbishop@evequefou.be)\n\n**Alan Frindell** (editor)\nFacebook\nEMail: [afrind@fb.com](mailto:afrind@fb.com)", "znaku_textu": 62150, "slov": 9456, "odkazu": 230, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:52", "sha256": "5444e035a2dcb1ec438f2ac7bafdf7352125e5d4e9997e3666818f2ee0a8bb06", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9204", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc2360.html", "https://www.rfc-editor.org/rfc/rfc7541.html", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/rfc/rfc9114.html", "https://dx.doi.org/10.17487/RFC9114", "https://www.rfc-editor.org/info/rfc9114", "https://www.rfc-editor.org/rfc/rfc9000.html", "https://dx.doi.org/10.17487/RFC9000", "https://www.rfc-editor.org/info/rfc9000", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/info/bcp22", "https://dx.doi.org/10.17487/RFC2360", "https://www.rfc-editor.org/info/rfc2360", "https://dx.doi.org/10.17487/RFC7541", "https://www.rfc-editor.org/info/rfc7541", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "http://en.wikipedia.org/w/index.php?oldid=660948120&title=CRIME", "https://www.rfc-editor.org/rfc/rfc9113.html", "https://dx.doi.org/10.17487/RFC9113", "https://www.rfc-editor.org/info/rfc9113", "http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-13-106.pdf", "https://www.rfc-editor.org/rfc/rfc1951.html", "https://dx.doi.org/10.17487/RFC1951", "https://www.rfc-editor.org/info/rfc1951", "https://www.rfc-editor.org/rfc/rfc6454.html", "https://dx.doi.org/10.17487/RFC6454", "https://www.rfc-editor.org/info/rfc6454", "https://www.rfc-editor.org/rfc/rfc8446.html", "https://dx.doi.org/10.17487/RFC8446", "https://www.rfc-editor.org/info/rfc8446"]} {"url": "https://httpwg.org/specs/rfc9205.html", "titulek": "RFC 9205 - Building Protocols with HTTP", "h1": "Building Protocols with HTTP", "popis": "Applications often use HTTP as a substrate to create HTTP-based APIs. This document specifies best practices for writing specifications that use HTTP to define new application protocols. It is written primarily to guide IETF efforts to define application protocols using HTTP for deployment on the Internet but might be applicable in other situations.This document obsoletes RFC 3205.", "klicova_slova": "HTTP API", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9205", "og:description": "Building Protocols with HTTP", "og:url": "https://httpwg.org/specs/rfc9205.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "2. Is HTTP Being Used?"}, {"uroven": 3, "text": "2.1. Non-HTTP Protocols"}, {"uroven": 2, "text": "3. What's Important About HTTP"}, {"uroven": 3, "text": "3.1. Generic Semantics"}, {"uroven": 3, "text": "3.2. Links"}, {"uroven": 3, "text": "3.3. Rich Functionality"}, {"uroven": 2, "text": "4. Best Practices for Specifying the Use of HTTP"}, {"uroven": 3, "text": "4.1. Specifying the Use of HTTP"}, {"uroven": 3, "text": "4.2. Specifying Server Behaviour"}, {"uroven": 3, "text": "4.3. Specifying Client Behaviour"}, {"uroven": 3, "text": "4.4. Specifying URLs"}, {"uroven": 4, "text": "4.4.1. Discovering an Application's URLs"}, {"uroven": 4, "text": "4.4.2. Considering URI Schemes"}, {"uroven": 4, "text": "4.4.3. Choosing Transport Ports"}, {"uroven": 3, "text": "4.5. Using HTTP Methods"}, {"uroven": 4, "text": "4.5.1. GET"}, {"uroven": 4, "text": "4.5.2. OPTIONS"}, {"uroven": 3, "text": "4.6. Using HTTP Status Codes"}, {"uroven": 4, "text": "4.6.1. Redirection"}, {"uroven": 3, "text": "4.7. Specifying HTTP Header Fields"}, {"uroven": 3, "text": "4.8. Defining Message Content"}, {"uroven": 3, "text": "4.9. Leveraging HTTP Caching"}, {"uroven": 4, "text": "4.9.1. Freshness"}, {"uroven": 4, "text": "4.9.2. Stale Responses"}, {"uroven": 4, "text": "4.9.3. Caching and Application Semantics"}, {"uroven": 4, "text": "4.9.4. Varying Content Based Upon the Request"}, {"uroven": 3, "text": "4.10. Handling Application State"}, {"uroven": 3, "text": "4.11. Making Multiple Requests"}, {"uroven": 3, "text": "4.12. Client Authentication"}, {"uroven": 3, "text": "4.13. Coexisting with Web Browsing"}, {"uroven": 3, "text": "4.14. Maintaining Application Boundaries"}, {"uroven": 3, "text": "4.15. Using Server Push"}, {"uroven": 3, "text": "4.16. Allowing Versioning and Evolution"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 2, "text": "6. Security Considerations"}, {"uroven": 3, "text": "6.1. Privacy Considerations"}, {"uroven": 2, "text": "7. References"}, {"uroven": 3, "text": "7.1. Normative References"}, {"uroven": 3, "text": "7.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Changes from RFC 3205"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nApplications often use HTTP as a substrate to create HTTP-based APIs. This document specifies best practices for writing specifications that use HTTP to define new application protocols. It is written primarily to guide IETF efforts to define application protocols using HTTP for deployment on the Internet but might be applicable in other situations.\n\nThis document obsoletes RFC 3205.\n\n## Status of This Memo\n\nThis memo documents an Internet Best Current Practice.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on BCPs is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9205](https://www.rfc-editor.org/info/rfc9205).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. Is HTTP Being Used?\n - 2.1. Non-HTTP Protocols\n- 3. What's Important About HTTP\n - 3.1. Generic Semantics\n - 3.2. Links\n - 3.3. Rich Functionality\n- 4. Best Practices for Specifying the Use of HTTP\n - 4.1. Specifying the Use of HTTP\n - 4.2. Specifying Server Behaviour\n - 4.3. Specifying Client Behaviour\n - 4.4. Specifying URLs\n - 4.4.1. Discovering an Application's URLs\n - 4.4.2. Considering URI Schemes\n - 4.4.3. Choosing Transport Ports\n - 4.5. Using HTTP Methods\n - 4.5.1. GET\n - 4.5.2. OPTIONS\n - 4.6. Using HTTP Status Codes\n - 4.6.1. Redirection\n - 4.7. Specifying HTTP Header Fields\n - 4.8. Defining Message Content\n - 4.9. Leveraging HTTP Caching\n - 4.9.1. Freshness\n - 4.9.2. Stale Responses\n - 4.9.3. Caching and Application Semantics\n - 4.9.4. Varying Content Based Upon the Request\n - 4.10. Handling Application State\n - 4.11. Making Multiple Requests\n - 4.12. Client Authentication\n - 4.13. Coexisting with Web Browsing\n - 4.14. Maintaining Application Boundaries\n - 4.15. Using Server Push\n - 4.16. Allowing Versioning and Evolution\n- 5. IANA Considerations\n- 6. Security Considerations\n - 6.1. Privacy Considerations\n- 7. References\n - 7.1. Normative References\n - 7.2. Informative References\n- Appendix A. Changes from RFC 3205\n- Author's Address\n\n---\n\n## 1. Introduction\n\nApplications other than Web browsing often use HTTP [HTTP] as a substrate, a practice sometimes referred to as creating \"HTTP-based APIs\", \"REST APIs\", or just \"HTTP APIs\". This is done for a variety of reasons, including:\n\n- familiarity by implementers, specifiers, administrators, developers, and users;\n- availability of a variety of client, server, and proxy implementations;\n- ease of use;\n- availability of Web browsers;\n- reuse of existing mechanisms like authentication and encryption;\n- presence of HTTP servers and clients in target deployments; and\n- its ability to traverse firewalls.\n\nThese protocols are often ad hoc, intended for only deployment by one or a few servers and consumption by a limited set of clients. As a result, a body of practices and tools has arisen around defining HTTP-based APIs that favour these conditions.\n\nHowever, when such an application has multiple, separate implementations, is deployed on multiple uncoordinated servers, and is consumed by diverse clients (as is often the case for HTTP APIs defined by standards efforts), tools and practices intended for limited deployment can become unsuitable.\n\nThis mismatch is largely because the API's clients and servers will implement and evolve at different paces, leading to a need for deployments with different features and versions to coexist. As a result, the designers of HTTP-based APIs intended for such deployments need to more carefully consider how extensibility of the service will be handled and how different deployment requirements will be accommodated.\n\nMore generally, an application protocol using HTTP faces a number of design decisions, including:\n\n- Should it define a new URI scheme? Use new ports?\n- Should it use standard HTTP methods and status codes or define new ones?\n- How can the maximum value be extracted from the use of HTTP?\n- How does it coexist with other uses of HTTP -- especially Web browsing?\n- How can interoperability problems and \"protocol dead ends\" be avoided?\n\nSection 2 defines when this document applies, Section 3 surveys the properties of HTTP that are important to preserve, and Section 4 contains best practices for the specification of applications that use HTTP.\n\nIt is written primarily to guide IETF efforts to define application protocols using HTTP for deployment on the Internet but might be applicable in other situations. Note that the requirements herein do not necessarily apply to the development of generic HTTP extensions.\n\nThis document obsoletes [RFC3205] to reflect the experience and developments regarding HTTP in the intervening time.\n\n### 1.1. Notational Conventions\n\nThe 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.\n\n---\n\n## 2. Is HTTP Being Used?\n\nDifferent applications have different goals when using HTTP. The recommendations in this document apply when a specification defines an application that:\n\n- uses the transport port 80 or 443, or\n- uses the URI scheme \"http\" or \"https\", or\n- uses an ALPN protocol ID [RFC7301] that generically identifies HTTP (e.g., \"http/1.1\", \"h2\", \"h3\"), or\n- makes registrations in or overall modifications to the IANA registries defined for HTTP.\n\nAdditionally, when a specification is using HTTP, all of the requirements of the HTTP protocol suite are in force ([HTTP] in particular but also other specifications such as the specific version of HTTP in use and any extensions in use).\n\nNote that this document is intended to apply to applications, not generic extensions to HTTP. Furthermore, while it is intended for IETF-specified applications, other standards organisations are encouraged to adhere to its requirements.\n\n### 2.1. Non-HTTP Protocols\n\nAn application can rely upon HTTP without meeting the criteria for using it as defined above. For example, an application might wish to avoid re-specifying parts of the message format but might change other aspects of the protocol's operation, or it might want to use application-specific methods.\n\nDoing so permits more freedom to modify protocol operations, but at least a portion of the benefits outlined in Section 3 are lost as most HTTP implementations won't be easily adaptable to these changes. The benefit of mindshare will also be lost.\n\nSuch specifications *MUST NOT* use HTTP's URI schemes, transport ports, ALPN protocol IDs, or IANA registries; rather, they are encouraged to establish their own.\n\n---\n\n## 3. What's Important About HTTP\n\nThis section examines the characteristics of HTTP that are important to consider when using HTTP to define an application protocol.\n\n### 3.1. Generic Semantics\n\nMuch of the value of HTTP is in its generic semantics -- that is, the protocol elements defined by HTTP are potentially applicable to every resource and are not specific to a particular context. Application-specific semantics are best expressed in message content and header fields, not status codes or methods (although status codes and methods do have generic semantics that relate to application state).\n\nThis split between generic and application-specific semantics allows an HTTP message to be handled by common software (e.g., HTTP servers, intermediaries, client implementations, and caches) without requiring those implementations to understand the application in use. It also allows people to leverage their knowledge of HTTP semantics without needing specialised knowledge of a particular application.\n\nTherefore, applications that use HTTP *MUST NOT* redefine, refine, or overlay the semantics of generic protocol elements such as methods, status codes, or existing header fields. Instead, they should focus their specifications on protocol elements that are specific to that application -- namely, their HTTP resources.\n\nWhen writing a specification, it's often tempting to specify exactly how HTTP is to be implemented, supported, and used. However, this can easily lead to an unintended profile of HTTP behaviour. For example, it's common to see specifications with language like this:\n\n> A POST request MUST result in a 201 (Created) response.\n\nThis forms an expectation in the client that the response will always be 201 (Created) when in fact there are a number of reasons why the status code might differ in a real deployment; for example, there might be a proxy that requires authentication, or a server-side error, or a redirection. If the client does not anticipate this, the application's deployment is brittle.\n\nSee Section 4.2 for more details.\n\n### 3.2. Links\n\nAnother common practice is assuming that the HTTP server's namespace (or a portion thereof) is exclusively for the use of a single application. This effectively overlays special, application-specific semantics onto that space and precludes other applications from using it.\n\nAs explained in [BCP190], such \"squatting\" on a part of the URL space by a standard usurps the server's authority over its own resources, can cause deployment issues, and is therefore bad practice in standards.\n\nInstead of statically defining URI components like paths, it is *RECOMMENDED* that applications using HTTP define and use links [WEB-LINKING] to allow flexibility in deployment.\n\nUsing runtime links in this fashion has a number of other benefits -- especially when an application is to have multiple implementations and/or deployments (as is often the case for those that are standardised).\n\nFor example, navigating with a link allows a request to be routed to a different server without the overhead of a redirection, thereby supporting deployment across machines well.\n\nBy using links, it also becomes possible to \"mix and match\" different applications on the same server. The use of links also offers a natural mechanism for extensibility, versioning, and capability management because the document containing the links can also contain information about their targets.\n\nUsing links also offers a form of cache invalidation that's seen on the Web; when a resource's state changes, the application can change the affected links so that a fresh copy is always fetched.\n\nSee Section 4.4 for more details.\n\n### 3.3. Rich Functionality\n\nHTTP offers a number of features to applications, such as:\n\n- Message framing\n- Multiplexing (in HTTP/2 [HTTP/2] and HTTP/3 [HTTP/3] )\n- Integration with TLS\n- Support for intermediaries (proxies, gateways, content delivery networks (CDNs))\n- Client authentication\n- Content negotiation for format, language, and other features\n- Caching for server scalability, latency and bandwidth reduction, and reliability\n- Granularity of access control (through use of a rich space of URLs)\n- Partial content to selectively request part of a response\n- The ability to interact with the application easily using a Web browser\n\nAn application that uses HTTP is encouraged to utilise the various features that the protocol offers so that its users receive the maximum benefit from those features and so that the application can be deployed in a variety of situations. This document does not require specific features to be used since the appropriate design trade-offs are highly specific to a given situation. However, following the practices in Section 4 is a good starting point.\n\n---\n\n## 4. Best Practices for Specifying the Use of HTTP\n\nThis section contains best practices for specifying the use of HTTP by applications, including practices for specific HTTP protocol elements.\n\n### 4.1. Specifying the Use of HTTP\n\nSpecifications should use [HTTP] as the primary reference for HTTP; it is not necessary to reference all of the specifications in the HTTP suite unless there are specific reasons to do so (e.g., a particular feature is called out).\n\nBecause HTTP is a hop-by-hop protocol, a connection can be handled by implementations that are not controlled by the application; for example, proxies, CDNs, firewalls, and so on. Requiring a particular version of HTTP makes it difficult to use in these situations and harms interoperability. Therefore, it is *NOT RECOMMENDED* that applications using HTTP specify a minimum version of HTTP to be used.\n\nHowever, if an application's deployment benefits from the use of a particular version of HTTP (for example, HTTP/2's multiplexing), this ought be noted.\n\nApplications using HTTP *MUST NOT* specify a maximum version, to preserve the protocol's ability to evolve.\n\nWhen specifying examples of protocol interactions, applications should document both the request and response messages with complete header sections, preferably in HTTP/1.1 format [HTTP/1.1]. For example:\n\n```\nGET /thing HTTP/1.1\nHost: example.com\nAccept: application/things+json\nUser-Agent: Foo/1.0\n```\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/things+json\nContent-Length: 500\nServer: Bar/2.2\n\n[content here]\n```\n\n### 4.2. Specifying Server Behaviour\n\nThe server-side behaviours of an application are most effectively specified by defining the following protocol elements:\n\n- Media types [RFC6838] , often based upon a format convention such as JSON [JSON] ;\n- HTTP header fields, per Section 4.7 ; and\n- The behaviour of resources, as identified by link relations [WEB-LINKING] .\n\nAn application can define its operation by composing these protocol elements to define a set of resources that are identified by link relations and that implement specified behaviours, including:\n\n- retrieval of resource state using GET in one or more formats identified by media type;\n- resource creation or update using POST or PUT, with an appropriately identified request content format;\n- data processing using POST and identified request and response content format(s); and\n- Resource deletion using DELETE.\n\nFor example, an application might specify:\n\n> Resources linked to with the \"example-widget\" link relation type are Widgets. The state of a Widget can be fetched in the \"application/example-widget+json\" format, and can be updated by PUT to the same link. Widget resources can be deleted.\n> \n> The Example-Count response header field on Widget representations indicates how many Widgets are held by the sender.\n> \n> The \"application/example-widget+json\" format is a JSON [RFC8259] format representing the state of a Widget. It contains links to related information in the link indicated by the Link header field value with the \"example-other-info\" link relation type.\n\nApplications can also specify the use of URI Templates [URI-TEMPLATE] to allow clients to generate URLs based upon runtime data.\n\n### 4.3. Specifying Client Behaviour\n\nAn application's expectations for client behaviour ought to be closely aligned with those of Web browsers to avoid interoperability issues when they are used.\n\nOne way to do this is to define it in terms of [FETCH] since that is the abstraction that browsers use for HTTP.\n\nSome client behaviours (e.g., automatic redirect handling) and extensions (e.g., cookies) are not required by HTTP but nevertheless have become very common. If their use is not explicitly specified by applications using HTTP, there may be confusion and interoperability problems. In particular:\n\nRedirect handling:\n\nApplications need to specify how redirects are expected to be handled; see Section 4.6.1.\n\nCookies:\n\nApplications using HTTP should explicitly reference the Cookie specification [COOKIES] if they are required.\n\nCertificates:\n\nApplications using HTTP should specify that TLS certificates are to be checked according to [Section 4.3.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.3.4) of [HTTP] when HTTPS is used.\n\nApplications using HTTP should not require that clients statically support HTTP features that are usually negotiated. For example, requiring that clients support responses with a certain content coding ([HTTP], [Section 8.4.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.4.1)) instead of negotiating for it ([HTTP], [Section 12.5.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-12.5.3)) means that otherwise conformant clients cannot interoperate with the application. Applications can encourage the implementation of such features, though.\n\n### 4.4. Specifying URLs\n\nIn HTTP, the resources that clients interact with are identified with URLs [URL]. As [BCP190] explains, parts of the URL are designed to be under the control of the owner (also known as the \"authority\") of that server to give them the flexibility in deployment.\n\nThis means that in most cases, specifications for applications that use HTTP won't contain fixed application URLs or paths; while it is common practice for a specification of a single-deployment API to specify the path prefix \"/app/v1\" (for example), doing so in an IETF specification is inappropriate.\n\nTherefore, the specification writer needs some mechanism to allow clients to discover an application's URLs. Additionally, they need to specify which URL scheme(s) the application should be used with and whether to use a dedicated port or to reuse HTTP's port(s).\n\n#### 4.4.1. Discovering an Application's URLs\n\nGenerally, a client will begin interacting with a given application server by requesting an initial document that contains information about that particular deployment, potentially including links to other relevant resources. Doing so ensures that the deployment is as flexible as possible (potentially spanning multiple servers), allows evolution, and also gives the application the opportunity to tailor the \"discovery document\" to the client.\n\nThere are a few common patterns for discovering that initial URL.\n\nThe most straightforward mechanism for URL discovery is to configure the client with (or otherwise convey to it) a full URL. This might be done in a configuration document or through another discovery mechanism.\n\nHowever, if the client only knows the server's hostname and the identity of the application, there needs to be some way to derive the initial URL from that information.\n\nAn application cannot define a fixed prefix for its URL paths; see [BCP190]. Instead, a specification for such an application can use one of the following strategies:\n\n- Register a well-known URI [WELL-KNOWN-URI] as an entry point for that application. This provides a fixed path on every potential server that will not collide with other applications.\n- Enable the server authority to convey a URI Template [URI-TEMPLATE] or similar mechanism for generating a URL for an entry point. For example, this might be done in a configuration document or other artefact.\n\nOnce the discovery document is located, it can be fetched, cached for later reuse (if allowed by its metadata), and used to locate other resources that are relevant to the application using full URIs or URL Templates.\n\nIn some cases, an application may not wish to use such a discovery document -- for example, when communication is very brief or when the latency concerns of doing so preclude the use of a discovery document. These situations can be addressed by placing all of the application's resources under a well-known location.\n\n#### 4.4.2. Considering URI Schemes\n\nApplications that use HTTP will typically employ the \"http\" and/or \"https\" URI schemes. \"https\" is *RECOMMENDED* to provide authentication, integrity, and confidentiality, as well as to mitigate pervasive monitoring attacks [RFC7258].\n\nHowever, application-specific schemes can also be defined. When defining a URI scheme for an application using HTTP, there are a number of trade-offs and caveats to keep in mind:\n\n- Unmodified Web browsers will not support the new scheme. While it is possible to register new URI schemes with Web browsers (e.g., registerProtocolHandler() in [HTML] , as well as several proprietary approaches), support for these mechanisms is not shared by all browsers, and their capabilities vary.\n- Existing non-browser clients, intermediaries, servers, and associated software will not recognise the new scheme. For example, a client library might fail to dispatch the request, a cache might refuse to store the response, and a proxy might fail to forward the request.\n- Because URLs commonly occur in HTTP artefacts and are often generated automatically (e.g., in the Location response header field), it can be difficult to ensure that the new scheme is used consistently.\n- The resources identified by the new scheme will still be available using \"http\" and/or \"https\" URLs. Those URLs can \"leak\" into use, which can present security and operability issues. For example, using a new scheme to ensure that requests don't get sent to a \"normal\" Web site is likely to fail.\n- Features that rely upon the URL's origin [RFC6454] , such as the Web's same-origin policy, will be impacted by a change of scheme.\n- HTTP-specific features such as cookies [COOKIES] , authentication [HTTP] , caching [HTTP-CACHING] , HTTP Strict Transport Security (HSTS) [RFC6797] , and Cross-Origin Resource Sharing (CORS) [FETCH] might or might not work correctly, depending on how they are defined and implemented. Generally, they are designed and implemented with an assumption that the URL will always be \"http\" or \"https\".\n- Web features that require a secure context [SECCTXT] will likely treat a new scheme as insecure.\n\nSee [RFC7595] for more information about minting new URI schemes.\n\n#### 4.4.3. Choosing Transport Ports\n\nApplications can use the applicable default port (80 for HTTP, 443 for HTTPS), or they can be deployed upon other ports. This decision can be made at deployment time or might be encouraged by the application's specification (e.g., by registering a port for that application).\n\nIf a non-default port is used, it needs to be reflected in the authority of all URLs for that resource; the only mechanism for changing a default port is changing the URI scheme (see Section 4.4.2).\n\nUsing a port other than the default has privacy implications (i.e., the protocol can now be distinguished from other traffic), as well as operability concerns (as some networks might block or otherwise interfere with it). Privacy implications (including those stemming from this distinguishability) should be documented in Security Considerations.\n\nSee [RFC7605] for further guidance.\n\n### 4.5. Using HTTP Methods\n\nApplications that use HTTP *MUST* confine themselves to using registered HTTP methods such as GET, POST, PUT, DELETE, and PATCH.\n\nNew HTTP methods are rare; they are required to be registered in the \"HTTP Method Registry\" with IETF Review (see [HTTP]) and are also required to be generic. That means that they need to be potentially applicable to all resources, not just those of one application.\n\nWhile historically some applications (e.g., [RFC4791]) have defined application-specific methods, [HTTP] now forbids this.\n\nWhen authors believe that a new method is required, they are encouraged to engage with the HTTP community early (e.g., on the <[mailto:ietf-http-wg@w3.org](mailto:ietf-http-wg@w3.org)> mailing list) and document their proposal as a separate HTTP extension rather than as part of an application's specification.\n\n#### 4.5.1. GET\n\nGET is the most common and useful HTTP method; its retrieval semantics allow caching and side-effect free linking and underlie many of the benefits of using HTTP.\n\nQueries can be performed with GET, often using the query component of the URL; this is a familiar pattern from Web browsing, and the results can be cached, improving the efficiency of an often expensive process. In some cases, however, GET might be unwieldy for expressing queries because of the limited syntax of the URI; in particular, if binary data forms part of the query terms, it needs to be encoded to conform to the URI syntax.\n\nWhile this is not an issue for short queries, it can become one for larger query terms or those that need to sustain a high rate of requests. Additionally, some HTTP implementations limit the size of URLs they support, although modern HTTP software has much more generous limits than previously (typically, considerably more than 8000 octets, as required by [HTTP]).\n\nIn these cases, an application using HTTP might consider using POST to express queries in the request's content; doing so avoids encoding overhead and URL length limits in implementations. However, in doing so, it should be noted that the benefits of GET such as caching and linking to query results are lost. Therefore, applications using HTTP that require support for POST queries ought to consider allowing both methods.\n\nProcessing of GET requests should not change the application's state or have other side effects that might be significant to the client since implementations can and do retry HTTP GET requests that fail. Furthermore, some GET requests protected by TLS early data might be vulnerable to replay attacks (see [RFC8470]). Note that this does not include logging and similar functions; see [HTTP], [Section 9.2.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.1).\n\nFinally, note that while the generic HTTP syntax allows a GET request message to contain content, the purpose is to allow message parsers to be generic; per [HTTP], [Section 9.3.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.1), content in a GET is not recommended, has no meaning, and will be either ignored or rejected by generic HTTP software (such as intermediaries, caches, servers, and client libraries).\n\n#### 4.5.2. OPTIONS\n\nThe OPTIONS method was defined for metadata retrieval and is used both by Web Distributed Authoring and Versioning (WebDAV) [RFC4918] and CORS [FETCH]. Because HTTP-based APIs often need to retrieve metadata about resources, it is often considered for their use.\n\nHowever, OPTIONS does have significant limitations:\n\n- It isn't possible to link to the metadata with a simple URL because OPTIONS is not the default method.\n- OPTIONS responses are not cacheable because HTTP caches operate on representations of the resource (i.e., GET and HEAD). If OPTIONS responses are cached separately, their interactions with the HTTP cache expiry, secondary keys, and other mechanisms need to be considered.\n- OPTIONS is \"chatty\" -- requesting metadata separately increases the number of requests needed to interact with the application.\n- Implementation support for OPTIONS is not universal; some servers do not expose the ability to respond to OPTIONS requests without significant effort.\n\nInstead of OPTIONS, one of these alternative approaches might be more appropriate:\n\n- For server-wide metadata, create a well-known URI [WELL-KNOWN-URI] or use an already existing one if appropriate (e.g., host-meta [RFC6415] ).\n- For metadata about a specific resource, create a separate resource and link to it using a Link response header field or a link serialised into the response's content. See [WEB-LINKING] . Note that the Link header field is available on HEAD responses, which is useful if the client wants to discover a resource's capabilities before they interact with it.\n\n### 4.6. Using HTTP Status Codes\n\nHTTP status codes convey semantics both for the benefit of generic HTTP components -- such as caches, intermediaries, and clients -- and applications themselves. However, applications can encounter a number of pitfalls in their use.\n\nFirst, status codes are often generated by components other than the application itself. This can happen, for example, when network errors are encountered; when a captive portal, proxy, or content delivery network is present; or when a server is overloaded or thinks it is under attack. They can even be generated by generic client software when certain error conditions are encountered. As a result, if an application assigns specific semantics to one of these status codes, a client can be misled about its state because the status code was generated by a generic component, not the application itself.\n\nFurthermore, mapping application errors to individual HTTP status codes one-to-one often leads to a situation where the finite space of applicable HTTP status codes is exhausted. This, in turn, leads to a number of bad practices -- including minting new, application-specific status codes or using existing status codes even though the link between their semantics and the application's is tenuous at best.\n\nInstead, applications using HTTP should define their errors to use the most applicable status code, making generous use of the general status codes (200, 400, and 500) when in doubt. Importantly, they should not specify a one-to-one relationship between status codes and application errors, thereby avoiding the exhaustion issue outlined above.\n\nTo distinguish between multiple error conditions that are mapped to the same status code and to avoid the misattribution issue outlined above, applications using HTTP should convey finer-grained error information in the response's message content and/or header fields. [PROBLEM-DETAILS] provides one way to do so.\n\nBecause the set of registered HTTP status codes can expand, applications using HTTP should explicitly point out that clients ought to be able to handle all applicable status codes gracefully (i.e., falling back to the generic n00 semantics of a given status code; e.g., 499 can be safely handled as 400 (Bad Request) by clients that don't recognise it). This is preferable to creating a \"laundry list\" of potential status codes since such a list won't be complete in the foreseeable future.\n\nApplications using HTTP *MUST NOT* re-specify the semantics of HTTP status codes, even if it is only by copying their definition. It is *NOT RECOMMENDED* they require specific reason phrases to be used; the reason phrase has no function in HTTP, is not guaranteed to be preserved by implementations, and is not carried at all in the HTTP/2 [HTTP/2] message format.\n\nApplications *MUST* only use registered HTTP status codes. As with methods, new HTTP status codes are rare and required (by [HTTP]) to be registered with IETF Review. Similarly, HTTP status codes are generic; they are required (by [HTTP]) to be potentially applicable to all resources, not just to those of one application.\n\nWhen authors believe that a new status code is required, they are encouraged to engage with the HTTP community early (e.g., on the <[mailto:ietf-http-wg@w3.org](mailto:ietf-http-wg@w3.org)> mailing list) and document their proposal as a separate HTTP extension, rather than as part of an application's specification.\n\n#### 4.6.1. Redirection\n\nThe 3xx series of status codes specified in [Section 15.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.4) of [HTTP] directs the user agent to another resource to satisfy the request. The most common of these are 301, 302, 307, and 308, all of which use the Location response header field to indicate where the client should resend the request.\n\nThere are two ways that the members of this group of status codes differ:\n\n- Whether they are permanent or temporary. Permanent redirects can be used to update links stored in the client (e.g., bookmarks), whereas temporary ones cannot. Note that this has no effect on HTTP caching; it is completely separate.\n- Whether they allow the redirected request to change the request method from POST to GET. Web browsers generally do change POST to GET for 301 and 302; therefore, 308 and 307 were created to allow redirection without changing the method.\n\nThis table summarises their relationships:\n\n| | Permanent | Temporary |\n| --- | --- | --- |\n| Allows change of the request method from POST to GET | 301 | 302 |\n| Does not allow change of the request method | 308 | 307 |\n\nThe 303 (See Other) status code can be used to inform the client that the result of an operation is available at a different location using GET.\n\nAs noted in [HTTP], a user agent is allowed to automatically follow a 3xx redirect that has a Location response header field, even if they don't understand the semantics of the specific status code. However, they aren't required to do so; therefore, if an application using HTTP desires redirects to be automatically followed, it needs to explicitly specify the circumstances when this is required.\n\nRedirects can be cached (when appropriate cache directives are present), but beyond that, they are not \"sticky\" -- i.e., redirection of a URI will not result in the client assuming that similar URIs (e.g., with different query parameters) will also be redirected.\n\nApplications using HTTP are encouraged to specify that 301 and 302 responses change the subsequent request method from POST (but no other method) to GET to be compatible with browsers. Generally, when a redirected request is made, its header fields are copied from the original request. However, they can be modified by various mechanisms; e.g., sent Authorization ([HTTP], [Section 11](https://www.rfc-editor.org/rfc/rfc9110.html#section-11)) and Cookie ([COOKIES]) header fields will change if the origin (and sometimes path) of the request changes. An application using HTTP should specify if any request header fields that it defines need to be modified or removed upon a redirect; however, this behaviour cannot be relied upon since a generic client (like a browser) will be unaware of such requirements.\n\n### 4.7. Specifying HTTP Header Fields\n\nApplications often define new HTTP header fields. Typically, using HTTP header fields is appropriate in a few different situations:\n\n- The field is useful to intermediaries (who often wish to avoid parsing message content), and/or\n- The field is useful to generic HTTP software (e.g., clients, servers), and/or\n- It is not possible to include their values in the message content (usually because a format does not allow it).\n\nWhen the conditions above are not met, it is usually better to convey application-specific information in other places -- e.g., the message content or the URL query string.\n\nNew header fields *MUST* be registered, per [Section 16.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-16.3) of [HTTP].\n\nSee [Section 16.3.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-16.3.2) of [HTTP] for guidelines to consider when minting new header fields. [STRUCTURED-FIELDS] provides a common structure for new header fields and avoids many issues in their parsing and handling; it is *RECOMMENDED* that new header fields use it.\n\nIt is *RECOMMENDED* that header field names be short (even when field compression is used, there is an overhead) but appropriately specific. In particular, if a header field is specific to an application, an identifier for that application can form a prefix to the header field name, separated by a hyphen.\n\nFor example, if the \"example\" application needs to create three header fields, they might be called \"example-foo\", \"example-bar\", and \"example-baz\". Note that the primary motivation here is to avoid consuming more generic field names, not to reserve a portion of the namespace for the application; see [RFC6648] for related considerations.\n\nThe semantics of existing HTTP header fields *MUST NOT* be redefined without updating their registration or defining an extension to them (if allowed). For example, an application using HTTP cannot specify that the Location header field has a special meaning in a certain context.\n\nSee Section 4.9 for the interaction between header fields and HTTP caching; in particular, request header fields that are used to choose (per [Section 4.1](https://www.rfc-editor.org/rfc/rfc9111.html#section-4.1) of [HTTP-CACHING]) a response have impact there and need to be carefully considered.\n\nSee Section 4.10 for considerations regarding header fields that carry application state (e.g., Cookie).\n\n### 4.8. Defining Message Content\n\nCommon syntactic conventions for message contents include JSON [JSON], XML [XML], and Concise Binary Object Representation (CBOR) [RFC8949]. Best practices for their use are out of scope for this document.\n\nApplications should register distinct media types for each format they define; this makes it possible to identify them unambiguously and negotiate for their use. See [RFC6838] for more information.\n\n### 4.9. Leveraging HTTP Caching\n\nHTTP caching [HTTP-CACHING] is one of the primary benefits of using HTTP for applications; it provides scalability, reduces latency, and improves reliability. Furthermore, HTTP caches are readily available in browsers and other clients, networks as forward and reverse proxies, content delivery networks, and as part of server software.\n\nEven when an application using HTTP isn't designed to take advantage of caching, it needs to consider how caches will handle its responses to preserve correct behaviour when one is interposed (whether in the network, server, client, or intervening infrastructure).\n\n#### 4.9.1. Freshness\n\nAssigning even a short freshness lifetime ([HTTP-CACHING], [Section 4.2](https://www.rfc-editor.org/rfc/rfc9111.html#section-4.2)) -- e.g., 5 seconds -- allows a response to be reused to satisfy multiple clients and/or a single client making the same request repeatedly. In general, if it is safe to reuse something, consider assigning a freshness lifetime.\n\nThe most common method for specifying freshness is the max-age response directive ([HTTP-CACHING], [Section 5.2.2.1](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.1)). The Expires header field ([HTTP-CACHING], [Section 5.3](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.3)) can also be used, but it is not necessary; all modern cache implementations support the Cache-Control header field, and specifying freshness as a delta is usually more convenient and less error-prone.\n\nIt is not necessary to add the public response directive ([HTTP-CACHING], [Section 5.2.2.9](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.9)) to cache most responses; it is only necessary when it's desirable to store an authenticated response, or when the status code isn't understood by the cache and there isn't explicit freshness information available.\n\nIn some situations, responses without explicit cache freshness directives will be stored and served using a heuristic freshness lifetime; see [HTTP-CACHING], [Section 4.2.2](https://www.rfc-editor.org/rfc/rfc9111.html#section-4.2.2). As the heuristic is not under the control of the application, it is generally preferable to set an explicit freshness lifetime or make the response explicitly uncacheable.\n\nIf caching of a response is not desired, the appropriate cache response directive is no-store. Other directives are not necessary, and no-store only needs to be sent in situations where the response might be cached; see [HTTP-CACHING], [Section 3](https://www.rfc-editor.org/rfc/rfc9111.html#section-3). Note that the no-cache directive allows a response to be stored, just not reused by a cache without validation; it does not prevent caching (despite its name).\n\nFor example, this response cannot be stored or reused by a cache:\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/example+xml\nCache-Control: no-store\n\n[content]\n```\n\n#### 4.9.2. Stale Responses\n\nAuthors should understand that stale responses (e.g., with Cache-Control: max-age=0) can be reused by caches when disconnected from the origin server; this can be useful for handling network issues.\n\nIf doing so is not suitable for a given response, the origin should send the must-revalidate cache directive. See [Section 4.2.4](https://www.rfc-editor.org/rfc/rfc9111.html#section-4.2.4) of [HTTP-CACHING] and also [RFC5861] for additional controls over stale content.\n\nStale responses can be refreshed by assigning a validator, saving both transfer bandwidth and latency for large responses; see [Section 13](https://www.rfc-editor.org/rfc/rfc9110.html#section-13) of [HTTP].\n\n#### 4.9.3. Caching and Application Semantics\n\nWhen an application has a need to express a lifetime that's separate from the freshness lifetime, this should be conveyed separately, either in the response's content or in a separate header field. When this happens, the relationship between HTTP caching and that lifetime needs to be carefully considered since the response will be used as long as it is considered fresh.\n\nIn particular, application authors need to consider how responses that are not freshly obtained from the origin server should be handled; if they have a concept like a validity period, this will need to be calculated considering the age of the response (see [HTTP-CACHING], [Section 4.2.3](https://www.rfc-editor.org/rfc/rfc9111.html#section-4.2.3)).\n\nOne way to address this is to explicitly specify that responses need to be fresh upon use.\n\n#### 4.9.4. Varying Content Based Upon the Request\n\nIf an application uses a request header field to change the response's header fields or content, authors should point out that this has implications for caching; in general, such resources need to either make their responses uncacheable (e.g., with the no-store cache directive defined in [HTTP-CACHING], [Section 5.2.2.5](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.5)) or send the Vary response header field ([HTTP], [Section 12.5.5](https://www.rfc-editor.org/rfc/rfc9110.html#section-12.5.5)) on all responses from that resource (including the \"default\" response).\n\nFor example, this response:\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/example+xml\nCache-Control: max-age=60\nETag: \"sa0f8wf20fs0f\"\nVary: Accept-Encoding\n\n[content]\n```\n\ncan be stored for 60 seconds by both private and shared caches, can be revalidated with If-None-Match, and varies on the Accept-Encoding request header field.\n\n### 4.10. Handling Application State\n\nApplications can use stateful cookies [COOKIES] to identify a client and/or store client-specific data to contextualise requests.\n\nWhen used, it is important to carefully specify the scoping and use of cookies; if the application exposes sensitive data or capabilities (e.g., by acting as an ambient authority), exploits are possible. Mitigations include using a request-specific token to ensure the intent of the client.\n\n### 4.11. Making Multiple Requests\n\nClients often need to send multiple requests to perform a task.\n\nIn HTTP/1 [HTTP/1.1], parallel requests are most often supported by opening multiple connections. Application performance can be impacted when too many simultaneous connections are used because connections' congestion control will not be coordinated. Furthermore, it can be difficult for applications to decide when to issue and which connection to use for a given request, further impacting performance.\n\nHTTP/2 [HTTP/2] and HTTP/3 [HTTP/3] offer multiplexing to applications, removing the need to use multiple connections. However, application performance can still be significantly affected by how the server chooses to prioritize responses. Depending on the application, it might be best for the server to determine the priority of responses or for the client to hint its priorities to the server (see, e.g., [HTTP-PRIORITY]).\n\nIn all versions of HTTP, requests are made independently -- you can't rely on the relative order of two requests to guarantee their processing order. This is because they might be sent over a multiplexed protocol by an intermediary or sent to different origin servers, or the server might even perform processing in a different order. If two requests need strict ordering, the only reliable way to ensure the outcome is to issue the second request when the final response to the first has begun.\n\nApplications *MUST NOT* make assumptions about the relationship between separate requests on a single transport connection; doing so breaks many of the assumptions of HTTP as a stateless protocol and will cause problems in interoperability, security, operability, and evolution.\n\n### 4.12. Client Authentication\n\nApplications can use HTTP authentication ([Section 11](https://www.rfc-editor.org/rfc/rfc9110.html#section-11) of [HTTP]) to identify clients. Per [RFC7617], the Basic authentication scheme is not suitable for protecting sensitive or valuable information unless the channel is secure (e.g., using the \"https\" URI scheme). Likewise, [RFC7616] requires the Digest authentication scheme to be used over a secure channel.\n\nWith HTTPS, clients might also be authenticated using certificates [RFC8446], but note that such authentication is intrinsically scoped to the underlying transport connection. As a result, a client has no way of knowing whether the authenticated status was used in preparing the response (though Vary: * and/or the private cache directive can provide a partial indication), and the only way to obtain a specifically unauthenticated response is to open a new connection.\n\nWhen used, it is important to carefully specify the scoping and use of authentication; if the application exposes sensitive data or capabilities (e.g., by acting as an ambient authority; see [Section 8.3](https://www.rfc-editor.org/rfc/rfc6454.html#section-8.3) of [RFC6454]), exploits are possible. Mitigations include using a request-specific token to ensure the intent of the client.\n\n### 4.13. Coexisting with Web Browsing\n\nEven if there is not an intent for an application to be used with a Web browser, its resources will remain available to browsers and other HTTP clients. This means that all such applications that use HTTP need to consider how browsers will interact with them, particularly regarding security.\n\nFor example, if an application's state can be changed using a POST request, a Web browser can easily be coaxed into cross-site request forgery (CSRF) from arbitrary Web sites.\n\nOr, if an attacker gains control of content returned from the application's resources (for example, part of the request is reflected in the response, or the response contains external information that the attacker can change), they can inject code into the browser and access data and capabilities as if they were the origin -- a technique known as a cross-site scripting (XSS) attack.\n\nThis is only a small sample of the kinds of issues that applications using HTTP must consider. Generally, the best approach is to actually consider the application as a Web application, and to follow best practices for their secure development.\n\nA complete enumeration of such practices is out of scope for this document, but some considerations include:\n\n- Using an application-specific media type in the Content-Type header field, and requiring clients to fail if it is not used.\n- Using X-Content-Type-Options: nosniff [FETCH] to ensure that content under attacker control can't be coaxed into a form that is interpreted as active content by a Web browser.\n- Using Content-Security-Policy [CSP] to constrain the capabilities of active content (i.e., that which can execute scripts, such as HTML [HTML] and PDF), thereby mitigating XSS attacks.\n- Using Referrer-Policy [REFERRER-POLICY] to prevent sensitive data in URLs from being leaked in the Referer request header field.\n- Using the 'HttpOnly' flag on Cookies to ensure that cookies are not exposed to browser scripting languages [COOKIES] .\n- Avoiding use of compression on any sensitive information (e.g., authentication tokens, passwords), as the scripting environment offered by Web browsers allows an attacker to repeatedly probe the compression space; if the attacker has access to the network path of the communication, they can use this capability to recover that information.\n\nDepending on how they are intended to be deployed, specifications for applications using HTTP might require the use of these mechanisms in specific ways or might merely point them out in Security Considerations.\n\nAn example of an HTTP response from an application that does not intend for its content to be treated as active by browsers might look like this:\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/example+json\nX-Content-Type-Options: nosniff\nContent-Security-Policy: default-src 'none'\nCache-Control: max-age=3600\nReferrer-Policy: no-referrer\n\n[content]\n```\n\nIf an application has browser compatibility as a goal, client interaction ought to be defined in terms of [FETCH] since that is the abstraction that browsers use for HTTP; it enforces many of these best practices.\n\n### 4.14. Maintaining Application Boundaries\n\nBecause many HTTP capabilities are scoped to the origin [RFC6454], applications also need to consider how deployments might interact with other applications (including Web browsing) that use the same origin server.\n\nFor example, if cookies [COOKIES] are used to carry application state, they will be sent with all requests to the origin by default (unless scoped by path), and the application might receive cookies from other applications on the origin server. This can lead to security issues as well as collision in cookie names.\n\nOne solution to these issues is to require a dedicated hostname for the application so that it has a unique origin. However, it is often desirable to allow multiple applications to be deployed on a single hostname; doing so provides the most deployment flexibility and enables them to be \"mixed\" together (see [BCP190] for details).\n\nTherefore, applications using HTTP should strive to allow multiple applications on an origin. Specifically, when specifying the use of cookies, HTTP authentication realms [HTTP], or other origin-wide HTTP mechanisms, applications using HTTP should not mandate the use of a particular name but instead let deployments configure them. Consideration should be given to scoping them to part of the origin, using their specified mechanisms for doing so.\n\nModern Web browsers constrain the ability of content from one origin to access resources from another to avoid leaking private information. As a result, applications that wish to expose cross-origin data to browsers will need to implement the CORS protocol; see [FETCH].\n\n### 4.15. Using Server Push\n\nHTTP/2 added the ability for servers to \"push\" request/response pairs to clients in [HTTP/2], [Section 8.4](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.4). While server push seems like a natural fit for many common application semantics (e.g., \"fanout\" and publish/subscribe), a few caveats should be noted:\n\n- Server push is hop by hop; that is, it is not automatically forwarded by intermediaries. As a result, it might not work easily (or at all) with proxies, reverse proxies, and content delivery networks.\n- Server push can have a negative performance impact on HTTP when used incorrectly, particularly if there is contention with resources that have actually been requested by the client.\n- Server push is implemented differently in different clients, especially regarding interaction with HTTP caching, and capabilities might vary.\n- APIs for server push are currently unavailable in some implementations and vary widely in others. In particular, there is no current browser API for it.\n- Server push is not supported in HTTP/1.1 or HTTP/1.0.\n- Server push does not form part of the \"core\" semantics of HTTP and therefore might not be supported by future versions of the protocol.\n\nApplications wishing to optimise cases where the client can perform work related to requests before the full response is available (e.g., fetching links for things likely to be contained within) might benefit from using the 103 (Early Hints) status code; see [RFC8297].\n\nApplications using server push directly need to enforce the requirements regarding authority in [HTTP/2], [Section 8.4](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.4) to avoid cross-origin push attacks.\n\n### 4.16. Allowing Versioning and Evolution\n\nIt's often necessary to introduce new features into application protocols and change existing ones.\n\nIn HTTP, backwards-incompatible changes can be made using mechanisms such as:\n\n- Using a distinct link relation type [WEB-LINKING] to identify a URL for a resource that implements the new functionality.\n- Using a distinct media type [RFC6838] to identify formats that enable the new functionality.\n- Using a distinct HTTP header field to implement new functionality outside the message content.\n\n---\n\n## 5. IANA Considerations\n\nThis document has no IANA actions.\n\n---\n\n## 6. Security Considerations\n\nApplications using HTTP are subject to the security considerations of HTTP itself and any extensions used; [HTTP], [HTTP-CACHING], and [WEB-LINKING] are often relevant, amongst others.\n\nSection 4.4.2 recommends support for \"https\" URLs and discourages the use of \"http\" URLs to provide authentication, integrity, and confidentiality, as well as to mitigate pervasive monitoring attacks. Many applications using HTTP perform authentication and authorization with bearer tokens (e.g., in session cookies). If the transport is unencrypted, an attacker that can eavesdrop upon or modify HTTP communications can often escalate their privilege to perform operations on resources.\n\nSection 4.9.3 highlights the potential for mismatch between HTTP caching and application-specific storage of responses or information therein.\n\nSection 4.10 discusses the impact of using stateful mechanisms in the protocol as ambient authority and suggests a mitigation.\n\nSection 4.13 highlights the implications of Web browsers' capabilities on applications that use HTTP.\n\nSection 4.14 discusses the issues that arise when applications are deployed on the same origin as websites (and other applications).\n\nSection 4.15 highlights risks of using HTTP/2 server push in a manner other than that specified.\n\nApplications that use HTTP in a manner that involves modification of implementations -- for example, requiring support for a new URI scheme or a non-standard method -- risk having those implementations \"fork\" from their parent HTTP implementations, with the possible result that they do not benefit from patches and other security improvements incorporated upstream.\n\n### 6.1. Privacy Considerations\n\nHTTP clients can expose a variety of information to servers. Besides information that's explicitly sent as part of an application's operation (for example, names and other user-entered data) and \"on the wire\" (which is one of the reasons \"https\" is recommended in Section 4.4.2), other information can be gathered through less obvious means -- often by connecting activities of a user over time.\n\nThis includes session information, tracking the client through fingerprinting, and code execution.\n\nSession information includes things like the IP address of the client, TLS session tickets, Cookies, ETags stored in the client's cache, and other stateful mechanisms. Applications are advised to avoid using session mechanisms unless they are unavoidable or necessary for operation, in which case these risks need to be documented. When they are used, implementations should be encouraged to allow clearing such state.\n\nFingerprinting uses unique aspects of a client's messages and behaviours to connect disparate requests and connections. For example, the User-Agent request header field conveys specific information about the implementation; the Accept-Language request header field conveys the users' preferred language. In combination, a number of these markers can be used to uniquely identify a client, impacting its control over its data. As a result, applications are advised to specify that clients should only emit the information they need to function in requests.\n\nFinally, if an application exposes the ability to execute code, great care needs to be taken since any ability to observe its environment can be used as an opportunity to both fingerprint the client and to obtain and manipulate private data (including session information). For example, access to high-resolution timers (even indirectly) can be used to profile the underlying hardware, creating a unique identifier for the system. Applications are advised to avoid allowing the use of mobile code where possible; when it cannot be avoided, the resulting system's security properties need be carefully scrutinised.\n\n## 7. References\n\n### 7.1. Normative References\n\n[BCP190]\n\nNottingham, M., “[URI Design and Ownership](https://www.rfc-editor.org/rfc/rfc8820)”, [BCP 190](https://www.rfc-editor.org/info/bcp190), RFC 8820, [DOI 10.17487/RFC8820](https://dx.doi.org/10.17487/RFC8820), June 2020, <[https://www.rfc-editor.org/rfc/rfc8820](https://www.rfc-editor.org/rfc/rfc8820)>.\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[HTTP-CACHING]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html)”, [STD 98](https://www.rfc-editor.org/info/std98), RFC 9111, [DOI 10.17487/RFC9111](https://dx.doi.org/10.17487/RFC9111), June 2022, <[https://www.rfc-editor.org/info/rfc9111](https://www.rfc-editor.org/info/rfc9111)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC6454]\n\nBarth, A., “[The Web Origin Concept](https://www.rfc-editor.org/rfc/rfc6454.html)”, RFC 6454, [DOI 10.17487/RFC6454](https://dx.doi.org/10.17487/RFC6454), December 2011, <[https://www.rfc-editor.org/info/rfc6454](https://www.rfc-editor.org/info/rfc6454)>.\n\n[RFC6648]\n\nSaint-Andre, P., Crocker, D., and M. Nottingham, “[Deprecating the \"X-\" Prefix and Similar Constructs in Application Protocols](https://www.rfc-editor.org/rfc/rfc6648.html)”, [BCP 178](https://www.rfc-editor.org/info/bcp178), RFC 6648, [DOI 10.17487/RFC6648](https://dx.doi.org/10.17487/RFC6648), June 2012, <[https://www.rfc-editor.org/info/rfc6648](https://www.rfc-editor.org/info/rfc6648)>.\n\n[RFC6838]\n\nFreed, N., Klensin, J., and T. Hansen, “[Media Type Specifications and Registration Procedures](https://www.rfc-editor.org/rfc/rfc6838.html)”, [BCP 13](https://www.rfc-editor.org/info/bcp13), RFC 6838, [DOI 10.17487/RFC6838](https://dx.doi.org/10.17487/RFC6838), January 2013, <[https://www.rfc-editor.org/info/rfc6838](https://www.rfc-editor.org/info/rfc6838)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc8941.html)”, RFC 8941, [DOI 10.17487/RFC8941](https://dx.doi.org/10.17487/RFC8941), February 2021, <[https://www.rfc-editor.org/info/rfc8941](https://www.rfc-editor.org/info/rfc8941)>.\n\n[URL]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[https://www.rfc-editor.org/info/rfc3986](https://www.rfc-editor.org/info/rfc3986)>.\n\n[WEB-LINKING]\n\nNottingham, M., “[Web Linking](https://www.rfc-editor.org/rfc/rfc8288.html)”, RFC 8288, [DOI 10.17487/RFC8288](https://dx.doi.org/10.17487/RFC8288), October 2017, <[https://www.rfc-editor.org/info/rfc8288](https://www.rfc-editor.org/info/rfc8288)>.\n\n[WELL-KNOWN-URI]\n\nNottingham, M., “[Well-Known Uniform Resource Identifiers (URIs)](https://www.rfc-editor.org/rfc/rfc8615.html)”, RFC 8615, [DOI 10.17487/RFC8615](https://dx.doi.org/10.17487/RFC8615), May 2019, <[https://www.rfc-editor.org/info/rfc8615](https://www.rfc-editor.org/info/rfc8615)>.\n\n### 7.2. Informative References\n\n[COOKIES]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, [DOI 10.17487/RFC6265](https://dx.doi.org/10.17487/RFC6265), April 2011, <[https://www.rfc-editor.org/info/rfc6265](https://www.rfc-editor.org/info/rfc6265)>.\n\n[CSP]\n\nWest, M., “[Content Security Policy Level 3](https://www.w3.org/TR/2021/WD-CSP3-20210629)”, W3C Working Draft, June 2021, <[https://www.w3.org/TR/2021/WD-CSP3-20210629](https://www.w3.org/TR/2021/WD-CSP3-20210629)>.\n\n[FETCH]\n\nWHATWG, “[Fetch - Living Standard](https://fetch.spec.whatwg.org)”, <[https://fetch.spec.whatwg.org](https://fetch.spec.whatwg.org)>.\n\n[HTML]\n\nWHATWG, “[HTML - Living Standard](https://html.spec.whatwg.org)”, <[https://html.spec.whatwg.org](https://html.spec.whatwg.org)>.\n\n[HTTP-PRIORITY]\n\n一穂, 奥. and L. Pardue, “[Extensible Prioritization Scheme for HTTP](https://www.rfc-editor.org/rfc/rfc9218.html)”, RFC 9218, [DOI 10.17487/RFC9218](https://dx.doi.org/10.17487/RFC9218), June 2022, <[https://www.rfc-editor.org/info/rfc9218](https://www.rfc-editor.org/info/rfc9218)>.\n\n[HTTP/1.1]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html)”, [STD 99](https://www.rfc-editor.org/info/std99), RFC 9112, [DOI 10.17487/RFC9112](https://dx.doi.org/10.17487/RFC9112), June 2022, <[https://www.rfc-editor.org/info/rfc9112](https://www.rfc-editor.org/info/rfc9112)>.\n\n[HTTP/2]\n\nThomson, M., Ed. and C. Benfield, Ed., “[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html)”, RFC 9113, [DOI 10.17487/RFC9113](https://dx.doi.org/10.17487/RFC9113), June 2022, <[https://www.rfc-editor.org/info/rfc9113](https://www.rfc-editor.org/info/rfc9113)>.\n\n[HTTP/3]\n\nBishop, M., Ed., “[HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html)”, RFC 9114, [DOI 10.17487/RFC9114](https://dx.doi.org/10.17487/RFC9114), June 2022, <[https://www.rfc-editor.org/info/rfc9114](https://www.rfc-editor.org/info/rfc9114)>.\n\n[JSON]\n\nBray, T., Ed., “[The JavaScript Object Notation (JSON) Data Interchange Format](https://www.rfc-editor.org/rfc/rfc8259.html)”, [STD 90](https://www.rfc-editor.org/info/std90), RFC 8259, [DOI 10.17487/RFC8259](https://dx.doi.org/10.17487/RFC8259), December 2017, <[https://www.rfc-editor.org/info/rfc8259](https://www.rfc-editor.org/info/rfc8259)>.\n\n[PROBLEM-DETAILS]\n\nNottingham, M. and E. Wilde, “[Problem Details for HTTP APIs](https://www.rfc-editor.org/rfc/rfc7807.html)”, RFC 7807, [DOI 10.17487/RFC7807](https://dx.doi.org/10.17487/RFC7807), March 2016, <[https://www.rfc-editor.org/info/rfc7807](https://www.rfc-editor.org/info/rfc7807)>.\n\n[REFERRER-POLICY]\n\nEisinger, J. and E. Stark, “[Referrer Policy](https://www.w3.org/TR/2017/CR-referrer-policy-20170126)”, W3C Candidate Recommendation CR-referrer-policy-20170126, January 2017, <[https://www.w3.org/TR/2017/CR-referrer-policy-20170126](https://www.w3.org/TR/2017/CR-referrer-policy-20170126)>.\n\n[RFC3205]\n\nMoore, K., “[On the use of HTTP as a Substrate](https://www.rfc-editor.org/rfc/rfc3205.html)”, [BCP 56](https://www.rfc-editor.org/info/bcp56), RFC 3205, [DOI 10.17487/RFC3205](https://dx.doi.org/10.17487/RFC3205), February 2002, <[https://www.rfc-editor.org/info/rfc3205](https://www.rfc-editor.org/info/rfc3205)>.\n\n[RFC4791]\n\nDaboo, C., Desruisseaux, B., and L. Dusseault, “[Calendaring Extensions to WebDAV (CalDAV)](https://www.rfc-editor.org/rfc/rfc4791.html)”, RFC 4791, [DOI 10.17487/RFC4791](https://dx.doi.org/10.17487/RFC4791), March 2007, <[https://www.rfc-editor.org/info/rfc4791](https://www.rfc-editor.org/info/rfc4791)>.\n\n[RFC4918]\n\nDusseault, L., Ed., “[HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)](https://www.rfc-editor.org/rfc/rfc4918.html)”, RFC 4918, [DOI 10.17487/RFC4918](https://dx.doi.org/10.17487/RFC4918), June 2007, <[https://www.rfc-editor.org/info/rfc4918](https://www.rfc-editor.org/info/rfc4918)>.\n\n[RFC5861]\n\nNottingham, M., “[HTTP Cache-Control Extensions for Stale Content](https://www.rfc-editor.org/rfc/rfc5861.html)”, RFC 5861, [DOI 10.17487/RFC5861](https://dx.doi.org/10.17487/RFC5861), May 2010, <[https://www.rfc-editor.org/info/rfc5861](https://www.rfc-editor.org/info/rfc5861)>.\n\n[RFC6415]\n\nHammer-Lahav, E., Ed. and B. Cook, “[Web Host Metadata](https://www.rfc-editor.org/rfc/rfc6415.html)”, RFC 6415, [DOI 10.17487/RFC6415](https://dx.doi.org/10.17487/RFC6415), October 2011, <[https://www.rfc-editor.org/info/rfc6415](https://www.rfc-editor.org/info/rfc6415)>.\n\n[RFC6797]\n\nHodges, J., Jackson, C., and A. Barth, “[HTTP Strict Transport Security (HSTS)](https://www.rfc-editor.org/rfc/rfc6797.html)”, RFC 6797, [DOI 10.17487/RFC6797](https://dx.doi.org/10.17487/RFC6797), November 2012, <[https://www.rfc-editor.org/info/rfc6797](https://www.rfc-editor.org/info/rfc6797)>.\n\n[RFC7258]\n\nFarrell, S. and H. Tschofenig, “[Pervasive Monitoring Is an Attack](https://www.rfc-editor.org/rfc/rfc7258.html)”, [BCP 188](https://www.rfc-editor.org/info/bcp188), RFC 7258, [DOI 10.17487/RFC7258](https://dx.doi.org/10.17487/RFC7258), May 2014, <[https://www.rfc-editor.org/info/rfc7258](https://www.rfc-editor.org/info/rfc7258)>.\n\n[RFC7301]\n\nFriedl, S., Popov, A., Langley, A., and E. Stephan, “[Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension](https://www.rfc-editor.org/rfc/rfc7301.html)”, RFC 7301, [DOI 10.17487/RFC7301](https://dx.doi.org/10.17487/RFC7301), July 2014, <[https://www.rfc-editor.org/info/rfc7301](https://www.rfc-editor.org/info/rfc7301)>.\n\n[RFC7595]\n\nThaler, D., Ed., Hansen, T., and T. Hardie, “[Guidelines and Registration Procedures for URI Schemes](https://www.rfc-editor.org/rfc/rfc7595.html)”, [BCP 35](https://www.rfc-editor.org/info/bcp35), RFC 7595, [DOI 10.17487/RFC7595](https://dx.doi.org/10.17487/RFC7595), June 2015, <[https://www.rfc-editor.org/info/rfc7595](https://www.rfc-editor.org/info/rfc7595)>.\n\n[RFC7605]\n\nTouch, J., “[Recommendations on Using Assigned Transport Port Numbers](https://www.rfc-editor.org/rfc/rfc7605.html)”, [BCP 165](https://www.rfc-editor.org/info/bcp165), RFC 7605, [DOI 10.17487/RFC7605](https://dx.doi.org/10.17487/RFC7605), August 2015, <[https://www.rfc-editor.org/info/rfc7605](https://www.rfc-editor.org/info/rfc7605)>.\n\n[RFC7616]\n\nShekh-Yusef, R., Ed., Ahrens, D., and S. Bremer, “[HTTP Digest Access Authentication](https://www.rfc-editor.org/rfc/rfc7616.html)”, RFC 7616, [DOI 10.17487/RFC7616](https://dx.doi.org/10.17487/RFC7616), September 2015, <[https://www.rfc-editor.org/info/rfc7616](https://www.rfc-editor.org/info/rfc7616)>.\n\n[RFC7617]\n\nReschke, J., “[The 'Basic' HTTP Authentication Scheme](https://www.rfc-editor.org/rfc/rfc7617.html)”, RFC 7617, [DOI 10.17487/RFC7617](https://dx.doi.org/10.17487/RFC7617), September 2015, <[https://www.rfc-editor.org/info/rfc7617](https://www.rfc-editor.org/info/rfc7617)>.\n\n[RFC8297]\n\nOku, K., “[An HTTP Status Code for Indicating Hints](https://www.rfc-editor.org/rfc/rfc8297.html)”, RFC 8297, [DOI 10.17487/RFC8297](https://dx.doi.org/10.17487/RFC8297), December 2017, <[https://www.rfc-editor.org/info/rfc8297](https://www.rfc-editor.org/info/rfc8297)>.\n\n[RFC8446]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n[RFC8470]\n\nThomson, M., Nottingham, M., and W. Tarreau, “[Using Early Data in HTTP](https://www.rfc-editor.org/rfc/rfc8470.html)”, RFC 8470, [DOI 10.17487/RFC8470](https://dx.doi.org/10.17487/RFC8470), September 2018, <[https://www.rfc-editor.org/info/rfc8470](https://www.rfc-editor.org/info/rfc8470)>.\n\n[RFC8949]\n\nBormann, C. and P. Hoffman, “[Concise Binary Object Representation (CBOR)](https://www.rfc-editor.org/rfc/rfc8949.html)”, [STD 94](https://www.rfc-editor.org/info/std94), RFC 8949, [DOI 10.17487/RFC8949](https://dx.doi.org/10.17487/RFC8949), December 2020, <[https://www.rfc-editor.org/info/rfc8949](https://www.rfc-editor.org/info/rfc8949)>.\n\n[SECCTXT]\n\nWest, M., “[Secure Contexts](https://www.w3.org/TR/2021/CRD-secure-contexts-20210918)”, W3C Candidate Recommendation, September 2021, <[https://www.w3.org/TR/2021/CRD-secure-contexts-20210918](https://www.w3.org/TR/2021/CRD-secure-contexts-20210918)>.\n\n[URI-TEMPLATE]\n\nGregorio, J., Fielding, R., Hadley, M., Nottingham, M., and D. Orchard, “[URI Template](https://www.rfc-editor.org/rfc/rfc6570.html)”, RFC 6570, [DOI 10.17487/RFC6570](https://dx.doi.org/10.17487/RFC6570), March 2012, <[https://www.rfc-editor.org/info/rfc6570](https://www.rfc-editor.org/info/rfc6570)>.\n\n[XML]\n\nBray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and F. Yergeau, “[Extensible Markup Language (XML) 1.0 (Fifth Edition)](https://www.w3.org/TR/2008/REC-xml-20081126)”, W3C Recommendation REC-xml-20081126, November 2008, <[https://www.w3.org/TR/2008/REC-xml-20081126](https://www.w3.org/TR/2008/REC-xml-20081126)>.\n\n---\n\n## Appendix A. Changes from RFC 3205\n\n[RFC3205] captured the Best Current Practice in the early 2000s based on the concerns facing protocol designers at the time. Use of HTTP has changed considerably since then; as a result, this document is substantially different. Consequently, the changes are too numerous to list individually.\n\n---\n\n## Author's Address\n\n**Mark Nottingham**\nPrahran\nAustralia\nEMail: [mnot@mnot.net](mailto:mnot@mnot.net)\nURI: [https://www.mnot.net/](https://www.mnot.net/)", "znaku_textu": 70040, "slov": 9635, "odkazu": 298, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:54", "sha256": "dbc10f6456f3c49bcb064ae03a41659c11effa60c4c2fa99b3c52f88d4b47c0b", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/info/bcp56", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9205", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc9111.html", "https://www.rfc-editor.org/rfc/rfc6454.html", "https://www.rfc-editor.org/rfc/rfc9113.html", "https://www.rfc-editor.org/rfc/rfc8820", "https://www.rfc-editor.org/info/bcp190", "https://dx.doi.org/10.17487/RFC8820", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/info/std98", "https://dx.doi.org/10.17487/RFC9111", "https://www.rfc-editor.org/info/rfc9111", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://dx.doi.org/10.17487/RFC6454", "https://www.rfc-editor.org/info/rfc6454", "https://www.rfc-editor.org/rfc/rfc6648.html", "https://www.rfc-editor.org/info/bcp178", "https://dx.doi.org/10.17487/RFC6648", "https://www.rfc-editor.org/info/rfc6648", "https://www.rfc-editor.org/rfc/rfc6838.html", "https://www.rfc-editor.org/info/bcp13", "https://dx.doi.org/10.17487/RFC6838", "https://www.rfc-editor.org/info/rfc6838", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/rfc/rfc8941.html", "https://dx.doi.org/10.17487/RFC8941", "https://www.rfc-editor.org/info/rfc8941", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "https://www.rfc-editor.org/info/rfc3986", "https://www.rfc-editor.org/rfc/rfc8288.html", "https://dx.doi.org/10.17487/RFC8288", "https://www.rfc-editor.org/info/rfc8288", "https://www.rfc-editor.org/rfc/rfc8615.html", "https://dx.doi.org/10.17487/RFC8615", "https://www.rfc-editor.org/info/rfc8615", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://dx.doi.org/10.17487/RFC6265", "https://www.rfc-editor.org/info/rfc6265", "https://www.w3.org/TR/2021/WD-CSP3-20210629", "https://fetch.spec.whatwg.org/", "https://html.spec.whatwg.org/", "https://www.rfc-editor.org/rfc/rfc9218.html", "https://dx.doi.org/10.17487/RFC9218", "https://www.rfc-editor.org/info/rfc9218", "https://www.rfc-editor.org/rfc/rfc9112.html", "https://www.rfc-editor.org/info/std99", "https://dx.doi.org/10.17487/RFC9112", "https://www.rfc-editor.org/info/rfc9112", "https://dx.doi.org/10.17487/RFC9113", "https://www.rfc-editor.org/info/rfc9113", "https://www.rfc-editor.org/rfc/rfc9114.html", "https://dx.doi.org/10.17487/RFC9114", "https://www.rfc-editor.org/info/rfc9114", "https://www.rfc-editor.org/rfc/rfc8259.html", "https://www.rfc-editor.org/info/std90", "https://dx.doi.org/10.17487/RFC8259", "https://www.rfc-editor.org/info/rfc8259", "https://www.rfc-editor.org/rfc/rfc7807.html", "https://dx.doi.org/10.17487/RFC7807", "https://www.rfc-editor.org/info/rfc7807", "https://www.w3.org/TR/2017/CR-referrer-policy-20170126", "https://www.rfc-editor.org/rfc/rfc3205.html", "https://dx.doi.org/10.17487/RFC3205", "https://www.rfc-editor.org/info/rfc3205", "https://www.rfc-editor.org/rfc/rfc4791.html", "https://dx.doi.org/10.17487/RFC4791", "https://www.rfc-editor.org/info/rfc4791", "https://www.rfc-editor.org/rfc/rfc4918.html", "https://dx.doi.org/10.17487/RFC4918", "https://www.rfc-editor.org/info/rfc4918", "https://www.rfc-editor.org/rfc/rfc5861.html", "https://dx.doi.org/10.17487/RFC5861", "https://www.rfc-editor.org/info/rfc5861", "https://www.rfc-editor.org/rfc/rfc6415.html", "https://dx.doi.org/10.17487/RFC6415", "https://www.rfc-editor.org/info/rfc6415", "https://www.rfc-editor.org/rfc/rfc6797.html", "https://dx.doi.org/10.17487/RFC6797", "https://www.rfc-editor.org/info/rfc6797", "https://www.rfc-editor.org/rfc/rfc7258.html", "https://www.rfc-editor.org/info/bcp188", "https://dx.doi.org/10.17487/RFC7258", "https://www.rfc-editor.org/info/rfc7258", "https://www.rfc-editor.org/rfc/rfc7301.html", "https://dx.doi.org/10.17487/RFC7301"]} {"url": "https://httpwg.org/specs/rfc9209.html", "titulek": "RFC 9209 - The Proxy-Status HTTP Response Header Field", "h1": "The Proxy-Status HTTP Response Header Field", "popis": "This document defines the Proxy-Status HTTP response field to convey the details of an intermediary's response handling, including generated errors.", "klicova_slova": "proxy, intermediary, reverse proxy", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9209", "og:description": "The Proxy-Status HTTP Response Header Field", "og:url": "https://httpwg.org/specs/rfc9209.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "3. IANA Considerations"}, {"uroven": 2, "text": "4. Security Considerations"}, {"uroven": 2, "text": "5. References"}, {"uroven": 3, "text": "5.1. Normative References"}, {"uroven": 3, "text": "5.2. Informative References"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document defines the Proxy-Status HTTP response field to convey the details of an intermediary's response handling, including generated errors.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9209](https://www.rfc-editor.org/info/rfc9209).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. The Proxy-Status HTTP Field\n - 2.1. Proxy-Status Parameters\n - 2.1.1. error\n - 2.1.2. next-hop\n - 2.1.3. next-protocol\n - 2.1.4. received-status\n - 2.1.5. details\n - 2.2. Defining New Proxy-Status Parameters\n - 2.3. Proxy Error Types\n - 2.3.1. DNS Timeout\n - 2.3.2. DNS Error\n - 2.3.3. Destination Not Found\n - 2.3.4. Destination Unavailable\n - 2.3.5. Destination IP Prohibited\n - 2.3.6. Destination IP Unroutable\n - 2.3.7. Connection Refused\n - 2.3.8. Connection Terminated\n - 2.3.9. Connection Timeout\n - 2.3.10. Connection Read Timeout\n - 2.3.11. Connection Write Timeout\n - 2.3.12. Connection Limit Reached\n - 2.3.13. TLS Protocol Error\n - 2.3.14. TLS Certificate Error\n - 2.3.15. TLS Alert Received\n - 2.3.16. HTTP Request Error\n - 2.3.17. HTTP Request Denied\n - 2.3.18. HTTP Incomplete Response\n - 2.3.19. HTTP Response Header Section Too Large\n - 2.3.20. HTTP Response Header Field Line Too Large\n - 2.3.21. HTTP Response Body Too Large\n - 2.3.22. HTTP Response Trailer Section Too Large\n - 2.3.23. HTTP Response Trailer Field Line Too Large\n - 2.3.24. HTTP Response Transfer-Coding Error\n - 2.3.25. HTTP Response Content-Coding Error\n - 2.3.26. HTTP Response Timeout\n - 2.3.27. HTTP Upgrade Failed\n - 2.3.28. HTTP Protocol Error\n - 2.3.29. Proxy Internal Response\n - 2.3.30. Proxy Internal Error\n - 2.3.31. Proxy Configuration Error\n - 2.3.32. Proxy Loop Detected\n - 2.4. Defining New Proxy Error Types\n- 3. IANA Considerations\n- 4. Security Considerations\n- 5. References\n - 5.1. Normative References\n - 5.2. Informative References\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nHTTP intermediaries (see [Section 3.7](https://www.rfc-editor.org/rfc/rfc9110.html#section-3.7) of [HTTP]) -- including both forward proxies and gateways (also known as \"reverse proxies\") -- have become an increasingly significant part of HTTP deployments. In particular, reverse proxies and content delivery networks (CDNs) form part of the critical infrastructure of many websites.\n\nTypically, HTTP intermediaries forward requests towards the origin server (inbound) and then forward their responses back to clients (outbound). However, if an error occurs before a response is obtained from an inbound server, the response is often generated by the intermediary itself.\n\nHTTP accommodates these types of errors with a few status codes -- for example, 502 (Bad Gateway) and 504 (Gateway Timeout). However, experience has shown that more information is necessary to aid debugging and communicate what's happened to the client. Additionally, intermediaries sometimes want to convey additional information about their handling of a response, even if they did not generate it.\n\nTo enable these uses, Section 2 defines a new HTTP response field to allow intermediaries to convey details of their handling of a response. Section 2.1 enumerates the information that can be added to the field by intermediaries, which can be extended per Section 2.2. Section 2.3 defines a set of error types for use when a proxy encounters an issue when obtaining a response for the request; these can likewise be extended per Section 2.4.\n\n### 1.1. Notational Conventions\n\nThe 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.\n\nThis document uses the following terminology from [Section 3](https://www.rfc-editor.org/rfc/rfc8941.html#section-3) of [STRUCTURED-FIELDS] to specify syntax and parsing: List, String, Token, Integer, and Byte Sequence.\n\nNote that in this specification, \"proxy\" is used to indicate both forward and reverse proxies, otherwise known as gateways. \"Next hop\" indicates the connection in the direction leading to the origin server for the request.\n\n---\n\n---\n\n## 3. IANA Considerations\n\nIANA has created the \"HTTP Proxy-Status Parameters\" registry and the \"HTTP Proxy Error Types\" registry at <[https://www.iana.org/assignments/http-proxy-status](https://www.iana.org/assignments/http-proxy-status)> and has populated them with the types defined in Sections 2.1 and 2.3 respectively; see Sections 2.2 and 2.4 for their associated procedures.\n\nAdditionally, the following entry has been added to the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\":\n\nField name:\n\nProxy-Status\n\nStatus:\n\npermanent\n\nSpecification document(s):\n\nRFC 9209\n\nComments:\n\n---\n\n## 4. Security Considerations\n\nOne of the primary security concerns when using Proxy-Status is leaking information that might aid an attacker. For example, information about the intermediary's configuration and backend topology can be exposed, allowing attackers to directly target backend services that are not prepared for high traffic volume or malformed inputs. Some information might only be suitable to reveal to authorized parties.\n\nAs a result, care needs to be taken when deciding to generate a Proxy-Status field and what information to include in it. Note that intermediaries are not required to generate a Proxy-Status field in any response and can conditionally generate them based upon request attributes (e.g., authentication tokens, IP address).\n\nLikewise, generation of all parameters is optional, as is the generation of the field itself. Also, the field's content is not verified; an intermediary can claim certain actions (e.g., sending a request over an encrypted channel) but fail to actually do that.\n\n## 5. References\n\n### 5.1. Normative References\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC7301]\n\nFriedl, S., Popov, A., Langley, A., and E. Stephan, “[Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension](https://www.rfc-editor.org/rfc/rfc7301.html)”, RFC 7301, [DOI 10.17487/RFC7301](https://dx.doi.org/10.17487/RFC7301), July 2014, <[https://www.rfc-editor.org/info/rfc7301](https://www.rfc-editor.org/info/rfc7301)>.\n\n[RFC8126]\n\nCotton, M., Leiba, B., and T. Narten, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc8126.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 8126, [DOI 10.17487/RFC8126](https://dx.doi.org/10.17487/RFC8126), June 2017, <[https://www.rfc-editor.org/info/rfc8126](https://www.rfc-editor.org/info/rfc8126)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[RFC8499]\n\nHoffman, P., Sullivan, A., and K. Fujiwara, “[DNS Terminology](https://www.rfc-editor.org/rfc/rfc8499.html)”, [BCP 219](https://www.rfc-editor.org/info/bcp219), RFC 8499, [DOI 10.17487/RFC8499](https://dx.doi.org/10.17487/RFC8499), January 2019, <[https://www.rfc-editor.org/info/rfc8499](https://www.rfc-editor.org/info/rfc8499)>.\n\n[RFC8914]\n\nKumari, W., Hunt, E., Arends, R., Hardaker, W., and D. Lawrence, “[Extended DNS Errors](https://www.rfc-editor.org/rfc/rfc8914.html)”, RFC 8914, [DOI 10.17487/RFC8914](https://dx.doi.org/10.17487/RFC8914), October 2020, <[https://www.rfc-editor.org/info/rfc8914](https://www.rfc-editor.org/info/rfc8914)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc8941.html)”, RFC 8941, [DOI 10.17487/RFC8941](https://dx.doi.org/10.17487/RFC8941), March 2021, <[https://www.rfc-editor.org/info/rfc8941](https://www.rfc-editor.org/info/rfc8941)>.\n\n[TLS]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n### 5.2. Informative References\n\n[RFC8586]\n\nLudin, S., Nottingham, M., and N. Sullivan, “[Loop Detection in Content Delivery Networks (CDNs)](https://www.rfc-editor.org/rfc/rfc8586.html)”, RFC 8586, [DOI 10.17487/RFC8586](https://dx.doi.org/10.17487/RFC8586), April 2019, <[https://www.rfc-editor.org/info/rfc8586](https://www.rfc-editor.org/info/rfc8586)>.\n\n---\n\n## Authors' Addresses\n\n**Mark Nottingham**\nFastly\nPrahran\nAustralia\nEMail: [mnot@mnot.net](mailto:mnot@mnot.net)\nURI: [https://www.mnot.net/](https://www.mnot.net/)\n\n**Piotr Sikora**\nGoogle\nEMail: [piotrsikora@google.com](mailto:piotrsikora@google.com)", "znaku_textu": 10620, "slov": 1292, "odkazu": 173, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:15", "sha256": "797bf4c3dbead2e2d57d8c317392da0f5e5f231126f9052639e6b87e95fd38e9", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9209", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc8941.html", "https://www.iana.org/assignments/tls-extensiontype-values", "https://www.rfc-editor.org/rfc/rfc8126.html", "https://www.iana.org/assignments/http-proxy-status", "https://www.rfc-editor.org/rfc/rfc8499.html", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc7301.html", "https://dx.doi.org/10.17487/RFC7301", "https://www.rfc-editor.org/info/rfc7301", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC8126", "https://www.rfc-editor.org/info/rfc8126", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/info/bcp219", "https://dx.doi.org/10.17487/RFC8499", "https://www.rfc-editor.org/info/rfc8499", "https://www.rfc-editor.org/rfc/rfc8914.html", "https://dx.doi.org/10.17487/RFC8914", "https://www.rfc-editor.org/info/rfc8914", "https://dx.doi.org/10.17487/RFC8941", "https://www.rfc-editor.org/info/rfc8941", "https://www.rfc-editor.org/rfc/rfc8446.html", "https://dx.doi.org/10.17487/RFC8446", "https://www.rfc-editor.org/info/rfc8446", "https://www.rfc-editor.org/rfc/rfc8586.html", "https://dx.doi.org/10.17487/RFC8586", "https://www.rfc-editor.org/info/rfc8586", "https://www.mnot.net/"]} {"url": "https://httpwg.org/specs/rfc9211.html", "titulek": "RFC 9211 - The Cache-Status HTTP Response Header Field", "h1": "The Cache-Status HTTP Response Header Field", "popis": "To aid debugging, HTTP caches often append header fields to a response, explaining how they handled the request in an ad hoc manner. This specification defines a standard mechanism to do so that is aligned with HTTP's caching model.", "klicova_slova": "http, cache, debugging, x-cache", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9211", "og:description": "The Cache-Status HTTP Response Header Field", "og:url": "https://httpwg.org/specs/rfc9211.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "2. The Cache-Status HTTP Response Header Field"}, {"uroven": 3, "text": "2.1. The hit Parameter"}, {"uroven": 3, "text": "2.2. The fwd Parameter"}, {"uroven": 3, "text": "2.3. The fwd-status Parameter"}, {"uroven": 3, "text": "2.4. The ttl Parameter"}, {"uroven": 3, "text": "2.5. The stored Parameter"}, {"uroven": 3, "text": "2.6. The collapsed Parameter"}, {"uroven": 3, "text": "2.7. The key Parameter"}, {"uroven": 3, "text": "2.8. The detail Parameter"}, {"uroven": 2, "text": "3. Examples"}, {"uroven": 2, "text": "4. Defining New Cache-Status Parameters"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 2, "text": "6. Security Considerations"}, {"uroven": 2, "text": "7. References"}, {"uroven": 3, "text": "7.1. Normative References"}, {"uroven": 3, "text": "7.2. Informative References"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nTo aid debugging, HTTP caches often append header fields to a response, explaining how they handled the request in an ad hoc manner. This specification defines a standard mechanism to do so that is aligned with HTTP's caching model.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9211](https://www.rfc-editor.org/info/rfc9211).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. The Cache-Status HTTP Response Header Field\n - 2.1. The hit Parameter\n - 2.2. The fwd Parameter\n - 2.3. The fwd-status Parameter\n - 2.4. The ttl Parameter\n - 2.5. The stored Parameter\n - 2.6. The collapsed Parameter\n - 2.7. The key Parameter\n - 2.8. The detail Parameter\n- 3. Examples\n- 4. Defining New Cache-Status Parameters\n- 5. IANA Considerations\n- 6. Security Considerations\n- 7. References\n - 7.1. Normative References\n - 7.2. Informative References\n- Author's Address\n\n---\n\n## 1. Introduction\n\nTo aid debugging (both by humans and automated tools), HTTP caches often append header fields to a response explaining how they handled the request. Unfortunately, the semantics of these header fields are often unclear, and both the semantics and syntax used vary between implementations.\n\nThis specification defines a new HTTP response header field, \"Cache-Status\", for this purpose with standardized syntax and semantics.\n\n### 1.1. Notational Conventions\n\nThe 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.\n\nThis document uses the following terminology from [Section 3](https://www.rfc-editor.org/rfc/rfc8941.html#section-3) of [STRUCTURED-FIELDS] to specify syntax and parsing: List, String, Token, Integer, and Boolean.\n\nThis document also uses terminology from [HTTP] and [HTTP-CACHING].\n\n---\n\n## 2. The Cache-Status HTTP Response Header Field\n\nThe Cache-Status HTTP response header field indicates how caches have handled that response and its corresponding request. The syntax of this header field conforms to [STRUCTURED-FIELDS].\n\nIts value is a List. Each member of the List represents a cache that has handled the request. The first member represents the cache closest to the origin server, and the last member represents the cache closest to the user (possibly including the user agent's cache itself if it appends a value).\n\nCaches determine when it is appropriate to add the Cache-Status header field to a response. Some might add it to all responses, whereas others might only do so when specifically configured to, or when the request contains a header field that activates a debugging mode. See Section 6 for related security considerations.\n\nAn intermediary *SHOULD NOT* append a Cache-Status member to responses that it generates locally, even if that intermediary contains a cache, unless the generated response is based upon a stored response (e.g., 304 (Not Modified) and 206 (Partial Content) are both based upon a stored response). For example, a proxy generating a 400 response due to a malformed request will not add a Cache-Status value, because that response was generated by the proxy, not the origin server.\n\nWhen adding a value to the Cache-Status header field, caches *SHOULD* preserve the existing field value, to allow debugging of the entire chain of caches handling the request.\n\nEach List member identifies the cache that inserted it, and this identifier *MUST* be a String or Token. Depending on the deployment, this might be a product or service name (e.g., \"ExampleCache\" or \"Example CDN\"), a hostname (\"cache-3.example.com\"), an IP address, or a generated string.\n\nEach member of the list can have parameters that describe that cache's handling of the request. While these parameters are *OPTIONAL*, caches are encouraged to provide as much information as possible.\n\nThis specification defines the following parameters.\n\n### 2.1. The hit Parameter\n\nThe value of \"hit\" is a Boolean that, when true, indicates that the request was satisfied by the cache; that is, it was not forwarded, and the response was obtained from the cache.\n\nA response that was originally produced by the origin but was modified by the cache (for example, a 304 or 206 status code) is still considered a hit, as long as it did not go forward (e.g., for validation).\n\nA response that was in cache but not able to be used without going forward (e.g., because it was stale or partial) is not considered a hit. Note that a stale response that is used without going forward (e.g., because the origin server is not available) can be considered a hit.\n\n\"hit\" and \"fwd\" are exclusive; only one of them should appear on each list member.\n\n### 2.2. The fwd Parameter\n\n\"fwd\", when present, indicates that the request went forward towards the origin; its value is a Token that indicates why.\n\nThe following parameter values are defined to explain why the request went forward, from most specific to least:\n\nbypass:\n\nThe cache was configured to not handle this request.\n\nmethod:\n\nThe request method's semantics require the request to be forwarded.\n\nuri-miss:\n\nThe cache did not contain any responses that matched the request URI.\n\nvary-miss:\n\nThe cache contained a response that matched the request URI, but it could not select a response based upon this request's header fields and stored Vary header fields.\n\nmiss:\n\nThe cache did not contain any responses that could be used to satisfy this request (to be used when an implementation cannot distinguish between uri-miss and vary-miss).\n\nrequest:\n\nThe cache was able to select a fresh response for the request, but the request's semantics (e.g., Cache-Control request directives) did not allow its use.\n\nstale:\n\nThe cache was able to select a response for the request, but it was stale.\n\npartial:\n\nThe cache was able to select a partial response for the request, but it did not contain all of the requested ranges (or the request was for the complete response).\n\nThe most specific reason known to the cache *SHOULD* be used, to the extent that it is possible to implement. See also [HTTP-CACHING], [Section 4](https://www.rfc-editor.org/rfc/rfc9111.html#section-4).\n\n### 2.3. The fwd-status Parameter\n\nThe value of \"fwd-status\" is an Integer that indicates which status code (see [HTTP], [Section 15](https://www.rfc-editor.org/rfc/rfc9110.html#section-15)) the next-hop server returned in response to the forwarded request. The fwd-status parameter is only meaningful when fwd is present. If fwd-status is not present but the fwd parameter is, it defaults to the status code sent in the response.\n\nThis parameter is useful to distinguish cases when the next-hop server sends a 304 (Not Modified) response to a conditional request or a 206 (Partial Content) response because of a range request.\n\n### 2.4. The ttl Parameter\n\nThe value of \"ttl\" is an Integer that indicates the response's remaining freshness lifetime (see [HTTP-CACHING], [Section 4.2.1](https://www.rfc-editor.org/rfc/rfc9111.html#section-4.2.1)) as calculated by the cache, as an integer number of seconds, measured as closely as possible to when the response header section is sent by the cache. This includes freshness assigned by the cache through, for example, heuristics (see [HTTP-CACHING], [Section 4.2.2](https://www.rfc-editor.org/rfc/rfc9111.html#section-4.2.2)), local configuration, or other factors. It may be negative, to indicate staleness.\n\n### 2.5. The stored Parameter\n\nThe value of \"stored\" is a Boolean that indicates whether the cache stored the response (see [HTTP-CACHING], [Section 3](https://www.rfc-editor.org/rfc/rfc9111.html#section-3)); a true value indicates that it did. The stored parameter is only meaningful when fwd is present.\n\n### 2.6. The collapsed Parameter\n\nThe value of \"collapsed\" is a Boolean that indicates whether this request was collapsed together with one or more other forward requests (see [HTTP-CACHING], [Section 4](https://www.rfc-editor.org/rfc/rfc9111.html#section-4)). If true, the response was successfully reused; if not, a new request had to be made. If not present, the request was not collapsed with others. The collapsed parameter is only meaningful when fwd is present.\n\n### 2.7. The key Parameter\n\nThe value of \"key\" is a String that conveys a representation of the cache key (see [HTTP-CACHING], [Section 2](https://www.rfc-editor.org/rfc/rfc9111.html#section-2)) used for the response. Note that this may be implementation specific.\n\n### 2.8. The detail Parameter\n\nThe value of \"detail\" is either a String or a Token that allows implementations to convey additional information not captured in other parameters, such as implementation-specific states or other caching-related metrics.\n\nFor example:\n\n```\nCache-Status: ExampleCache; hit; detail=MEMORY\n```\n\nThe semantics of a detail parameter are always specific to the cache that sent it; even if a details parameter from another cache shares the same value, it might not mean the same thing.\n\nThis parameter is intentionally limited. If an implementation's developer or operator needs to convey additional information in an interoperable fashion, they are encouraged to register extension parameters (see Section 4) or define another header field.\n\n---\n\n## 3. Examples\n\nThe following is an example of a minimal cache hit:\n\n```\nCache-Status: ExampleCache; hit\n```\n\nHowever, a polite cache will give some more information, e.g.:\n\n```\nCache-Status: ExampleCache; hit; ttl=376\n```\n\nA stale hit just has negative freshness, as in this example:\n\n```\nCache-Status: ExampleCache; hit; ttl=-412\n```\n\nWhereas this is an example of a complete miss:\n\n```\nCache-Status: ExampleCache; fwd=uri-miss\n```\n\nThis is an example of a miss that successfully validated on the backend server:\n\n```\nCache-Status: ExampleCache; fwd=stale; fwd-status=304\n```\n\nThis is an example of a miss that was collapsed with another request:\n\n```\nCache-Status: ExampleCache; fwd=uri-miss; collapsed\n```\n\nThis is an example of a miss that the cache attempted to collapse, but couldn't:\n\n```\nCache-Status: ExampleCache; fwd=uri-miss; collapsed=?0\n```\n\nThe following is an example of going through two separate layers of caching, where the cache closest to the origin responded to an earlier request with a stored response, and a second cache stored that response and later reused it to satisfy the current request:\n\n```\nCache-Status: OriginCache; hit; ttl=1100,\n \"CDN Company Here\"; hit; ttl=545\n```\n\nThe following is an example of going through a three-layer caching system, where the closest to the origin is a reverse proxy (where the response was served from cache); the next is a forward proxy interposed by the network (where the request was forwarded because there wasn't any response cached with its URI, the request was collapsed with others, and the resulting response was stored); and the closest to the user is a browser cache (where there wasn't any response cached with the request's URI):\n\n```\nCache-Status: ReverseProxyCache; hit\nCache-Status: ForwardProxyCache; fwd=uri-miss; collapsed; stored\nCache-Status: BrowserCache; fwd=uri-miss\n```\n\n---\n\n## 4. Defining New Cache-Status Parameters\n\nNew Cache-Status parameters can be defined by registering them in the \"HTTP Cache-Status\" registry.\n\nRegistration requests are reviewed and approved by a designated expert, per [RFC8126], [Section 4.5](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.5). A specification document is appreciated but not required.\n\nThe expert(s) should consider the following factors when evaluating requests:\n\n- Community feedback\n- If the value is sufficiently well defined\n- Generic parameters are preferred over vendor-specific, application-specific, or deployment-specific values. If a generic value cannot be agreed upon in the community, the parameter's name should be correspondingly specific (e.g., with a prefix that identifies the vendor, application, or deployment).\n\nRegistration requests should use the following template:\n\nName:\n\n[a name for the Cache-Status parameter's key; see [Section 3.1.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.1.2) of [STRUCTURED-FIELDS] for syntactic requirements]\n\nType:\n\n[the Structured Type of the parameter's value; see [Section 3.1.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.1.2) of [STRUCTURED-FIELDS]]\n\nDescription:\n\n[a description of the parameter's semantics]\n\nReference:\n\n[to a specification defining this parameter, if available]\n\nSee the registry at <[https://www.iana.org/assignments/http-cache-status](https://www.iana.org/assignments/http-cache-status)> for details on where to send registration requests.\n\n---\n\n## 5. IANA Considerations\n\nIANA has created the \"HTTP Cache-Status\" registry at <[https://www.iana.org/assignments/http-cache-status](https://www.iana.org/assignments/http-cache-status)> and populated it with the types defined in Section 2; see Section 4 for its associated procedures.\n\nIANA has added the following entry in the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" defined in [HTTP], [Section 18.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-18.4):\n\nField name:\n\nCache-Status\n\nStatus:\n\npermanent\n\nReference:\n\nRFC 9211\n\n---\n\n## 6. Security Considerations\n\nAttackers can use the information in Cache-Status to probe the behavior of the cache (and other components) and infer the activity of those using the cache. The Cache-Status header field may not create these risks on its own, but it can assist attackers in exploiting them.\n\nFor example, knowing if a cache has stored a response can help an attacker execute a timing attack on sensitive data.\n\nAdditionally, exposing the cache key can help an attacker understand modifications to the cache key, which may assist cache poisoning attacks. See [ENTANGLE] for details.\n\nThe underlying risks can be mitigated with a variety of techniques (e.g., using encryption and authentication and avoiding the inclusion of attacker-controlled data in the cache key), depending on their exact nature. Note that merely obfuscating the key does not mitigate this risk.\n\nTo avoid assisting such attacks, the Cache-Status header field can be omitted, only sent when the client is authorized to receive it, or sent with sensitive information (e.g., the key parameter) only when the client is authorized.\n\n## 7. References\n\n### 7.1. Normative References\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[HTTP-CACHING]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html)”, [STD 98](https://www.rfc-editor.org/info/std98), RFC 9111, [DOI 10.17487/RFC9111](https://dx.doi.org/10.17487/RFC9111), June 2022, <[https://www.rfc-editor.org/info/rfc9111](https://www.rfc-editor.org/info/rfc9111)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC8126]\n\nCotton, M., Leiba, B., and T. Narten, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc8126.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 8126, [DOI 10.17487/RFC8126](https://dx.doi.org/10.17487/RFC8126), June 2017, <[https://www.rfc-editor.org/info/rfc8126](https://www.rfc-editor.org/info/rfc8126)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc8941.html)”, RFC 8941, [DOI 10.17487/RFC8941](https://dx.doi.org/10.17487/RFC8941), February 2021, <[https://www.rfc-editor.org/info/rfc8941](https://www.rfc-editor.org/info/rfc8941)>.\n\n### 7.2. Informative References\n\n[ENTANGLE]\n\nKettle, J., “[Web Cache Entanglement: Novel Pathways to Poisoning](https://portswigger.net/research/web-cache-entanglement)”, September 2020, <[https://portswigger.net/research/web-cache-entanglement](https://portswigger.net/research/web-cache-entanglement)>.\n\n---\n\n## Author's Address\n\n**Mark Nottingham**\nFastly\nPrahran\nAustralia\nEMail: [mnot@mnot.net](mailto:mnot@mnot.net)\nURI: [https://www.mnot.net/](https://www.mnot.net/)", "znaku_textu": 17992, "slov": 2547, "odkazu": 98, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:02", "sha256": "6ebde9317e2e673b0da30b1f91936e5999d21ae09b8b88ce900f4ddf737faaec", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9211", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc8941.html", "https://www.rfc-editor.org/rfc/rfc9111.html", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc8126.html", "https://www.iana.org/assignments/http-cache-status", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/info/std98", "https://dx.doi.org/10.17487/RFC9111", "https://www.rfc-editor.org/info/rfc9111", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC8126", "https://www.rfc-editor.org/info/rfc8126", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC8941", "https://www.rfc-editor.org/info/rfc8941", "https://portswigger.net/research/web-cache-entanglement", "https://www.mnot.net/"]} {"url": "https://httpwg.org/specs/rfc9213.html", "titulek": "RFC 9213 - Targeted HTTP Cache Control", "h1": "Targeted HTTP Cache Control", "popis": "This specification defines a convention for HTTP response header fields that allow cache directives to be targeted at specific caches or classes of caches. It also defines one such header field, the CDN-Cache-Control response header field, which is targeted at content delivery network (CDN) caches.", "klicova_slova": "CDN, Content Delivery Network, Caching", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9213", "og:description": "Targeted HTTP Cache Control", "og:url": "https://httpwg.org/specs/rfc9213.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "2. Targeted Cache-Control Header Fields"}, {"uroven": 3, "text": "2.1. Syntax"}, {"uroven": 3, "text": "2.2. Cache Behavior"}, {"uroven": 3, "text": "2.3. Interaction with HTTP Freshness"}, {"uroven": 3, "text": "2.4. Defining Targeted Fields"}, {"uroven": 2, "text": "3. The CDN-Cache-Control Targeted Field"}, {"uroven": 3, "text": "3.1. Examples"}, {"uroven": 2, "text": "4. IANA Considerations"}, {"uroven": 2, "text": "5. Security Considerations"}, {"uroven": 2, "text": "6. References"}, {"uroven": 3, "text": "6.1. Normative References"}, {"uroven": 3, "text": "6.2. Informative References"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis specification defines a convention for HTTP response header fields that allow cache directives to be targeted at specific caches or classes of caches. It also defines one such header field, the CDN-Cache-Control response header field, which is targeted at content delivery network (CDN) caches.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9213](https://www.rfc-editor.org/info/rfc9213).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. Targeted Cache-Control Header Fields\n - 2.1. Syntax\n - 2.2. Cache Behavior\n - 2.3. Interaction with HTTP Freshness\n - 2.4. Defining Targeted Fields\n- 3. The CDN-Cache-Control Targeted Field\n - 3.1. Examples\n- 4. IANA Considerations\n- 5. Security Considerations\n- 6. References\n - 6.1. Normative References\n - 6.2. Informative References\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nModern deployments of HTTP often use multiple layers of caching. For example, a website might use a cache on the origin server itself; it might deploy a caching layer in the same network as the origin server, it might use one or more CDNs that are distributed throughout the Internet, and it might benefit from browser caching as well.\n\nBecause it is often desirable to control these different classes of caches separately, some means of targeting cache directives at them is necessary. For example, if a publisher has a mechanism to invalidate the contents of a cache that it has a relationship with (such as a CDN cache), they might be more comfortable assigning a more generous caching policy to it while still wanting to restrict the behavior of other caches.\n\nThe HTTP Cache-Control response header field (defined in [Section 5.2](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2) of [HTTP-CACHING]) is widely used to direct caching behavior. However, it is relatively undifferentiated; while some cache directives (e.g., s-maxage) are targeted at a specific class of caches (for s-maxage, shared caches), targeting is not consistently available across all existing cache directives (e.g., stale-while-revalidate). This is problematic especially as the number of caching extensions grows along with the number of potential targets.\n\nSome implementations have defined ad hoc control mechanisms to overcome this issue, but their interoperability is low. Section 2 defines a standard framework for targeted cache control using HTTP response headers, and Section 3 defines one such header: the CDN-Cache-Control response header field.\n\n### 1.1. Notational Conventions\n\nThe 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.\n\n---\n\n## 2. Targeted Cache-Control Header Fields\n\nA Targeted Cache-Control Header Field (hereafter \"targeted field\") is an HTTP response header field that has the same semantics as the Cache-Control response header field ([HTTP-CACHING], [Section 5.2](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2)). However, it has a distinct field name that indicates the target for its cache directives.\n\nFor example:\n\n```\nCDN-Cache-Control: max-age=60\n```\n\nis a targeted field that applies to CDNs, as defined in Section 3.\n\n### 2.1. Syntax\n\nTargeted fields are Dictionary Structured Fields ([Section 3.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.2) of [STRUCTURED-FIELDS]). Each member of the Dictionary is an HTTP cache response directive ([Section 5.2.2](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2) of [HTTP-CACHING]) including extension response directives (as per [Section 5.2.3](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.3) of [HTTP-CACHING]). Note that while targeted fields often have the same syntax as Cache-Control fields, differences in error handling mean that using a Cache-Control parser rather than a Structured Fields parser can introduce interoperability issues.\n\nBecause cache directives are not defined in terms of structured data types, it is necessary to map their values into the appropriate types. [Section 5.2](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2) of [HTTP-CACHING] defines cache directive values to be either absent, a quoted-string, or a token.\n\nThis means that cache directives that have no value will be mapped to a Boolean ([Section 3.3.6](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.6) of [STRUCTURED-FIELDS]). When the value is a quoted-string, it will be mapped to a String ([Section 3.3.3](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.3) of [STRUCTURED-FIELDS]), and when it is a token, it will map to a Token ([Section 3.3.4](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.4) of [STRUCTURED-FIELDS]), an Integer ([Section 3.3.1](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.1) of [STRUCTURED-FIELDS]), or a Decimal ([Section 3.3.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.2) of [STRUCTURED-FIELDS]), depending on the content of the value.\n\nFor example, the max-age directive ([Section 5.2.2.1](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.1) of [HTTP-CACHING]) has an integer value; no-store ([Section 5.2.2.5](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.5) of [HTTP-CACHING]) always has a Boolean true value, and no-cache ([Section 5.2.2.4](https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.4) of [HTTP-CACHING]) has a value that can be either Boolean true or a string containing a comma-delimited list of field names.\n\nImplementations *MUST NOT* generate values that violate these inferred constraints on the cache directive's value. In particular, string values whose first character is not alphabetic or \"*\" *MUST* be generated as Strings so that they are not mistaken for other types.\n\nImplementations *SHOULD NOT* consume values that violate these inferred constraints. For example, a consuming implementation that coerces a max-age with a decimal value into an integer would behave differently than other implementations, potentially causing interoperability issues.\n\nParameters received on cache directives are to be ignored, unless other handling is explicitly specified.\n\nIf a targeted field in a given response is empty, or a parsing error is encountered, that field *MUST* be ignored by the cache (i.e., it behaves as if the field were not present, likely falling back to other cache-control mechanisms present).\n\n### 2.2. Cache Behavior\n\nA cache that implements this specification maintains a target list. A target list is an ordered list of the targeted field names that it uses for caching policy, with the order reflecting priority from most applicable to least. The target list might be fixed, user configurable, or generated per request, depending upon the implementation.\n\nFor example, a CDN cache might support both CDN-Cache-Control and a header specific to that CDN, ExampleCDN-Cache-Control, with the latter overriding the former. Its target list would be:\n\n```\n [ExampleCDN-Cache-Control, CDN-Cache-Control]\n \n```\n\nWhen a cache that implements this specification receives a response with one or more of the header field names on its target list, the cache *MUST* select the first (in target-list order) field with a valid, non-empty value and use its value to determine the caching policy for the response, and it *MUST* ignore the Cache-Control and Expires header fields in that response, unless no valid, non-empty value is available from the listed header fields.\n\nNote that this occurs on a response-by-response basis; if no member of the cache's target list is present, valid, and non-empty, a cache falls back to other cache control mechanisms as required by HTTP [HTTP-CACHING].\n\nTargeted fields that are not on a cache's target list *MUST NOT* change that cache's behavior and *MUST* be passed through.\n\nCaches that use a targeted field *MUST* implement the semantics of the following cache directives:\n\n- max-age\n- must-revalidate\n- no-store\n- no-cache\n- private\n\nFurthermore, they *SHOULD* implement other cache directives (including extension cache directives) that they support in the Cache-Control response header field.\n\nThe semantics and precedence of cache directives in a targeted field are the same as those in Cache-Control. In particular, no-store and no-cache make max-age inoperative, and unrecognized extension directives are ignored.\n\n### 2.3. Interaction with HTTP Freshness\n\nHTTP caching has a single, end-to-end freshness model defined in [Section 4.2](https://www.rfc-editor.org/rfc/rfc9111.html#section-4.2) of [HTTP-CACHING]. When additional freshness mechanisms are only available to some caches along a request path (for example, using targeted fields), their interactions need to be carefully considered. In particular, a targeted cache might have longer freshness lifetimes available to it than other caches, causing it to serve responses that appear to be prematurely (or even immediately) stale to those other caches, negatively impacting cache efficiency.\n\nFor example, a response stored by a CDN cache might be served with the following headers:\n\n```\nAge: 1800\nCache-Control: max-age=600\nCDN-Cache-Control: max-age=3600\n```\n\nFrom the CDN's perspective, this response is still fresh after being cached for 30 minutes, while from the standpoint of other caches, this response is already stale. See [AGE-PENALTY] for more discussion.\n\nWhen the targeted cache has a strong coherence mechanism (e.g., the origin server has the ability to proactively invalidate cached responses), it is often desirable to mitigate these effects. Some techniques seen in deployments include:\n\n- Removing the Age header field\n- Updating the Date header field value to the current time\n- Updating the Expires header field value to the current time, plus any Cache-Control: max-age value\n\nThis specification does not place any specific requirements on implementations to mitigate these effects, but definitions of targeted fields can do so.\n\n### 2.4. Defining Targeted Fields\n\nA targeted field for a particular class of cache can be defined by requesting registration in the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" (<[https://www.iana.org/assignments/http-fields/](https://www.iana.org/assignments/http-fields/)>).\n\nRegistration requests can use this document as the specification document; in which case, the Comments field should clearly define the class of caches that the targeted field applies to. Alternatively, if other documentation for the field has been created, it can be used as the specification document.\n\nBy convention, targeted fields have the suffix \"-Cache-Control\", e.g., \"ExampleCDN-Cache-Control\". However, this suffix *MUST NOT* be used on its own to identify targeted fields; it is only a convention.\n\n---\n\n## 3. The CDN-Cache-Control Targeted Field\n\nThe CDN-Cache-Control response header field is a targeted field (Section 2) that allows origin servers to control the behavior of CDN caches interposed between them and clients separately from other caches that might handle the response.\n\nIt applies to caches that are part of a distributed network that operate on behalf of an origin server (commonly called a CDN).\n\nCDN caches that use CDN-Cache-Control will typically forward this header so that downstream CDN caches can use it as well. However, they *MAY* remove it when this is undesirable (for example, when configured to do so because it is known not to be used downstream).\n\n### 3.1. Examples\n\nFor example, the following header fields would instruct a CDN cache (i.e., a cache with a target list of [CDN-Cache-Control]) to consider the response fresh for 600 seconds, other shared caches to consider the response fresh for 120 seconds, and any remaining caches to consider the response fresh for 60 seconds:\n\n```\nCache-Control: max-age=60, s-maxage=120\nCDN-Cache-Control: max-age=600\n```\n\nThese header fields would instruct a CDN cache to consider the response fresh for 600 seconds, while all other caches would be prevented from storing it:\n\n```\nCDN-Cache-Control: max-age=600\nCache-Control: no-store\n```\n\nBecause CDN-Cache-Control is not present, this header field would prevent all caches from storing the response:\n\n```\nCache-Control: no-store\n```\n\nWhereas these would prevent all caches except for CDN caches from storing the response:\n\n```\nCache-Control: no-store\nCDN-Cache-Control: none\n```\n\n(Note that 'none' is not a registered cache directive; it is here to avoid sending a header field with an empty value, which would be ignored.)\n\n---\n\n## 4. IANA Considerations\n\nIANA has registered the following entry in the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" defined by [HTTP]:\n\nField Name:\n\nCDN-Cache-Control\n\nStatus:\n\npermanent\n\nSpecification Document:\n\nRFC 9213\n\nComments:\n\nCache directives targeted at content delivery networks\n\n---\n\n## 5. Security Considerations\n\nThe security considerations of HTTP caching [HTTP-CACHING] apply.\n\nThe ability to carry multiple caching policies on a response can result in confusion about how a response will be cached in different systems, potentially resulting in unintentional reuse of responses with sensitive information. For this reason, care must be exercised.\n\n## 6. References\n\n### 6.1. Normative References\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[HTTP-CACHING]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html)”, [STD 98](https://www.rfc-editor.org/info/std98), RFC 9111, [DOI 10.17487/RFC9111](https://dx.doi.org/10.17487/RFC9111), June 2022, <[https://www.rfc-editor.org/info/rfc9111](https://www.rfc-editor.org/info/rfc9111)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc8941.html)”, RFC 8941, [DOI 10.17487/RFC8941](https://dx.doi.org/10.17487/RFC8941), February 2021, <[https://www.rfc-editor.org/info/rfc8941](https://www.rfc-editor.org/info/rfc8941)>.\n\n### 6.2. Informative References\n\n[AGE-PENALTY]\n\nCohen, E. and H. Kaplan, “[The age penalty and its effect on cache performance](https://dl.acm.org/doi/10.5555/1251440.1251447)”, March 2001, <[https://dl.acm.org/doi/10.5555/1251440.1251447](https://dl.acm.org/doi/10.5555/1251440.1251447)>.\n\n---\n\n## Authors' Addresses\n\n**Stephen Ludin**\nAkamai\nEMail: [sludin@ludin.org](mailto:sludin@ludin.org)\n\n**Mark Nottingham**\nFastly\nPrahran\nAustralia\nEMail: [mnot@mnot.net](mailto:mnot@mnot.net)\nURI: [https://www.mnot.net/](https://www.mnot.net/)\n\n**Yuchen Wu**\nCloudflare\nEMail: [me@yuchenwu.net](mailto:me@yuchenwu.net)", "znaku_textu": 16729, "slov": 2340, "odkazu": 90, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:03", "sha256": "ddfc2ae3c75883f3474f9fe79920b3582d3597c91dcbd6d8dd398c4f54fbbf20", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9213", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9111.html", "https://www.rfc-editor.org/rfc/rfc8941.html", "https://www.iana.org/assignments/http-fields/", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/info/std98", "https://dx.doi.org/10.17487/RFC9111", "https://www.rfc-editor.org/info/rfc9111", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC8941", "https://www.rfc-editor.org/info/rfc8941", "https://dl.acm.org/doi/10.5555/1251440.1251447", "https://www.mnot.net/"]} {"url": "https://httpwg.org/specs/rfc9218.html", "titulek": "RFC 9218 - Extensible Prioritization Scheme for HTTP", "h1": "Extensible Prioritization Scheme for HTTP", "popis": "This document describes a scheme that allows an HTTP client to communicate its preferences for how the upstream server prioritizes responses to its requests, and also allows a server to hint to a downstream intermediary how its responses should be prioritized when they are forwarded. This document defines the Priority header field for communicating the initial priority in an HTTP version-independent manner, as well as HTTP/2 and HTTP/3 frames for reprioritizing responses. These share a common format structure that is designed to provide future extensibility.", "klicova_slova": "Response priority, Stream multiplexing, Reprioritization, Server scheduling", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9218", "og:description": "Extensible Prioritization Scheme for HTTP", "og:url": "https://httpwg.org/specs/rfc9218.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "2. Motivation for Replacing RFC 7540 Stream Priorities"}, {"uroven": 3, "text": "2.1. Disabling RFC 7540 Stream Priorities"}, {"uroven": 4, "text": "2.1.1. Advice when Using Extensible Priorities as the Alternative"}, {"uroven": 2, "text": "3. Applicability of the Extensible Priority Scheme"}, {"uroven": 2, "text": "4. Priority Parameters"}, {"uroven": 3, "text": "4.1. Urgency"}, {"uroven": 3, "text": "4.2. Incremental"}, {"uroven": 3, "text": "4.3. Defining New Priority Parameters"}, {"uroven": 4, "text": "4.3.1. Registration"}, {"uroven": 2, "text": "6. Reprioritization"}, {"uroven": 2, "text": "7. The PRIORITY_UPDATE Frame"}, {"uroven": 3, "text": "7.1. HTTP/2 PRIORITY_UPDATE Frame"}, {"uroven": 3, "text": "7.2. HTTP/3 PRIORITY_UPDATE Frame"}, {"uroven": 2, "text": "8. Merging Client- and Server-Driven Priority Parameters"}, {"uroven": 2, "text": "9. Client Scheduling"}, {"uroven": 2, "text": "10. Server Scheduling"}, {"uroven": 3, "text": "10.1. Intermediaries with Multiple Backend Connections"}, {"uroven": 2, "text": "11. Scheduling and the CONNECT Method"}, {"uroven": 2, "text": "12. Retransmission Scheduling"}, {"uroven": 2, "text": "13. Fairness"}, {"uroven": 3, "text": "13.1. Coalescing Intermediaries"}, {"uroven": 3, "text": "13.2. HTTP/1.x Back Ends"}, {"uroven": 3, "text": "13.3. Intentional Introduction of Unfairness"}, {"uroven": 2, "text": "15. Security Considerations"}, {"uroven": 2, "text": "16. IANA Considerations"}, {"uroven": 2, "text": "17. References"}, {"uroven": 3, "text": "17.1. Normative References"}, {"uroven": 3, "text": "17.2. Informative References"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document describes a scheme that allows an HTTP client to communicate its preferences for how the upstream server prioritizes responses to its requests, and also allows a server to hint to a downstream intermediary how its responses should be prioritized when they are forwarded. This document defines the Priority header field for communicating the initial priority in an HTTP version-independent manner, as well as HTTP/2 and HTTP/3 frames for reprioritizing responses. These share a common format structure that is designed to provide future extensibility.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9218](https://www.rfc-editor.org/info/rfc9218).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. Motivation for Replacing RFC 7540 Stream Priorities\n - 2.1. Disabling RFC 7540 Stream Priorities\n - 2.1.1. Advice when Using Extensible Priorities as the Alternative\n- 3. Applicability of the Extensible Priority Scheme\n- 4. Priority Parameters\n - 4.1. Urgency\n - 4.2. Incremental\n - 4.3. Defining New Priority Parameters\n - 4.3.1. Registration\n- 5. The Priority HTTP Header Field\n- 6. Reprioritization\n- 7. The PRIORITY_UPDATE Frame\n - 7.1. HTTP/2 PRIORITY_UPDATE Frame\n - 7.2. HTTP/3 PRIORITY_UPDATE Frame\n- 8. Merging Client- and Server-Driven Priority Parameters\n- 9. Client Scheduling\n- 10. Server Scheduling\n - 10.1. Intermediaries with Multiple Backend Connections\n- 11. Scheduling and the CONNECT Method\n- 12. Retransmission Scheduling\n- 13. Fairness\n - 13.1. Coalescing Intermediaries\n - 13.2. HTTP/1.x Back Ends\n - 13.3. Intentional Introduction of Unfairness\n- 14. Why Use an End-to-End Header Field?\n- 15. Security Considerations\n- 16. IANA Considerations\n- 17. References\n - 17.1. Normative References\n - 17.2. Informative References\n- Acknowledgements\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nIt is common for representations of an HTTP [HTTP] resource to have relationships to one or more other resources. Clients will often discover these relationships while processing a retrieved representation, which may lead to further retrieval requests. Meanwhile, the nature of the relationships determines whether a client is blocked from continuing to process locally available resources. An example of this is the visual rendering of an HTML document, which could be blocked by the retrieval of a Cascading Style Sheets (CSS) file that the document refers to. In contrast, inline images do not block rendering and get drawn incrementally as the chunks of the images arrive.\n\nHTTP/2 [HTTP/2] and HTTP/3 [HTTP/3] support multiplexing of requests and responses in a single connection. An important feature of any implementation of a protocol that provides multiplexing is the ability to prioritize the sending of information. For example, to provide meaningful presentation of an HTML document at the earliest moment, it is important for an HTTP server to prioritize the HTTP responses, or the chunks of those HTTP responses, that it sends to a client.\n\nHTTP/2 and HTTP/3 servers can schedule transmission of concurrent response data by any means they choose. Servers can ignore client priority signals and still successfully serve HTTP responses. However, servers that operate in ignorance of how clients issue requests and consume responses can cause suboptimal client application performance. Priority signals allow clients to communicate their view of request priority. Servers have their own needs that are independent of client needs, so they often combine priority signals with other available information in order to inform scheduling of response data.\n\nRFC 7540 [RFC7540] stream priority allowed a client to send a series of priority signals that communicate to the server a \"priority tree\"; the structure of this tree represents the client's preferred relative ordering and weighted distribution of the bandwidth among HTTP responses. Servers could use these priority signals as input into prioritization decisions.\n\nThe design and implementation of RFC 7540 stream priority were observed to have shortcomings, as explained in Section 2. HTTP/2 [HTTP/2] has consequently deprecated the use of these stream priority signals. The prioritization scheme and priority signals defined herein can act as a substitute for RFC 7540 stream priority.\n\nThis document describes an extensible scheme for prioritizing HTTP responses that uses absolute values. Section 4 defines priority parameters, which are a standardized and extensible format of priority information. Section 5 defines the Priority HTTP header field, which is an end-to-end priority signal that is independent of protocol version. Clients can send this header field to signal their view of how responses should be prioritized. Similarly, servers behind an intermediary can use it to signal priority to the intermediary. After sending a request, a client can change their view of response priority (see Section 6) by sending HTTP-version-specific frames as defined in Sections 7.1 and 7.2.\n\nHeader field and frame priority signals are input to a server's response prioritization process. They are only a suggestion and do not guarantee any particular processing or transmission order for one response relative to any other response. Sections 10 and 12 provide considerations and guidance about how servers might act upon signals.\n\n### 1.1. Notational Conventions\n\nThe 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.\n\nThis document uses the following terminology from [Section 3](https://www.rfc-editor.org/rfc/rfc8941.html#section-3) of [STRUCTURED-FIELDS] to specify syntax and parsing: \"Boolean\", \"Dictionary\", and \"Integer\".\n\nExample HTTP requests and responses use the HTTP/2-style formatting from [HTTP/2].\n\nThis document uses the variable-length integer encoding from [QUIC].\n\nThe term \"control stream\" is used to describe both the HTTP/2 stream with identifier 0x0 and the HTTP/3 control stream; see [Section 6.2.1](https://www.rfc-editor.org/rfc/rfc9114.html#section-6.2.1) of [HTTP/3].\n\nThe term \"HTTP/2 priority signal\" is used to describe the priority information sent from clients to servers in HTTP/2 frames; see [Section 5.3.2](https://www.rfc-editor.org/rfc/rfc9113.html#section-5.3.2) of [HTTP/2].\n\n---\n\n## 2. Motivation for Replacing RFC 7540 Stream Priorities\n\nRFC 7540 stream priority (see [Section 5.3](https://www.rfc-editor.org/rfc/rfc7540.html#section-5.3) of [RFC7540]) is a complex system where clients signal stream dependencies and weights to describe an unbalanced tree. It suffered from limited deployment and interoperability and has been deprecated in a revision of HTTP/2 [HTTP/2]. HTTP/2 retains these protocol elements in order to maintain wire compatibility (see [Section 5.3.2](https://www.rfc-editor.org/rfc/rfc9113.html#section-5.3.2) of [HTTP/2]), which means that they might still be used even in the presence of alternative signaling, such as the scheme this document describes.\n\nMany RFC 7540 server implementations do not act on HTTP/2 priority signals.\n\nPrioritization can use information that servers have about resources or the order in which requests are generated. For example, a server, with knowledge of an HTML document structure, might want to prioritize the delivery of images that are critical to user experience above other images. With RFC 7540, it is difficult for servers to interpret signals from clients for prioritization, as the same conditions could result in very different signaling from different clients. This document describes signaling that is simpler and more constrained, requiring less interpretation and allowing less variation.\n\nRFC 7540 does not define a method that can be used by a server to provide a priority signal for intermediaries.\n\nRFC 7540 stream priority is expressed relative to other requests sharing the same connection at the same time. It is difficult to incorporate such a design into applications that generate requests without knowledge of how other requests might share a connection, or into protocols that do not have strong ordering guarantees across streams, like HTTP/3 [HTTP/3].\n\nExperiments from independent research [MARX] have shown that simpler schemes can reach at least equivalent performance characteristics compared to the more complex RFC 7540 setups seen in practice, at least for the Web use case.\n\n### 2.1. Disabling RFC 7540 Stream Priorities\n\nThe problems and insights set out above provided the motivation for an alternative to RFC 7540 stream priority (see [Section 5.3](https://www.rfc-editor.org/rfc/rfc9113.html#section-5.3) of [HTTP/2]).\n\nThe SETTINGS_NO_RFC7540_PRIORITIES HTTP/2 setting is defined by this document in order to allow endpoints to omit or ignore HTTP/2 priority signals (see [Section 5.3.2](https://www.rfc-editor.org/rfc/rfc9113.html#section-5.3.2) of [HTTP/2]), as described below. The value of SETTINGS_NO_RFC7540_PRIORITIES *MUST* be 0 or 1. Any value other than 0 or 1 *MUST* be treated as a connection error (see [Section 5.4.1](https://www.rfc-editor.org/rfc/rfc9113.html#section-5.4.1) of [HTTP/2]) of type PROTOCOL_ERROR. The initial value is 0.\n\nIf endpoints use SETTINGS_NO_RFC7540_PRIORITIES, they *MUST* send it in the first SETTINGS frame. Senders *MUST NOT* change the SETTINGS_NO_RFC7540_PRIORITIES value after the first SETTINGS frame. Receivers that detect a change *MAY* treat it as a connection error of type PROTOCOL_ERROR.\n\nClients can send SETTINGS_NO_RFC7540_PRIORITIES with a value of 1 to indicate that they are not using HTTP/2 priority signals. The SETTINGS frame precedes any HTTP/2 priority signal sent from clients, so servers can determine whether they need to allocate any resources to signal handling before signals arrive. A server that receives SETTINGS_NO_RFC7540_PRIORITIES with a value of 1 *MUST* ignore HTTP/2 priority signals.\n\nServers can send SETTINGS_NO_RFC7540_PRIORITIES with a value of 1 to indicate that they will ignore HTTP/2 priority signals sent by clients.\n\nEndpoints that send SETTINGS_NO_RFC7540_PRIORITIES are encouraged to use alternative priority signals (for example, see Section 5 or Section 7.1), but there is no requirement to use a specific signal type.\n\n#### 2.1.1. Advice when Using Extensible Priorities as the Alternative\n\nBefore receiving a SETTINGS frame from a server, a client does not know if the server is ignoring HTTP/2 priority signals. Therefore, until the client receives the SETTINGS frame from the server, the client *SHOULD* send both the HTTP/2 priority signals and the signals of this prioritization scheme (see Sections 5 and 7.1).\n\nOnce the client receives the first SETTINGS frame that contains the SETTINGS_NO_RFC7540_PRIORITIES parameter with a value of 1, it *SHOULD* stop sending the HTTP/2 priority signals. This avoids sending redundant signals that are known to be ignored.\n\nSimilarly, if the client receives SETTINGS_NO_RFC7540_PRIORITIES with a value of 0 or if the settings parameter was absent, it *SHOULD* stop sending PRIORITY_UPDATE frames (Section 7.1), since those frames are likely to be ignored. However, the client *MAY* continue sending the Priority header field (Section 5), as it is an end-to-end signal that might be useful to nodes behind the server that the client is directly connected to.\n\n---\n\n## 3. Applicability of the Extensible Priority Scheme\n\nThe priority scheme defined by this document is primarily focused on the prioritization of HTTP response messages (see [Section 3.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-3.4) of [HTTP]). It defines new priority parameters (Section 4) and a means of conveying those parameters (Sections 5 and 7), which is intended to communicate the priority of responses to a server that is responsible for prioritizing them. Section 10 provides considerations for servers about acting on those signals in combination with other inputs and factors.\n\nThe CONNECT method (see [Section 9.3.6](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.6) of [HTTP]) can be used to establish tunnels. Signaling applies similarly to tunnels; additional considerations for server prioritization are given in Section 11.\n\nSection 9 describes how clients can optionally apply elements of this scheme locally to the request messages that they generate.\n\nSome forms of HTTP extensions might change HTTP/2 or HTTP/3 stream behavior or define new data carriage mechanisms. Such extensions can themselves define how this priority scheme is to be applied.\n\n---\n\n## 4. Priority Parameters\n\nThe priority information is a sequence of key-value pairs, providing room for future extensions. Each key-value pair represents a priority parameter.\n\nThe Priority HTTP header field (Section 5) is an end-to-end way to transmit this set of priority parameters when a request or a response is issued. After sending a request, a client can change their view of response priority (Section 6) by sending HTTP-version-specific PRIORITY_UPDATE frames as defined in Sections 7.1 and 7.2. Frames transmit priority parameters on a single hop only.\n\nIntermediaries can consume and produce priority signals in a PRIORITY_UPDATE frame or Priority header field. An intermediary that passes only the Priority request header field to the next hop preserves the original end-to-end signal from the client; see Section 14. An intermediary could pass the Priority header field and additionally send a PRIORITY_UPDATE frame. This would have the effect of preserving the original client end-to-end signal, while instructing the next hop to use a different priority, per the guidance in Section 7. An intermediary that replaces or adds a Priority request header field overrides the original client end-to-end signal, which can affect prioritization for all subsequent recipients of the request.\n\nFor both the Priority header field and the PRIORITY_UPDATE frame, the set of priority parameters is encoded as a Dictionary (see [Section 3.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.2) of [STRUCTURED-FIELDS]).\n\nThis document defines the urgency (u) and incremental (i) priority parameters. When receiving an HTTP request that does not carry these priority parameters, a server *SHOULD* act as if their default values were specified.\n\nAn intermediary can combine signals from requests and responses that it forwards. Note that omission of priority parameters in responses is handled differently from omission in requests; see Section 8.\n\nReceivers parse the Dictionary as described in [Section 4.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-4.2) of [STRUCTURED-FIELDS]. Where the Dictionary is successfully parsed, this document places the additional requirement that unknown priority parameters, priority parameters with out-of-range values, or values of unexpected types *MUST* be ignored.\n\n### 4.1. Urgency\n\nThe urgency (u) parameter value is Integer (see [Section 3.3.1](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.1) of [STRUCTURED-FIELDS]), between 0 and 7 inclusive, in descending order of priority. The default is 3.\n\nEndpoints use this parameter to communicate their view of the precedence of HTTP responses. The chosen value of urgency can be based on the expectation that servers might use this information to transmit HTTP responses in the order of their urgency. The smaller the value, the higher the precedence.\n\nThe following example shows a request for a CSS file with the urgency set to 0:\n\n```\n:method = GET\n:scheme = https\n:authority = example.net\n:path = /style.css\npriority = u=0\n```\n\nA client that fetches a document that likely consists of multiple HTTP resources (e.g., HTML) *SHOULD* assign the default urgency level to the main resource. This convention allows servers to refine the urgency using knowledge specific to the website (see Section 8).\n\nThe lowest urgency level (7) is reserved for background tasks such as delivery of software updates. This urgency level *SHOULD NOT* be used for fetching responses that have any impact on user interaction.\n\n### 4.2. Incremental\n\nThe incremental (i) parameter value is Boolean (see [Section 3.3.6](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.6) of [STRUCTURED-FIELDS]). It indicates if an HTTP response can be processed incrementally, i.e., provide some meaningful output as chunks of the response arrive.\n\nThe default value of the incremental parameter is false (0).\n\nIf a client makes concurrent requests with the incremental parameter set to false, there is no benefit in serving responses with the same urgency concurrently because the client is not going to process those responses incrementally. Serving non-incremental responses with the same urgency one by one, in the order in which those requests were generated, is considered to be the best strategy.\n\nIf a client makes concurrent requests with the incremental parameter set to true, serving requests with the same urgency concurrently might be beneficial. Doing this distributes the connection bandwidth, meaning that responses take longer to complete. Incremental delivery is most useful where multiple partial responses might provide some value to clients ahead of a complete response being available.\n\nThe following example shows a request for a JPEG file with the urgency parameter set to 5 and the incremental parameter set to true.\n\n```\n:method = GET\n:scheme = https\n:authority = example.net\n:path = /image.jpg\npriority = u=5, i\n```\n\n### 4.3. Defining New Priority Parameters\n\nWhen attempting to define new priority parameters, care must be taken so that they do not adversely interfere with prioritization performed by existing endpoints or intermediaries that do not understand the newly defined priority parameters. Since unknown priority parameters are ignored, new priority parameters should not change the interpretation of, or modify, the urgency (see Section 4.1) or incremental (see Section 4.2) priority parameters in a way that is not backwards compatible or fallback safe.\n\nFor example, if there is a need to provide more granularity than eight urgency levels, it would be possible to subdivide the range using an additional priority parameter. Implementations that do not recognize the parameter can safely continue to use the less granular eight levels.\n\nAlternatively, the urgency can be augmented. For example, a graphical user agent could send a visible priority parameter to indicate if the resource being requested is within the viewport.\n\nGeneric priority parameters are preferred over vendor-specific, application-specific, or deployment-specific values. If a generic value cannot be agreed upon in the community, the parameter's name should be correspondingly specific (e.g., with a prefix that identifies the vendor, application, or deployment).\n\n#### 4.3.1. Registration\n\nNew priority parameters can be defined by registering them in the \"HTTP Priority\" registry. This registry governs the keys (short textual strings) used in the Dictionary (see [Section 3.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.2) of [STRUCTURED-FIELDS]). Since each HTTP request can have associated priority signals, there is value in having short key lengths, especially single-character strings. In order to encourage extensions while avoiding unintended conflict among attractive key values, the \"HTTP Priority\" registry operates two registration policies, depending on key length.\n\n- Registration requests for priority parameters with a key length of one use the Specification Required policy, per [Section 4.6](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.6) of [RFC8126] .\n- Registration requests for priority parameters with a key length greater than one use the Expert Review policy, per [Section 4.5](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.5) of [RFC8126] . A specification document is appreciated but not required.\n\nWhen reviewing registration requests, the designated expert(s) can consider the additional guidance provided in Section 4.3 but cannot use it as a basis for rejection.\n\nRegistration requests should use the following template:\n\nName:\n\n[a name for the priority parameter that matches the parameter key]\n\nDescription:\n\n[a description of the priority parameter semantics and value]\n\nReference:\n\n[to a specification defining this priority parameter]\n\nSee the registry at <[https://www.iana.org/assignments/http-priority](https://www.iana.org/assignments/http-priority)> for details on where to send registration requests.\n\n---\n\n---\n\n## 6. Reprioritization\n\nAfter a client sends a request, it may be beneficial to change the priority of the response. As an example, a web browser might issue a prefetch request for a JavaScript file with the urgency parameter of the Priority request header field set to u=7 (background). Then, when the user navigates to a page that references the new JavaScript file, while the prefetch is in progress, the browser would send a reprioritization signal with the Priority Field Value set to u=0. The PRIORITY_UPDATE frame (Section 7) can be used for such reprioritization.\n\n---\n\n## 7. The PRIORITY_UPDATE Frame\n\nThis document specifies a new PRIORITY_UPDATE frame for HTTP/2 [HTTP/2] and HTTP/3 [HTTP/3]. It carries priority parameters and references the target of the prioritization based on a version-specific identifier. In HTTP/2, this identifier is the stream ID; in HTTP/3, the identifier is either the stream ID or push ID. Unlike the Priority header field, the PRIORITY_UPDATE frame is a hop-by-hop signal.\n\nPRIORITY_UPDATE frames are sent by clients on the control stream, allowing them to be sent independently of the stream that carries the response. This means they can be used to reprioritize a response or a push stream, or to signal the initial priority of a response instead of the Priority header field.\n\nA PRIORITY_UPDATE frame communicates a complete set of all priority parameters in the Priority Field Value field. Omitting a priority parameter is a signal to use its default value. Failure to parse the Priority Field Value *MAY* be treated as a connection error. In HTTP/2, the error is of type PROTOCOL_ERROR; in HTTP/3, the error is of type H3_GENERAL_PROTOCOL_ERROR.\n\nA client *MAY* send a PRIORITY_UPDATE frame before the stream that it references is open (except for HTTP/2 push streams; see Section 7.1). Furthermore, HTTP/3 offers no guaranteed ordering across streams, which could cause the frame to be received earlier than intended. Either case leads to a race condition where a server receives a PRIORITY_UPDATE frame that references a request stream that is yet to be opened. To solve this condition, for the purposes of scheduling, the most recently received PRIORITY_UPDATE frame can be considered as the most up-to-date information that overrides any other signal. Servers *SHOULD* buffer the most recently received PRIORITY_UPDATE frame and apply it once the referenced stream is opened. Holding PRIORITY_UPDATE frames for each stream requires server resources, which can be bounded by local implementation policy. Although there is no limit to the number of PRIORITY_UPDATE frames that can be sent, storing only the most recently received frame limits resource commitment.\n\n### 7.1. HTTP/2 PRIORITY_UPDATE Frame\n\nThe HTTP/2 PRIORITY_UPDATE frame (type=0x10) is used by clients to signal the initial priority of a response, or to reprioritize a response or push stream. It carries the stream ID of the response and the priority in ASCII text, using the same representation as the Priority header field value.\n\nThe Stream Identifier field (see [Section 5.1.1](https://www.rfc-editor.org/rfc/rfc9113.html#section-5.1.1) of [HTTP/2]) in the PRIORITY_UPDATE frame header *MUST* be zero (0x0). Receiving a PRIORITY_UPDATE frame with a field of any other value *MUST* be treated as a connection error of type PROTOCOL_ERROR.\n\n```\nHTTP/2 PRIORITY_UPDATE Frame {\n Length (24),\n Type (8) = 0x10,\n\n Unused Flags (8),\n\n Reserved (1),\n Stream Identifier (31),\n\n Reserved (1),\n Prioritized Stream ID (31),\n Priority Field Value (..),\n}\n```\n\nFigure 1: HTTP/2 PRIORITY_UPDATE Frame Format\n\nThe Length, Type, Unused Flag(s), Reserved, and Stream Identifier fields are described in [Section 4](https://www.rfc-editor.org/rfc/rfc9113.html#section-4) of [HTTP/2]. The PRIORITY_UPDATE frame payload contains the following additional fields:\n\nPrioritized Stream ID:\n\nA 31-bit stream identifier for the stream that is the target of the priority update.\n\nPriority Field Value:\n\nThe priority update value in ASCII text, encoded using Structured Fields. This is the same representation as the Priority header field value.\n\nWhen the PRIORITY_UPDATE frame applies to a request stream, clients *SHOULD* provide a prioritized stream ID that refers to a stream in the \"open\", \"half-closed (local)\", or \"idle\" state (i.e., streams where data might still be received). Servers can discard frames where the prioritized stream ID refers to a stream in the \"half-closed (local)\" or \"closed\" state (i.e., streams where no further data will be sent). The number of streams that have been prioritized but remain in the \"idle\" state plus the number of active streams (those in the \"open\" state or in either of the \"half-closed\" states; see [Section 5.1.2](https://www.rfc-editor.org/rfc/rfc9113.html#section-5.1.2) of [HTTP/2]) *MUST NOT* exceed the value of the SETTINGS_MAX_CONCURRENT_STREAMS parameter. Servers that receive such a PRIORITY_UPDATE *MUST* respond with a connection error of type PROTOCOL_ERROR.\n\nWhen the PRIORITY_UPDATE frame applies to a push stream, clients *SHOULD* provide a prioritized stream ID that refers to a stream in the \"reserved (remote)\" or \"half-closed (local)\" state. Servers can discard frames where the prioritized stream ID refers to a stream in the \"closed\" state. Clients *MUST NOT* provide a prioritized stream ID that refers to a push stream in the \"idle\" state. Servers that receive a PRIORITY_UPDATE for a push stream in the \"idle\" state *MUST* respond with a connection error of type PROTOCOL_ERROR.\n\nIf a PRIORITY_UPDATE frame is received with a prioritized stream ID of 0x0, the recipient *MUST* respond with a connection error of type PROTOCOL_ERROR.\n\nServers *MUST NOT* send PRIORITY_UPDATE frames. If a client receives a PRIORITY_UPDATE frame, it *MUST* respond with a connection error of type PROTOCOL_ERROR.\n\n### 7.2. HTTP/3 PRIORITY_UPDATE Frame\n\nThe HTTP/3 PRIORITY_UPDATE frame (type=0xF0700 or 0xF0701) is used by clients to signal the initial priority of a response, or to reprioritize a response or push stream. It carries the identifier of the element that is being prioritized and the updated priority in ASCII text that uses the same representation as that of the Priority header field value. PRIORITY_UPDATE with a frame type of 0xF0700 is used for request streams, while PRIORITY_UPDATE with a frame type of 0xF0701 is used for push streams.\n\nThe PRIORITY_UPDATE frame *MUST* be sent on the client control stream (see [Section 6.2.1](https://www.rfc-editor.org/rfc/rfc9114.html#section-6.2.1) of [HTTP/3]). Receiving a PRIORITY_UPDATE frame on a stream other than the client control stream *MUST* be treated as a connection error of type H3_FRAME_UNEXPECTED.\n\n```\nHTTP/3 PRIORITY_UPDATE Frame {\n Type (i) = 0xF0700..0xF0701,\n Length (i),\n Prioritized Element ID (i),\n Priority Field Value (..),\n}\n```\n\nFigure 2: HTTP/3 PRIORITY_UPDATE Frame\n\nThe PRIORITY_UPDATE frame payload has the following fields:\n\nPrioritized Element ID:\n\nThe stream ID or push ID that is the target of the priority update.\n\nPriority Field Value:\n\nThe priority update value in ASCII text, encoded using Structured Fields. This is the same representation as the Priority header field value.\n\nThe request-stream variant of PRIORITY_UPDATE (type=0xF0700) *MUST* reference a request stream. If a server receives a PRIORITY_UPDATE (type=0xF0700) for a stream ID that is not a request stream, this *MUST* be treated as a connection error of type H3_ID_ERROR. The stream ID *MUST* be within the client-initiated bidirectional stream limit. If a server receives a PRIORITY_UPDATE (type=0xF0700) with a stream ID that is beyond the stream limits, this *SHOULD* be treated as a connection error of type H3_ID_ERROR. Generating an error is not mandatory because HTTP/3 implementations might have practical barriers to determining the active stream concurrency limit that is applied by the QUIC layer.\n\nThe push-stream variant of PRIORITY_UPDATE (type=0xF0701) *MUST* reference a promised push stream. If a server receives a PRIORITY_UPDATE (type=0xF0701) with a push ID that is greater than the maximum push ID or that has not yet been promised, this *MUST* be treated as a connection error of type H3_ID_ERROR.\n\nServers *MUST NOT* send PRIORITY_UPDATE frames of either type. If a client receives a PRIORITY_UPDATE frame, this *MUST* be treated as a connection error of type H3_FRAME_UNEXPECTED.\n\n---\n\n## 8. Merging Client- and Server-Driven Priority Parameters\n\nIt is not always the case that the client has the best understanding of how the HTTP responses deserve to be prioritized. The server might have additional information that can be combined with the client's indicated priority in order to improve the prioritization of the response. For example, use of an HTML document might depend heavily on one of the inline images; the existence of such dependencies is typically best known to the server. Or, a server that receives requests for a font [RFC8081] and images with the same urgency might give higher precedence to the font, so that a visual client can render textual information at an early moment.\n\nAn origin can use the Priority response header field to indicate its view on how an HTTP response should be prioritized. An intermediary that forwards an HTTP response can use the priority parameters found in the Priority response header field, in combination with the client Priority request header field, as input to its prioritization process. No guidance is provided for merging priorities; this is left as an implementation decision.\n\nThe absence of a priority parameter in an HTTP response indicates the server's disinterest in changing the client-provided value. This is different from the request header field, in which omission of a priority parameter implies the use of its default value (see Section 4).\n\nAs a non-normative example, when the client sends an HTTP request with the urgency parameter set to 5 and the incremental parameter set to true\n\n```\n:method = GET\n:scheme = https\n:authority = example.net\n:path = /menu.png\npriority = u=5, i\n```\n\nand the origin responds with\n\n```\n:status = 200\ncontent-type = image/png\npriority = u=1\n```\n\nthe intermediary might alter its understanding of the urgency from 5 to 1, because it prefers the server-provided value over the client's. The incremental value continues to be true, i.e., the value specified by the client, as the server did not specify the incremental (i) parameter.\n\n---\n\n## 9. Client Scheduling\n\nA client *MAY* use priority values to make local processing or scheduling choices about the requests it initiates.\n\n---\n\n## 10. Server Scheduling\n\nIt is generally beneficial for an HTTP server to send all responses as early as possible. However, when serving multiple requests on a single connection, there could be competition between the requests for resources such as connection bandwidth. This section describes considerations regarding how servers can schedule the order in which the competing responses will be sent when such competition exists.\n\nServer scheduling is a prioritization process based on many inputs, with priority signals being only one form of input. Factors such as implementation choices or deployment environment also play a role. Any given connection is likely to have many dynamic permutations. For these reasons, it is not possible to describe a universal scheduling algorithm. This document provides some basic, non-exhaustive recommendations for how servers might act on priority parameters. It does not describe in detail how servers might combine priority signals with other factors. Endpoints cannot depend on particular treatment based on priority signals. Expressing priority is only a suggestion.\n\nIt is *RECOMMENDED* that, when possible, servers respect the urgency parameter (Section 4.1), sending higher-urgency responses before lower-urgency responses.\n\nThe incremental parameter indicates how a client processes response bytes as they arrive. It is *RECOMMENDED* that, when possible, servers respect the incremental parameter (Section 4.2).\n\nNon-incremental responses of the same urgency *SHOULD* be served by prioritizing bandwidth allocation in ascending order of the stream ID, which corresponds to the order in which clients make requests. Doing so ensures that clients can use request ordering to influence response order.\n\nIncremental responses of the same urgency *SHOULD* be served by sharing bandwidth among them. The message content of incremental responses is used as parts, or chunks, are received. A client might benefit more from receiving a portion of all these resources rather than the entirety of a single resource. How large a portion of the resource is needed to be useful in improving performance varies. Some resource types place critical elements early; others can use information progressively. This scheme provides no explicit mandate about how a server should use size, type, or any other input to decide how to prioritize.\n\nThere can be scenarios where a server will need to schedule multiple incremental and non-incremental responses at the same urgency level. Strictly abiding by the scheduling guidance based on urgency and request generation order might lead to suboptimal results at the client, as early non-incremental responses might prevent the serving of incremental responses issued later. The following are examples of such challenges:\n\n1. At the same urgency level, a non-incremental request for a large resource followed by an incremental request for a small resource.\n2. At the same urgency level, an incremental request of indeterminate length followed by a non-incremental large resource.\n\nIt is *RECOMMENDED* that servers avoid such starvation where possible. The method for doing so is an implementation decision. For example, a server might preemptively send responses of a particular incremental type based on other information such as content size.\n\nOptimal scheduling of server push is difficult, especially when pushed resources contend with active concurrent requests. Servers can consider many factors when scheduling, such as the type or size of resource being pushed, the priority of the request that triggered the push, the count of active concurrent responses, the priority of other active concurrent responses, etc. There is no general guidance on the best way to apply these. A server that is too simple could easily push at too high a priority and block client requests, or push at too low a priority and delay the response, negating intended goals of server push.\n\nPriority signals are a factor for server push scheduling. The concept of parameter value defaults applies slightly differently because there is no explicit client-signaled initial priority. A server can apply priority signals provided in an origin response; see the merging guidance given in Section 8. In the absence of origin signals, applying default parameter values could be suboptimal. By whatever means a server decides to schedule a pushed response, it can signal the intended priority to the client by including the Priority field in a PUSH_PROMISE or HEADERS frame.\n\n### 10.1. Intermediaries with Multiple Backend Connections\n\nAn intermediary serving an HTTP connection might split requests over multiple backend connections. When it applies prioritization rules strictly, low-priority requests cannot make progress while requests with higher priorities are in flight. This blocking can propagate to backend connections, which the peer might interpret as a connection stall. Endpoints often implement protections against stalls, such as abruptly closing connections after a certain time period. To reduce the possibility of this occurring, intermediaries can avoid strictly following prioritization and instead allocate small amounts of bandwidth for all the requests that they are forwarding, so that every request can make some progress over time.\n\nSimilarly, servers *SHOULD* allocate some amount of bandwidths to streams acting as tunnels.\n\n---\n\n## 11. Scheduling and the CONNECT Method\n\nWhen a stream carries a CONNECT request, the scheduling guidance in this document applies to the frames on the stream. A client that issues multiple CONNECT requests can set the incremental parameter to true. Servers that implement the recommendations for handling of the incremental parameter (Section 10) are likely to schedule these fairly, preventing one CONNECT stream from blocking others.\n\n---\n\n## 12. Retransmission Scheduling\n\nTransport protocols such as TCP and QUIC provide reliability by detecting packet losses and retransmitting lost information. In addition to the considerations in Section 10, scheduling of retransmission data could compete with new data. The remainder of this section discusses considerations when using QUIC.\n\n[Section 13.3](https://www.rfc-editor.org/rfc/rfc9000.html#section-13.3) of [QUIC] states the following: \"Endpoints *SHOULD* prioritize retransmission of data over sending new data, unless priorities specified by the application indicate otherwise\". When an HTTP/3 application uses the priority scheme defined in this document and the QUIC transport implementation supports application-indicated stream priority, a transport that considers the relative priority of streams when scheduling both new data and retransmission data might better match the expectations of the application. However, there are no requirements on how a transport chooses to schedule based on this information because the decision depends on several factors and trade-offs. It could prioritize new data for a higher-urgency stream over retransmission data for a lower-priority stream, or it could prioritize retransmission data over new data irrespective of urgencies.\n\n[Section 6.2.4](https://www.rfc-editor.org/rfc/rfc9002.html#section-6.2.4) of [QUIC-RECOVERY] also highlights considerations regarding application priorities when sending probe packets after Probe Timeout timer expiration. A QUIC implementation supporting application-indicated priorities might use the relative priority of streams when choosing probe data.\n\n---\n\n## 13. Fairness\n\nTypically, HTTP implementations depend on the underlying transport to maintain fairness between connections competing for bandwidth. When an intermediary receives HTTP requests on client connections, it forwards them to backend connections. Depending on how the intermediary coalesces or splits requests across different backend connections, different clients might experience dissimilar performance. This dissimilarity might expand if the intermediary also uses priority signals when forwarding requests. Sections 13.1 and 13.2 discuss mitigations of this expansion of unfairness.\n\nConversely, Section 13.3 discusses how servers might intentionally allocate unequal bandwidth to some connections, depending on the priority signals.\n\n### 13.1. Coalescing Intermediaries\n\nWhen an intermediary coalesces HTTP requests coming from multiple clients into one HTTP/2 or HTTP/3 connection going to the backend server, requests that originate from one client might carry signals indicating higher priority than those coming from others.\n\nIt is sometimes beneficial for the server running behind an intermediary to obey Priority header field values. As an example, a resource-constrained server might defer the transmission of software update files that have the background urgency level (7). However, in the worst case, the asymmetry between the priority declared by multiple clients might cause all responses going to one user agent to be delayed until all responses going to another user agent have been sent.\n\nIn order to mitigate this fairness problem, a server could use knowledge about the intermediary as another input in its prioritization decisions. For instance, if a server knows the intermediary is coalescing requests, then it could avoid serving the responses in their entirety and instead distribute bandwidth (for example, in a round-robin manner). This can work if the constrained resource is network capacity between the intermediary and the user agent, as the intermediary buffers responses and forwards the chunks based on the prioritization scheme it implements.\n\nA server can determine if a request came from an intermediary through configuration or can check to see if the request contains one of the following header fields:\n\n- Forwarded [FORWARDED] , X-Forwarded-For\n- Via (see [Section 7.6.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.6.3) of [HTTP] )\n\n### 13.2. HTTP/1.x Back Ends\n\nIt is common for Content Delivery Network (CDN) infrastructure to support different HTTP versions on the front end and back end. For instance, the client-facing edge might support HTTP/2 and HTTP/3 while communication to backend servers is done using HTTP/1.1. Unlike connection coalescing, the CDN will \"demux\" requests into discrete connections to the back end. Response multiplexing in a single connection is not supported by HTTP/1.1 (or older), so there is not a fairness problem. However, backend servers *MAY* still use client headers for request scheduling. Backend servers *SHOULD* only schedule based on client priority information where that information can be scoped to individual end clients. Authentication and other session information might provide this linkability.\n\n### 13.3. Intentional Introduction of Unfairness\n\nIt is sometimes beneficial to deprioritize the transmission of one connection over others, knowing that doing so introduces a certain amount of unfairness between the connections and therefore between the requests served on those connections.\n\nFor example, a server might use a scavenging congestion controller on connections that only convey background priority responses such as software update images. Doing so improves responsiveness of other connections at the cost of delaying the delivery of updates.\n\n---\n\n---\n\n## 15. Security Considerations\n\nSection 7 describes considerations for server buffering of PRIORITY_UPDATE frames.\n\nSection 10 presents examples where servers that prioritize responses in a certain way might be starved of the ability to transmit responses.\n\nThe security considerations from [STRUCTURED-FIELDS] apply to the processing of priority parameters defined in Section 4.\n\n---\n\n## 16. IANA Considerations\n\nThis specification registers the following entry in the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" defined in [HTTP/2]:\n\nField Name:\n\nPriority\n\nStatus:\n\npermanent\n\nReference:\n\nThis document\n\nThis specification registers the following entry in the \"HTTP/2 Settings\" registry defined in [HTTP/2]:\n\nCode:\n\n0x9\n\nName:\n\nSETTINGS_NO_RFC7540_PRIORITIES\n\nInitial Value:\n\n0\n\nReference:\n\nThis document\n\nThis specification registers the following entry in the \"HTTP/2 Frame Type\" registry defined in [HTTP/2]:\n\nCode:\n\n0x10\n\nFrame Type:\n\nPRIORITY_UPDATE\n\nReference:\n\nThis document\n\nThis specification registers the following entry in the \"HTTP/3 Frame Types\" registry established by [HTTP/3]:\n\nValue:\n\n0xF0700-0xF0701\n\nFrame Type:\n\nPRIORITY_UPDATE\n\nStatus:\n\npermanent\n\nReference:\n\nThis document\n\nChange Controller:\n\nIETF\n\nContact:\n\nietf-http-wg@w3.org\n\nIANA has created the \"Hypertext Transfer Protocol (HTTP) Priority\" registry at <[https://www.iana.org/assignments/http-priority](https://www.iana.org/assignments/http-priority)> and has populated it with the entries in Table 1; see Section 4.3.1 for its associated procedures.\n\n| Name | Description | Reference |\n| --- | --- | --- |\n| u | The urgency of an HTTP response. | Section 4.1 |\n| i | Whether an HTTP response can be processed incrementally. | Section 4.2 |\n\n## 17. References\n\n### 17.1. Normative References\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[HTTP/2]\n\nThomson, M., Ed. and C. Benfield, Ed., “[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html)”, RFC 9113, [DOI 10.17487/RFC9113](https://dx.doi.org/10.17487/RFC9113), June 2022, <[https://www.rfc-editor.org/info/rfc9113](https://www.rfc-editor.org/info/rfc9113)>.\n\n[HTTP/3]\n\nBishop, M., Ed., “[HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html)”, RFC 9114, [DOI 10.17487/RFC9114](https://dx.doi.org/10.17487/RFC9114), June 2022, <[https://www.rfc-editor.org/info/rfc9114](https://www.rfc-editor.org/info/rfc9114)>.\n\n[QUIC]\n\nIyengar, J., Ed. and M. Thomson, Ed., “[QUIC: A UDP-Based Multiplexed and Secure Transport](https://www.rfc-editor.org/rfc/rfc9000.html)”, RFC 9000, [DOI 10.17487/RFC9000](https://dx.doi.org/10.17487/RFC9000), May 2021, <[https://www.rfc-editor.org/info/rfc9000](https://www.rfc-editor.org/info/rfc9000)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC8126]\n\nCotton, M., Leiba, B., and T. Narten, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc8126.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 8126, [DOI 10.17487/RFC8126](https://dx.doi.org/10.17487/RFC8126), June 2017, <[https://www.rfc-editor.org/info/rfc8126](https://www.rfc-editor.org/info/rfc8126)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc8941.html)”, RFC 8941, [DOI 10.17487/RFC8941](https://dx.doi.org/10.17487/RFC8941), February 2021, <[https://www.rfc-editor.org/info/rfc8941](https://www.rfc-editor.org/info/rfc8941)>.\n\n### 17.2. Informative References\n\n[CACHING]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html)”, [STD 98](https://www.rfc-editor.org/info/std98), RFC 9111, [DOI 10.17487/RFC9111](https://dx.doi.org/10.17487/RFC9111), June 2022, <[https://www.rfc-editor.org/info/rfc9111](https://www.rfc-editor.org/info/rfc9111)>.\n\n[FORWARDED]\n\nPetersson, A. and M. Nilsson, “[Forwarded HTTP Extension](https://www.rfc-editor.org/rfc/rfc7239.html)”, RFC 7239, [DOI 10.17487/RFC7239](https://dx.doi.org/10.17487/RFC7239), June 2014, <[https://www.rfc-editor.org/info/rfc7239](https://www.rfc-editor.org/info/rfc7239)>.\n\n[MARX]\n\nMarx, R., De Decker, T., Quax, P., and W. Lamotte, “[Of the Utmost Importance: Resource Prioritization in HTTP/3 over QUIC](https://www.doi.org/10.5220/0008191701300143)”, [DOI 10.5220/0008191701300143](https://dx.doi.org/10.5220/0008191701300143), SCITEPRESS Proceedings of the 15th International Conference on Web Information Systems and Technologies (pages 130-143), September 2019, <[https://www.doi.org/10.5220/0008191701300143](https://www.doi.org/10.5220/0008191701300143)>.\n\n[PRIORITY-SETTING]\n\nLassey, B. and L. , “[Declaring Support for HTTP/2 Priorities](https://datatracker.ietf.org/doc/html/draft-lassey-priority-setting-00)”, [Work in Progress](https://datatracker.ietf.org/doc/draft-lassey-priority-setting), draft-lassey-priority-setting-00, Work in Progress, July 2019, <[https://datatracker.ietf.org/doc/html/draft-lassey-priority-setting-00](https://datatracker.ietf.org/doc/html/draft-lassey-priority-setting-00)>.\n\n[QUIC-RECOVERY]\n\nIyengar, J., Ed. and I. Swett, Ed., “[QUIC Loss Detection and Congestion Control](https://www.rfc-editor.org/rfc/rfc9002.html)”, RFC 9002, [DOI 10.17487/RFC9002](https://dx.doi.org/10.17487/RFC9002), May 2021, <[https://www.rfc-editor.org/info/rfc9002](https://www.rfc-editor.org/info/rfc9002)>.\n\n[RFC7540]\n\nBelshe, M., Peon, R., and M. Thomson, Ed., “[Hypertext Transfer Protocol Version 2 (HTTP/2)](https://www.rfc-editor.org/rfc/rfc7540.html)”, RFC 7540, [DOI 10.17487/RFC7540](https://dx.doi.org/10.17487/RFC7540), May 2015, <[https://www.rfc-editor.org/info/rfc7540](https://www.rfc-editor.org/info/rfc7540)>.\n\n[RFC8081]\n\nLilley, C., “[The \"font\" Top-Level Media Type](https://www.rfc-editor.org/rfc/rfc8081.html)”, RFC 8081, [DOI 10.17487/RFC8081](https://dx.doi.org/10.17487/RFC8081), February 2017, <[https://www.rfc-editor.org/info/rfc8081](https://www.rfc-editor.org/info/rfc8081)>.\n\n---\n\n## Acknowledgements\n\nRoy Fielding presented the idea of using a header field for representing priorities in <[https://www.ietf.org/proceedings/83/slides/slides-83-httpbis-5.pdf](https://www.ietf.org/proceedings/83/slides/slides-83-httpbis-5.pdf)>. In <[https://github.com/pmeenan/http3-prioritization-proposal](https://github.com/pmeenan/http3-prioritization-proposal)>, Patrick Meenan advocated for representing the priorities using a tuple of urgency and concurrency. The ability to disable HTTP/2 prioritization is inspired by [PRIORITY-SETTING], authored by Brad Lassey and Lucas Pardue, with modifications based on feedback that was not incorporated into an update to that document.\n\nThe motivation for defining an alternative to HTTP/2 priorities is drawn from discussion within the broad HTTP community. Special thanks to Roberto Peon, Martin Thomson, and Netflix for text that was incorporated explicitly in this document.\n\nIn addition to the people above, this document owes a lot to the extensive discussion in the HTTP priority design team, consisting of Alan Frindell, Andrew Galloni, Craig Taylor, Ian Swett, Matthew Cox, Mike Bishop, Roberto Peon, Robin Marx, Roy Fielding, and the authors of this document.\n\nYang Chi contributed the section on retransmission scheduling.\n\n---\n\n## Authors' Addresses\n\n**Kazuho Oku**\nFastly\nEMail: [kazuhooku@gmail.com](mailto:kazuhooku@gmail.com)\n\n*Additional contact information:*\n**奥 一穂**\nFastly\nEMail: [kazuhooku@gmail.com](mailto:kazuhooku@gmail.com)\n\n**Lucas Pardue**\nCloudflare\nEMail: [lucaspardue.24.7@gmail.com](mailto:lucaspardue.24.7@gmail.com)", "znaku_textu": 51817, "slov": 7286, "odkazu": 172, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:17", "sha256": "b0f6390f0c5938f8f2567132020127ff9c5f676cf0ca954154cf44ded188f472", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9218", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc8941.html", "https://www.rfc-editor.org/rfc/rfc9114.html", "https://www.rfc-editor.org/rfc/rfc9113.html", "https://www.rfc-editor.org/rfc/rfc7540.html", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc8126.html", "https://www.iana.org/assignments/http-priority", "https://www.rfc-editor.org/rfc/rfc9000.html", "https://www.rfc-editor.org/rfc/rfc9002.html", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://dx.doi.org/10.17487/RFC9113", "https://www.rfc-editor.org/info/rfc9113", "https://dx.doi.org/10.17487/RFC9114", "https://www.rfc-editor.org/info/rfc9114", "https://dx.doi.org/10.17487/RFC9000", "https://www.rfc-editor.org/info/rfc9000", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC8126", "https://www.rfc-editor.org/info/rfc8126", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC8941", "https://www.rfc-editor.org/info/rfc8941", "https://www.rfc-editor.org/rfc/rfc9111.html", "https://www.rfc-editor.org/info/std98", "https://dx.doi.org/10.17487/RFC9111", "https://www.rfc-editor.org/info/rfc9111", "https://www.rfc-editor.org/rfc/rfc7239.html", "https://dx.doi.org/10.17487/RFC7239", "https://www.rfc-editor.org/info/rfc7239", "https://www.doi.org/10.5220/0008191701300143", "https://dx.doi.org/10.5220/0008191701300143", "https://datatracker.ietf.org/doc/html/draft-lassey-priority-setting-00", "https://datatracker.ietf.org/doc/draft-lassey-priority-setting", "https://dx.doi.org/10.17487/RFC9002", "https://www.rfc-editor.org/info/rfc9002", "https://dx.doi.org/10.17487/RFC7540", "https://www.rfc-editor.org/info/rfc7540", "https://www.rfc-editor.org/rfc/rfc8081.html", "https://dx.doi.org/10.17487/RFC8081", "https://www.rfc-editor.org/info/rfc8081", "https://www.ietf.org/proceedings/83/slides/slides-83-httpbis-5.pdf", "https://github.com/pmeenan/http3-prioritization-proposal"]} {"url": "https://httpwg.org/specs/rfc9220.html", "titulek": "RFC 9220 - Bootstrapping WebSockets with HTTP/3", "h1": "Bootstrapping WebSockets with HTTP/3", "popis": "The mechanism for running the WebSocket Protocol over a single stream of an HTTP/2 connection is equally applicable to HTTP/3, but the HTTP-version-specific details need to be specified. This document describes how the mechanism is adapted for HTTP/3.", "klicova_slova": "extended connect, 42", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9220", "og:description": "Bootstrapping WebSockets with HTTP/3", "og:url": "https://httpwg.org/specs/rfc9220.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 2, "text": "2. Conventions and Definitions"}, {"uroven": 2, "text": "3. WebSockets Upgrade over HTTP/3"}, {"uroven": 2, "text": "4. Security Considerations"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 2, "text": "6. Normative References"}, {"uroven": 2, "text": "Acknowledgments"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThe mechanism for running the WebSocket Protocol over a single stream of an HTTP/2 connection is equally applicable to HTTP/3, but the HTTP-version-specific details need to be specified. This document describes how the mechanism is adapted for HTTP/3.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9220](https://www.rfc-editor.org/info/rfc9220).\n\n## Copyright Notice\n\nCopyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n- 2. Conventions and Definitions\n- 3. WebSockets Upgrade over HTTP/3\n- 4. Security Considerations\n- 5. IANA Considerations\n- 6. Normative References\n- Acknowledgments\n- Author's Address\n\n---\n\n## 1. Introduction\n\n\"Bootstrapping WebSockets with HTTP/2\" [RFC8441] defines an extension to HTTP/2 [HTTP/2] that is also useful in HTTP/3 [HTTP/3]. This extension makes use of an HTTP/2 setting. [Appendix A.3](https://www.rfc-editor.org/rfc/rfc9114.html#appendix-A.3) of [HTTP/3] gives some guidance on what changes (if any) are appropriate when porting settings from HTTP/2 to HTTP/3.\n\n---\n\n## 2. Conventions and Definitions\n\nThe 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.\n\n---\n\n## 3. WebSockets Upgrade over HTTP/3\n\n[RFC8441] defines a mechanism for running the WebSocket Protocol [RFC6455] over a single stream of an HTTP/2 connection. It defines an Extended CONNECT method that specifies a new \":protocol\" pseudo-header field and new semantics for the \":path\" and \":authority\" pseudo-header fields. It also defines a new HTTP/2 setting sent by a server to allow the client to use Extended CONNECT.\n\nThe semantics of the pseudo-header fields and setting are identical to those in HTTP/2 as defined in [RFC8441]. [Appendix A.3](https://www.rfc-editor.org/rfc/rfc9114.html#appendix-A.3) of [HTTP/3] requires that HTTP/3 settings be registered separately for HTTP/3. The SETTINGS_ENABLE_CONNECT_PROTOCOL value is 0x08 (decimal 8), as in HTTP/2.\n\nIf a server advertises support for Extended CONNECT but receives an Extended CONNECT request with a \":protocol\" value that is unknown or is not supported, the server *SHOULD* respond to the request with a 501 (Not Implemented) status code ([Section 15.6.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.6.2) of [HTTP]). A server *MAY* provide more information via a \"problem details\" response [RFC7807].\n\nThe HTTP/3 stream closure is also analogous to the TCP connection closure of [RFC6455]. Orderly TCP-level closures are represented as a FIN bit on the stream ([Section 4.4](https://www.rfc-editor.org/rfc/rfc9114.html#section-4.4) of [HTTP/3]). RST exceptions are represented with a stream error ([Section 8](https://www.rfc-editor.org/rfc/rfc9114.html#section-8) of [HTTP/3]) of type H3_REQUEST_CANCELLED ([Section 8.1](https://www.rfc-editor.org/rfc/rfc9114.html#section-8.1) of [HTTP/3]).\n\n---\n\n## 4. Security Considerations\n\nThis document introduces no new security considerations beyond those discussed in [RFC8441].\n\n---\n\n## 5. IANA Considerations\n\nThis document registers a new setting in the \"HTTP/3 Settings\" registry ([Section 11.2.2](https://www.rfc-editor.org/rfc/rfc9114.html#section-11.2.2) of [HTTP/3]).\n\nValue:\n\n0x08\n\nSetting Name:\n\nSETTINGS_ENABLE_CONNECT_PROTOCOL\n\nDefault:\n\n0\n\nStatus:\n\npermanent\n\nSpecification:\n\nThis document\n\nChange Controller:\n\nIETF\n\nContact:\n\nHTTP Working Group (ietf-http-wg@w3.org)\n\n## 6. Normative References\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[HTTP/2]\n\nThomson, M., Ed. and C. Benfield, Ed., “[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html)”, RFC 9113, [DOI 10.17487/RFC9113](https://dx.doi.org/10.17487/RFC9113), June 2022, <[https://www.rfc-editor.org/info/rfc9113](https://www.rfc-editor.org/info/rfc9113)>.\n\n[HTTP/3]\n\nBishop, M., Ed., “[HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html)”, RFC 9114, [DOI 10.17487/RFC9114](https://dx.doi.org/10.17487/RFC9114), June 2022, <[https://www.rfc-editor.org/info/rfc9114](https://www.rfc-editor.org/info/rfc9114)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC6455]\n\nFette, I. and A. Melnikov, “[The WebSocket Protocol](https://www.rfc-editor.org/rfc/rfc6455.html)”, RFC 6455, [DOI 10.17487/RFC6455](https://dx.doi.org/10.17487/RFC6455), December 2011, <[https://www.rfc-editor.org/info/rfc6455](https://www.rfc-editor.org/info/rfc6455)>.\n\n[RFC7807]\n\nNottingham, M. and E. Wilde, “[Problem Details for HTTP APIs](https://www.rfc-editor.org/rfc/rfc7807.html)”, RFC 7807, [DOI 10.17487/RFC7807](https://dx.doi.org/10.17487/RFC7807), March 2016, <[https://www.rfc-editor.org/info/rfc7807](https://www.rfc-editor.org/info/rfc7807)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[RFC8441]\n\nMcManus, P., “[Bootstrapping WebSockets with HTTP/2](https://www.rfc-editor.org/rfc/rfc8441.html)”, RFC 8441, [DOI 10.17487/RFC8441](https://dx.doi.org/10.17487/RFC8441), September 2018, <[https://www.rfc-editor.org/info/rfc8441](https://www.rfc-editor.org/info/rfc8441)>.\n\n---\n\n## Acknowledgments\n\nThis document had reviews and input from many contributors in the IETF HTTP and QUIC Working Groups, with substantive input from David Schinazi, Martin Thomson, Lucas Pardue, Mike Bishop, Dragana Damjanovic, Mark Nottingham, and Julian Reschke.\n\n---\n\n## Author's Address\n\n**Ryan Hamilton**\nGoogle\nEMail: [rch@google.com](mailto:rch@google.com)", "znaku_textu": 7503, "slov": 886, "odkazu": 73, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:17", "sha256": "ee10dfdff3281ed104d846b9f02416d1f3988559699e3cfe1bfac82e32584e1d", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9220", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9114.html", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/rfc/rfc9113.html", "https://dx.doi.org/10.17487/RFC9113", "https://www.rfc-editor.org/info/rfc9113", "https://dx.doi.org/10.17487/RFC9114", "https://www.rfc-editor.org/info/rfc9114", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc6455.html", "https://dx.doi.org/10.17487/RFC6455", "https://www.rfc-editor.org/info/rfc6455", "https://www.rfc-editor.org/rfc/rfc7807.html", "https://dx.doi.org/10.17487/RFC7807", "https://www.rfc-editor.org/info/rfc7807", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/rfc/rfc8441.html", "https://dx.doi.org/10.17487/RFC8441", "https://www.rfc-editor.org/info/rfc8441"]} {"url": "https://httpwg.org/specs/rfc9412.html", "titulek": "RFC 9412 - The ORIGIN Extension in HTTP/3", "h1": "The ORIGIN Extension in HTTP/3", "popis": "The ORIGIN frame for HTTP/2 is equally applicable to HTTP/3, but it needs to be separately registered. This document describes the ORIGIN frame for HTTP/3.", "klicova_slova": "Internet-Draft", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9412", "og:description": "The ORIGIN Extension in HTTP/3", "og:url": "https://httpwg.org/specs/rfc9412.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "2. The ORIGIN HTTP/3 Frame"}, {"uroven": 3, "text": "2.1. Frame Layout"}, {"uroven": 2, "text": "3. Security Considerations"}, {"uroven": 2, "text": "4. IANA Considerations"}, {"uroven": 2, "text": "5. References"}, {"uroven": 3, "text": "5.1. Normative References"}, {"uroven": 3, "text": "5.2. Informative References"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThe ORIGIN frame for HTTP/2 is equally applicable to HTTP/3, but it needs to be separately registered. This document describes the ORIGIN frame for HTTP/3.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9412](https://www.rfc-editor.org/info/rfc9412).\n\n## Copyright Notice\n\nCopyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. The ORIGIN HTTP/3 Frame\n - 2.1. Frame Layout\n- 3. Security Considerations\n- 4. IANA Considerations\n- 5. References\n - 5.1. Normative References\n - 5.2. Informative References\n- Author's Address\n\n---\n\n## 1. Introduction\n\nExisting RFCs define extensions to HTTP/2 [HTTP/2] that remain useful in HTTP/3. [Appendix A.2](https://www.rfc-editor.org/rfc/rfc9114.html#appendix-A.2) of [HTTP/3] describes the required updates for HTTP/2 frames to be used with HTTP/3.\n\n[ORIGIN] defines the HTTP/2 ORIGIN frame, which indicates what origins are available on a given connection. It defines a single HTTP/2 frame type.\n\n### 1.1. Notational Conventions\n\nThe key words \"*MUST*\", \"*MUST NOT*\", \"*REQUIRED*\", \"*SHALL*\", \"*SHALL\nNOT*\", \"*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.\n\nThe frame diagram in this document uses the format defined in [Section 1.3](https://www.rfc-editor.org/rfc/rfc9000.html#section-1.3) of [QUIC-TRANSPORT] to illustrate the order and size of fields.\n\n---\n\n## 2. The ORIGIN HTTP/3 Frame\n\nThe ORIGIN HTTP/3 frame allows a server to indicate what origin or origins [RFC6454] the server would like the client to consider as one or more members of the Origin Set ([Section 2.3](https://www.rfc-editor.org/rfc/rfc8336.html#section-2.3) of [ORIGIN]) for the connection within which it occurs.\n\nThe semantics of the frame payload are identical to those of the HTTP/2 frame defined in [ORIGIN]. Where HTTP/2 reserves stream 0 for frames related to the state of the connection, HTTP/3 defines a pair of unidirectional streams called \"control streams\" for this purpose.\n\nWhere [ORIGIN] indicates that the ORIGIN frame is sent on stream 0, this should be interpreted to mean the HTTP/3 control stream: that is, the ORIGIN frame is sent from servers to clients on the server's control stream.\n\nHTTP/3 does not define a Flags field in the generic frame layout. As no flags have been defined for the ORIGIN frame, this specification does not define a mechanism for communicating such flags in HTTP/3.\n\n### 2.1. Frame Layout\n\nThe ORIGIN frame has a layout that is nearly identical to the layout used in HTTP/2; the information is restated here for clarity. The ORIGIN frame type is 0x0c (decimal 12), as in HTTP/2. The payload contains zero or more instances of the Origin-Entry field.\n\n```\nHTTP/3 Origin-Entry {\n Origin-Len (16),\n ASCII-Origin (..),\n}\n\nHTTP/3 ORIGIN Frame {\n Type (i) = 0x0c,\n Length (i),\n Origin-Entry (..) ...,\n}\n```\n\nFigure 1: ORIGIN Frame Layout\n\nAn Origin-Entry is a length-delimited string. Specifically, it contains two fields:\n\nOrigin-Len:\n\nAn unsigned, 16-bit integer indicating the length, in octets, of the ASCII-Origin field.\n\nASCII-Origin:\n\nAn *OPTIONAL* sequence of characters containing the ASCII serialization of an origin ([RFC6454], [Section 6.2](https://www.rfc-editor.org/rfc/rfc6454.html#section-6.2)) that the sender asserts this connection is or could be authoritative for.\n\n---\n\n## 3. Security Considerations\n\nThis document introduces no new security considerations beyond those discussed in [ORIGIN] and [HTTP/3].\n\n---\n\n## 4. IANA Considerations\n\nThis document registers a frame type in the \"HTTP/3 Frame Types\" registry defined by [HTTP/3], located at .\n\nValue:\n\n0x0c\n\nFrame Type:\n\nORIGIN\n\nStatus:\n\npermanent\n\nReference:\n\nSection 2\n\nDate:\n\n2023-03-14\n\nChange Controller:\n\nIETF\n\nContact:\n\nHTTP WG \n\n## 5. References\n\n### 5.1. Normative References\n\n[HTTP/2]\n\nThomson, M., Ed. and C. Benfield, Ed., “[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html)”, RFC 9113, [DOI 10.17487/RFC9113](https://dx.doi.org/10.17487/RFC9113), June 2022, <[https://www.rfc-editor.org/info/rfc9113](https://www.rfc-editor.org/info/rfc9113)>.\n\n[HTTP/3]\n\nBishop, M., Ed., “[HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html)”, RFC 9114, [DOI 10.17487/RFC9114](https://dx.doi.org/10.17487/RFC9114), June 2022, <[https://www.rfc-editor.org/info/rfc9114](https://www.rfc-editor.org/info/rfc9114)>.\n\n[ORIGIN]\n\nNottingham, M. and E. Nygren, “[The ORIGIN HTTP/2 Frame](https://www.rfc-editor.org/rfc/rfc8336.html)”, RFC 8336, [DOI 10.17487/RFC8336](https://dx.doi.org/10.17487/RFC8336), March 2018, <[https://www.rfc-editor.org/info/rfc8336](https://www.rfc-editor.org/info/rfc8336)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n### 5.2. Informative References\n\n[QUIC-TRANSPORT]\n\nIyengar, J., Ed. and M. Thomson, Ed., “[QUIC: A UDP-Based Multiplexed and Secure Transport](https://www.rfc-editor.org/rfc/rfc9000.html)”, RFC 9000, [DOI 10.17487/RFC9000](https://dx.doi.org/10.17487/RFC9000), May 2021, <[https://www.rfc-editor.org/info/rfc9000](https://www.rfc-editor.org/info/rfc9000)>.\n\n[RFC6454]\n\nBarth, A., “[The Web Origin Concept](https://www.rfc-editor.org/rfc/rfc6454.html)”, RFC 6454, [DOI 10.17487/RFC6454](https://dx.doi.org/10.17487/RFC6454), December 2011, <[https://www.rfc-editor.org/info/rfc6454](https://www.rfc-editor.org/info/rfc6454)>.\n\n---\n\n## Author's Address\n\n**Mike Bishop**\nAkamai\nEMail: [mbishop@evequefou.be](mailto:mbishop@evequefou.be)", "znaku_textu": 7340, "slov": 940, "odkazu": 71, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:19", "sha256": "8a7aadea5370f628488f929107b557e7ccc3c94ef65279e358455823f1c5ea57", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9412", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9114.html", "https://www.rfc-editor.org/rfc/rfc9000.html", "https://www.rfc-editor.org/rfc/rfc8336.html", "https://www.rfc-editor.org/rfc/rfc6454.html", "https://www.rfc-editor.org/rfc/rfc9113.html", "https://dx.doi.org/10.17487/RFC9113", "https://www.rfc-editor.org/info/rfc9113", "https://dx.doi.org/10.17487/RFC9114", "https://www.rfc-editor.org/info/rfc9114", "https://dx.doi.org/10.17487/RFC8336", "https://www.rfc-editor.org/info/rfc8336", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC9000", "https://www.rfc-editor.org/info/rfc9000", "https://dx.doi.org/10.17487/RFC6454", "https://www.rfc-editor.org/info/rfc6454"]} {"url": "https://httpwg.org/specs/rfc9421.html", "titulek": "RFC 9421 - HTTP Message Signatures", "h1": "HTTP Message Signatures", "popis": "This document describes a mechanism for creating, encoding, and verifying digital signatures or message authentication codes over components of an HTTP message. This mechanism supports use cases where the full HTTP message may not be known to the signer and where the message may be transformed (e.g., by intermediaries) before reaching the verifier. This document also describes a means for requesting that a signature be applied to a subsequent HTTP message in an ongoing HTTP exchange.", "klicova_slova": "PKI", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9421", "og:description": "HTTP Message Signatures", "og:url": "https://httpwg.org/specs/rfc9421.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Conventions and Terminology"}, {"uroven": 3, "text": "1.2. Requirements"}, {"uroven": 3, "text": "1.3. HTTP Message Transformations"}, {"uroven": 3, "text": "1.4. Application of HTTP Message Signatures"}, {"uroven": 2, "text": "2. HTTP Message Components"}, {"uroven": 3, "text": "2.1. HTTP Fields"}, {"uroven": 4, "text": "2.1.1. Strict Serialization of HTTP Structured Fields"}, {"uroven": 4, "text": "2.1.2. Dictionary Structured Field Members"}, {"uroven": 4, "text": "2.1.3. Binary-Wrapped HTTP Fields"}, {"uroven": 4, "text": "2.1.4. Trailer Fields"}, {"uroven": 3, "text": "2.2. Derived Components"}, {"uroven": 4, "text": "2.2.1. Method"}, {"uroven": 4, "text": "2.2.2. Target URI"}, {"uroven": 4, "text": "2.2.3. Authority"}, {"uroven": 4, "text": "2.2.4. Scheme"}, {"uroven": 4, "text": "2.2.5. Request Target"}, {"uroven": 4, "text": "2.2.6. Path"}, {"uroven": 4, "text": "2.2.7. Query"}, {"uroven": 4, "text": "2.2.8. Query Parameters"}, {"uroven": 4, "text": "2.2.9. Status Code"}, {"uroven": 3, "text": "2.3. Signature Parameters"}, {"uroven": 3, "text": "2.4. Signing Request Components in a Response Message"}, {"uroven": 3, "text": "2.5. Creating the Signature Base"}, {"uroven": 2, "text": "3. HTTP Message Signatures"}, {"uroven": 3, "text": "3.1. Creating a Signature"}, {"uroven": 3, "text": "3.2. Verifying a Signature"}, {"uroven": 4, "text": "3.2.1. Enforcing Application Requirements"}, {"uroven": 3, "text": "3.3. Signature Algorithms"}, {"uroven": 4, "text": "3.3.1. RSASSA-PSS Using SHA-512"}, {"uroven": 4, "text": "3.3.2. RSASSA-PKCS1-v1_5 Using SHA-256"}, {"uroven": 4, "text": "3.3.3. HMAC Using SHA-256"}, {"uroven": 4, "text": "3.3.4. ECDSA Using Curve P-256 DSS and SHA-256"}, {"uroven": 4, "text": "3.3.5. ECDSA Using Curve P-384 DSS and SHA-384"}, {"uroven": 4, "text": "3.3.6. EdDSA Using Curve edwards25519"}, {"uroven": 4, "text": "3.3.7. JSON Web Signature (JWS) Algorithms"}, {"uroven": 2, "text": "4. Including a Message Signature in a Message"}, {"uroven": 3, "text": "4.3. Multiple Signatures"}, {"uroven": 2, "text": "5. Requesting Signatures"}, {"uroven": 3, "text": "5.2. Processing an Accept-Signature"}, {"uroven": 2, "text": "6. IANA Considerations"}, {"uroven": 3, "text": "6.1. HTTP Field Name Registration"}, {"uroven": 3, "text": "6.2. HTTP Signature Algorithms Registry"}, {"uroven": 4, "text": "6.2.1. Registration Template"}, {"uroven": 4, "text": "6.2.2. Initial Contents"}, {"uroven": 3, "text": "6.3. HTTP Signature Metadata Parameters Registry"}, {"uroven": 4, "text": "6.3.1. Registration Template"}, {"uroven": 4, "text": "6.3.2. Initial Contents"}, {"uroven": 3, "text": "6.4. HTTP Signature Derived Component Names Registry"}, {"uroven": 4, "text": "6.4.1. Registration Template"}, {"uroven": 4, "text": "6.4.2. Initial Contents"}, {"uroven": 3, "text": "6.5. HTTP Signature Component Parameters Registry"}, {"uroven": 4, "text": "6.5.1. Registration Template"}, {"uroven": 4, "text": "6.5.2. Initial Contents"}, {"uroven": 2, "text": "7. Security Considerations"}, {"uroven": 3, "text": "7.1. General Considerations"}, {"uroven": 4, "text": "7.1.1. Skipping Signature Verification"}, {"uroven": 4, "text": "7.1.2. Use of TLS"}, {"uroven": 3, "text": "7.2. Message Processing and Selection"}, {"uroven": 4, "text": "7.2.1. Insufficient Coverage"}, {"uroven": 4, "text": "7.2.2. Signature Replay"}, {"uroven": 4, "text": "7.2.3. Choosing Message Components"}, {"uroven": 4, "text": "7.2.4. Choosing Signature Parameters and Derived Components over HTTP Fields"}, {"uroven": 4, "text": "7.2.5. Signature Labels"}, {"uroven": 4, "text": "7.2.6. Multiple Signature Confusion"}, {"uroven": 4, "text": "7.2.7. Collision of Application-Specific Signature Tag"}, {"uroven": 4, "text": "7.2.8. Message Content"}, {"uroven": 3, "text": "7.3. Cryptographic Considerations"}, {"uroven": 4, "text": "7.3.1. Cryptography and Signature Collision"}, {"uroven": 4, "text": "7.3.2. Key Theft"}, {"uroven": 4, "text": "7.3.3. Symmetric Cryptography"}, {"uroven": 4, "text": "7.3.4. Key Specification Mixup"}, {"uroven": 4, "text": "7.3.5. Non-deterministic Signature Primitives"}, {"uroven": 4, "text": "7.3.6. Key and Algorithm Specification Downgrades"}, {"uroven": 4, "text": "7.3.7. Signing Signature Values"}, {"uroven": 3, "text": "7.4. Matching Signature Parameters to the Target Message"}, {"uroven": 4, "text": "7.4.1. Modification of Required Message Parameters"}, {"uroven": 4, "text": "7.4.2. Matching Values of Covered Components to Values in the Target Message"}, {"uroven": 4, "text": "7.4.3. Message Component Source and Context"}, {"uroven": 4, "text": "7.4.4. Multiple Message Component Contexts"}, {"uroven": 3, "text": "7.5. HTTP Processing"}, {"uroven": 4, "text": "7.5.2. Semantically Equivalent Field Values"}, {"uroven": 4, "text": "7.5.3. Parsing Structured Field Values"}, {"uroven": 4, "text": "7.5.4. HTTP Versions and Component Ambiguity"}, {"uroven": 4, "text": "7.5.5. Canonicalization Attacks"}, {"uroven": 4, "text": "7.5.6. Non-List Field Values"}, {"uroven": 4, "text": "7.5.7. Padding Attacks with Multiple Field Values"}, {"uroven": 4, "text": "7.5.8. Ambiguous Handling of Query Elements"}, {"uroven": 2, "text": "8. Privacy Considerations"}, {"uroven": 3, "text": "8.1. Identification through Keys"}, {"uroven": 3, "text": "8.2. Signatures do not provide confidentiality"}, {"uroven": 3, "text": "8.3. Oracles"}, {"uroven": 3, "text": "8.4. Required Content"}, {"uroven": 2, "text": "9. References"}, {"uroven": 3, "text": "9.1. Normative References"}, {"uroven": 3, "text": "9.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Detecting HTTP Message Signatures"}, {"uroven": 2, "text": "Appendix B. Examples"}, {"uroven": 3, "text": "B.1. Example Keys"}, {"uroven": 4, "text": "B.1.1. Example RSA Key"}, {"uroven": 4, "text": "B.1.2. Example RSA-PSS Key"}, {"uroven": 4, "text": "B.1.3. Example ECC P-256 Test Key"}, {"uroven": 4, "text": "B.1.4. Example Ed25519 Test Key"}, {"uroven": 4, "text": "B.1.5. Example Shared Secret"}, {"uroven": 3, "text": "B.2. Test Cases"}, {"uroven": 4, "text": "B.2.1. Minimal Signature Using rsa-pss-sha512"}, {"uroven": 4, "text": "B.2.2. Selective Covered Components Using rsa-pss-sha512"}, {"uroven": 4, "text": "B.2.3. Full Coverage Using rsa-pss-sha512"}, {"uroven": 4, "text": "B.2.4. Signing a Response Using ecdsa-p256-sha256"}, {"uroven": 4, "text": "B.2.5. Signing a Request Using hmac-sha256"}, {"uroven": 4, "text": "B.2.6. Signing a Request Using ed25519"}, {"uroven": 3, "text": "B.3. TLS-Terminating Proxies"}, {"uroven": 3, "text": "B.4. HTTP Message Transformations"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document describes a mechanism for creating, encoding, and verifying digital signatures or message authentication codes over components of an HTTP message. This mechanism supports use cases where the full HTTP message may not be known to the signer and where the message may be transformed (e.g., by intermediaries) before reaching the verifier. This document also describes a means for requesting that a signature be applied to a subsequent HTTP message in an ongoing HTTP exchange.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9421](https://www.rfc-editor.org/info/rfc9421).\n\n## Copyright Notice\n\nCopyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Conventions and Terminology\n - 1.2. Requirements\n - 1.3. HTTP Message Transformations\n - 1.4. Application of HTTP Message Signatures\n- 2. HTTP Message Components\n - 2.1. HTTP Fields\n - 2.1.1. Strict Serialization of HTTP Structured Fields\n - 2.1.2. Dictionary Structured Field Members\n - 2.1.3. Binary-Wrapped HTTP Fields\n - 2.1.4. Trailer Fields\n - 2.2. Derived Components\n - 2.2.1. Method\n - 2.2.2. Target URI\n - 2.2.3. Authority\n - 2.2.4. Scheme\n - 2.2.5. Request Target\n - 2.2.6. Path\n - 2.2.7. Query\n - 2.2.8. Query Parameters\n - 2.2.9. Status Code\n - 2.3. Signature Parameters\n - 2.4. Signing Request Components in a Response Message\n - 2.5. Creating the Signature Base\n- 3. HTTP Message Signatures\n - 3.1. Creating a Signature\n - 3.2. Verifying a Signature\n - 3.2.1. Enforcing Application Requirements\n - 3.3. Signature Algorithms\n - 3.3.1. RSASSA-PSS Using SHA-512\n - 3.3.2. RSASSA-PKCS1-v1_5 Using SHA-256\n - 3.3.3. HMAC Using SHA-256\n - 3.3.4. ECDSA Using Curve P-256 DSS and SHA-256\n - 3.3.5. ECDSA Using Curve P-384 DSS and SHA-384\n - 3.3.6. EdDSA Using Curve edwards25519\n - 3.3.7. JSON Web Signature (JWS) Algorithms\n- 4. Including a Message Signature in a Message\n - 4.1. The Signature-Input HTTP Field\n - 4.2. The Signature HTTP Field\n - 4.3. Multiple Signatures\n- 5. Requesting Signatures\n - 5.1. The Accept-Signature Field\n - 5.2. Processing an Accept-Signature\n- 6. IANA Considerations\n - 6.1. HTTP Field Name Registration\n - 6.2. HTTP Signature Algorithms Registry\n - 6.2.1. Registration Template\n - 6.2.2. Initial Contents\n - 6.3. HTTP Signature Metadata Parameters Registry\n - 6.3.1. Registration Template\n - 6.3.2. Initial Contents\n - 6.4. HTTP Signature Derived Component Names Registry\n - 6.4.1. Registration Template\n - 6.4.2. Initial Contents\n - 6.5. HTTP Signature Component Parameters Registry\n - 6.5.1. Registration Template\n - 6.5.2. Initial Contents\n- 7. Security Considerations\n - 7.1. General Considerations\n - 7.1.1. Skipping Signature Verification\n - 7.1.2. Use of TLS\n - 7.2. Message Processing and Selection\n - 7.2.1. Insufficient Coverage\n - 7.2.2. Signature Replay\n - 7.2.3. Choosing Message Components\n - 7.2.4. Choosing Signature Parameters and Derived Components over HTTP Fields\n - 7.2.5. Signature Labels\n - 7.2.6. Multiple Signature Confusion\n - 7.2.7. Collision of Application-Specific Signature Tag\n - 7.2.8. Message Content\n - 7.3. Cryptographic Considerations\n - 7.3.1. Cryptography and Signature Collision\n - 7.3.2. Key Theft\n - 7.3.3. Symmetric Cryptography\n - 7.3.4. Key Specification Mixup\n - 7.3.5. Non-deterministic Signature Primitives\n - 7.3.6. Key and Algorithm Specification Downgrades\n - 7.3.7. Signing Signature Values\n - 7.4. Matching Signature Parameters to the Target Message\n - 7.4.1. Modification of Required Message Parameters\n - 7.4.2. Matching Values of Covered Components to Values in the Target Message\n - 7.4.3. Message Component Source and Context\n - 7.4.4. Multiple Message Component Contexts\n - 7.5. HTTP Processing\n - 7.5.1. Processing Invalid HTTP Field Names as Derived Component Names\n - 7.5.2. Semantically Equivalent Field Values\n - 7.5.3. Parsing Structured Field Values\n - 7.5.4. HTTP Versions and Component Ambiguity\n - 7.5.5. Canonicalization Attacks\n - 7.5.6. Non-List Field Values\n - 7.5.7. Padding Attacks with Multiple Field Values\n - 7.5.8. Ambiguous Handling of Query Elements\n- 8. Privacy Considerations\n - 8.1. Identification through Keys\n - 8.2. Signatures do not provide confidentiality\n - 8.3. Oracles\n - 8.4. Required Content\n- 9. References\n - 9.1. Normative References\n - 9.2. Informative References\n- Appendix A. Detecting HTTP Message Signatures\n- Appendix B. Examples\n - B.1. Example Keys\n - B.1.1. Example RSA Key\n - B.1.2. Example RSA-PSS Key\n - B.1.3. Example ECC P-256 Test Key\n - B.1.4. Example Ed25519 Test Key\n - B.1.5. Example Shared Secret\n - B.2. Test Cases\n - B.2.1. Minimal Signature Using rsa-pss-sha512\n - B.2.2. Selective Covered Components Using rsa-pss-sha512\n - B.2.3. Full Coverage Using rsa-pss-sha512\n - B.2.4. Signing a Response Using ecdsa-p256-sha256\n - B.2.5. Signing a Request Using hmac-sha256\n - B.2.6. Signing a Request Using ed25519\n - B.3. TLS-Terminating Proxies\n - B.4. HTTP Message Transformations\n- Acknowledgements\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nMessage integrity and authenticity are security properties that are critical to the secure operation of many HTTP applications. Application developers typically rely on the transport layer to provide these properties, by operating their application over TLS [TLS]. However, TLS only guarantees these properties over a single TLS connection, and the path between the client and application may be composed of multiple independent TLS connections (for example, if the application is hosted behind a TLS-terminating gateway or if the client is behind a TLS Inspection appliance). In such cases, TLS cannot guarantee end-to-end message integrity or authenticity between the client and application. Additionally, some operating environments present obstacles that make it impractical to use TLS (such as the presentation of client certificates from a browser) or to use features necessary to provide message authenticity. Furthermore, some applications require the binding of a higher-level application-specific key to the HTTP message, separate from any TLS certificates in use. Consequently, while TLS can meet message integrity and authenticity needs for many HTTP-based applications, it is not a universal solution.\n\nAdditionally, many applications need to be able to generate and verify signatures despite incomplete knowledge of the HTTP message as seen on the wire, due to the use of libraries, proxies, or application frameworks that alter or hide portions of the message from the application at the time of signing or verification. These applications need a means to protect the parts of the message that are most relevant to the application without having to violate layering and abstraction.\n\nFinally, object-based signature mechanisms such as JSON Web Signature [JWS] require the intact conveyance of the exact information that was signed. When applying such technologies to an HTTP message, elements of the HTTP message need to be duplicated in the object payload either directly or through the inclusion of a hash. This practice introduces complexity, since the repeated information needs to be carefully checked for consistency when the signature is verified.\n\nThis document defines a mechanism for providing end-to-end integrity and authenticity for components of an HTTP message by using a detached signature on HTTP messages. The mechanism allows applications to create digital signatures or message authentication codes (MACs) over only the components of the message that are meaningful and appropriate for the application. Strict canonicalization rules ensure that the verifier can verify the signature even if the message has been transformed in many of the ways permitted by HTTP.\n\nThe signing mechanism described in this document consists of three parts:\n\n- A common nomenclature and canonicalization rule set for the different protocol elements and other components of HTTP messages, used to create the signature base ( Section 2 ).\n- Algorithms for generating and verifying signatures over HTTP message components using this signature base through the application of cryptographic primitives ( Section 3 ).\n- A mechanism for attaching a signature and related metadata to an HTTP message and for parsing attached signatures and metadata from HTTP messages. To facilitate this, this document defines the \"Signature-Input\" and \"Signature\" fields ( Section 4 ).\n\nThis document also provides a mechanism for negotiating the use of signatures in one or more subsequent messages via the \"Accept-Signature\" field (Section 5). This optional negotiation mechanism can be used along with opportunistic or application-driven message signatures by either party.\n\nThe mechanisms defined in this document are important tools that can be used to build an overall security mechanism for an application. This toolkit provides some powerful capabilities but is not sufficient in creating an overall security story. In particular, the requirements listed in Section 1.4 and the security considerations discussed in Section 7 are of high importance to all implementors of this specification. For example, this specification does not define a means to directly cover HTTP message content (defined in [Section 6.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.4) of [HTTP]); rather, it relies on the Digest specification [DIGEST] to provide a hash of the message content, as discussed in Section 7.2.8.\n\n### 1.1. Conventions and Terminology\n\nThe 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.\n\nThe terms \"HTTP message\", \"HTTP request\", \"HTTP response\", \"target URI\", \"gateway\", \"header field\", \"intermediary\", \"request target\", \"trailer field\", \"sender\", \"method\", and \"recipient\" are used as defined in [HTTP].\n\nFor brevity, the term \"signature\" on its own is used in this document to refer to both digital signatures (which use asymmetric cryptography) and keyed MACs (which use symmetric cryptography). Similarly, the verb \"sign\" refers to the generation of either a digital signature or keyed MAC over a given signature base. The qualified term \"digital signature\" refers specifically to the output of an asymmetric cryptographic signing operation.\n\nThis document uses the following terminology from [Section 3](https://www.rfc-editor.org/rfc/rfc8941.html#section-3) of [STRUCTURED-FIELDS] to specify data types: List, Inner List, Dictionary, Item, String, Integer, Byte Sequence, and Boolean.\n\nThis document defines several string constructions using ABNF [ABNF] and uses the following ABNF rules: VCHAR, SP, DQUOTE, and LF. This document uses the following ABNF rules from [STRUCTURED-FIELDS]: sf-string, inner-list, and parameters. This document uses the following ABNF rules from [HTTP] and [HTTP/1.1]: field-content, obs-fold, and obs-text.\n\nIn addition to those listed above, this document uses the following terms:\n\nHTTP Message Signature:\n\nA digital signature or keyed MAC that covers one or more portions of an HTTP message. Note that a given HTTP message can contain multiple HTTP message signatures.\n\nSigner:\n\nThe entity that is generating or has generated an HTTP message signature. Note that multiple entities can act as signers and apply separate HTTP message signatures to a given HTTP message.\n\nVerifier:\n\nAn entity that is verifying or has verified an HTTP message signature against an HTTP message. Note that an HTTP message signature may be verified multiple times, potentially by different entities.\n\nHTTP Message Component:\n\nA portion of an HTTP message that is capable of being covered by an HTTP message signature.\n\nDerived Component:\n\nAn HTTP message component derived from the HTTP message through the use of a specified algorithm or process. See Section 2.2.\n\nHTTP Message Component Name:\n\nA String that identifies an HTTP message component's source, such as a field name or derived component name.\n\nHTTP Message Component Identifier:\n\nThe combination of an HTTP message component name and any parameters. This combination uniquely identifies a specific HTTP message component with respect to a particular HTTP message signature and the HTTP message it applies to.\n\nHTTP Message Component Value:\n\nThe value associated with a given component identifier within the context of a particular HTTP message. Component values are derived from the HTTP message and are usually subject to a canonicalization process.\n\nCovered Components:\n\nAn ordered set of HTTP message component identifiers for fields (Section 2.1) and derived components (Section 2.2) that indicates the set of message components covered by the signature, never including the @signature-params identifier itself. The order of this set is preserved and communicated between the signer and verifier to facilitate reconstruction of the signature base.\n\nSignature Base:\n\nThe sequence of bytes generated by the signer and verifier using the covered components set and the HTTP message. The signature base is processed by the cryptographic algorithm to produce or verify the HTTP message signature.\n\nHTTP Message Signature Algorithm:\n\nA cryptographic algorithm that describes the signing and verification process for the signature, defined in terms of the HTTP_SIGN and HTTP_VERIFY primitives described in Section 3.3.\n\nKey Material:\n\nThe key material required to create or verify the signature. The key material is often identified with an explicit key identifier, allowing the signer to indicate to the verifier which key was used.\n\nCreation Time:\n\nA timestamp representing the point in time that the signature was generated, as asserted by the signer.\n\nExpiration Time:\n\nA timestamp representing the point in time after which the signature should no longer be accepted by the verifier, as asserted by the signer.\n\nTarget Message:\n\nThe HTTP message to which an HTTP message signature is applied.\n\nSignature Context:\n\nThe data source from which the HTTP message component values are drawn. The context includes the target message and any additional information the signer or verifier might have, such as the full target URI of a request or the related request message for a response.\n\nThe term \"UNIX timestamp\" refers to what Section 4.16 of [POSIX.1] calls \"seconds since the Epoch\".\n\nThis document contains non-normative examples of partial and complete HTTP messages. Some examples use a single trailing backslash (\\) to indicate line wrapping for long values, as per [RFC8792]. The \\ character and leading spaces on wrapped lines are not part of the value.\n\n### 1.2. Requirements\n\nHTTP permits, and sometimes requires, intermediaries to transform messages in a variety of ways. This can result in a recipient receiving a message that is not bitwise-equivalent to the message that was originally sent. In such a case, the recipient will be unable to verify integrity protections over the raw bytes of the sender's HTTP message, as verifying digital signatures or MACs requires both signer and verifier to have the exact same signature base. Since the exact raw bytes of the message cannot be relied upon as a reliable source for a signature base, the signer and verifier have to independently create the signature base from their respective versions of the message, via a mechanism that is resilient to safe changes that do not alter the meaning of the message.\n\nFor a variety of reasons, it is impractical to strictly define what constitutes a safe change versus an unsafe one. Applications use HTTP in a wide variety of ways and may disagree on whether a particular piece of information in a message (e.g., the message content, the method, or a particular header field) is relevant. Thus, a general-purpose solution needs to provide signers with some degree of control over which message components are signed.\n\nHTTP applications may be running in environments that do not provide complete access to or control over HTTP messages (such as a web browser's JavaScript environment) or may be using libraries that abstract away the details of the protocol (such as [the Java HTTP Client (HttpClient) library](https://openjdk.java.net/groups/net/httpclient/intro.html)). These applications need to be able to generate and verify signatures despite incomplete knowledge of the HTTP message.\n\n### 1.3. HTTP Message Transformations\n\nAs mentioned earlier, HTTP explicitly permits, and in some cases requires, implementations to transform messages in a variety of ways. Implementations are required to tolerate many of these transformations. What follows is a non-normative and non-exhaustive list of transformations that could occur under HTTP, provided as context:\n\n- Reordering of fields with different field names ( [Section 5.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.3) of [HTTP] ).\n- Combination of fields with the same field name ( [Section 5.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.2) of [HTTP] ).\n- Removal of fields listed in the Connection header field ( [Section 7.6.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.6.1) of [HTTP] ).\n- Addition of fields that indicate control options ( [Section 7.6.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.6.1) of [HTTP] ).\n- Addition or removal of a transfer coding ( [Section 7.7](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.7) of [HTTP] ).\n- Addition of fields such as Via ( [Section 7.6.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.6.3) of [HTTP] ) and Forwarded ( [Section 4](https://www.rfc-editor.org/rfc/rfc7239.html#section-4) of [RFC7239] ).\n- Conversion between different versions of HTTP (e.g., HTTP/1.x to HTTP/2, or vice versa).\n- Changes in case (e.g., \"Origin\" to \"origin\") of any case-insensitive components such as field names, request URI scheme, or host.\n- Changes to the request target and authority that, when applied together, do not result in a change to the message's target URI, as defined in [Section 7.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1) of [HTTP] .\n\nAdditionally, there are some transformations that are either deprecated or otherwise not allowed but that could still occur in the wild. These transformations can still be handled without breaking the signature; they include such actions as:\n\n- Use, addition, or removal of leading or trailing whitespace in a field value.\n- Use, addition, or removal of obs-fold in field values ( [Section 5.2](https://www.rfc-editor.org/rfc/rfc9112.html#section-5.2) of [HTTP/1.1] ).\n\nWe can identify these types of transformations as transformations that should not prevent signature verification, even when performed on message components covered by the signature. Additionally, all changes to components not covered by the signature should not prevent signature verification.\n\nSome examples of these kinds of transformations, and the effect they have on the message signature, are found in Appendix B.4.\n\nOther transformations, such as parsing and reserializing the field values of a covered component or changing the value of a derived component, can cause a signature to no longer validate against a target message. Applications of this specification need to take care to ensure that the transformations expected by the application are adequately handled by the choice of covered components.\n\n### 1.4. Application of HTTP Message Signatures\n\nHTTP message signatures are designed to be a general-purpose tool applicable in a wide variety of circumstances and applications. In order to properly and safely apply HTTP message signatures, an application or profile of this specification *MUST* specify, at a minimum, all of the following items:\n\n- The set of component identifiers ( Section 2 ) and signature parameters ( Section 2.3 ) that are expected and required to be included in the covered components list. For example, an authorization protocol could mandate that the Authorization field be covered to protect the authorization credentials and mandate that the signature parameters contain a created parameter ( Section 2.3 ), while an API expecting semantically relevant HTTP message content could require the Content-Digest field defined in [DIGEST] to be present and covered as well as mandate a value for the tag parameter ( Section 2.3 ) that is specific to the API being protected.\n- The expected Structured Field types [STRUCTURED-FIELDS] of any required or expected covered component fields or parameters.\n- A means of retrieving the key material used to verify the signature. An application will usually use the keyid parameter of the signature parameters ( Section 2.3 ) and define rules for resolving a key from there, though the appropriate key could be known from other means such as preregistration of a signer's key.\n- The set of allowable signature algorithms to be used by signers and accepted by verifiers.\n- A means of determining that the signature algorithm used to verify the signature is appropriate for the key material and context of the message. For example, the process could use the alg parameter of the signature parameters ( Section 2.3 ) to state the algorithm explicitly, derive the algorithm from the key material, or use some preconfigured algorithm agreed upon by the signer and verifier.\n- A means of determining that a given key and algorithm used for a signature are appropriate for the context of the message. For example, a server expecting only ECDSA signatures should know to reject any RSA signatures, or a server expecting asymmetric cryptography should know to reject any symmetric cryptography.\n- A means of determining the context for derivation of message components from an HTTP message and its application context. While this is normally the target HTTP message itself, the context could include additional information known to the application through configuration, such as an external hostname.\n- If binding between a request and response is needed using the mechanism provided in Section 2.4 , all elements of the request message and the response message that would be required to provide properties of such a binding.\n- The error messages and codes that are returned from the verifier to the signer when the signature is invalid, the key material is inappropriate, the validity time window is out of specification, a component value cannot be calculated, or any other errors occur during the signature verification process. For example, if a signature is being used as an authentication mechanism, an HTTP status code of 401 (Unauthorized) or 403 (Forbidden) could be appropriate. If the response is from an HTTP API, a response with an HTTP status code such as 400 (Bad Request) could include more details [RFC7807] [RFC9457] , such as an indicator that the wrong key material was used.\n\nWhen choosing these parameters, an application of HTTP message signatures has to ensure that the verifier will have access to all required information needed to recreate the signature base. For example, a server behind a reverse proxy would need to know the original request URI to make use of the derived component @target-uri, even though the apparent target URI would be changed by the reverse proxy (see also Section 7.4.3). Additionally, an application using signatures in responses would need to ensure that clients receiving signed responses have access to all the signed portions of the message, including any portions of the request that were signed by the server using the req (\"request-response\") parameter (Section 2.4).\n\nDetails regarding this kind of profiling are within the purview of the application and outside the scope of this specification; however, some additional considerations are discussed in Section 7. In particular, when choosing the required set of component identifiers, care has to be taken to make sure that the coverage is sufficient for the application, as discussed in Sections 7.2.1 and 7.2.8. This specification defines only part of a full security system for an application. When building a complete security system based on this tool, it is important to perform a security analysis of the entire system, of which HTTP message signatures is a part. Historical systems, such as AWS Signature Version 4 [AWS-SIGv4], can provide inspiration and examples of how to apply similar mechanisms to an application, though review of such historical systems does not negate the need for a security analysis of an application of HTTP message signatures.\n\n---\n\n## 2. HTTP Message Components\n\nIn order to allow signers and verifiers to establish which components are covered by a signature, this document defines component identifiers for components covered by an HTTP message signature, a set of rules for deriving and canonicalizing the values associated with these component identifiers from the HTTP message, and the means for combining these canonicalized values into a signature base.\n\nThe signature context for deriving these values *MUST* be accessible to both the signer and the verifier of the message. The context *MUST* be the same across all components in a given signature. For example, it would be an error to use the raw query string for the @query derived component but combined query and form parameters for the @query-param derived component. For more considerations regarding the message component context, see Section 7.4.3.\n\nA component identifier is composed of a component name and any parameters associated with that name. Each component name is either an HTTP field name (Section 2.1) or a registered derived component name (Section 2.2). The possible parameters for a component identifier are dependent on the component identifier. The \"HTTP Signature Component Parameters\" registry, which catalogs all possible parameters, is defined in Section 6.5.\n\nWithin a single list of covered components, each component identifier *MUST* occur only once. One component identifier is distinct from another if the component name differs or if any of the parameters differ for the same component name. Multiple component identifiers having the same component name *MAY* be included if they have parameters that make them distinct, such as \"foo\";bar and \"foo\";baz. The order of parameters *MUST* be preserved when processing a component identifier (such as when parsing during verification), but the order of parameters is not significant when comparing two component identifiers for equality checks. That is to say, \"foo\";bar;baz cannot be in the same message as \"foo\";baz;bar, since these two component identifiers are equivalent, but a system processing one form is not allowed to transform it into the other form.\n\nThe component value associated with a component identifier is defined by the identifier itself. Component values *MUST NOT* contain newline (\\n) characters. Some HTTP message components can undergo transformations that change the bitwise value without altering the meaning of the component's value (for example, when combining field values). Message component values therefore need to be canonicalized before they are signed, to ensure that a signature can be verified despite such intermediary transformations. This document defines rules for each component identifier that transform the identifier's associated component value into such a canonical form.\n\nThe following sections define component identifier names, their parameters, their associated values, and the canonicalization rules for their values. The method for combining message components into the signature base is defined in Section 2.5.\n\n### 2.1. HTTP Fields\n\nThe component name for an HTTP field is the lowercased form of its field name as defined in [Section 5.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.1) of [HTTP]. While HTTP field names are case insensitive, implementations *MUST* use lowercased field names (e.g., content-type, date, etag) when using them as component names.\n\nThe component value for an HTTP field is the field value for the named field as defined in [Section 5.5](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.5) of [HTTP]. The field value *MUST* be taken from the named header field of the target message unless this behavior is overridden by additional parameters and rules, such as the req and tr flags, below. For most fields, the field value is an ASCII string as recommended by [HTTP], and the component value is exactly that string. Other encodings could exist in some implementations, and all non-ASCII field values *MUST* be encoded to ASCII before being added to the signature base. The bs parameter, as described in Section 2.1.3, provides a method for wrapping such problematic field values.\n\nUnless overridden by additional parameters and rules, HTTP field values *MUST* be combined into a single value as defined in [Section 5.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.2) of [HTTP] to create the component value. Specifically, HTTP fields sent as multiple fields *MUST* be combined by concatenating the values using a single comma and a single space as a separator (\",\" + \" \"). Note that intermediaries are allowed to combine values of HTTP fields with any amount of whitespace between the commas, and if this behavior is not accounted for by the verifier, the signature can fail, since the signer and verifier will see a different component value in their respective signature bases. For robustness, it is *RECOMMENDED* that signed messages include only a single instance of any field covered under the signature, particularly with the value for any list-based fields serialized using the algorithm below. This approach increases the chances of the field value remaining untouched through intermediaries. Where that approach is not possible and multiple instances of a field need to be sent separately, it is *RECOMMENDED* that signers and verifiers process any list-based fields taking all individual field values and combining them based on the strict algorithm below, to counter possible intermediary behavior. When the field in question is a Structured Field of type List or Dictionary, this effect can be accomplished more directly by requiring the strict Structured Field serialization of the field value, as described in Section 2.1.1.\n\nNote that some HTTP fields, such as Set-Cookie [COOKIE], do not follow a syntax that allows for the combination of field values in this manner (such that the combined output is unambiguous from multiple inputs). Even though the component value is never parsed by the message signature process and is used only as part of the signature base (Section 2.5), caution needs to be taken when including such fields in signatures, since the combined value could be ambiguous. The bs parameter, as described in Section 2.1.3, provides a method for wrapping such problematic fields. See Section 7.5.6 for more discussion regarding this issue.\n\nIf the correctly combined value is not directly available for a given field by an implementation, the following algorithm will produce canonicalized results for list-based fields:\n\n1. Create an ordered list of the field values of each instance of the field in the message, in the order they occur (or will occur) in the message.\n2. Strip leading and trailing whitespace from each item in the list. Note that since HTTP field values are not allowed to contain leading and trailing whitespace, this would be a no-op in a compliant implementation.\n3. Remove any obsolete line folding within the line, and replace it with a single space (\" \"), as discussed in [Section 5.2](https://www.rfc-editor.org/rfc/rfc9112.html#section-5.2) of [HTTP/1.1] . Note that this behavior is specific to HTTP/1.1 and does not apply to other versions of the HTTP specification, which do not allow internal line folding.\n4. Concatenate the list of values with a single comma (\",\") and a single space (\" \") between each item.\n\nThe resulting string is the component value for the field.\n\nNote that some HTTP fields have values with multiple valid serializations that have equivalent semantics, such as allowing case-insensitive values that intermediaries could change. Applications signing and processing such fields *MUST* consider how to handle the values of such fields to ensure that the signer and verifier can derive the same value, as discussed in Section 7.5.2.\n\nThe following are non-normative examples of component values for header fields, given the following example HTTP message fragment:\n\n```\nHost: www.example.com\nDate: Tue, 20 Apr 2021 02:07:56 GMT\nX-OWS-Header: Leading and trailing whitespace.\nX-Obs-Fold-Header: Obsolete\n line folding.\nCache-Control: max-age=60\nCache-Control: must-revalidate\nExample-Dict: a=1, b=2;x=1;y=2, c=(a b c)\n```\n\nThe following example shows the component values for these example header fields, presented using the signature base format defined in Section 2.5:\n\n```\n\"host\": www.example.com\n\"date\": Tue, 20 Apr 2021 02:07:56 GMT\n\"x-ows-header\": Leading and trailing whitespace.\n\"x-obs-fold-header\": Obsolete line folding.\n\"cache-control\": max-age=60, must-revalidate\n\"example-dict\": a=1, b=2;x=1;y=2, c=(a b c)\n```\n\nEmpty HTTP fields can also be signed when present in a message. The canonicalized value is the empty string. This means that the following empty header field, with (SP) indicating a single trailing space character before the empty field value:\n\n```\nX-Empty-Header:(SP)\n```\n\nis serialized by the signature base generation algorithm (Section 2.5) with an empty string value following the colon and space added after the component identifier.\n\n```\n\"x-empty-header\":(SP)\n```\n\nAny HTTP field component identifiers *MAY* have the following parameters in specific circumstances, each described in detail in their own sections:\n\nsf\n\nA Boolean flag indicating that the component value is serialized using strict encoding of the Structured Field value (Section 2.1.1).\n\nkey\n\nA String parameter used to select a single member value from a Dictionary Structured Field (Section 2.1.2).\n\nbs\n\nA Boolean flag indicating that individual field values are encoded using Byte Sequence data structures before being combined into the component value (Section 2.1.3).\n\nreq\n\nA Boolean flag for signed responses indicating that the component value is derived from the request that triggered this response message and not from the response message directly. Note that this parameter can also be applied to any derived component identifiers that target the request (Section 2.4).\n\ntr\n\nA Boolean flag indicating that the field value is taken from the trailers of the message as defined in [Section 6.5](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.5) of [HTTP]. If this flag is absent, the field value is taken from the header fields of the message as defined in [Section 6.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.3) of [HTTP] (Section 2.1.4).\n\nMultiple parameters *MAY* be specified together, though some combinations are redundant or incompatible. For example, the sf parameter's functionality is already covered when the key parameter is used on a Dictionary item, since key requires strict serialization of the value. The bs parameter, which requires the raw bytes of the field values from the message, is not compatible with the use of the sf or key parameters, which require the parsed data structures of the field values after combination.\n\nAdditional parameters can be defined in the \"HTTP Signature Component Parameters\" registry established in Section 6.5.\n\n#### 2.1.1. Strict Serialization of HTTP Structured Fields\n\nIf the value of an HTTP field is known by the application to be a Structured Field type (as defined in [STRUCTURED-FIELDS] or its extensions or updates) and the expected type of the Structured Field is known, the signer *MAY* include the sf parameter in the component identifier. If this parameter is included with a component identifier, the HTTP field value *MUST* be serialized using the formal serialization rules specified in [Section 4](https://www.rfc-editor.org/rfc/rfc8941.html#section-4) of [STRUCTURED-FIELDS] (or the applicable formal serialization section of its extensions or updates) applicable to the type of the HTTP field. Note that this process will replace any optional internal whitespace with a single space character, among other potential transformations of the value.\n\nIf multiple field values occur within a message, these values *MUST* be combined into a single List or Dictionary structure before serialization.\n\nIf the application does not know the type of the field or does not know how to serialize the type of the field, the use of this flag will produce an error. As a consequence, the signer can only reliably sign fields using this flag when the verifier's system knows the type as well.\n\nFor example, the following Dictionary field is a valid serialization:\n\n```\nExample-Dict: a=1, b=2;x=1;y=2, c=(a b c)\n```\n\nIf included in the signature base without parameters, its value would be:\n\n```\n\"example-dict\": a=1, b=2;x=1;y=2, c=(a b c)\n```\n\nHowever, if the sf parameter is added, the value is reserialized as follows:\n\n```\n\"example-dict\";sf: a=1, b=2;x=1;y=2, c=(a b c)\n```\n\nThe resulting string is used as the component value; see Section 2.1.\n\n#### 2.1.2. Dictionary Structured Field Members\n\nIf a given field is known by the application to be a Dictionary Structured Field, an individual member in the value of that Dictionary is identified by using the parameter key and the Dictionary member key as a String value.\n\nIf multiple field values occur within a message, these values *MUST* be combined into a single Dictionary structure before serialization.\n\nAn individual member value of a Dictionary Structured Field is canonicalized by applying the serialization algorithm described in [Section 4.1.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-4.1.2) of [STRUCTURED-FIELDS] on the member_value and its parameters, not including the Dictionary key itself. Specifically, the value is serialized as an Item or Inner List (the two possible values of a Dictionary member), with all parameters and possible subfields serialized using the strict serialization rules defined in [Section 4](https://www.rfc-editor.org/rfc/rfc8941.html#section-4) of [STRUCTURED-FIELDS] (or the applicable section of its extensions or updates).\n\nEach parameterized key for a given field *MUST NOT* appear more than once in the signature base. Parameterized keys *MAY* appear in any order in the signature base, regardless of the order they occur in the source Dictionary.\n\nIf a Dictionary key is named as a covered component but it does not occur in the Dictionary, this *MUST* cause an error in the signature base generation.\n\nThe following are non-normative examples of canonicalized values for Dictionary Structured Field members, given the following example header field, whose value is known by the application to be a Dictionary:\n\n```\nExample-Dict: a=1, b=2;x=1;y=2, c=(a b c), d\n```\n\nThe following example shows canonicalized values for different component identifiers of this field, presented using the signature base format discussed in Section 2.5:\n\n```\n\"example-dict\";key=\"a\": 1\n\"example-dict\";key=\"d\": ?1\n\"example-dict\";key=\"b\": 2;x=1;y=2\n\"example-dict\";key=\"c\": (a b c)\n```\n\nNote that the value for key=\"c\" has been reserialized according to the strict member_value algorithm, and the value for key=\"d\" has been serialized as a Boolean value.\n\n#### 2.1.3. Binary-Wrapped HTTP Fields\n\nIf the value of the HTTP field in question is known by the application to cause problems with serialization, particularly with the combination of multiple values into a single line as discussed in Section 7.5.6, the signer *SHOULD* include the bs parameter in a component identifier to indicate that the values of the field need to be wrapped as binary structures before being combined.\n\nIf this parameter is included with a component identifier, the component value *MUST* be calculated using the following algorithm:\n\n1. Let the input be the ordered set of values for a field, in the order they appear in the message.\n2. Create an empty List for accumulating processed field values.\n3. For each field value in the set: 11.Strip leading and trailing whitespace from the field value. Note that since HTTP field values are not allowed to contain leading and trailing whitespace, this would be a no-op in a compliant implementation.12.Remove any obsolete line folding within the line, and replace it with a single space (\" \"), as discussed in [Section 5.2](https://www.rfc-editor.org/rfc/rfc9112.html#section-5.2) of [HTTP/1.1]. Note that this behavior is specific to [HTTP/1.1] and does not apply to other versions of the HTTP specification.13.Encode the bytes of the resulting field value as a Byte Sequence. Note that most fields are restricted to ASCII characters, but other octets could be included in the value in some implementations.14.Add the Byte Sequence to the List accumulator.\n4. The intermediate result is a List of Byte Sequence values.\n5. Follow the strict serialization of a List as described in [Section 4.1.1](https://www.rfc-editor.org/rfc/rfc8941.html#section-4.1.1) of [STRUCTURED-FIELDS] , and return this output.\n\nFor example, the following field with internal commas prevents the distinct field values from being safely combined:\n\n```\nExample-Header: value, with, lots\nExample-Header: of, commas\n```\n\nIn our example, the same field can be sent with a semantically different single value:\n\n```\nExample-Header: value, with, lots, of, commas\n```\n\nBoth of these versions are treated differently by the application. However, if included in the signature base without parameters, the component value would be the same in both cases:\n\n```\n\"example-header\": value, with, lots, of, commas\n```\n\nHowever, if the bs parameter is added, the two separate instances are encoded and serialized as follows:\n\n```\n\"example-header\";bs: :dmFsdWUsIHdpdGgsIGxvdHM=:, :b2YsIGNvbW1hcw==:\n```\n\nFor the single-instance field above, the encoding with the bs parameter is:\n\n```\n\"example-header\";bs: :dmFsdWUsIHdpdGgsIGxvdHMsIG9mLCBjb21tYXM=:\n```\n\nThis component value is distinct from the multiple-instance field above, preventing a collision that could potentially be exploited.\n\n#### 2.1.4. Trailer Fields\n\nIf the signer wants to include a trailer field in the signature, the signer *MUST* include the tr Boolean parameter to indicate that the value *MUST* be taken from the trailer fields and not from the header fields.\n\nFor example, given the following message:\n\n```\nHTTP/1.1 200 OK\nContent-Type: text/plain\nTransfer-Encoding: chunked\nTrailer: Expires\n\n4\nHTTP\n7\nMessage\na\nSignatures\n0\nExpires: Wed, 9 Nov 2022 07:28:00 GMT\n```\n\nThe signer decides to add both the Trailer header field and the Expires trailer field to the signature base, along with the status code derived component:\n\n```\n\"@status\": 200\n\"trailer\": Expires\n\"expires\";tr: Wed, 9 Nov 2022 07:28:00 GMT\n```\n\nIf a field is available as both a header and a trailer in a message, both values *MAY* be signed, but the values *MUST* be signed separately. The values of header fields and trailer fields of the same name *MUST NOT* be combined for purposes of the signature.\n\nSince trailer fields could be merged into the header fields or dropped entirely by intermediaries as per [Section 6.5.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.5.1) of [HTTP], it is *NOT RECOMMENDED* to include trailers in the signature unless the signer knows that the verifier will have access to the values of the trailers as sent.\n\n### 2.2. Derived Components\n\nIn addition to HTTP fields, there are a number of different components that can be derived from the control data, signature context, or other aspects of the HTTP message being signed. Such derived components can be included in the signature base by defining a component name, possible parameters, message targets, and the derivation method for its component value.\n\nDerived component names *MUST* start with the \"at\" (@) character. This differentiates derived component names from HTTP field names, which cannot contain the @ character as per [Section 5.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.1) of [HTTP]. Processors of HTTP message signatures *MUST* treat derived component names separately from field names, as discussed in Section 7.5.1.\n\nThis specification defines the following derived components:\n\n@method\n\nThe method used for a request (Section 2.2.1).\n\n@target-uri\n\nThe full target URI for a request (Section 2.2.2).\n\n@authority\n\nThe authority of the target URI for a request (Section 2.2.3).\n\n@scheme\n\nThe scheme of the target URI for a request (Section 2.2.4).\n\n@request-target\n\nThe request target (Section 2.2.5).\n\n@path\n\nThe absolute path portion of the target URI for a request (Section 2.2.6).\n\n@query\n\nThe query portion of the target URI for a request (Section 2.2.7).\n\n@query-param\n\nA parsed and encoded query parameter of the target URI for a request (Section 2.2.8).\n\n@status\n\nThe status code for a response (Section 2.2.9).\n\nAdditional derived component names are defined in the \"HTTP Signature Derived Component Names\" registry (Section 6.4).\n\nDerived component values are taken from the context of the target message for the signature. This context includes information about the message itself, such as its control data, as well as any additional state and context held by the signer or verifier. In particular, when signing a response, the signer can include any derived components from the originating request by using the req parameter (Section 2.4).\n\nrequest:\n\nValues derived from, and results applied to, an HTTP request message as described in [Section 3.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-3.4) of [HTTP]. If the target message of the signature is a response, derived components that target request messages can be included by using the req parameter as defined in Section 2.4.\n\nresponse:\n\nValues derived from, and results applied to, an HTTP response message as described in [Section 3.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-3.4) of [HTTP].\n\nrequest, response:\n\nValues derived from, and results applied to, either a request message or a response message.\n\nA derived component definition *MUST* define all target message types to which it can be applied.\n\nDerived component values *MUST* be limited to printable characters and spaces and *MUST NOT* contain any newline characters. Derived component values *MUST NOT* start or end with whitespace characters.\n\n#### 2.2.1. Method\n\nThe @method derived component refers to the HTTP method of a request message. The component value is canonicalized by taking the value of the method as a string. Note that the method name is case sensitive as per [HTTP], [Section 9.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.1). While conventionally standardized method names are uppercase [ASCII], no transformation to the input method value's case is performed.\n\nFor example, the following request message:\n\n```\nPOST /path?param=value HTTP/1.1\nHost: www.example.com\n```\n\nwould result in the following @method component value:\n\n```\nPOST\n```\n\nand the following signature base line:\n\n```\n\"@method\": POST\n```\n\n#### 2.2.2. Target URI\n\nThe @target-uri derived component refers to the target URI of a request message. The component value is the target URI of the request ([HTTP], [Section 7.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1)), assembled from all available URI components, including the authority.\n\nFor example, the following message sent over HTTPS:\n\n```\nPOST /path?param=value HTTP/1.1\nHost: www.example.com\n```\n\nwould result in the following @target-uri component value:\n\n```\nhttps://www.example.com/path?param=value\n```\n\nand the following signature base line:\n\n```\n\"@target-uri\": https://www.example.com/path?param=value\n```\n\n#### 2.2.3. Authority\n\nThe @authority derived component refers to the authority component of the target URI of the HTTP request message, as defined in [HTTP], [Section 7.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.2). In HTTP/1.1, this is usually conveyed using the Host header field, while in HTTP/2 and HTTP/3 it is conveyed using the :authority pseudo-header. The value is the fully qualified authority component of the request, comprised of the host and, optionally, port of the request target, as a string. The component value *MUST* be normalized according to the rules provided in [HTTP], [Section 4.2.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.2.3). Namely, the hostname is normalized to lowercase, and the default port is omitted.\n\nFor example, the following request message:\n\n```\nPOST /path?param=value HTTP/1.1\nHost: www.example.com\n```\n\nwould result in the following @authority component value:\n\n```\nwww.example.com\n```\n\nand the following signature base line:\n\n```\n\"@authority\": www.example.com\n```\n\nThe @authority derived component *SHOULD* be used instead of signing the Host header field directly. See Section 7.2.4.\n\n#### 2.2.4. Scheme\n\nThe @scheme derived component refers to the scheme of the target URL of the HTTP request message. The component value is the scheme as a lowercase string as defined in [HTTP], [Section 4.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.2). While the scheme itself is case insensitive, it *MUST* be normalized to lowercase for inclusion in the signature base.\n\nFor example, the following request message sent over plain HTTP:\n\n```\nPOST /path?param=value HTTP/1.1\nHost: www.example.com\n```\n\nwould result in the following @scheme component value:\n\n```\nhttp\n```\n\nand the following signature base line:\n\n```\n\"@scheme\": http\n```\n\n#### 2.2.5. Request Target\n\nThe @request-target derived component refers to the full request target of the HTTP request message, as defined in [HTTP], [Section 7.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1). The component value of the request target can take different forms, depending on the type of request, as described below.\n\nFor HTTP/1.1, the component value is equivalent to the request target portion of the request line. However, this value is more difficult to reliably construct in other versions of HTTP. Therefore, it is *NOT RECOMMENDED* that this component be used when versions of HTTP other than 1.1 might be in use.\n\nThe origin form value is a combination of the absolute path and query components of the request URL.\n\nFor example, the following request message:\n\n```\nPOST /path?param=value HTTP/1.1\nHost: www.example.com\n```\n\nwould result in the following @request-target component value:\n\n```\n/path?param=value\n```\n\nand the following signature base line:\n\n```\n\"@request-target\": /path?param=value\n```\n\nThe following request to an HTTP proxy with the absolute-form value, containing the fully qualified target URI:\n\n```\nGET https://www.example.com/path?param=value HTTP/1.1\n```\n\nwould result in the following @request-target component value:\n\n```\nhttps://www.example.com/path?param=value\n```\n\nand the following signature base line:\n\n```\n\"@request-target\": https://www.example.com/path?param=value\n```\n\nThe following CONNECT request with an authority-form value, containing the host and port of the target:\n\n```\nCONNECT www.example.com:80 HTTP/1.1\nHost: www.example.com\n```\n\nwould result in the following @request-target component value:\n\n```\nwww.example.com:80\n```\n\nand the following signature base line:\n\n```\n\"@request-target\": www.example.com:80\n```\n\nThe following OPTIONS request message with the asterisk-form value, containing a single asterisk (*) character:\n\n```\nOPTIONS * HTTP/1.1\nHost: www.example.com\n```\n\nwould result in the following @request-target component value:\n\n```\n*\n```\n\nand the following signature base line:\n\n```\n\"@request-target\": *\n```\n\n#### 2.2.6. Path\n\nThe @path derived component refers to the target path of the HTTP request message. The component value is the absolute path of the request target defined by [URI], with no query component and no trailing question mark (?) character. The value is normalized according to the rules provided in [HTTP], [Section 4.2.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.2.3). Namely, an empty path string is normalized as a single slash (/) character. Path components are represented by their values before decoding any percent-encoded octets, as described in the simple string comparison rules provided in [Section 6.2.1](https://www.rfc-editor.org/rfc/rfc3986.html#section-6.2.1) of [URI].\n\nFor example, the following request message:\n\n```\nGET /path?param=value HTTP/1.1\nHost: www.example.com\n```\n\nwould result in the following @path component value:\n\n```\n/path\n```\n\nand the following signature base line:\n\n```\n\"@path\": /path\n```\n\n#### 2.2.7. Query\n\nThe @query derived component refers to the query component of the HTTP request message. The component value is the entire normalized query string defined by [URI], including the leading ? character. The value is read using the simple string comparison rules provided in [Section 6.2.1](https://www.rfc-editor.org/rfc/rfc3986.html#section-6.2.1) of [URI]. Namely, percent-encoded octets are not decoded.\n\nFor example, the following request message:\n\n```\nGET /path?param=value&foo=bar&baz=bat%2Dman HTTP/1.1\nHost: www.example.com\n```\n\nwould result in the following @query component value:\n\n```\n?param=value&foo=bar&baz=bat%2Dman\n```\n\nand the following signature base line:\n\n```\n\"@query\": ?param=value&foo=bar&baz=bat%2Dman\n```\n\nThe following request message:\n\n```\nPOST /path?queryString HTTP/1.1\nHost: www.example.com\n```\n\nwould result in the following @query component value:\n\n```\n?queryString\n```\n\nand the following signature base line:\n\n```\n\"@query\": ?queryString\n```\n\nJust like including an empty path component, the signer can include an empty query component to indicate that this component is not used in the message. If the query string is absent from the request message, the component value is the leading ? character alone:\n\n```\n?\n```\n\nresulting in the following signature base line:\n\n```\n\"@query\": ?\n```\n\n#### 2.2.8. Query Parameters\n\nIf the query portion of a request target URI uses HTML form parameters in the format defined in Section [5](https://url.spec.whatwg.org/https://url.spec.whatwg.org/#application/x-www-form-urlencoded) of [HTMLURL], the @query-param derived component allows addressing of these individual query parameters. The query parameters *MUST* be parsed according to Section [5.1](https://url.spec.whatwg.org/https://url.spec.whatwg.org/#urlencoded-parsing) of [HTMLURL], resulting in a list of (nameString, valueString) tuples. The *REQUIRED* name parameter of each component identifier contains the encoded nameString of a single query parameter as a String value. The component value of a single named parameter is the encoded valueString of that single query parameter. Several different named query parameters *MAY* be included in the covered components. Single named parameters *MAY* occur in any order in the covered components, regardless of the order they occur in the query string.\n\nThe value of the name parameter and the component value of a single named parameter are calculated via the following process:\n\n1. Parse the nameString or valueString of the named query parameter defined by Section [5.1](https://url.spec.whatwg.org/https://url.spec.whatwg.org/#urlencoded-parsing) of [HTMLURL] ; this is the value after percent-encoded octets are decoded.\n2. Encode the nameString or valueString using the \"percent-encode after encoding\" process defined by Section [5.2](https://url.spec.whatwg.org/https://url.spec.whatwg.org/#urlencoded-serializing) of [HTMLURL] ; this results in an ASCII string [ASCII] .\n3. Output the ASCII string.\n\nNote that the component value does not include any leading question mark (?) characters, equals sign (=) characters, or separating ampersand (&) characters. Named query parameters with an empty valueString have an empty string as the component value. Note that due to inconsistencies in implementations, some query parameter parsing libraries drop such empty values.\n\nIf a query parameter is named as a covered component but it does not occur in the query parameters, this *MUST* cause an error in the signature base generation.\n\nFor example, for the following request:\n\n```\nGET /path?param=value&foo=bar&baz=batman&qux= HTTP/1.1\nHost: www.example.com\n```\n\nIndicating the baz, qux, and param named query parameters would result in the following @query-param component values:\n\n*baz*: batman\n\n*qux*: an empty string\n\n*param*: value\n\nand the following signature base lines, with (SP) indicating a single trailing space character before the empty component value:\n\n```\n\"@query-param\";name=\"baz\": batman\n\"@query-param\";name=\"qux\":(SP)\n\"@query-param\";name=\"param\": value\n```\n\nThis derived component has some limitations. Specifically, the algorithms provided in Section [5](https://url.spec.whatwg.org/https://url.spec.whatwg.org/#application/x-www-form-urlencoded) of [HTMLURL] only support query parameters using percent-escaped UTF-8 encoding. Other encodings are not supported. Additionally, multiple instances of a named parameter are not reliably supported in the wild. If a parameter name occurs multiple times in a request, the named query parameter *MUST NOT* be included. If multiple parameters are common within an application, it is *RECOMMENDED* to sign the entire query string using the @query component identifier defined in Section 2.2.7.\n\nThe encoding process allows query parameters that include newlines or other problematic characters in their values, or with alternative encodings such as using the plus (+) character to represent spaces. For the query parameters in this message:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nGET /parameters?var=this%20is%20a%20big%0Amultiline%20value&\\\n bar=with+plus+whitespace&fa%C3%A7ade%22%3A%20=something HTTP/1.1\nHost: www.example.com\nDate: Tue, 20 Apr 2021 02:07:56 GMT\n```\n\nThe resulting values are encoded as follows:\n\n```\n\"@query-param\";name=\"var\": this%20is%20a%20big%0Amultiline%20value\n\"@query-param\";name=\"bar\": with%20plus%20whitespace\n\"@query-param\";name=\"fa%C3%A7ade%22%3A%20\": something\n```\n\nIf the encoding were not applied, the resultant values would be:\n\n```\n\"@query-param\";name=\"var\": this is a big\nmultiline value\n\"@query-param\";name=\"bar\": with plus whitespace\n\"@query-param\";name=\"façade\\\": \": something\n```\n\nThis base string contains characters that violate the constraints on component names and values and is therefore invalid.\n\n#### 2.2.9. Status Code\n\nThe @status derived component refers to the three-digit numeric HTTP status code of a response message as defined in [HTTP], [Section 15](https://www.rfc-editor.org/rfc/rfc9110.html#section-15). The component value is the serialized three-digit integer of the HTTP status code, with no descriptive text.\n\nFor example, the following response message:\n\n```\nHTTP/1.1 200 OK\nDate: Fri, 26 Mar 2010 00:05:00 GMT\n```\n\nwould result in the following @status component value:\n\n```\n200\n```\n\nand the following signature base line:\n\n```\n\"@status\": 200\n```\n\nThe @status component identifier *MUST NOT* be used in a request message.\n\n### 2.3. Signature Parameters\n\nHTTP message signatures have metadata properties that provide information regarding the signature's generation and verification, consisting of the ordered set of covered components and the ordered set of parameters, where the parameters include a timestamp of signature creation, identifiers for verification key material, and other utilities. This metadata is represented by a special message component in the signature base for signature parameters; this special message component is treated slightly differently from other message components. Specifically, the signature parameters message component is *REQUIRED* as the last line of the signature base (Section 2.5), and the component identifier *MUST NOT* be enumerated within the set of covered components for any signature, including itself.\n\nThe signature parameters component name is @signature-params.\n\nThe signature parameters component value is the serialization of the signature parameters for this signature, including the covered components ordered set with all associated parameters. These parameters include any of the following:\n\ncreated:\n\nCreation time as a UNIX timestamp value of type Integer. Sub-second precision is not supported. The inclusion of this parameter is *RECOMMENDED*.\n\nexpires:\n\nExpiration time as a UNIX timestamp value of type Integer. Sub-second precision is not supported.\n\nnonce:\n\nA random unique value generated for this signature as a String value.\n\nalg:\n\nThe HTTP message signature algorithm from the \"HTTP Signature Algorithms\" registry, as a String value.\n\nkeyid:\n\nThe identifier for the key material as a String value.\n\ntag:\n\nAn application-specific tag for the signature as a String value. This value is used by applications to help identify signatures relevant for specific applications or protocols.\n\nAdditional parameters can be defined in the \"HTTP Signature Metadata Parameters\" registry (Section 6.3). Note that the parameters are not in any general order, but once an ordering is chosen for a given set of parameters, it cannot be changed without altering the signature parameters value.\n\nThe signature parameters component value is serialized as a parameterized Inner List using the rules provided in [Section 4](https://www.rfc-editor.org/rfc/rfc8941.html#section-4) of [STRUCTURED-FIELDS] as follows:\n\n1. Let the output be an empty string.\n2. Determine an order for the component identifiers of the covered components, not including the @signature-params component identifier itself. Once this order is chosen, it cannot be changed. This order *MUST* be the same order as that used in creating the signature base ( Section 2.5 ).\n3. Serialize the component identifiers of the covered components, including all parameters, as an ordered Inner List of String values according to [Section 4.1.1.1](https://www.rfc-editor.org/rfc/rfc8941.html#section-4.1.1.1) of [STRUCTURED-FIELDS] ; then, append this to the output. Note that the component identifiers can include their own parameters, and these parameters are ordered sets. Once an order is chosen for a component's parameters, the order cannot be changed.\n4. Determine an order for any signature parameters. Once this order is chosen, it cannot be changed.\n5. Append the parameters to the Inner List in order according to [Section 4.1.1.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-4.1.1.2) of [STRUCTURED-FIELDS] , skipping parameters that are not available or not used for this message signature.\n6. The output contains the signature parameters component value.\n\nNote that the Inner List serialization from [Section 4.1.1.1](https://www.rfc-editor.org/rfc/rfc8941.html#section-4.1.1.1) of [STRUCTURED-FIELDS] is used for the covered component value instead of the List serialization from [Section 4.1.1](https://www.rfc-editor.org/rfc/rfc8941.html#section-4.1.1) of [STRUCTURED-FIELDS] in order to facilitate parallelism with this value's inclusion in the Signature-Input field, as discussed in Section 4.1.\n\nThis example shows the serialized component value for the parameters of an example message signature:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n(\"@target-uri\" \"@authority\" \"date\" \"cache-control\")\\\n ;keyid=\"test-key-rsa-pss\";alg=\"rsa-pss-sha512\";\\\n created=1618884475;expires=1618884775\n```\n\nNote that an HTTP message could contain multiple signatures (Section 4.3), but only the signature parameters used for a single signature are included in a given signature parameters entry.\n\n### 2.4. Signing Request Components in a Response Message\n\nWhen a request message results in a signed response message, the signer can include portions of the request message in the signature base by adding the req parameter to the component identifier.\n\nreq\n\nA Boolean flag indicating that the component value is derived from the request that triggered this response message and not from the response message directly.\n\nThis parameter can be applied to both HTTP fields and derived components that target the request, with the same semantics. The component value for a message component using this parameter is calculated in the same manner as it is normally, but data is pulled from the request message instead of the target response message to which the signature is applied.\n\nNote that the same component name *MAY* be included with and without the req parameter in a single signature base, indicating the same named component from both the request message and the response message.\n\nThe req parameter *MAY* be combined with other parameters as appropriate for the component identifier, such as the key parameter for a Dictionary field.\n\nFor example, when serving a response for this request:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: example.com\nDate: Tue, 20 Apr 2021 02:07:55 GMT\nContent-Digest: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+T\\\n aPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\nContent-Type: application/json\nContent-Length: 18\n\n{\"hello\": \"world\"}\n```\n\nThis would result in the following unsigned response message:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 503 Service Unavailable\nDate: Tue, 20 Apr 2021 02:07:56 GMT\nContent-Type: application/json\nContent-Length: 62\nContent-Digest: sha-512=:0Y6iCBzGg5rZtoXS95Ijz03mslf6KAMCloESHObfwn\\\n HJDbkkWWQz6PhhU9kxsTbARtY2PTBOzq24uJFpHsMuAg==:\n\n{\"busy\": true, \"message\": \"Your call is very important to us\"}\n```\n\nThe server signs the response with its own key, including the @status code and several header fields in the covered components. While this covers a reasonable amount of the response for this application, the server additionally includes several components derived from the original request message that triggered this response. In this example, the server includes the method, authority, path, and content digest from the request in the covered components of the response. The Content-Digest for both the request and the response is included under the response signature. For the application in this example, the query is deemed not to be relevant to the response and is therefore not covered. Other applications would make different decisions based on application needs, as discussed in Section 1.4.\n\nThe signature base for this example is:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"@status\": 503\n\"content-digest\": sha-512=:0Y6iCBzGg5rZtoXS95Ijz03mslf6KAMCloESHObf\\\n wnHJDbkkWWQz6PhhU9kxsTbARtY2PTBOzq24uJFpHsMuAg==:\n\"content-type\": application/json\n\"@authority\";req: example.com\n\"@method\";req: POST\n\"@path\";req: /foo\n\"content-digest\";req: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A\\\n 2svX+TaPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\n\"@signature-params\": (\"@status\" \"content-digest\" \"content-type\" \\\n \"@authority\";req \"@method\";req \"@path\";req \"content-digest\";req)\\\n ;created=1618884479;keyid=\"test-key-ecc-p256\"\n```\n\nThe signed response message is:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 503 Service Unavailable\nDate: Tue, 20 Apr 2021 02:07:56 GMT\nContent-Type: application/json\nContent-Length: 62\nContent-Digest: sha-512=:0Y6iCBzGg5rZtoXS95Ijz03mslf6KAMCloESHObfwn\\\n HJDbkkWWQz6PhhU9kxsTbARtY2PTBOzq24uJFpHsMuAg==:\nSignature-Input: reqres=(\"@status\" \"content-digest\" \"content-type\" \\\n \"@authority\";req \"@method\";req \"@path\";req \"content-digest\";req)\\\n ;created=1618884479;keyid=\"test-key-ecc-p256\"\nSignature: reqres=:dMT/A/76ehrdBTD/2Xx8QuKV6FoyzEP/I9hdzKN8LQJLNgzU\\\n 4W767HK05rx1i8meNQQgQPgQp8wq2ive3tV5Ag==:\n\n{\"busy\": true, \"message\": \"Your call is very important to us\"}\n```\n\nNote that the ECDSA signature algorithm in use here is non-deterministic, meaning that a different signature value will be created every time the algorithm is run. The signature value provided here can be validated against the given keys, but newly generated signature values are not expected to match the example. See Section 7.3.5.\n\nSince the component values from the request are not repeated in the response message, the requester *MUST* keep the original message component values around long enough to validate the signature of the response that uses this component identifier parameter. In most cases, this means the requester needs to keep the original request message around, since the signer could choose to include any portions of the request in its response, according to the needs of the application. Since it is possible for an intermediary to alter a request message before it is processed by the server, applications need to take care not to sign such altered values, as the client would not be able to validate the resulting signature.\n\nIt is also possible for a server to create a signed response in response to a signed request. For this example of a signed request:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: example.com\nDate: Tue, 20 Apr 2021 02:07:55 GMT\nContent-Digest: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+T\\\n aPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\nContent-Type: application/json\nContent-Length: 18\nSignature-Input: sig1=(\"@method\" \"@authority\" \"@path\" \"@query\" \\\n \"content-digest\" \"content-type\" \"content-length\")\\\n ;created=1618884475;keyid=\"test-key-rsa-pss\"\nSignature: sig1=:e8UJ5wMiRaonlth5ERtE8GIiEH7Akcr493nQ07VPNo6y3qvjdK\\\n t0fo8VHO8xXDjmtYoatGYBGJVlMfIp06eVMEyNW2I4vN7XDAz7m5v1108vGzaDljr\\\n d0H8+SJ28g7bzn6h2xeL/8q+qUwahWA/JmC8aOC9iVnwbOKCc0WSrLgWQwTY6VLp4\\\n 2Qt7jjhYT5W7/wCvfK9A1VmHH1lJXsV873Z6hpxesd50PSmO+xaNeYvDLvVdZlhtw\\\n 5PCtUYzKjHqwmaQ6DEuM8udRjYsoNqp2xZKcuCO1nKc0V3RjpqMZLuuyVbHDAbCzr\\\n 0pg2d2VM/OC33JAU7meEjjaNz+d7LWPg==:\n\n{\"hello\": \"world\"}\n```\n\nThe server could choose to sign portions of this response, including several portions of the request, resulting in this signature base:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"@status\": 503\n\"content-digest\": sha-512=:0Y6iCBzGg5rZtoXS95Ijz03mslf6KAMCloESHObf\\\n wnHJDbkkWWQz6PhhU9kxsTbARtY2PTBOzq24uJFpHsMuAg==:\n\"content-type\": application/json\n\"@authority\";req: example.com\n\"@method\";req: POST\n\"@path\";req: /foo\n\"@query\";req: ?param=Value&Pet=dog\n\"content-digest\";req: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A\\\n 2svX+TaPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\n\"content-type\";req: application/json\n\"content-length\";req: 18\n\"@signature-params\": (\"@status\" \"content-digest\" \"content-type\" \\\n \"@authority\";req \"@method\";req \"@path\";req \"@query\";req \\\n \"content-digest\";req \"content-type\";req \"content-length\";req)\\\n ;created=1618884479;keyid=\"test-key-ecc-p256\"\n```\n\nand the following signed response:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 503 Service Unavailable\nDate: Tue, 20 Apr 2021 02:07:56 GMT\nContent-Type: application/json\nContent-Length: 62\nContent-Digest: sha-512=:0Y6iCBzGg5rZtoXS95Ijz03mslf6KAMCloESHObfwn\\\n HJDbkkWWQz6PhhU9kxsTbARtY2PTBOzq24uJFpHsMuAg==:\nSignature-Input: reqres=(\"@status\" \"content-digest\" \"content-type\" \\\n \"@authority\";req \"@method\";req \"@path\";req \"@query\";req \\\n \"content-digest\";req \"content-type\";req \"content-length\";req)\\\n ;created=1618884479;keyid=\"test-key-ecc-p256\"\nSignature: reqres=:C73J41GVKc+TYXbSobvZf0CmNcptRiWN+NY1Or0A36ISg6ym\\\n dRN6ZgR2QfrtopFNzqAyv+CeWrMsNbcV2Ojsgg==:\n\n{\"busy\": true, \"message\": \"Your call is very important to us\"}\n```\n\nNote that the ECDSA signature algorithm in use here is non-deterministic, meaning that a different signature value will be created every time the algorithm is run. The signature value provided here can be validated against the given keys, but newly generated signature values are not expected to match the example. See Section 7.3.5.\n\nApplications signing a response to a signed request *SHOULD* sign all of the components of the request signature value to provide sufficient coverage and protection against a class of collision attacks, as discussed in Section 7.3.7. The server in this example has included all components listed in the Signature-Input field of the client's signature on the request in the response signature, in addition to components of the response.\n\nWhile it is syntactically possible to include the Signature and Signature-Input fields of the request message in the signature components of a response to a message using this mechanism, this practice is *NOT RECOMMENDED*. This is because signatures of signatures do not provide transitive coverage of covered components as one might expect, and the practice is susceptible to several attacks as discussed in Section 7.3.7. An application that needs to signal successful processing or receipt of a signature would need to carefully specify alternative mechanisms for sending such a signal securely.\n\nThe response signature can only ever cover what is included in the request message when using this flag. Consequently, if an application needs to include the message content of the request under the signature of its response, the client needs to include a means for covering that content, such as a Content-Digest field. See the discussion in Section 7.2.8 for more information.\n\nThe req parameter *MUST NOT* be used for any component in a signature that targets a request message.\n\n### 2.5. Creating the Signature Base\n\nThe signature base is an ASCII string [ASCII] containing the canonicalized HTTP message components covered by the signature. The input to the signature base creation algorithm is the ordered set of covered component identifiers and their associated values, along with any additional signature parameters discussed in Section 2.3.\n\nComponent identifiers are serialized using the strict serialization rules defined by [STRUCTURED-FIELDS], [Section 4](https://www.rfc-editor.org/rfc/rfc8941.html#section-4). The component identifier has a component name, which is a String Item value serialized using the sf-string ABNF rule. The component identifier *MAY* also include defined parameters that are serialized using the parameters ABNF rule. The signature parameters line defined in Section 2.3 follows this same pattern, but the component identifier is a String Item with a fixed value and no parameters, and the component value is always an Inner List with optional parameters.\n\nNote that this means the serialization of the component name itself is encased in double quotes, with parameters following as a semicolon-separated list, such as \"cache-control\", \"@authority\", \"@signature-params\", or \"example-dictionary\";key=\"foo\".\n\nThe output is the ordered set of bytes that form the signature base, which conforms to the following ABNF:\n\n```\nsignature-base = *( signature-base-line LF ) signature-params-line\nsignature-base-line = component-identifier \":\" SP\n ( derived-component-value / *field-content )\n ; no obs-fold nor obs-text\ncomponent-identifier = component-name parameters\ncomponent-name = sf-string\nderived-component-value = *( VCHAR / SP )\nsignature-params-line = DQUOTE \"@signature-params\" DQUOTE\n \":\" SP inner-list\n```\n\nTo create the signature base, the signer or verifier concatenates entries for each component identifier in the signature's covered components (including their parameters) using the following algorithm. All errors produced as described *MUST* fail the algorithm immediately, without outputting a signature base.\n\n1. Let the output be an empty string.\n2. For each message component item in the covered components set (in order): 11.If the component identifier (including its parameters) has already been added to the signature base, produce an error.12.Append the component identifier for the covered component serialized according to the component-identifier ABNF rule. Note that this serialization places the component name in double quotes and appends any parameters outside of the quotes.13.Append a single colon (:).14.Append a single space (\" \").15.Determine the component value for the component identifier. If the component identifier has a parameter that is not understood, produce an error.If the component identifier has parameters that are mutually incompatible with one another, such as bs and sf, produce an error.If the component identifier contains the req parameter and the target message is a request, produce an error.If the component identifier contains the req parameter and the target message is a response, the context for the component value is the related request message of the target response message. Otherwise, the context for the component value is the target message.If the component name starts with an \"at\" (@) character, derive the component's value from the message according to the specific rules defined for the derived component, as provided in Section 2.2, including processing of any known valid parameters. If the derived component name is unknown or the value cannot be derived, produce an error.If the component name does not start with an \"at\" (@) character, canonicalize the HTTP field value as described in Section 2.1, including processing of any known valid parameters. If the field cannot be found in the message or the value cannot be obtained in the context, produce an error. 16.Append the covered component's canonicalized component value.17.Append a single newline (\\n).\n3. Append the signature parameters component (Section 2.3) according to the signature-params-line rule as follows: 11.Append the component identifier for the signature parameters serialized according to the component-identifier rule, i.e., the exact value \"@signature-params\" (including double quotes).12.Append a single colon (:).13.Append a single space (\" \").14.Append the signature parameters' canonicalized component values as defined in Section 2.3, i.e., Inner List Structured Field values with parameters.\n4. Produce an error if the output string contains any non-ASCII characters [ASCII] .\n5. Return the output string.\n\nIf covered components reference a component identifier that cannot be resolved to a component value in the message, the implementation *MUST* produce an error and not create a signature base. Such situations include, but are not limited to, the following:\n\n- The signer or verifier does not understand the derived component name.\n- The component name identifies a field that is not present in the message or whose value is malformed.\n- The component identifier includes a parameter that is unknown or does not apply to the component identifier to which it is attached.\n- The component identifier indicates that a Structured Field serialization is used (via the sf parameter), but the field in question is known to not be a Structured Field or the type of Structured Field is not known to the implementation.\n- The component identifier is a Dictionary member identifier that references a field that is not present in the message, that is not a Dictionary Structured Field, or whose value is malformed.\n- The component identifier is a Dictionary member identifier or a named query parameter identifier that references a member that is not present in the component value or whose value is malformed. For example, the identifier is \"example-dict\";key=\"c\" , and the value of the Example-Dict header field is a=1, b=2 , which does not have the c value.\n\nIn the following non-normative example, the HTTP message being signed is the following request:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: example.com\nDate: Tue, 20 Apr 2021 02:07:55 GMT\nContent-Type: application/json\nContent-Digest: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+T\\\n aPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\nContent-Length: 18\n\n{\"hello\": \"world\"}\n```\n\nThe covered components consist of the @method, @authority, and @path derived components followed by the Content-Digest, Content-Length, and Content-Type HTTP header fields, in order. The signature parameters consist of a creation timestamp of 1618884473 and a key identifier of test-key-rsa-pss. Note that no explicit alg parameter is given here, since the verifier is known by the application to use the RSA-PSS algorithm based on the identified key. The signature base for this message with these parameters is:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"@method\": POST\n\"@authority\": example.com\n\"@path\": /foo\n\"content-digest\": sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX\\\n +TaPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\n\"content-length\": 18\n\"content-type\": application/json\n\"@signature-params\": (\"@method\" \"@authority\" \"@path\" \\\n \"content-digest\" \"content-length\" \"content-type\")\\\n ;created=1618884473;keyid=\"test-key-rsa-pss\"\n```\n\nFigure 1: Non-normative Example Signature Base\n\nNote that the example signature base above does not include the final newline that ends the displayed example, nor do other example signature bases displayed elsewhere in this specification.\n\n---\n\n## 3. HTTP Message Signatures\n\nAn HTTP message signature is a signature over a string generated from a subset of the components of an HTTP message in addition to metadata about the signature itself. When successfully verified against an HTTP message, an HTTP message signature provides cryptographic proof that the message is semantically equivalent to the message for which the signature was generated, with respect to the subset of message components that was signed.\n\n### 3.1. Creating a Signature\n\nCreation of an HTTP message signature is a process that takes as its input the signature context (including the target message) and the requirements for the application. The output is a signature value and set of signature parameters that can be communicated to the verifier by adding them to the message.\n\nIn order to create a signature, a signer *MUST* apply the following algorithm:\n\n1. The signer chooses an HTTP signature algorithm and key material for signing from the set of potential signing algorithms. The set of potential algorithms is determined by the application and is out of scope for this document. The signer *MUST* choose key material that is appropriate for the signature's algorithm and that conforms to any requirements defined by the algorithm, such as key size or format. The mechanism by which the signer chooses the algorithm and key material is out of scope for this document.\n2. The signer sets the signature's creation time to the current time.\n3. If applicable, the signer sets the signature's expiration time property to the time at which the signature is to expire. The expiration is a hint to the verifier, expressing the time at which the signer is no longer willing to vouch for the signature. An appropriate expiration length, and the processing requirements of this parameter, are application specific.\n4. The signer creates an ordered set of component identifiers representing the message components to be covered by the signature and attaches signature metadata parameters to this set. The serialized value of this set is later used as the value of the Signature-Input field as described in Section 4.1. Once an order of covered components is chosen, the order *MUST NOT* change for the life of the signature.Each covered component identifier *MUST* be either (1) an HTTP field (Section 2.1) in the signature context or (2) a derived component listed in Section 2.2 or in the \"HTTP Signature Derived Component Names\" registry.Signers of a request *SHOULD* include some or all of the message control data in the covered components, such as the @method, @authority, @target-uri, or some combination thereof.Signers *SHOULD* include the created signature metadata parameter to indicate when the signature was created.The @signature-params derived component identifier *MUST NOT* be present in the list of covered component identifiers. The derived component is required to always be the last line in the signature base, ensuring that a signature always covers its own metadata and the metadata cannot be substituted.Further guidance on what to include in this set and in what order is out of scope for this document.\n5. The signer creates the signature base using these parameters and the signature base creation algorithm ( Section 2.5 ).\n6. The signer uses the HTTP_SIGN primitive function to sign the signature base with the chosen signing algorithm using the key material chosen by the signer. The HTTP_SIGN primitive and several concrete applications of signing algorithms are defined in Section 3.3 .\n7. The byte array output of the signature function is the HTTP message signature output value to be included in the Signature field as defined in Section 4.2 .\n\nFor example, given the HTTP message and signature parameters in the example in Section 2.5, the example signature base is signed with the test-key-rsa-pss key (see Appendix B.1.2) and the RSASSA-PSS algorithm described in Section 3.3.1, giving the following message signature output value, encoded in Base64:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHIbjHC5rS0BYaa9v4QfD4193TORw7u9edguPh0AW3dMq9WImrlFrCGUDih47vAxi4L2\\\nYRZ3XMJc1uOKk/J0ZmZ+wcta4nKIgBkKq0rM9hs3CQyxXGxHLMCy8uqK488o+9jrptQ\\\n+xFPHK7a9sRL1IXNaagCNN3ZxJsYapFj+JXbmaI5rtAdSfSvzPuBCh+ARHBmWuNo1Uz\\\nVVdHXrl8ePL4cccqlazIJdC4QEjrF+Sn4IxBQzTZsL9y9TP5FsZYzHvDqbInkTNigBc\\\nE9cKOYNFCn4D/WM7F6TNuZO9EgtzepLWcjTymlHzK7aXq6Am6sfOrpIC49yXjj3ae6H\\\nRalVc/g==\n```\n\nFigure 2: Non-normative Example Signature Value\n\nNote that the RSA-PSS algorithm in use here is non-deterministic, meaning that a different signature value will be created every time the algorithm is run. The signature value provided here can be validated against the given keys, but newly generated signature values are not expected to match the example. See Section 7.3.5.\n\n### 3.2. Verifying a Signature\n\nVerification of an HTTP message signature is a process that takes as its input the signature context (including the target message, particularly its Signature and Signature-Input fields) and the requirements for the application. The output of the verification is either a positive verification or an error.\n\nIn order to verify a signature, a verifier *MUST* apply the following algorithm:\n\n1. Parse the Signature and Signature-Input fields as described in Sections 4.1 and 4.2, and extract the signatures to be verified and their labels. 11.If there is more than one signature value present, determine which signature should be processed for this message based on the policy and configuration of the verifier. If an applicable signature is not found, produce an error.12.If the chosen Signature field value does not have a corresponding Signature-Input field value (i.e., one with the same label), produce an error.\n2. Parse the values of the chosen Signature-Input field as a parameterized Inner List to get the ordered list of covered components and the signature parameters for the signature to be verified.\n3. Parse the value of the corresponding Signature field to get the byte array value of the signature to be verified.\n4. Examine the signature parameters to confirm that the signature meets the requirements described in this document, as well as any additional requirements defined by the application such as which message components are required to be covered by the signature ( Section 3.2.1 ).\n5. Determine the verification key material for this signature. If the key material is known through external means such as static configuration or external protocol negotiation, the verifier will use the applicable technique to obtain the key material from this external knowledge. If the key is identified in the signature parameters, the verifier will dereference the key identifier to appropriate key material to use with the signature. The verifier has to determine the trustworthiness of the key material for the context in which the signature is presented. If a key is identified that the verifier does not know or trust for this request or that does not match something preconfigured, the verification *MUST* fail.\n6. Determine the algorithm to apply for verification: 11.Start with the set of allowable algorithms known to the application. If any of the following steps select an algorithm that is not in this set, the signature validation fails.12.If the algorithm is known through external means such as static configuration or external protocol negotiation, the verifier will use that algorithm.13.If the algorithm can be determined from the keying material, such as through an algorithm field on the key value itself, the verifier will use that algorithm.14.If the algorithm is explicitly stated in the signature parameters using a value from the \"HTTP Signature Algorithms\" registry, the verifier will use the referenced algorithm.15.If the algorithm is specified in more than one location (e.g., a combination of static configuration, the algorithm signature parameter, and the key material itself), the resolved algorithms *MUST* be the same. If the algorithms are not the same, the verifier *MUST* fail the verification.\n7. Use the received HTTP message and the parsed signature parameters to recreate the signature base, using the algorithm defined in Section 2.5 . The value of the @signature-params input is the value of the Signature-Input field for this signature serialized according to the rules described in Section 2.3 . Note that this does not include the signature's label from the Signature-Input field.\n8. If the key material is appropriate for the algorithm, apply the appropriate HTTP_VERIFY cryptographic verification algorithm to the signature, recalculated signature base, key material, and signature value. The HTTP_VERIFY primitive and several concrete algorithms are defined in Section 3.3 .\n9. The results of the verification algorithm function are the final results of the cryptographic verification function.\n\nIf any of the above steps fail or produce an error, the signature validation fails.\n\nFor example, verifying the signature with the label sig1 of the following message with the test-key-rsa-pss key (see Appendix B.1.2) and the RSASSA-PSS algorithm described in Section 3.3.1:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: example.com\nDate: Tue, 20 Apr 2021 02:07:55 GMT\nContent-Type: application/json\nContent-Digest: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+T\\\n aPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\nContent-Length: 18\nSignature-Input: sig1=(\"@method\" \"@authority\" \"@path\" \\\n \"content-digest\" \"content-length\" \"content-type\")\\\n ;created=1618884473;keyid=\"test-key-rsa-pss\"\nSignature: sig1=:HIbjHC5rS0BYaa9v4QfD4193TORw7u9edguPh0AW3dMq9WImrl\\\n FrCGUDih47vAxi4L2YRZ3XMJc1uOKk/J0ZmZ+wcta4nKIgBkKq0rM9hs3CQyxXGxH\\\n LMCy8uqK488o+9jrptQ+xFPHK7a9sRL1IXNaagCNN3ZxJsYapFj+JXbmaI5rtAdSf\\\n SvzPuBCh+ARHBmWuNo1UzVVdHXrl8ePL4cccqlazIJdC4QEjrF+Sn4IxBQzTZsL9y\\\n 9TP5FsZYzHvDqbInkTNigBcE9cKOYNFCn4D/WM7F6TNuZO9EgtzepLWcjTymlHzK7\\\n aXq6Am6sfOrpIC49yXjj3ae6HRalVc/g==:\n\n{\"hello\": \"world\"}\n```\n\nWith the additional requirements that at least the method, authority, path, content-digest, content-length, and content-type entries be signed, and that the signature creation timestamp be recent enough at the time of verification, the verification passes.\n\n#### 3.2.1. Enforcing Application Requirements\n\nThe verification requirements specified in this document are intended as a baseline set of restrictions that are generally applicable to all use cases. Applications using HTTP message signatures *MAY* impose requirements above and beyond those specified by this document, as appropriate for their use case.\n\nSome non-normative examples of additional requirements an application might define are:\n\n- Requiring a specific set of header fields to be signed (e.g., Authorization, Content-Digest).\n- Enforcing a maximum signature age from the time of the created timestamp.\n- Rejecting signatures past the expiration time in the expires timestamp. Note that the expiration time is a hint from the signer and that a verifier can always reject a signature ahead of its expiration time.\n- Prohibiting certain signature metadata parameters, such as runtime algorithm signaling with the alg parameter when the algorithm is determined from the key information.\n- Ensuring successful dereferencing of the keyid parameter to valid and appropriate key material.\n- Prohibiting the use of certain algorithms or mandating the use of a specific algorithm.\n- Requiring keys to be of a certain size (e.g., 2048 bits vs. 1024 bits).\n- Enforcing uniqueness of the nonce parameter.\n- Requiring an application-specific value for the tag parameter.\n\nApplication-specific requirements are expected and encouraged. When an application defines additional requirements, it *MUST* enforce them during the signature verification process, and signature verification *MUST* fail if the signature does not conform to the application's requirements.\n\nApplications *MUST* enforce the requirements defined in this document. Regardless of use case, applications *MUST NOT* accept signatures that do not conform to these requirements.\n\n### 3.3. Signature Algorithms\n\nAn HTTP message signature *MUST* use a cryptographic digital signature or MAC method that is appropriate for the key material, environment, and needs of the signer and verifier. This specification does not strictly limit the available signature algorithms, and any signature algorithm that meets these basic requirements *MAY* be used by an application of HTTP message signatures.\n\nFor each signing method, HTTP_SIGN takes as its input the signature base defined in Section 2.5 as a byte array (M) and the signing key material (Ks), and outputs the resultant signature as a byte array (S):\n\n```\nHTTP_SIGN (M, Ks) -> S\n```\n\nFor each verification method, HTTP_VERIFY takes as its input the regenerated signature base defined in Section 2.5 as a byte array (M), the verification key material (Kv), and the presented signature to be verified as a byte array (S), and outputs the verification result (V) as a Boolean:\n\n```\nHTTP_VERIFY (M, Kv, S) -> V\n```\n\nThe following sections contain several common signature algorithms and demonstrate how these cryptographic primitives map to the HTTP_SIGN and HTTP_VERIFY definitions above. Which method to use can be communicated through the explicit algorithm (alg) signature parameter (Section 2.3), by reference to the key material, or through mutual agreement between the signer and verifier. Signature algorithms selected using the alg parameter *MUST* use values from the \"HTTP Signature Algorithms\" registry (Section 6.2).\n\n#### 3.3.1. RSASSA-PSS Using SHA-512\n\nTo sign using this algorithm, the signer applies the RSASSA-PSS-SIGN (K, M) function defined in [RFC8017] with the signer's private signing key (K) and the signature base (M) (Section 2.5). The mask generation function is MGF1 as specified in [RFC8017] with a hash function of SHA-512 [RFC6234]. The salt length (sLen) is 64 bytes. The hash function (Hash) SHA-512 [RFC6234] is applied to the signature base to create the digest content to which the digital signature is applied. The resulting signed content byte array (S) is the HTTP message signature output used in Section 3.1.\n\nTo verify using this algorithm, the verifier applies the RSASSA-PSS-VERIFY ((n, e), M, S) function [RFC8017] using the public key portion of the verification key material (n, e) and the signature base (M) recreated as described in Section 3.2. The mask generation function is MGF1 as specified in [RFC8017] with a hash function of SHA-512 [RFC6234]. The salt length (sLen) is 64 bytes. The hash function (Hash) SHA-512 [RFC6234] is applied to the signature base to create the digest content to which the verification function is applied. The verifier extracts the HTTP message signature to be verified (S) as described in Section 3.2. The results of the verification function indicate whether the signature presented is valid.\n\nNote that the output of the RSASSA-PSS algorithm is non-deterministic; therefore, it is not correct to recalculate a new signature on the signature base and compare the results to an existing signature. Instead, the verification algorithm defined here needs to be used. See Section 7.3.5.\n\nThe use of this algorithm can be indicated at runtime using the rsa-pss-sha512 value for the alg signature parameter.\n\n#### 3.3.2. RSASSA-PKCS1-v1_5 Using SHA-256\n\nTo sign using this algorithm, the signer applies the RSASSA-PKCS1-V1_5-SIGN (K, M) function defined in [RFC8017] with the signer's private signing key (K) and the signature base (M) (Section 2.5). The hash SHA-256 [RFC6234] is applied to the signature base to create the digest content to which the digital signature is applied. The resulting signed content byte array (S) is the HTTP message signature output used in Section 3.1.\n\nTo verify using this algorithm, the verifier applies the RSASSA-PKCS1-V1_5-VERIFY ((n, e), M, S) function [RFC8017] using the public key portion of the verification key material (n, e) and the signature base (M) recreated as described in Section 3.2. The hash function SHA-256 [RFC6234] is applied to the signature base to create the digest content to which the verification function is applied. The verifier extracts the HTTP message signature to be verified (S) as described in Section 3.2. The results of the verification function indicate whether the signature presented is valid.\n\nThe use of this algorithm can be indicated at runtime using the rsa-v1_5-sha256 value for the alg signature parameter.\n\n#### 3.3.3. HMAC Using SHA-256\n\nTo sign and verify using this algorithm, the signer applies the HMAC function [RFC2104] with the shared signing key (K) and the signature base (text) (Section 2.5). The hash function SHA-256 [RFC6234] is applied to the signature base to create the digest content to which the HMAC is applied, giving the signature result.\n\nFor signing, the resulting value is the HTTP message signature output used in Section 3.1.\n\nFor verification, the verifier extracts the HTTP message signature to be verified (S) as described in Section 3.2. The output of the HMAC function is compared bytewise to the value of the HTTP message signature, and the results of the comparison determine the validity of the signature presented.\n\nThe use of this algorithm can be indicated at runtime using the hmac-sha256 value for the alg signature parameter.\n\n#### 3.3.4. ECDSA Using Curve P-256 DSS and SHA-256\n\nTo sign using this algorithm, the signer applies the ECDSA signature algorithm defined in [FIPS186-5] using curve P-256 with the signer's private signing key and the signature base (Section 2.5). The hash SHA-256 [RFC6234] is applied to the signature base to create the digest content to which the digital signature is applied (M). The signature algorithm returns two integer values: r and s. These are both encoded as big-endian unsigned integers, zero-padded to 32 octets each. These encoded values are concatenated into a single 64-octet array consisting of the encoded value of r followed by the encoded value of s. The resulting concatenation of (r, s) is a byte array of the HTTP message signature output used in Section 3.1.\n\nTo verify using this algorithm, the verifier applies the ECDSA signature algorithm defined in [FIPS186-5] using the public key portion of the verification key material and the signature base recreated as described in Section 3.2. The hash function SHA-256 [RFC6234] is applied to the signature base to create the digest content to which the signature verification function is applied (M). The verifier extracts the HTTP message signature to be verified (S) as described in Section 3.2. This value is a 64-octet array consisting of the encoded values of r and s concatenated in order. These are both encoded as big-endian unsigned integers, zero-padded to 32 octets each. The resulting signature value (r, s) is used as input to the signature verification function. The results of the verification function indicate whether the signature presented is valid.\n\nNote that the output of ECDSA signature algorithms is non-deterministic; therefore, it is not correct to recalculate a new signature on the signature base and compare the results to an existing signature. Instead, the verification algorithm defined here needs to be used. See Section 7.3.5.\n\nThe use of this algorithm can be indicated at runtime using the ecdsa-p256-sha256 value for the alg signature parameter.\n\n#### 3.3.5. ECDSA Using Curve P-384 DSS and SHA-384\n\nTo sign using this algorithm, the signer applies the ECDSA signature algorithm defined in [FIPS186-5] using curve P-384 with the signer's private signing key and the signature base (Section 2.5). The hash SHA-384 [RFC6234] is applied to the signature base to create the digest content to which the digital signature is applied (M). The signature algorithm returns two integer values: r and s. These are both encoded as big-endian unsigned integers, zero-padded to 48 octets each. These encoded values are concatenated into a single 96-octet array consisting of the encoded value of r followed by the encoded value of s. The resulting concatenation of (r, s) is a byte array of the HTTP message signature output used in Section 3.1.\n\nTo verify using this algorithm, the verifier applies the ECDSA signature algorithm defined in [FIPS186-5] using the public key portion of the verification key material and the signature base recreated as described in Section 3.2. The hash function SHA-384 [RFC6234] is applied to the signature base to create the digest content to which the signature verification function is applied (M). The verifier extracts the HTTP message signature to be verified (S) as described in Section 3.2. This value is a 96-octet array consisting of the encoded values of r and s concatenated in order. These are both encoded as big-endian unsigned integers, zero-padded to 48 octets each. The resulting signature value (r, s) is used as input to the signature verification function. The results of the verification function indicate whether the signature presented is valid.\n\nNote that the output of ECDSA signature algorithms is non-deterministic; therefore, it is not correct to recalculate a new signature on the signature base and compare the results to an existing signature. Instead, the verification algorithm defined here needs to be used. See Section 7.3.5.\n\nThe use of this algorithm can be indicated at runtime using the ecdsa-p384-sha384 value for the alg signature parameter.\n\n#### 3.3.6. EdDSA Using Curve edwards25519\n\nTo sign using this algorithm, the signer applies the Ed25519 algorithm defined in [Section 5.1.6](https://www.rfc-editor.org/rfc/rfc8032.html#section-5.1.6) of [RFC8032] with the signer's private signing key and the signature base (Section 2.5). The signature base is taken as the input message (M) with no prehash function. The signature is a 64-octet concatenation of R and S as specified in [Section 5.1.6](https://www.rfc-editor.org/rfc/rfc8032.html#section-5.1.6) of [RFC8032], and this is taken as a byte array for the HTTP message signature output used in Section 3.1.\n\nTo verify using this algorithm, the signer applies the Ed25519 algorithm defined in [Section 5.1.7](https://www.rfc-editor.org/rfc/rfc8032.html#section-5.1.7) of [RFC8032] using the public key portion of the verification key material (A) and the signature base recreated as described in Section 3.2. The signature base is taken as the input message (M) with no prehash function. The signature to be verified is processed as the 64-octet concatenation of R and S as specified in [Section 5.1.7](https://www.rfc-editor.org/rfc/rfc8032.html#section-5.1.7) of [RFC8032]. The results of the verification function indicate whether the signature presented is valid.\n\nThe use of this algorithm can be indicated at runtime using the ed25519 value for the alg signature parameter.\n\n#### 3.3.7. JSON Web Signature (JWS) Algorithms\n\nIf the signing algorithm is a JSON Object Signing and Encryption (JOSE) signing algorithm from the \"JSON Web Signature and Encryption Algorithms\" registry established by [RFC7518], the JWS algorithm definition determines the signature and hashing algorithms to apply for both signing and verification.\n\nFor both signing and verification, the HTTP message's signature base (Section 2.5) is used as the entire \"JWS Signing Input\". The JOSE Header [JWS] [RFC7517] is not used, and the signature base is not first encoded in Base64 before applying the algorithm. The output of the JWS Signature is taken as a byte array prior to the Base64url encoding used in JOSE.\n\nThe JWS algorithm *MUST NOT* be \"none\" and *MUST NOT* be any algorithm with a JOSE Implementation Requirement of \"Prohibited\".\n\nJSON Web Algorithm (JWA) values from the \"JSON Web Signature and Encryption Algorithms\" registry are not included as signature parameters. Typically, the JWS algorithm can be signaled using JSON Web Keys (JWKs) or other mechanisms common to JOSE implementations. In fact, JWA values are not registered in the \"HTTP Signature Algorithms\" registry (Section 6.2), and so the explicit alg signature parameter is not used at all when using JOSE signing algorithms.\n\n---\n\n## 4. Including a Message Signature in a Message\n\nHTTP message signatures can be included within an HTTP message via the Signature-Input and Signature fields, both defined within this specification.\n\nThe Signature-Input field identifies the covered components and parameters that describe how the signature was generated, while the Signature field contains the signature value. Each field *MAY* contain multiple labeled values.\n\nAn HTTP message signature is identified by a label within an HTTP message. This label *MUST* be unique within a given HTTP message and *MUST* be used in both the Signature-Input field and the Signature field. The label is chosen by the signer, except where a specific label is dictated by protocol negotiations such as those described in Section 5.\n\nAn HTTP message signature *MUST* use both the Signature-Input field and the Signature field, and each field *MUST* contain the same labels. The presence of a label in one field but not the other is an error.\n\n### 4.3. Multiple Signatures\n\nMultiple distinct signatures *MAY* be included in a single message. Each distinct signature *MUST* have a unique label. These multiple signatures could all be added by the same signer, or they could come from several different signers. For example, a signer may include multiple signatures signing the same message components with different keys or algorithms to support verifiers with different capabilities, or a reverse proxy may include information about the client in fields when forwarding the request to a service host, including a signature over the client's original signature values.\n\nThe following non-normative example starts with a signed request from the client. A reverse proxy takes this request and validates the client's signature:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: example.com\nDate: Tue, 20 Apr 2021 02:07:55 GMT\nContent-Type: application/json\nContent-Length: 18\nContent-Digest: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+T\\\n aPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\nSignature-Input: sig1=(\"@method\" \"@authority\" \"@path\" \\\n \"content-digest\" \"content-type\" \"content-length\")\\\n ;created=1618884475;keyid=\"test-key-ecc-p256\"\nSignature: sig1=:X5spyd6CFnAG5QnDyHfqoSNICd+BUP4LYMz2Q0JXlb//4Ijpzp\\\n +kve2w4NIyqeAuM7jTDX+sNalzA8ESSaHD3A==:\n\n{\"hello\": \"world\"}\n```\n\nThe proxy then alters the message before forwarding it on to the origin server, changing the target host and adding the Forwarded header field defined in [RFC7239]:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: origin.host.internal.example\nDate: Tue, 20 Apr 2021 02:07:56 GMT\nContent-Type: application/json\nContent-Length: 18\nForwarded: for=192.0.2.123;host=example.com;proto=https\nContent-Digest: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+T\\\n aPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\nSignature-Input: sig1=(\"@method\" \"@authority\" \"@path\" \\\n \"content-digest\" \"content-type\" \"content-length\")\\\n ;created=1618884475;keyid=\"test-key-ecc-p256\"\nSignature: sig1=:X5spyd6CFnAG5QnDyHfqoSNICd+BUP4LYMz2Q0JXlb//4Ijpzp\\\n +kve2w4NIyqeAuM7jTDX+sNalzA8ESSaHD3A==:\n\n{\"hello\": \"world\"}\n```\n\nThe proxy is in a position to validate the incoming client's signature and make its own statement to the origin server about the nature of the request that it is forwarding by adding its own signature over the new message before passing it along to the origin server. The proxy also includes all the elements from the original message that are relevant to the origin server's processing. In many cases, the proxy will want to cover all the same components that were covered by the client's signature, which is the case in the following example. Note that in this example, the proxy is signing over the new authority value, which it has changed. The proxy also adds the Forwarded header field to its own signature value. The proxy identifies its own key and algorithm and, in this example, includes an expiration for the signature to indicate to downstream systems that the proxy will not vouch for this signed message past this short time window. This results in a signature base of:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"@method\": POST\n\"@authority\": origin.host.internal.example\n\"@path\": /foo\n\"content-digest\": sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX\\\n +TaPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\n\"content-type\": application/json\n\"content-length\": 18\n\"forwarded\": for=192.0.2.123;host=example.com;proto=https\n\"@signature-params\": (\"@method\" \"@authority\" \"@path\" \\\n \"content-digest\" \"content-type\" \"content-length\" \"forwarded\")\\\n ;created=1618884480;keyid=\"test-key-rsa\";alg=\"rsa-v1_5-sha256\"\\\n ;expires=1618884540\n```\n\nand a signature output value of:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nS6ZzPXSdAMOPjN/6KXfXWNO/f7V6cHm7BXYUh3YD/fRad4BCaRZxP+JH+8XY1I6+8Cy\\\n+CM5g92iHgxtRPz+MjniOaYmdkDcnL9cCpXJleXsOckpURl49GwiyUpZ10KHgOEe11s\\\nx3G2gxI8S0jnxQB+Pu68U9vVcasqOWAEObtNKKZd8tSFu7LB5YAv0RAGhB8tmpv7sFn\\\nIm9y+7X5kXQfi8NMaZaA8i2ZHwpBdg7a6CMfwnnrtflzvZdXAsD3LH2TwevU+/PBPv0\\\nB6NMNk93wUs/vfJvye+YuI87HU38lZHowtznbLVdp770I6VHR6WfgS9ddzirrswsE1w\\\n5o0LV/g==\n```\n\nThese values are added to the HTTP request message by the proxy. The original signature is included under the label sig1, and the reverse proxy's signature is included under the label proxy_sig. The proxy uses the key test-key-rsa to create its signature using the rsa-v1_5-sha256 signature algorithm, while the client's original signature was made using the key test-key-rsa-pss and an RSA-PSS signature algorithm:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: origin.host.internal.example\nDate: Tue, 20 Apr 2021 02:07:56 GMT\nContent-Type: application/json\nContent-Length: 18\nForwarded: for=192.0.2.123;host=example.com;proto=https\nContent-Digest: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+T\\\n aPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\nSignature-Input: sig1=(\"@method\" \"@authority\" \"@path\" \\\n \"content-digest\" \"content-type\" \"content-length\")\\\n ;created=1618884475;keyid=\"test-key-ecc-p256\", \\\n proxy_sig=(\"@method\" \"@authority\" \"@path\" \"content-digest\" \\\n \"content-type\" \"content-length\" \"forwarded\")\\\n ;created=1618884480;keyid=\"test-key-rsa\";alg=\"rsa-v1_5-sha256\"\\\n ;expires=1618884540\nSignature: sig1=:X5spyd6CFnAG5QnDyHfqoSNICd+BUP4LYMz2Q0JXlb//4Ijpzp\\\n +kve2w4NIyqeAuM7jTDX+sNalzA8ESSaHD3A==:, \\\n proxy_sig=:S6ZzPXSdAMOPjN/6KXfXWNO/f7V6cHm7BXYUh3YD/fRad4BCaRZxP+\\\n JH+8XY1I6+8Cy+CM5g92iHgxtRPz+MjniOaYmdkDcnL9cCpXJleXsOckpURl49G\\\n wiyUpZ10KHgOEe11sx3G2gxI8S0jnxQB+Pu68U9vVcasqOWAEObtNKKZd8tSFu7\\\n LB5YAv0RAGhB8tmpv7sFnIm9y+7X5kXQfi8NMaZaA8i2ZHwpBdg7a6CMfwnnrtf\\\n lzvZdXAsD3LH2TwevU+/PBPv0B6NMNk93wUs/vfJvye+YuI87HU38lZHowtznbL\\\n Vdp770I6VHR6WfgS9ddzirrswsE1w5o0LV/g==:\n\n{\"hello\": \"world\"}\n```\n\nWhile the proxy could additionally include the client's Signature field value and Signature-Input fields from the original message in the new signature's covered components, this practice is *NOT RECOMMENDED* due to known weaknesses in signing signature values as discussed in Section 7.3.7. The proxy is in a position to validate the client's signature; the changes the proxy makes to the message will invalidate the existing signature when the message is seen by the origin server. In this example, it is possible for the origin server to have additional information in its signature context to account for the change in authority, though this practice requires additional configuration and extra care as discussed in Section 7.4.4. In other applications, the origin server will not be able to verify the original signature itself but will still want to verify that the proxy has done the appropriate validation of the client's signature. An application that needs to signal successful processing or receipt of a signature would need to carefully specify alternative mechanisms for sending such a signal securely.\n\n---\n\n## 5. Requesting Signatures\n\nWhile a signer is free to attach a signature to a request or response without prompting, it is often desirable for a potential verifier to signal that it expects a signature from a potential signer using the Accept-Signature field.\n\nWhen the Accept-Signature field is sent in an HTTP request message, the field indicates that the client desires the server to sign the response using the identified parameters, and the target message is the response to this request. All responses from resources that support such signature negotiation *SHOULD* either be uncacheable or contain a Vary header field that lists Accept-Signature, in order to prevent a cache from returning a response with a signature intended for a different request.\n\nWhen the Accept-Signature field is used in an HTTP response message, the field indicates that the server desires the client to sign its next request to the server with the identified parameters, and the target message is the client's next request. The client can choose to also continue signing future requests to the same server in the same way.\n\nThe target message of an Accept-Signature field *MUST* include all labeled signatures indicated in the Accept-Signature field, each covering the same identified components of the Accept-Signature field.\n\nThe sender of an Accept-Signature field *MUST* include only identifiers that are appropriate for the type of the target message. For example, if the target message is a request, the covered components cannot include the @status component identifier.\n\n### 5.2. Processing an Accept-Signature\n\nThe receiver of an Accept-Signature field fulfills that header as follows:\n\n1. Parse the field value as a Dictionary.\n2. For each member of the Dictionary: 11.The key is taken as the label of the output signature as specified in Section 4.1.12.Parse the value of the member to obtain the set of covered component identifiers.13.Determine that the covered components are applicable to the target message. If not, the process fails and returns an error.14.Process the requested parameters, such as the signing algorithm and key material. If any requested parameters cannot be fulfilled or if the requested parameters conflict with those deemed appropriate to the target message, the process fails and returns an error.15.Select and generate any additional parameters necessary for completing the signature.16.Create the HTTP message signature over the target message.17.Create the Signature-Input and Signature field values, and associate them with the label.\n3. Optionally create any additional Signature-Input and Signature field values, with unique labels not found in the Accept-Signature field.\n4. Combine all labeled Signature-Input and Signature field values, and attach both fields to the target message.\n\nBy this process, a signature applied to a target message *MUST* have the same label, *MUST* include the same set of covered components, *MUST* process all requested parameters, and *MAY* have additional parameters.\n\nThe receiver of an Accept-Signature field *MAY* ignore any signature request that does not fit application parameters.\n\nThe target message *MAY* include additional signatures not specified by the Accept-Signature field. For example, to cover additional message components, the signer can create a second signature that includes the additional components as well as the signature output of the requested signature.\n\n---\n\n## 6. IANA Considerations\n\nIANA has updated one registry and created four new registries, according to the following sections.\n\n### 6.1. HTTP Field Name Registration\n\nIANA has updated the entries in the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" as follows:\n\n| Field Name | Status | Reference |\n| --- | --- | --- |\n| Signature-Input | permanent | Section 4.1 of RFC 9421 |\n| Signature | permanent | Section 4.2 of RFC 9421 |\n| Accept-Signature | permanent | Section 5.1 of RFC 9421 |\n\n### 6.2. HTTP Signature Algorithms Registry\n\nThis document defines HTTP signature algorithms, for which IANA has created and now maintains a new registry titled \"HTTP Signature Algorithms\". Initial values for this registry are given in Section 6.2.2. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy [RFC8126].\n\nThe algorithms listed in this registry identify some possible cryptographic algorithms for applications to use with this specification, but the entries neither represent an exhaustive list of possible algorithms nor indicate fitness for purpose with any particular application of this specification. An application is free to implement any algorithm that suits its needs, provided the signer and verifier can agree to the parameters of that algorithm in a secure and deterministic fashion. When an application needs to signal the use of a particular algorithm at runtime using the alg signature parameter, this registry provides a mapping between the value of that parameter and a particular algorithm. However, the use of the alg parameter needs to be treated with caution to avoid various forms of algorithm confusion and substitution attacks, as discussed in Section 7.\n\nThe Status value should reflect standardization status and the broad opinion of relevant interest groups such as the IETF or security-related Standards Development Organizations (SDOs). When an algorithm is first registered, the designated expert (DE) should set the Status field to \"Active\" if there is consensus for the algorithm to be generally recommended as secure or \"Provisional\" if the algorithm has not reached that consensus, e.g., for an experimental algorithm. A status of \"Provisional\" does not mean that the algorithm is known to be insecure but instead indicates that the algorithm has not reached consensus regarding its properties. If at a future time the algorithm as registered is found to have flaws, the registry entry can be updated and the algorithm can be marked as \"Deprecated\" to indicate that the algorithm has been found to have problems. This status does not preclude an application from using a particular algorithm; rather, it serves to provide a warning regarding possible known issues with an algorithm that need to be considered by the application. The DE can further ensure that the registration includes an explanation and reference for the Status value; this is particularly important for deprecated algorithms.\n\nThe DE is expected to do the following:\n\n- Ensure that the algorithms referenced by a registered algorithm identifier are fully defined with all parameters (e.g., salt, hash, required key length) fixed by the defining text.\n- Ensure that the algorithm definition fully specifies the HTTP_SIGN and HTTP_VERIFY primitive functions, including how all defined inputs and outputs map to the underlying cryptographic algorithm.\n- Reject any registrations that are aliases of existing registrations.\n- Ensure that all registrations follow the template presented in Section 6.2.1 ; this includes ensuring that the length of the name is not excessive while still being unique and recognizable.\n\nThis specification creates algorithm identifiers by including major parameters in the identifier String in order to make the algorithm name unique and recognizable by developers. However, algorithm identifiers in this registry are to be interpreted as whole String values and not as a combination of parts. That is to say, it is expected that implementors understand rsa-pss-sha512 as referring to one specific algorithm with its hash, mask, and salt values set as defined in the defining text that establishes the identifier in question. Implementors do not parse out the rsa, pss, and sha512 portions of the identifier to determine parameters of the signing algorithm from the String, and the registration of one combination of parameters does not imply the registration of other combinations.\n\n#### 6.2.1. Registration Template\n\nAlgorithm Name:\n\nAn identifier for the HTTP signature algorithm. The name *MUST* be an ASCII string that conforms to the sf-string ABNF rule in [Section 3.3.3](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.3) of [STRUCTURED-FIELDS] and *SHOULD NOT* exceed 20 characters in length. The identifier *MUST* be unique within the context of the registry.\n\nDescription:\n\nA brief description of the algorithm used to sign the signature base.\n\nStatus:\n\nThe status of the algorithm. *MUST* start with one of the following values and *MAY* contain additional explanatory text. The options are:\"Active\":For algorithms without known problems. The signature algorithm is fully specified, and its security properties are understood.\"Provisional\":For unproven algorithms. The signature algorithm is fully specified, but its security properties are not known or proven.\"Deprecated\":For algorithms with known security issues. The signature algorithm is no longer recommended for general use and might be insecure or unsafe in some known circumstances.\n\nReference:\n\nReference to the document or documents that specify the algorithm, preferably including a URI that can be used to retrieve a copy of the document(s). An indication of the relevant sections may also be included but is not required.\n\n#### 6.2.2. Initial Contents\n\nThe table below contains the initial contents of the \"HTTP Signature Algorithms\" registry.\n\n| Algorithm Name | Description | Status | Reference |\n| --- | --- | --- | --- |\n| rsa-pss-sha512 | RSASSA-PSS using SHA-512 | Active | Section 3.3.1 of RFC 9421 |\n| rsa-v1_5-sha256 | RSASSA-PKCS1-v1_5 using SHA-256 | Active | Section 3.3.2 of RFC 9421 |\n| hmac-sha256 | HMAC using SHA-256 | Active | Section 3.3.3 of RFC 9421 |\n| ecdsa-p256-sha256 | ECDSA using curve P-256 DSS and SHA-256 | Active | Section 3.3.4 of RFC 9421 |\n| ecdsa-p384-sha384 | ECDSA using curve P-384 DSS and SHA-384 | Active | Section 3.3.5 of RFC 9421 |\n| ed25519 | EdDSA using curve edwards25519 | Active | Section 3.3.6 of RFC 9421 |\n\n### 6.3. HTTP Signature Metadata Parameters Registry\n\nThis document defines the signature parameters structure (Section 2.3), which may have parameters containing metadata about a message signature. IANA has created and now maintains a new registry titled \"HTTP Signature Metadata Parameters\" to record and maintain the set of parameters defined for use with member values in the signature parameters structure. Initial values for this registry are given in Section 6.3.2. Future assignments and modifications to existing assignments are to be made through the Expert Review registration policy [RFC8126].\n\nThe DE is expected to do the following:\n\n- Ensure that the name follows the template presented in Section 6.3.1 ; this includes ensuring that the length of the name is not excessive while still being unique and recognizable for its defined function.\n- Ensure that the defined functionality is clear and does not conflict with other registered parameters.\n- Ensure that the definition of the metadata parameter includes its behavior when used as part of the normal signature process as well as when used in an Accept-Signature field.\n\n#### 6.3.1. Registration Template\n\nName:\n\nAn identifier for the HTTP signature metadata parameter. The name *MUST* be an ASCII string that conforms to the key ABNF rule defined in [Section 3.1.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.1.2) of [STRUCTURED-FIELDS] and *SHOULD NOT* exceed 20 characters in length. The identifier *MUST* be unique within the context of the registry.\n\nDescription:\n\nA brief description of the metadata parameter and what it represents.\n\nReference:\n\nReference to the document or documents that specify the parameter, preferably including a URI that can be used to retrieve a copy of the document(s). An indication of the relevant sections may also be included but is not required.\n\n#### 6.3.2. Initial Contents\n\nThe table below contains the initial contents of the \"HTTP Signature Metadata Parameters\" registry. Each row in the table represents a distinct entry in the registry.\n\n| Name | Description | Reference |\n| --- | --- | --- |\n| alg | Explicitly declared signature algorithm | Section 2.3 of RFC 9421 |\n| created | Timestamp of signature creation | Section 2.3 of RFC 9421 |\n| expires | Timestamp of proposed signature expiration | Section 2.3 of RFC 9421 |\n| keyid | Key identifier for the signing and verification keys used to create this signature | Section 2.3 of RFC 9421 |\n| nonce | A single-use nonce value | Section 2.3 of RFC 9421 |\n| tag | An application-specific tag for a signature | Section 2.3 of RFC 9421 |\n\n### 6.4. HTTP Signature Derived Component Names Registry\n\nThis document defines a method for canonicalizing HTTP message components, including components that can be derived from the context of the target message outside of the HTTP fields. These derived components are identified by a unique String, known as the component name. Component names for derived components always start with the \"at\" (@) symbol to distinguish them from HTTP field names. IANA has created and now maintains a new registry titled \"HTTP Signature Derived Component Names\" to record and maintain the set of non-field component names and the methods used to produce their associated component values. Initial values for this registry are given in Section 6.4.2. Future assignments and modifications to existing assignments are to be made through the Expert Review registration policy [RFC8126].\n\nThe DE is expected to do the following:\n\n- Ensure that the name follows the template presented in Section 6.4.1 ; this includes ensuring that the length of the name is not excessive while still being unique and recognizable for its defined function.\n- Ensure that the component value represented by the registration request can be deterministically derived from the target HTTP message.\n- Ensure that any parameters defined for the registration request are clearly documented, along with their effects on the component value.\n\nThe DE should ensure that a registration is sufficiently distinct from existing derived component definitions to warrant its registration.\n\nWhen setting a registered item's status to \"Deprecated\", the DE should ensure that a reason for the deprecation is documented, along with instructions for moving away from the deprecated functionality.\n\n#### 6.4.1. Registration Template\n\nName:\n\nA name for the HTTP derived component. The name *MUST* begin with the \"at\" (@) character followed by an ASCII string consisting only of lowercase characters (\"a\"-\"z\"), digits (\"0\"-\"9\"), and hyphens (\"-\"), and *SHOULD NOT* exceed 20 characters in length. The name *MUST* be unique within the context of the registry.\n\nDescription:\n\nA description of the derived component.\n\nStatus:\n\nA brief text description of the status of the algorithm. The description *MUST* begin with one of \"Active\" or \"Deprecated\" and *MAY* provide further context or explanation as to the reason for the status. A value of \"Deprecated\" indicates that the derived component name is no longer recommended for use.\n\nTarget:\n\nThe valid message targets for the derived parameter. *MUST* be one of the values \"Request\", \"Response\", or \"Request, Response\". The semantics of these entries are defined in Section 2.2.\n\nReference:\n\nReference to the document or documents that specify the derived component, preferably including a URI that can be used to retrieve a copy of the document(s). An indication of the relevant sections may also be included but is not required.\n\n#### 6.4.2. Initial Contents\n\nThe table below contains the initial contents of the \"HTTP Signature Derived Component Names\" registry.\n\n| Name | Description | Status | Target | Reference |\n| --- | --- | --- | --- | --- |\n| @signature-params | Reserved for signature parameters line in signature base | Active | Request, Response | Section 2.3 of RFC 9421 |\n| @method | The HTTP request method | Active | Request | Section 2.2.1 of RFC 9421 |\n| @authority | The HTTP authority, or target host | Active | Request | Section 2.2.3 of RFC 9421 |\n| @scheme | The URI scheme of the request URI | Active | Request | Section 2.2.4 of RFC 9421 |\n| @target-uri | The full target URI of the request | Active | Request | Section 2.2.2 of RFC 9421 |\n| @request-target | The request target of the request | Active | Request | Section 2.2.5 of RFC 9421 |\n| @path | The full path of the request URI | Active | Request | Section 2.2.6 of RFC 9421 |\n| @query | The full query of the request URI | Active | Request | Section 2.2.7 of RFC 9421 |\n| @query-param | A single named query parameter | Active | Request | Section 2.2.8 of RFC 9421 |\n| @status | The status code of the response | Active | Response | Section 2.2.9 of RFC 9421 |\n\n### 6.5. HTTP Signature Component Parameters Registry\n\nThis document defines several kinds of component identifiers, some of which can be parameterized in specific circumstances to provide unique modified behavior. IANA has created and now maintains a new registry titled \"HTTP Signature Component Parameters\" to record and maintain the set of parameter names, the component identifiers they are associated with, and the modifications these parameters make to the component value. Definitions of parameters *MUST* define the targets to which they apply (such as specific field types, derived components, or contexts). Initial values for this registry are given in Section 6.5.2. Future assignments and modifications to existing assignments are to be made through the Expert Review registration policy [RFC8126].\n\nThe DE is expected to do the following:\n\n- Ensure that the name follows the template presented in Section 6.5.1 ; this includes ensuring that the length of the name is not excessive while still being unique and recognizable for its defined function.\n- Ensure that the definition of the field sufficiently defines any interactions or incompatibilities with other existing parameters known at the time of the registration request.\n- Ensure that the component value defined by the component identifier with the parameter applied can be deterministically derived from the target HTTP message in cases where the parameter changes the component value.\n\n#### 6.5.1. Registration Template\n\nName:\n\nA name for the parameter. The name *MUST* be an ASCII string that conforms to the key ABNF rule defined in [Section 3.1.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.1.2) of [STRUCTURED-FIELDS] and *SHOULD NOT* exceed 20 characters in length. The name *MUST* be unique within the context of the registry.\n\nDescription:\n\nA description of the parameter's function.\n\nReference:\n\nReference to the document or documents that specify the derived component, preferably including a URI that can be used to retrieve a copy of the document(s). An indication of the relevant sections may also be included but is not required.\n\n#### 6.5.2. Initial Contents\n\nThe table below contains the initial contents of the \"HTTP Signature Component Parameters\" registry.\n\n| Name | Description | Reference |\n| --- | --- | --- |\n| sf | Strict Structured Field serialization | Section 2.1.1 of RFC 9421 |\n| key | Single key value of Dictionary Structured Fields | Section 2.1.2 of RFC 9421 |\n| bs | Byte Sequence wrapping indicator | Section 2.1.3 of RFC 9421 |\n| tr | Trailer | Section 2.1.4 of RFC 9421 |\n| req | Related request indicator | Section 2.4 of RFC 9421 |\n| name | Single named query parameter | Section 2.2.8 of RFC 9421 |\n\n---\n\n## 7. Security Considerations\n\nIn order for an HTTP message to be considered *covered* by a signature, all of the following conditions have to be true:\n\n- A signature is expected or allowed on the message by the verifier.\n- The signature exists on the message.\n- The signature is verified against the identified key material and algorithm.\n- The key material and algorithm are appropriate for the context of the message.\n- The signature is within expected time boundaries.\n- The signature covers the expected content, including any critical components.\n- The list of covered components is applicable to the context of the message.\n\nIn addition to the application requirement definitions listed in Section 1.4, the following security considerations provide discussion and context regarding the requirements of creating and verifying signatures on HTTP messages.\n\n### 7.1. General Considerations\n\n#### 7.1.1. Skipping Signature Verification\n\nHTTP message signatures only provide security if the signature is verified by the verifier. Since the message to which the signature is attached remains a valid HTTP message without the Signature or Signature-Input fields, it is possible for a verifier to ignore the output of the verification function and still process the message. Common reasons for this could be relaxed requirements in a development environment or a temporary suspension of enforcing verification while debugging an overall system. Such temporary suspensions are difficult to detect under positive-example testing, since a good signature will always trigger a valid response whether or not it has been checked.\n\nTo detect this, verifiers should be tested using both valid and invalid signatures, ensuring that an invalid signature fails as expected.\n\n#### 7.1.2. Use of TLS\n\nThe use of HTTP message signatures does not negate the need for TLS or its equivalent to protect information in transit. Message signatures provide message integrity over the covered message components but do not provide any confidentiality for communication between parties.\n\nTLS provides such confidentiality between the TLS endpoints. As part of this, TLS also protects the signature data itself from being captured by an attacker. This is an important step in preventing signature replay (Section 7.2.2).\n\nWhen TLS is used, it needs to be deployed according to the recommendations provided in [BCP195].\n\n### 7.2. Message Processing and Selection\n\n#### 7.2.1. Insufficient Coverage\n\nAny portions of the message not covered by the signature are susceptible to modification by an attacker without affecting the signature. An attacker can take advantage of this by introducing or modifying a header field or other message component that will change the processing of the message but will not be covered by the signature. Such an altered message would still pass signature verification, but when the verifier processes the message as a whole, the unsigned content injected by the attacker would subvert the trust conveyed by the valid signature and change the outcome of processing the message.\n\nTo combat this, an application of this specification should require as much of the message as possible to be signed, within the limits of the application and deployment. The verifier should only trust message components that have been signed. Verifiers could also strip out any sensitive unsigned portions of the message before processing of the message continues.\n\n#### 7.2.2. Signature Replay\n\nSince HTTP message signatures allow sub-portions of the HTTP message to be signed, it is possible for two different HTTP messages to validate against the same signature. The most extreme form of this would be a signature over no message components. If such a signature were intercepted, it could be replayed at will by an attacker, attached to any HTTP message. Even with sufficient component coverage, a given signature could be applied to two similar HTTP messages, allowing a message to be replayed by an attacker with the signature intact.\n\nTo counteract these kinds of attacks, it's first important for the signer to cover sufficient portions of the message to differentiate it from other messages. In addition, the signature can use the nonce signature parameter to provide a per-message unique value to allow the verifier to detect replay of the signature itself if a nonce value is repeated. Furthermore, the signer can provide a timestamp for when the signature was created and a time at which the signer considers the signature to be expired, limiting the utility of a captured signature value.\n\nIf a verifier wants to trigger a new signature from a signer, it can send the Accept-Signature header field with a new nonce parameter. An attacker that is simply replaying a signature would not be able to generate a new signature with the chosen nonce value.\n\n#### 7.2.3. Choosing Message Components\n\nApplications of HTTP message signatures need to decide which message components will be covered by the signature. Depending on the application, some components could be expected to be changed by intermediaries prior to the signature's verification. If these components are covered, such changes would, by design, break the signature.\n\nHowever, this document allows for flexibility in determining which components are signed precisely so that a given application can choose the appropriate portions of the message that need to be signed, avoiding problematic components. For example, a web application framework that relies on rewriting query parameters might avoid using the @query derived component in favor of sub-indexing the query value using @query-param derived components instead.\n\nSome components are expected to be changed by intermediaries and ought not to be signed under most circumstances. The Via and Forwarded header fields, for example, are expected to be manipulated by proxies and other middleboxes, including replacing or entirely dropping existing values. These fields should not be covered by the signature, except in very limited and tightly coupled scenarios.\n\nAdditional considerations for choosing signature aspects are discussed in Section 1.4.\n\n#### 7.2.4. Choosing Signature Parameters and Derived Components over HTTP Fields\n\nSome HTTP fields have values and interpretations that are similar to HTTP signature parameters or derived components. In most cases, it is more desirable to sign the non-field alternative. In particular, the following fields should usually not be included in the signature unless the application specifically requires it:\n\n\"date\"\n\nThe Date header field value represents the timestamp of the HTTP message. However, the creation time of the signature itself is encoded in the created signature parameter. These two values can be different, depending on how the signature and the HTTP message are created and serialized. Applications processing signatures for valid time windows should use the created signature parameter for such calculations. An application could also put limits on how much skew there is between the Date field and the created signature parameter, in order to limit the application of a generated signature to different HTTP messages. See also Sections 7.2.2 and 7.2.1.\n\n\"host\"\n\nThe Host header field is specific to HTTP/1.1, and its functionality is subsumed by the @authority derived component, defined in Section 2.2.3. In order to preserve the value across different HTTP versions, applications should always use the @authority derived component. See also Section 7.5.4.\n\n#### 7.2.5. Signature Labels\n\nHTTP message signature values are identified in the Signature and Signature-Input field values by unique labels. These labels are chosen only when attaching the signature values to the message and are not accounted for during the signing process. An intermediary is allowed to relabel an existing signature when processing the message.\n\nTherefore, applications should not rely on specific labels being present, and applications should not put semantic meaning on the labels themselves. Instead, additional signature parameters can be used to convey whatever additional meaning is required to be attached to, and covered by, the signature. In particular, the tag parameter can be used to define an application-specific value as described in Section 7.2.7.\n\n#### 7.2.6. Multiple Signature Confusion\n\nSince multiple signatures can be applied to one message (Section 4.3), it is possible for an attacker to attach their own signature to a captured message without modifying existing signatures. This new signature could be completely valid based on the attacker's key, or it could be an invalid signature for any number of reasons. Each of these situations needs to be accounted for.\n\nA verifier processing a set of valid signatures needs to account for all of the signers, identified by the signing keys. Only signatures from expected signers should be accepted, regardless of the cryptographic validity of the signature itself.\n\nA verifier processing a set of signatures on a message also needs to determine what to do when one or more of the signatures are not valid. If a message is accepted when at least one signature is valid, then a verifier could drop all invalid signatures from the request before processing the message further. Alternatively, if the verifier rejects a message for a single invalid signature, an attacker could use this to deny service to otherwise valid messages by injecting invalid signatures alongside the valid signatures.\n\n#### 7.2.7. Collision of Application-Specific Signature Tag\n\nMultiple applications and protocols could apply HTTP signatures on the same message simultaneously. In fact, this is a desired feature in many circumstances; see Section 4.3. A naive verifier could become confused while processing multiple signatures, either accepting or rejecting a message based on an unrelated or irrelevant signature. In order to help an application select which signatures apply to its own processing, the application can declare a specific value for the tag signature parameter as defined in Section 2.3. For example, a signature targeting an application gateway could require tag=\"app-gateway\" as part of the signature parameters for that application.\n\nThe use of the tag parameter does not prevent an attacker from also using the same value as a target application, since the parameter's value is public and otherwise unrestricted. As a consequence, a verifier should only use a value of the tag parameter to limit which signatures to check. Each signature still needs to be examined by the verifier to ensure that sufficient coverage is provided, as discussed in Section 7.2.1.\n\n#### 7.2.8. Message Content\n\nOn its own, this specification does not provide coverage for the content of an HTTP message under the signature, in either a request or a response. However, [DIGEST] defines a set of fields that allow a cryptographic digest of the content to be represented in a field. Once this field is created, it can be included just like any other field as defined in Section 2.1.\n\nFor example, in the following response message:\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/json\n\n{\"hello\": \"world\"}\n```\n\nThe digest of the content can be added to the Content-Digest field as follows:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 200 OK\nContent-Type: application/json\nContent-Digest: \\\n sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:\n\n{\"hello\": \"world\"}\n```\n\nThis field can be included in a signature base just like any other field along with the basic signature parameters:\n\n```\n\"@status\": 200\n\"content-digest\": \\\n sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:\n\"@signature-input\": (\"@status\" \"content-digest\")\n```\n\nFrom here, the signing process proceeds as usual.\n\nUpon verification, it is important that the verifier validate not only the signature but also the value of the Content-Digest field itself against the actual received content. Unless the verifier performs this step, it would be possible for an attacker to substitute the message content but leave the Content-Digest field value untouched to pass the signature. Since only the field value is covered by the signature directly, checking only the signature is not sufficient protection against such a substitution attack.\n\nAs discussed in [DIGEST], the value of the Content-Digest field is dependent on the content encoding of the message. If an intermediary changes the content encoding, the resulting Content-Digest value would change. This would in turn invalidate the signature. Any intermediary performing such an action would need to apply a new signature with the updated Content-Digest field value, similar to the reverse proxy use case discussed in Section 4.3.\n\nApplications that make use of the req parameter (Section 2.4) also need to be aware of the limitations of this functionality. Specifically, if a client does not include something like a Content-Digest header field in the request, the server is unable to include a signature that covers the request's content.\n\n### 7.3. Cryptographic Considerations\n\n#### 7.3.1. Cryptography and Signature Collision\n\nThis document does not define any of its own cryptographic primitives and instead relies on other specifications to define such elements. If the signature algorithm or key used to process the signature base is vulnerable to any attacks, the resulting signature will also be susceptible to these same attacks.\n\nA common attack against signature systems is to force a signature collision, where the same signature value successfully verifies against multiple different inputs. Since this specification relies on reconstruction of the signature base from an HTTP message and the list of components signed is fixed in the signature, it is difficult but not impossible for an attacker to effect such a collision. An attacker would need to manipulate the HTTP message and its covered message components in order to make the collision effective.\n\nTo counter this, only vetted keys and signature algorithms should be used to sign HTTP messages. The \"HTTP Signature Algorithms\" registry is one source of trusted signature algorithms for applications to apply to their messages.\n\nWhile it is possible for an attacker to substitute the signature parameters value or the signature value separately, the signature base generation algorithm (Section 2.5) always covers the signature parameters as the final value in the signature base using a deterministic serialization method. This step strongly binds the signature base with the signature value in a way that makes it much more difficult for an attacker to perform a partial substitution on the signature base.\n\n#### 7.3.2. Key Theft\n\nA foundational assumption of signature-based cryptographic systems is that the signing key is not compromised by an attacker. If the keys used to sign the message are exfiltrated or stolen, the attacker will be able to generate their own signatures using those keys. As a consequence, signers have to protect any signing key material from exfiltration, capture, and use by an attacker.\n\nTo combat this, signers can rotate keys over time to limit the amount of time that stolen keys are useful. Signers can also use key escrow and storage systems to limit the attack surface against keys. Furthermore, the use of asymmetric signing algorithms exposes key material less than the use of symmetric signing algorithms (Section 7.3.3).\n\n#### 7.3.3. Symmetric Cryptography\n\nThis document allows both asymmetric and symmetric cryptography to be applied to HTTP messages. By their nature, symmetric cryptographic methods require the same key material to be known by both the signer and verifier. This effectively means that a verifier is capable of generating a valid signature, since they have access to the same key material. An attacker that is able to compromise a verifier would be able to then impersonate a signer.\n\nWhere possible, asymmetric methods or secure key agreement mechanisms should be used in order to avoid this type of attack. When symmetric methods are used, distribution of the key material needs to be protected by the overall system. One technique for this is the use of separate cryptographic modules that separate the verification process (and therefore the key material) from other code, minimizing the vulnerable attack surface. Another technique is the use of key derivation functions that allow the signer and verifier to agree on unique keys for each message without having to share the key values directly.\n\nAdditionally, if symmetric algorithms are allowed within a system, special care must be taken to avoid key downgrade attacks (Section 7.3.6).\n\n#### 7.3.4. Key Specification Mixup\n\nThe existence of a valid signature on an HTTP message is not sufficient to prove that the message has been signed by the appropriate party. It is up to the verifier to ensure that a given key and algorithm are appropriate for the message in question. If the verifier does not perform such a step, an attacker could substitute their own signature using their own key on a message and force a verifier to accept and process it. To combat this, the verifier needs to ensure not only that the signature can be validated for a message but that the key and algorithm used are appropriate.\n\n#### 7.3.5. Non-deterministic Signature Primitives\n\nSome cryptographic primitives, such as RSA-PSS and ECDSA, have non-deterministic outputs, which include some amount of entropy within the algorithm. For such algorithms, multiple signatures generated in succession will not match. A lazy implementation of a verifier could ignore this distinction and simply check for the same value being created by re-signing the signature base. Such an implementation would work for deterministic algorithms such as HMAC and EdDSA but fail to verify valid signatures made using non-deterministic algorithms. It is therefore important that a verifier always use the correctly defined verification function for the algorithm in question and not do a simple comparison.\n\n#### 7.3.6. Key and Algorithm Specification Downgrades\n\nApplications of this specification need to protect against key specification downgrade attacks. For example, the same RSA key can be used for both RSA-PSS and RSA v1.5 signatures. If an application expects a key to only be used with RSA-PSS, it needs to reject signatures for any key that uses the weaker RSA 1.5 specification.\n\nAnother example of a downgrade attack would be when an asymmetric algorithm is expected, such as RSA-PSS, but an attacker substitutes a signature using a symmetric algorithm, such as HMAC. A naive verifier implementation could use the value of the public RSA key as the input to the HMAC verification function. Since the public key is known to the attacker, this would allow the attacker to create a valid HMAC signature against this known key. To prevent this, the verifier needs to ensure that both the key material and the algorithm are appropriate for the usage in question. Additionally, while this specification does allow runtime specification of the algorithm using the alg signature parameter, applications are encouraged to use other mechanisms such as static configuration or a higher-protocol-level algorithm specification instead, preventing an attacker from substituting the algorithm specified.\n\n#### 7.3.7. Signing Signature Values\n\nWhen applying the req parameter (Section 2.4) or multiple signatures (Section 4.3) to a message, it is possible to sign the value of an existing Signature field, thereby covering the bytes of the existing signature output in the new signature's value. While it would seem that this practice would transitively cover the components under the original signature in a verifiable fashion, the attacks described in [JACKSON2019] can be used to impersonate a signature output value on an unrelated message.\n\nIn this example, Alice intends to send a signed request to Bob, and Bob wants to provide a signed response to Alice that includes a cryptographic proof that Bob is responding to Alice's incoming message. Mallory wants to intercept this traffic and replace Alice's message with her own, without Alice being aware that the interception has taken place.\n\n1. Alice creates a message Req_A and applies a signature Sig_A using her private key Key_A_Sign .\n2. Alice believes she is sending Req_A to Bob.\n3. Mallory intercepts Req_A and reads the value Sig_A from this message.\n4. Mallory generates a different message Req_M to send to Bob instead.\n5. Mallory crafts a signing key Key_M_Sign such that she can create a valid signature Sig_M over her request Req_M using this key, but the byte value of Sig_M exactly equals that of Sig_A .\n6. Mallory sends Req_M with Sig_M to Bob.\n7. Bob validates Sig_M against Mallory's verification key Key_M_Verify . At no time does Bob think that he's responding to Alice.\n8. Bob responds with response message Res_B to Req_M and creates signature Sig_B over this message using his key Key_B_Sign . Bob includes the value of Sig_M under Sig_B 's covered components but does not include anything else from the request message.\n9. Mallory receives the response Res_B from Bob, including the signature Sig_B value. Mallory replays this response to Alice.\n10. Alice reads Res_B from Mallory and verifies Sig_B using Bob's verification key Key_B_Verify . Alice includes the bytes of her original signature Sig_A in the signature base, and the signature verifies.\n11. Alice is led to believe that Bob has responded to her message and believes she has cryptographic proof of this happening, but in fact Bob responded to Mallory's malicious request and Alice is none the wiser.\n\nTo mitigate this, Bob can sign more portions of the request message than just the Signature field, in order to more fully differentiate Alice's message from Mallory's. Applications using this feature, particularly for non-repudiation purposes, can stipulate that any components required in the original signature also be covered separately in the second signature. For signed messages, requiring coverage of the corresponding Signature-Input field of the first signature ensures that unique items such as nonces and timestamps are also covered sufficiently by the second signature.\n\n### 7.4. Matching Signature Parameters to the Target Message\n\n#### 7.4.1. Modification of Required Message Parameters\n\nAn attacker could effectively deny a service by modifying an otherwise benign signature parameter or signed message component. While rejecting a modified message is the desired behavior, consistently failing signatures could lead to (1) the verifier turning off signature checking in order to make systems work again (see Section 7.1.1) or (2) the application minimizing the requirements related to the signed component.\n\nIf such failures are common within an application, the signer and verifier should compare their generated signature bases with each other to determine which part of the message is being modified. If an expected modification is found, the signer and verifier can agree on an alternative set of requirements that will pass. However, the signer and verifier should not remove the requirement to sign the modified component when it is suspected that an attacker is modifying the component.\n\n#### 7.4.2. Matching Values of Covered Components to Values in the Target Message\n\nThe verifier needs to make sure that the signed message components match those in the message itself. For example, the @method derived component requires that the value within the signature base be the same as the HTTP method used when presenting this message. This specification encourages this by requiring the verifier to derive the signature base from the message, but lazy caching or conveyance of a raw signature base to a processing subsystem could lead to downstream verifiers accepting a message that does not match the presented signature.\n\nTo counter this, the component that generates the signature base needs to be trusted by both the signer and verifier within a system.\n\n#### 7.4.3. Message Component Source and Context\n\nThe signature context for deriving message component values includes the target HTTP message itself, any associated messages (such as the request that triggered a response), and additional information that the signer or verifier has access to. Both signers and verifiers need to carefully consider the source of all information when creating component values for the signature base and take care not to take information from untrusted sources. Otherwise, an attacker could leverage such a loosely defined message context to inject their own values into the signature base string, overriding or corrupting the intended values.\n\nFor example, in most situations, the target URI of the message is as defined in [HTTP], [Section 7.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1). However, let's say that there is an application that requires signing of the @authority of the incoming request, but the application doing the processing is behind a reverse proxy. Such an application would expect a change in the @authority value, and it could be configured to know the external target URI as seen by the client on the other side of the proxy. This application would use this configured value as its target URI for the purposes of deriving message component values such as @authority instead of using the target URI of the incoming message.\n\nThis approach is not without problems, as a misconfigured system could accept signed requests intended for different components in the system. For this scenario, an intermediary could instead add its own signature to be verified by the application directly, as demonstrated in Section 4.3. This alternative approach requires a more active intermediary but relies less on the target application knowing external configuration values.\n\nAs another example, Section 2.4 defines a method for signing response messages and also including portions of the request message that triggered the response. In this case, the context for component value calculation is the combination of the response and request messages, not just the single message to which the signature is applied. For this feature, the req flag allows both signers to explicitly signal which part of the context is being sourced for a component identifier's value. Implementations need to ensure that only the intended message is being referred to for each component; otherwise, an attacker could attempt to subvert a signature by manipulating one side or the other.\n\n#### 7.4.4. Multiple Message Component Contexts\n\nIt is possible that the context for deriving message component values could be distinct for each signature present within a single message. This is particularly the case when proxies mutate messages and include signatures over the mutated values, in addition to any existing signatures. For example, a reverse proxy can replace a public hostname in a request to a service with the hostname for the individual service host to which it is forwarding the request. If both the client and the reverse proxy add signatures covering @authority, the service host will see two signatures on the request, each signing different values for the @authority message component, reflecting the change to that component as the message made its way from the client to the service host.\n\nIn such a case, it's common for the internal service to verify only one of the signatures or to use externally configured information, as discussed in Section 7.4.3. However, a verifier processing both signatures has to use a different message component context for each signature, since the component value for the @authority component will be different for each signature. Verifiers like this need to be aware of both the reverse proxy's context for incoming messages and the target service's context for the message coming from the reverse proxy. The verifier needs to take particular care to apply the correct context to the correct signature; otherwise, an attacker could use knowledge of this complex setup to confuse the inputs to the verifier.\n\nSuch verifiers also need to ensure that any differences in message component contexts between signatures are expected and permitted. For example, in the above scenario, the reverse proxy could include the original hostname in a Forwarded header field and could sign @authority, forwarded, and the client's entry in the Signature field. The verifier can use the hostname from the Forwarded header field to confirm that the hostname was transformed as expected.\n\n### 7.5. HTTP Processing\n\n#### 7.5.2. Semantically Equivalent Field Values\n\nThe signature base generation algorithm (Section 2.5) uses the value of an HTTP field as its component value. In the common case, this amounts to taking the actual bytes of the field value as the component value for both the signer and verifier. However, some field values allow for transformation of the values in semantically equivalent ways that alter the bytes used in the value itself. For example, a field definition can declare some or all of its values to be case insensitive or to have special handling of internal whitespace characters. Other fields have expected transformations from intermediaries, such as the removal of comments in the Via header field. In such cases, a verifier could be tripped up by using the equivalent transformed field value, which would differ from the byte value used by the signer. The verifier would have a difficult time finding this class of errors, since the value of the field is still acceptable for the application but the actual bytes required by the signature base would not match.\n\nWhen processing such fields, the signer and verifier have to agree on how to handle such transformations, if at all. One option is to not sign problematic fields, but care must be taken to ensure that there is still sufficient signature coverage (Section 7.2.1) for the application. Another option is to define an application-specific canonicalization value for the field before it is added to the HTTP message, such as to always remove internal comments before signing or to always transform values to lowercase. Since these transformations are applied prior to the field being used as input to the signature base generation algorithm, the signature base will still simply contain the byte value of the field as it appears within the message. If the transformations were to be applied after the value is extracted from the message but before it is added to the signature base, different attack surfaces such as value substitution attacks could be launched against the application. All application-specific additional rules are outside the scope of this specification, and by their very nature these transformations would harm interoperability of the implementation outside of this specific application. It is recommended that applications avoid the use of such additional rules wherever possible.\n\n#### 7.5.3. Parsing Structured Field Values\n\nSeveral parts of this specification rely on the parsing of Structured Field values [STRUCTURED-FIELDS] -- in particular, strict serialization of HTTP Structured Field values (Section 2.1.1), referencing members of a Dictionary Structured Field (Section 2.1.2), and processing the @signature-input value when verifying a signature (Section 3.2). While Structured Field values are designed to be relatively simple to parse, a naive or broken implementation of such a parser could lead to subtle attack surfaces being exposed in the implementation.\n\nFor example, if a buggy parser of the @signature-input value does not enforce proper closing of quotes around string values within the list of component identifiers, an attacker could take advantage of this and inject additional content into the signature base through manipulating the Signature-Input field value on a message.\n\nTo counteract this, implementations should use fully compliant and trusted parsers for all Structured Field processing, on both the signer side and the verifier side.\n\n#### 7.5.4. HTTP Versions and Component Ambiguity\n\nSome message components are expressed in different ways across HTTP versions. For example, the authority of the request target is sent using the Host header field in HTTP/1.1 but with the :authority pseudo-header in HTTP/2. If a signer sends an HTTP/1.1 message and signs the Host header field but the message is translated to HTTP/2 before it reaches the verifier, the signature will not validate, as the Host header field could be dropped.\n\nIt is for this reason that HTTP message signatures define a set of derived components that define a single way to get the value in question, such as the @authority derived component (Section 2.2.3) in lieu of the Host header field. Applications should therefore prefer derived components for such options where possible.\n\n#### 7.5.5. Canonicalization Attacks\n\nAny ambiguity in the generation of the signature base could provide an attacker with leverage to substitute or break a signature on a message. Some message component values, particularly HTTP field values, are potentially susceptible to broken implementations that could lead to unexpected and insecure behavior. Naive implementations of this specification might implement HTTP field processing by taking the single value of a field and using it as the direct component value without processing it appropriately.\n\nFor example, if the handling of obs-fold field values does not remove the internal line folding and whitespace, additional newlines could be introduced into the signature base by the signer, providing a potential place for an attacker to mount a signature collision (Section 7.3.1) attack. Alternatively, if header fields that appear multiple times are not joined into a single string value, as required by this specification, similar attacks can be mounted, as a signed component value would show up in the signature base more than once and could be substituted or otherwise attacked in this way.\n\nTo counter this, the entire field value processing algorithm needs to be implemented by all implementations of signers and verifiers.\n\n#### 7.5.6. Non-List Field Values\n\nWhen an HTTP field occurs multiple times in a single message, these values need to be combined into a single one-line string value to be included in the HTTP signature base, as described in Section 2.5. Not all HTTP fields can be combined into a single value in this way and still be a valid value for the field. For the purposes of generating the signature base, the message component value is never meant to be read back out of the signature base string or used in the application. Therefore, it is considered best practice to treat the signature base generation algorithm separately from processing the field values by the application, particularly for fields that are known to have this property. If the field values that are being signed do not validate, the signed message should also be rejected.\n\nIf an HTTP field allows for unquoted commas within its values, combining multiple field values can lead to a situation where two semantically different messages produce the same line in a signature base. For example, take the following hypothetical header field with an internal comma in its syntax, here used to define two separate lists of values:\n\n```\nExample-Header: value, with, lots\nExample-Header: of, commas\n```\n\nFor this header field, sending all of these values as a single field value results in a single list of values:\n\n```\nExample-Header: value, with, lots, of, commas\n```\n\nBoth of these messages would create the following line in the signature base:\n\n```\n\"example-header\": value, with, lots, of, commas\n```\n\nSince two semantically distinct inputs can create the same output in the signature base, special care has to be taken when handling such values.\n\nSpecifically, the Set-Cookie field [COOKIE] defines an internal syntax that does not conform to the List syntax provided in [STRUCTURED-FIELDS]. In particular, some portions allow unquoted commas, and the field is typically sent as multiple separate field lines with distinct values when sending multiple cookies. When multiple Set-Cookie fields are sent in the same message, it is not generally possible to combine these into a single line and be able to parse and use the results, as discussed in [HTTP], [Section 5.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.3). Therefore, all the cookies need to be processed from their separate field values, without being combined, while the signature base needs to be processed from the special combined value generated solely for this purpose. If the cookie value is invalid, the signed message ought to be rejected, as this is a possible padding attack as described in Section 7.5.7.\n\nTo deal with this, an application can choose to limit signing of problematic fields like Set-Cookie, such as including the field in a signature only when a single field value is present and the results would be unambiguous. Similar caution needs to be taken with all fields that could have non-deterministic mappings into the signature base. Signers can also make use of the bs parameter to armor such fields, as described in Section 2.1.3.\n\n#### 7.5.7. Padding Attacks with Multiple Field Values\n\nSince HTTP field values need to be combined into a single string value to be included in the HTTP signature base (see Section 2.5), it is possible for an attacker to inject an additional value for a given field and add this to the signature base of the verifier.\n\nIn most circumstances, this causes the signature validation to fail as expected, since the new signature base value will not match the one used by the signer to create the signature. However, it is theoretically possible for the attacker to inject both a garbage value into a field and a desired value into another field in order to force a particular input. This is a variation of the collision attack described in Section 7.3.1, where the attacker accomplishes their change in the message by adding to existing field values.\n\nTo counter this, an application needs to validate the content of the fields covered in the signature in addition to ensuring that the signature itself validates. With such protections, the attacker's padding attack would be rejected by the field value processor, even in the case where the attacker could force a signature collision.\n\n#### 7.5.8. Ambiguous Handling of Query Elements\n\nThe HTML form parameters format defined in Section [5](https://url.spec.whatwg.org/https://url.spec.whatwg.org/#application/x-www-form-urlencoded) of [HTMLURL] is widely deployed and supported by many application frameworks. For convenience, some of these frameworks in particular combine query parameters that are found in the HTTP query and those found in the message content, particularly for POST messages with a Content-Type value of \"application/x-www-form-urlencoded\". The @query-param derived component identifier defined in Section 2.2.8 draws its values only from the query section of the target URI of the request. As such, it would be possible for an attacker to shadow or replace query parameters in a request by overriding a signed query parameter with an unsigned form parameter, or vice versa.\n\nTo counter this, an application needs to make sure that values used for the signature base and the application are drawn from a consistent context, in this case the query component of the target URI. Additionally, when the HTTP request has content, an application should sign the message content as well, as discussed in Section 7.2.8.\n\n---\n\n## 8. Privacy Considerations\n\n### 8.1. Identification through Keys\n\nIf a signer uses the same key with multiple verifiers or uses the same key over time with a single verifier, the ongoing use of that key can be used to track the signer throughout the set of verifiers that messages are sent to. Since cryptographic keys are meant to be functionally unique, the use of the same key over time is a strong indicator that it is the same party signing multiple messages.\n\nIn many applications, this is a desirable trait, and it allows HTTP message signatures to be used as part of authenticating the signer to the verifier. However, it could also result in unintentional tracking that a signer might not be aware of. To counter this kind of tracking, a signer can use a different key for each verifier that it is in communication with. Sometimes, a signer could also rotate their key when sending messages to a given verifier. These approaches do not negate the need for other anti-tracking techniques to be applied as necessary.\n\n### 8.2. Signatures do not provide confidentiality\n\nHTTP message signatures do not provide confidentiality for any of the information protected by the signature. The content of the HTTP message, including the value of all fields and the value of the signature itself, is presented in plaintext to any party with access to the message.\n\nTo provide confidentiality at the transport level, TLS or its equivalent can be used, as discussed in Section 7.1.2.\n\n### 8.3. Oracles\n\nIt is important to balance the need for providing useful feedback to developers regarding error conditions without providing additional information to an attacker. For example, a naive but helpful server implementation might try to indicate the required key identifier needed for requesting a resource. If someone knows who controls that key, a correlation can be made between the resource's existence and the party identified by the key. Access to such information could be used by an attacker as a means to target the legitimate owner of the resource for further attacks.\n\n### 8.4. Required Content\n\nA core design tenet of this specification is that all message components covered by the signature need to be available to the verifier in order to recreate the signature base and verify the signature. As a consequence, if an application of this specification requires that a particular field be signed, the verifier will need access to the value of that field.\n\nFor example, in some complex systems with intermediary processors, this could cause surprising behavior where, for fear of breaking the signature, an intermediary cannot remove privacy-sensitive information from a message before forwarding it on for processing. One way to mitigate this specific situation would be for the intermediary to verify the signature itself and then modify the message to remove the privacy-sensitive information. The intermediary can add its own signature at this point to signal to the next destination that the incoming signature was validated, as shown in the example in Section 4.3.\n\n## 9. References\n\n### 9.1. Normative References\n\n[ABNF]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[ASCII]\n\nCerf, V., “[ASCII format for network interchange](https://www.rfc-editor.org/rfc/rfc20.html)”, [STD 80](https://www.rfc-editor.org/info/std80), RFC 20, [DOI 10.17487/RFC0020](https://dx.doi.org/10.17487/RFC0020), October 1969, <[https://www.rfc-editor.org/info/rfc20](https://www.rfc-editor.org/info/rfc20)>.\n\n[FIPS186-5]\n\nNIST, “[Digital Signature Standard (DSS)](https://doi.org/10.6028/NIST.FIPS.186-5)”, [DOI 10.6028/NIST.FIPS.186-5](https://dx.doi.org/10.6028/NIST.FIPS.186-5), February 2023, <[https://doi.org/10.6028/NIST.FIPS.186-5](https://doi.org/10.6028/NIST.FIPS.186-5)>.\n\n[HTMLURL]\n\nWHATWG, “[URL (Living Standard)](https://url.spec.whatwg.org/)”, January 2024, <[https://url.spec.whatwg.org/](https://url.spec.whatwg.org/)>.\n\n[HTTP/1.1]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html)”, [STD 99](https://www.rfc-editor.org/info/std99), RFC 9112, [DOI 10.17487/RFC9112](https://dx.doi.org/10.17487/RFC9112), June 2022, <[https://www.rfc-editor.org/info/rfc9112](https://www.rfc-editor.org/info/rfc9112)>.\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[POSIX.1]\n\nIEEE, “[The Open Group Base Specifications Issue 7, 2018 edition](https://pubs.opengroup.org/onlinepubs/9699919799/)”, 2018, <[https://pubs.opengroup.org/onlinepubs/9699919799/](https://pubs.opengroup.org/onlinepubs/9699919799/)>.\n\n[RFC2104]\n\nKrawczyk, H., Bellare, M., and R. Canetti, “[HMAC: Keyed-Hashing for Message Authentication](https://www.rfc-editor.org/rfc/rfc2104.html)”, RFC 2104, [DOI 10.17487/RFC2104](https://dx.doi.org/10.17487/RFC2104), February 1997, <[https://www.rfc-editor.org/info/rfc2104](https://www.rfc-editor.org/info/rfc2104)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC6234]\n\nEastlake 3rd, D. and T. Hansen, “[US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)](https://www.rfc-editor.org/rfc/rfc6234.html)”, RFC 6234, [DOI 10.17487/RFC6234](https://dx.doi.org/10.17487/RFC6234), May 2011, <[https://www.rfc-editor.org/info/rfc6234](https://www.rfc-editor.org/info/rfc6234)>.\n\n[RFC7517]\n\nJones, M., “[JSON Web Key (JWK)](https://www.rfc-editor.org/rfc/rfc7517.html)”, RFC 7517, [DOI 10.17487/RFC7517](https://dx.doi.org/10.17487/RFC7517), May 2015, <[https://www.rfc-editor.org/info/rfc7517](https://www.rfc-editor.org/info/rfc7517)>.\n\n[RFC7518]\n\nJones, M., “[JSON Web Algorithms (JWA)](https://www.rfc-editor.org/rfc/rfc7518.html)”, RFC 7518, [DOI 10.17487/RFC7518](https://dx.doi.org/10.17487/RFC7518), May 2015, <[https://www.rfc-editor.org/info/rfc7518](https://www.rfc-editor.org/info/rfc7518)>.\n\n[RFC8017]\n\nMoriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, “[PKCS #1: RSA Cryptography Specifications Version 2.2](https://www.rfc-editor.org/rfc/rfc8017.html)”, RFC 8017, [DOI 10.17487/RFC8017](https://dx.doi.org/10.17487/RFC8017), November 2016, <[https://www.rfc-editor.org/info/rfc8017](https://www.rfc-editor.org/info/rfc8017)>.\n\n[RFC8032]\n\nJosefsson, S. and I. Liusvaara, “[Edwards-Curve Digital Signature Algorithm (EdDSA)](https://www.rfc-editor.org/rfc/rfc8032.html)”, RFC 8032, [DOI 10.17487/RFC8032](https://dx.doi.org/10.17487/RFC8032), January 2017, <[https://www.rfc-editor.org/info/rfc8032](https://www.rfc-editor.org/info/rfc8032)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc8941.html)”, RFC 8941, [DOI 10.17487/RFC8941](https://dx.doi.org/10.17487/RFC8941), February 2021, <[https://www.rfc-editor.org/info/rfc8941](https://www.rfc-editor.org/info/rfc8941)>.\n\n[URI]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[https://www.rfc-editor.org/info/rfc3986](https://www.rfc-editor.org/info/rfc3986)>.\n\n### 9.2. Informative References\n\n[AWS-SIGv4]\n\nAmazon Simple Storage Service, “[Authenticating Requests (AWS Signature Version 4)](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)”, March 2006, <[https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)>.\n\n[BCP195]\n\nMoriarty, K. and S. Farrell, “[Deprecating TLS 1.0 and TLS 1.1](https://www.rfc-editor.org/rfc/rfc8996.html)”, [BCP 195](https://www.rfc-editor.org/info/bcp195), RFC 8996, [DOI 10.17487/RFC8996](https://dx.doi.org/10.17487/RFC8996), March 2021.\n\nSheffer, Y., Saint-Andre, P., and T. Fossati, “[Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)](https://www.rfc-editor.org/rfc/rfc9325.html)”, [BCP 195](https://www.rfc-editor.org/info/bcp195), RFC 9325, [DOI 10.17487/RFC9325](https://dx.doi.org/10.17487/RFC9325), November 2022.\n\n<[https://www.rfc-editor.org/info/bcp195](https://www.rfc-editor.org/info/bcp195)>\n\n[CLIENT-CERT]\n\nCampbell, B. and M. Bishop, “[Client-Cert HTTP Header Field](https://www.rfc-editor.org/rfc/rfc9440.html)”, RFC 9440, [DOI 10.17487/RFC9440](https://dx.doi.org/10.17487/RFC9440), July 2023, <[https://www.rfc-editor.org/info/rfc9440](https://www.rfc-editor.org/info/rfc9440)>.\n\n[COOKIE]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, [DOI 10.17487/RFC6265](https://dx.doi.org/10.17487/RFC6265), April 2011, <[https://www.rfc-editor.org/info/rfc6265](https://www.rfc-editor.org/info/rfc6265)>.\n\n[DIGEST]\n\nPolli, R. and L. Pardue, “[Digest Fields](https://www.rfc-editor.org/rfc/rfc9530.html)”, RFC 9530, [DOI 10.17487/RFC9530](https://dx.doi.org/10.17487/RFC9530), February 2024, <[https://www.rfc-editor.org/info/rfc9530](https://www.rfc-editor.org/info/rfc9530)>.\n\n[JACKSON2019]\n\nJackson, D., Cremers, C., Cohn-Gordon, K., and R. Sasse, “[Seems Legit: Automated Analysis of Subtle Attacks on Protocols that Use Signatures](https://dl.acm.org/doi/10.1145/3319535.3339813)”, [DOI 10.1145/3319535.3339813](https://dx.doi.org/10.1145/3319535.3339813), CCS '19: Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pp. 2165-2180, November 2019, <[https://dl.acm.org/doi/10.1145/3319535.3339813](https://dl.acm.org/doi/10.1145/3319535.3339813)>.\n\n[JWS]\n\nJones, M., Bradley, J., and N. Sakimura, “[JSON Web Signature (JWS)](https://www.rfc-editor.org/rfc/rfc7515.html)”, RFC 7515, [DOI 10.17487/RFC7515](https://dx.doi.org/10.17487/RFC7515), May 2015, <[https://www.rfc-editor.org/info/rfc7515](https://www.rfc-editor.org/info/rfc7515)>.\n\n[RFC7239]\n\nPetersson, A. and M. Nilsson, “[Forwarded HTTP Extension](https://www.rfc-editor.org/rfc/rfc7239.html)”, RFC 7239, [DOI 10.17487/RFC7239](https://dx.doi.org/10.17487/RFC7239), June 2014, <[https://www.rfc-editor.org/info/rfc7239](https://www.rfc-editor.org/info/rfc7239)>.\n\n[RFC7468]\n\nJosefsson, S. and S. Leonard, “[Textual Encodings of PKIX, PKCS, and CMS Structures](https://www.rfc-editor.org/rfc/rfc7468.html)”, RFC 7468, [DOI 10.17487/RFC7468](https://dx.doi.org/10.17487/RFC7468), April 2015, <[https://www.rfc-editor.org/info/rfc7468](https://www.rfc-editor.org/info/rfc7468)>.\n\n[RFC7807]\n\nNottingham, M. and E. Wilde, “[Problem Details for HTTP APIs](https://www.rfc-editor.org/rfc/rfc7807.html)”, RFC 7807, [DOI 10.17487/RFC7807](https://dx.doi.org/10.17487/RFC7807), March 2016, <[https://www.rfc-editor.org/info/rfc7807](https://www.rfc-editor.org/info/rfc7807)>.\n\n[RFC8126]\n\nCotton, M., Leiba, B., and T. Narten, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc8126.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 8126, [DOI 10.17487/RFC8126](https://dx.doi.org/10.17487/RFC8126), June 2017, <[https://www.rfc-editor.org/info/rfc8126](https://www.rfc-editor.org/info/rfc8126)>.\n\n[RFC8792]\n\nWatsen, K., Auerswald, E., Farrel, A., and Q. Wu, “[Handling Long Lines in Content of Internet-Drafts and RFCs](https://www.rfc-editor.org/rfc/rfc8792.html)”, RFC 8792, [DOI 10.17487/RFC8792](https://dx.doi.org/10.17487/RFC8792), June 2020, <[https://www.rfc-editor.org/info/rfc8792](https://www.rfc-editor.org/info/rfc8792)>.\n\n[RFC9457]\n\nNottingham, M., Wilde, E., and S. Dalal, “[Problem Details for HTTP APIs](https://www.rfc-editor.org/rfc/rfc9457.html)”, RFC 9457, [DOI 10.17487/RFC9457](https://dx.doi.org/10.17487/RFC9457), July 2023, <[https://www.rfc-editor.org/info/rfc9457](https://www.rfc-editor.org/info/rfc9457)>.\n\n[SIGNING-HTTP-MESSAGES]\n\nCavage, M. and M. Sporny, “[Signing HTTP Messages](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12)”, [Work in Progress](https://datatracker.ietf.org/doc/draft-cavage-http-signatures), draft-cavage-http-signatures-12, Work in Progress, October 2019, <[https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12](https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12)>.\n\n[SIGNING-HTTP-REQS-OAUTH]\n\nRicher, J., Ed., Bradley, J., and H. Tschofenig, “[A Method for Signing HTTP Requests for OAuth](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03)”, [Work in Progress](https://datatracker.ietf.org/doc/draft-ietf-oauth-signed-http-request), draft-ietf-oauth-signed-http-request-03, Work in Progress, August 2016, <[https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-signed-http-request-03)>.\n\n[TLS]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n---\n\n## Appendix A. Detecting HTTP Message Signatures\n\nThere have been many attempts to create signed HTTP messages in the past, including other non-standardized definitions of the Signature field that is used within this specification. It is recommended that developers wishing to support this specification, other published documents, or other historical drafts do so carefully and deliberately, as incompatibilities between this specification and other documents or various versions of other drafts could lead to unexpected problems.\n\nIt is recommended that implementors first detect and validate the Signature-Input field defined in this specification to detect that the mechanism described in this document is in use and not an alternative. If the Signature-Input field is present, all Signature fields can be parsed and interpreted in the context of this specification.\n\n---\n\n## Appendix B. Examples\n\nThe following non-normative examples are provided as a means of testing implementations of HTTP message signatures. The signed messages given can be used to create the signature base with the stated parameters, creating signatures using the stated algorithms and keys.\n\nThe private keys given can be used to generate signatures, though since several of the demonstrated algorithms are non-deterministic, the results of a signature are expected to be different from the exact bytes of the examples. The public keys given can be used to validate all signed examples.\n\n### B.1. Example Keys\n\nThis section provides cryptographic keys that are referenced in example signatures throughout this document. These keys *MUST NOT* be used for any purpose other than testing.\n\nThe key identifiers for each key are used throughout the examples in this specification. It is assumed for these examples that the signer and verifier can unambiguously dereference all key identifiers used here and that the keys and algorithms used are appropriate for the context in which the signature is presented.\n\nThe components for each private key, in PEM format [RFC7468], can be displayed by executing the following OpenSSL command:\n\n```\nopenssl pkey -text\n```\n\nThis command was tested with all the example keys on OpenSSL version 1.1.1m. Note that some systems cannot produce or use all of these keys directly and may require additional processing. All keys are also made available in JWK format.\n\n#### B.1.1. Example RSA Key\n\nThe following key is a 2048-bit RSA public and private key pair, referred to in this document as test-key-rsa. This key is encoded in PEM format, with no encryption.\n\n```\n-----BEGIN RSA PUBLIC KEY-----\nMIIBCgKCAQEAhAKYdtoeoy8zcAcR874L8cnZxKzAGwd7v36APp7Pv6Q2jdsPBRrw\nWEBnez6d0UDKDwGbc6nxfEXAy5mbhgajzrw3MOEt8uA5txSKobBpKDeBLOsdJKFq\nMGmXCQvEG7YemcxDTRPxAleIAgYYRjTSd/QBwVW9OwNFhekro3RtlinV0a75jfZg\nkne/YiktSvLG34lw2zqXBDTC5NHROUqGTlML4PlNZS5Ri2U4aCNx2rUPRcKIlE0P\nuKxI4T+HIaFpv8+rdV6eUgOrB2xeI1dSFFn/nnv5OoZJEIB+VmuKn3DCUcCZSFlQ\nPSXSfBDiUGhwOw76WuSSsf1D4b/vLoJ10wIDAQAB\n-----END RSA PUBLIC KEY-----\n\n-----BEGIN RSA PRIVATE KEY-----\nMIIEqAIBAAKCAQEAhAKYdtoeoy8zcAcR874L8cnZxKzAGwd7v36APp7Pv6Q2jdsP\nBRrwWEBnez6d0UDKDwGbc6nxfEXAy5mbhgajzrw3MOEt8uA5txSKobBpKDeBLOsd\nJKFqMGmXCQvEG7YemcxDTRPxAleIAgYYRjTSd/QBwVW9OwNFhekro3RtlinV0a75\njfZgkne/YiktSvLG34lw2zqXBDTC5NHROUqGTlML4PlNZS5Ri2U4aCNx2rUPRcKI\nlE0PuKxI4T+HIaFpv8+rdV6eUgOrB2xeI1dSFFn/nnv5OoZJEIB+VmuKn3DCUcCZ\nSFlQPSXSfBDiUGhwOw76WuSSsf1D4b/vLoJ10wIDAQABAoIBAG/JZuSWdoVHbi56\nvjgCgkjg3lkO1KrO3nrdm6nrgA9P9qaPjxuKoWaKO1cBQlE1pSWp/cKncYgD5WxE\nCpAnRUXG2pG4zdkzCYzAh1i+c34L6oZoHsirK6oNcEnHveydfzJL5934egm6p8DW\n+m1RQ70yUt4uRc0YSor+q1LGJvGQHReF0WmJBZHrhz5e63Pq7lE0gIwuBqL8SMaA\nyRXtK+JGxZpImTq+NHvEWWCu09SCq0r838ceQI55SvzmTkwqtC+8AT2zFviMZkKR\nQo6SPsrqItxZWRty2izawTF0Bf5S2VAx7O+6t3wBsQ1sLptoSgX3QblELY5asI0J\nYFz7LJECgYkAsqeUJmqXE3LP8tYoIjMIAKiTm9o6psPlc8CrLI9CH0UbuaA2JCOM\ncCNq8SyYbTqgnWlB9ZfcAm/cFpA8tYci9m5vYK8HNxQr+8FS3Qo8N9RJ8d0U5Csw\nDzMYfRghAfUGwmlWj5hp1pQzAuhwbOXFtxKHVsMPhz1IBtF9Y8jvgqgYHLbmyiu1\nmwJ5AL0pYF0G7x81prlARURwHo0Yf52kEw1dxpx+JXER7hQRWQki5/NsUEtv+8RT\nqn2m6qte5DXLyn83b1qRscSdnCCwKtKWUug5q2ZbwVOCJCtmRwmnP131lWRYfj67\nB/xJ1ZA6X3GEf4sNReNAtaucPEelgR2nsN0gKQKBiGoqHWbK1qYvBxX2X3kbPDkv\n9C+celgZd2PW7aGYLCHq7nPbmfDV0yHcWjOhXZ8jRMjmANVR/eLQ2EfsRLdW69bn\nf3ZD7JS1fwGnO3exGmHO3HZG+6AvberKYVYNHahNFEw5TsAcQWDLRpkGybBcxqZo\n81YCqlqidwfeO5YtlO7etx1xLyqa2NsCeG9A86UjG+aeNnXEIDk1PDK+EuiThIUa\n/2IxKzJKWl1BKr2d4xAfR0ZnEYuRrbeDQYgTImOlfW6/GuYIxKYgEKCFHFqJATAG\nIxHrq1PDOiSwXd2GmVVYyEmhZnbcp8CxaEMQoevxAta0ssMK3w6UsDtvUvYvF22m\nqQKBiD5GwESzsFPy3Ga0MvZpn3D6EJQLgsnrtUPZx+z2Ep2x0xc5orneB5fGyF1P\nWtP+fG5Q6Dpdz3LRfm+KwBCWFKQjg7uTxcjerhBWEYPmEMKYwTJF5PBG9/ddvHLQ\nEQeNC8fHGg4UXU8mhHnSBt3EA10qQJfRDs15M38eG2cYwB1PZpDHScDnDA0=\n-----END RSA PRIVATE KEY-----\n```\n\nThe same public and private key pair in JWK format:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n{\n \"kty\": \"RSA\",\n \"kid\": \"test-key-rsa\",\n \"p\": \"sqeUJmqXE3LP8tYoIjMIAKiTm9o6psPlc8CrLI9CH0UbuaA2JCOMcCNq8Sy\\\n YbTqgnWlB9ZfcAm_cFpA8tYci9m5vYK8HNxQr-8FS3Qo8N9RJ8d0U5CswDzMYfRgh\\\n AfUGwmlWj5hp1pQzAuhwbOXFtxKHVsMPhz1IBtF9Y8jvgqgYHLbmyiu1mw\",\n \"q\": \"vSlgXQbvHzWmuUBFRHAejRh_naQTDV3GnH4lcRHuFBFZCSLn82xQS2_7xFO\\\n qfabqq17kNcvKfzdvWpGxxJ2cILAq0pZS6DmrZlvBU4IkK2ZHCac_XfWVZFh-PrsH\\\n _EnVkDpfcYR_iw1F40C1q5w8R6WBHaew3SAp\",\n \"d\": \"b8lm5JZ2hUduLnq-OAKCSODeWQ7Uqs7eet2bqeuAD0_2po-PG4qhZoo7VwF\\\n CUTWlJan9wqdxiAPlbEQKkCdFRcbakbjN2TMJjMCHWL5zfgvqhmgeyKsrqg1wSce9\\\n 7J1_Mkvn3fh6CbqnwNb6bVFDvTJS3i5FzRhKiv6rUsYm8ZAdF4XRaYkFkeuHPl7rc\\\n -ruUTSAjC4GovxIxoDJFe0r4kbFmkiZOr40e8RZYK7T1IKrSvzfxx5AjnlK_OZOTC\\\n q0L7wBPbMW-IxmQpFCjpI-yuoi3FlZG3LaLNrBMXQF_lLZUDHs77q3fAGxDWwum2h\\\n KBfdBuUQtjlqwjQlgXPsskQ\",\n \"e\": \"AQAB\",\n \"qi\": \"PkbARLOwU_LcZrQy9mmfcPoQlAuCyeu1Q9nH7PYSnbHTFzmiud4Hl8bIXU\\\n 9a0_58blDoOl3PctF-b4rAEJYUpCODu5PFyN6uEFYRg-YQwpjBMkXk8Eb39128ctA\\\n RB40Lx8caDhRdTyaEedIG3cQDXSpAl9EOzXkzfx4bZxjAHU9mkMdJwOcMDQ\",\n \"dp\": \"aiodZsrWpi8HFfZfeRs8OS_0L5x6WBl3Y9btoZgsIeruc9uZ8NXTIdxaM6\\\n FdnyNEyOYA1VH94tDYR-xEt1br1ud_dkPslLV_Aac7d7EaYc7cdkb7oC9t6sphVg0\\\n dqE0UTDlOwBxBYMtGmQbJsFzGpmjzVgKqWqJ3B947li2U7t63HXEvKprY2w\",\n \"dq\": \"b0DzpSMb5p42dcQgOTU8Mr4S6JOEhRr_YjErMkpaXUEqvZ3jEB9HRmcRi5\\\n Gtt4NBiBMiY6V9br8a5gjEpiAQoIUcWokBMAYjEeurU8M6JLBd3YaZVVjISaFmdty\\\n nwLFoQxCh6_EC1rSywwrfDpSwO29S9i8Xbaap\",\n \"n\": \"hAKYdtoeoy8zcAcR874L8cnZxKzAGwd7v36APp7Pv6Q2jdsPBRrwWEBnez6\\\n d0UDKDwGbc6nxfEXAy5mbhgajzrw3MOEt8uA5txSKobBpKDeBLOsdJKFqMGmXCQvE\\\n G7YemcxDTRPxAleIAgYYRjTSd_QBwVW9OwNFhekro3RtlinV0a75jfZgkne_YiktS\\\n vLG34lw2zqXBDTC5NHROUqGTlML4PlNZS5Ri2U4aCNx2rUPRcKIlE0PuKxI4T-HIa\\\n Fpv8-rdV6eUgOrB2xeI1dSFFn_nnv5OoZJEIB-VmuKn3DCUcCZSFlQPSXSfBDiUGh\\\n wOw76WuSSsf1D4b_vLoJ10w\"\n}\n```\n\n#### B.1.2. Example RSA-PSS Key\n\nThe following key is a 2048-bit RSA public and private key pair, referred to in this document as test-key-rsa-pss. This key is PKCS #8 encoded in PEM format, with no encryption.\n\n```\n-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr4tmm3r20Wd/PbqvP1s2\n+QEtvpuRaV8Yq40gjUR8y2Rjxa6dpG2GXHbPfvMs8ct+Lh1GH45x28Rw3Ry53mm+\noAXjyQ86OnDkZ5N8lYbggD4O3w6M6pAvLkhk95AndTrifbIFPNU8PPMO7OyrFAHq\ngDsznjPFmTOtCEcN2Z1FpWgchwuYLPL+Wokqltd11nqqzi+bJ9cvSKADYdUAAN5W\nUtzdpiy6LbTgSxP7ociU4Tn0g5I6aDZJ7A8Lzo0KSyZYoA485mqcO0GVAdVw9lq4\naOT9v6d+nb4bnNkQVklLQ3fVAvJm+xdDOp9LCNCN48V2pnDOkFV6+U9nV5oyc6XI\n2wIDAQAB\n-----END PUBLIC KEY-----\n\n-----BEGIN PRIVATE KEY-----\nMIIEvgIBADALBgkqhkiG9w0BAQoEggSqMIIEpgIBAAKCAQEAr4tmm3r20Wd/Pbqv\nP1s2+QEtvpuRaV8Yq40gjUR8y2Rjxa6dpG2GXHbPfvMs8ct+Lh1GH45x28Rw3Ry5\n3mm+oAXjyQ86OnDkZ5N8lYbggD4O3w6M6pAvLkhk95AndTrifbIFPNU8PPMO7Oyr\nFAHqgDsznjPFmTOtCEcN2Z1FpWgchwuYLPL+Wokqltd11nqqzi+bJ9cvSKADYdUA\nAN5WUtzdpiy6LbTgSxP7ociU4Tn0g5I6aDZJ7A8Lzo0KSyZYoA485mqcO0GVAdVw\n9lq4aOT9v6d+nb4bnNkQVklLQ3fVAvJm+xdDOp9LCNCN48V2pnDOkFV6+U9nV5oy\nc6XI2wIDAQABAoIBAQCUB8ip+kJiiZVKF8AqfB/aUP0jTAqOQewK1kKJ/iQCXBCq\npbo360gvdt05H5VZ/RDVkEgO2k73VSsbulqezKs8RFs2tEmU+JgTI9MeQJPWcP6X\naKy6LIYs0E2cWgp8GADgoBs8llBq0UhX0KffglIeek3n7Z6Gt4YFge2TAcW2WbN4\nXfK7lupFyo6HHyWRiYHMMARQXLJeOSdTn5aMBP0PO4bQyk5ORxTUSeOciPJUFktQ\nHkvGbym7KryEfwH8Tks0L7WhzyP60PL3xS9FNOJi9m+zztwYIXGDQuKM2GDsITeD\n2mI2oHoPMyAD0wdI7BwSVW18p1h+jgfc4dlexKYRAoGBAOVfuiEiOchGghV5vn5N\nRDNscAFnpHj1QgMr6/UG05RTgmcLfVsI1I4bSkbrIuVKviGGf7atlkROALOG/xRx\nDLadgBEeNyHL5lz6ihQaFJLVQ0u3U4SB67J0YtVO3R6lXcIjBDHuY8SjYJ7Ci6Z6\nvuDcoaEujnlrtUhaMxvSfcUJAoGBAMPsCHXte1uWNAqYad2WdLjPDlKtQJK1diCm\nrqmB2g8QE99hDOHItjDBEdpyFBKOIP+NpVtM2KLhRajjcL9Ph8jrID6XUqikQuVi\n4J9FV2m42jXMuioTT13idAILanYg8D3idvy/3isDVkON0X3UAVKrgMEne0hJpkPL\nFYqgetvDAoGBAKLQ6JZMbSe0pPIJkSamQhsehgL5Rs51iX4m1z7+sYFAJfhvN3Q/\nOGIHDRp6HjMUcxHpHw7U+S1TETxePwKLnLKj6hw8jnX2/nZRgWHzgVcY+sPsReRx\nNJVf+Cfh6yOtznfX00p+JWOXdSY8glSSHJwRAMog+hFGW1AYdt7w80XBAoGBAImR\nNUugqapgaEA8TrFxkJmngXYaAqpA0iYRA7kv3S4QavPBUGtFJHBNULzitydkNtVZ\n3w6hgce0h9YThTo/nKc+OZDZbgfN9s7cQ75x0PQCAO4fx2P91Q+mDzDUVTeG30mE\nt2m3S0dGe47JiJxifV9P3wNBNrZGSIF3mrORBVNDAoGBAI0QKn2Iv7Sgo4T/XjND\ndl2kZTXqGAk8dOhpUiw/HdM3OGWbhHj2NdCzBliOmPyQtAr770GITWvbAI+IRYyF\nS7Fnk6ZVVVHsxjtaHy1uJGFlaZzKR4AGNaUTOJMs6NadzCmGPAxNQQOCqoUjn4XR\nrOjr9w349JooGXhOxbu8nOxX\n-----END PRIVATE KEY-----\n```\n\nThe same public and private key pair in JWK format:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n{\n \"kty\": \"RSA\",\n \"kid\": \"test-key-rsa-pss\",\n \"p\": \"5V-6ISI5yEaCFXm-fk1EM2xwAWekePVCAyvr9QbTlFOCZwt9WwjUjhtKRus\\\n i5Uq-IYZ_tq2WRE4As4b_FHEMtp2AER43IcvmXPqKFBoUktVDS7dThIHrsnRi1U7d\\\n HqVdwiMEMe5jxKNgnsKLpnq-4NyhoS6OeWu1SFozG9J9xQk\",\n \"q\": \"w-wIde17W5Y0Cphp3ZZ0uM8OUq1AkrV2IKauqYHaDxAT32EM4ci2MMER2nI\\\n UEo4g_42lW0zYouFFqONwv0-HyOsgPpdSqKRC5WLgn0VXabjaNcy6KhNPXeJ0Agtq\\\n diDwPeJ2_L_eKwNWQ43RfdQBUquAwSd7SEmmQ8sViqB628M\",\n \"d\": \"lAfIqfpCYomVShfAKnwf2lD9I0wKjkHsCtZCif4kAlwQqqW6N-tIL3bdOR-\\\n VWf0Q1ZBIDtpO91UrG7pansyrPERbNrRJlPiYEyPTHkCT1nD-l2isuiyGLNBNnFoK\\\n fBgA4KAbPJZQatFIV9Cn34JSHnpN5-2ehreGBYHtkwHFtlmzeF3yu5bqRcqOhx8lk\\\n YmBzDAEUFyyXjknU5-WjAT9DzuG0MpOTkcU1EnjnIjyVBZLUB5Lxm8puyq8hH8B_E\\\n 5LNC-1oc8j-tDy98UvRTTiYvZvs87cGCFxg0LijNhg7CE3g9piNqB6DzMgA9MHSOw\\\n cElVtfKdYfo4H3OHZXsSmEQ\",\n \"e\": \"AQAB\",\n \"qi\": \"jRAqfYi_tKCjhP9eM0N2XaRlNeoYCTx06GlSLD8d0zc4ZZuEePY10LMGWI\\\n 6Y_JC0CvvvQYhNa9sAj4hFjIVLsWeTplVVUezGO1ofLW4kYWVpnMpHgAY1pRM4kyz\\\n o1p3MKYY8DE1BA4KqhSOfhdGs6Ov3Dfj0migZeE7Fu7yc7Fc\",\n \"dp\": \"otDolkxtJ7Sk8gmRJqZCGx6GAvlGznWJfibXPv6xgUAl-G83dD84YgcNGn\\\n oeMxRzEekfDtT5LVMRPF4_AoucsqPqHDyOdfb-dlGBYfOBVxj6w-xF5HE0lV_4J-H\\\n rI63Od9fTSn4lY5d1JjyCVJIcnBEAyiD6EUZbUBh23vDzRcE\",\n \"dq\": \"iZE1S6CpqmBoQDxOsXGQmaeBdhoCqkDSJhEDuS_dLhBq88FQa0UkcE1QvO\\\n K3J2Q21VnfDqGBx7SH1hOFOj-cpz45kNluB832ztxDvnHQ9AIA7h_HY_3VD6YPMNR\\\n VN4bfSYS3abdLR0Z7jsmInGJ9X0_fA0E2tkZIgXeas5EFU0M\",\n \"n\": \"r4tmm3r20Wd_PbqvP1s2-QEtvpuRaV8Yq40gjUR8y2Rjxa6dpG2GXHbPfvM\\\n s8ct-Lh1GH45x28Rw3Ry53mm-oAXjyQ86OnDkZ5N8lYbggD4O3w6M6pAvLkhk95An\\\n dTrifbIFPNU8PPMO7OyrFAHqgDsznjPFmTOtCEcN2Z1FpWgchwuYLPL-Wokqltd11\\\n nqqzi-bJ9cvSKADYdUAAN5WUtzdpiy6LbTgSxP7ociU4Tn0g5I6aDZJ7A8Lzo0KSy\\\n ZYoA485mqcO0GVAdVw9lq4aOT9v6d-nb4bnNkQVklLQ3fVAvJm-xdDOp9LCNCN48V\\\n 2pnDOkFV6-U9nV5oyc6XI2w\"\n}\n```\n\n#### B.1.3. Example ECC P-256 Test Key\n\nThe following key is a public and private elliptical curve key pair over the curve P-256, referred to in this document as test-key-ecc-p256. This key is encoded in PEM format, with no encryption.\n\n```\n-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEqIVYZVLCrPZHGHjP17CTW0/+D9Lf\nw0EkjqF7xB4FivAxzic30tMM4GF+hR6Dxh71Z50VGGdldkkDXZCnTNnoXQ==\n-----END PUBLIC KEY-----\n\n-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIFKbhfNZfpDsW43+0+JjUr9K+bTeuxopu653+hBaXGA7oAoGCCqGSM49\nAwEHoUQDQgAEqIVYZVLCrPZHGHjP17CTW0/+D9Lfw0EkjqF7xB4FivAxzic30tMM\n4GF+hR6Dxh71Z50VGGdldkkDXZCnTNnoXQ==\n-----END EC PRIVATE KEY-----\n```\n\nThe same public and private key pair in JWK format:\n\n```\n{\n \"kty\": \"EC\",\n \"crv\": \"P-256\",\n \"kid\": \"test-key-ecc-p256\",\n \"d\": \"UpuF81l-kOxbjf7T4mNSv0r5tN67Gim7rnf6EFpcYDs\",\n \"x\": \"qIVYZVLCrPZHGHjP17CTW0_-D9Lfw0EkjqF7xB4FivA\",\n \"y\": \"Mc4nN9LTDOBhfoUeg8Ye9WedFRhnZXZJA12Qp0zZ6F0\"\n}\n```\n\n#### B.1.4. Example Ed25519 Test Key\n\nThe following key is an elliptical curve key over the Edwards curve ed25519, referred to in this document as test-key-ed25519. This key is PKCS #8 encoded in PEM format, with no encryption.\n\n```\n-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAJrQLj5P/89iXES9+vFgrIy29clF9CC/oPPsw3c5D0bs=\n-----END PUBLIC KEY-----\n\n-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEIJ+DYvh6SEqVTm50DFtMDoQikTmiCqirVv9mWG9qfSnF\n-----END PRIVATE KEY-----\n```\n\nThe same public and private key pair in JWK format:\n\n```\n{\n \"kty\": \"OKP\",\n \"crv\": \"Ed25519\",\n \"kid\": \"test-key-ed25519\",\n \"d\": \"n4Ni-HpISpVObnQMW0wOhCKROaIKqKtW_2ZYb2p9KcU\",\n \"x\": \"JrQLj5P_89iXES9-vFgrIy29clF9CC_oPPsw3c5D0bs\"\n}\n```\n\n#### B.1.5. Example Shared Secret\n\nThe following shared secret is 64 randomly generated bytes encoded in Base64, referred to in this document as test-shared-secret:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nuzvJfB4u3N0Jy4T7NZ75MDVcr8zSTInedJtkgcu46YW4XByzNJjxBdtjUkdJPBt\\\n bmHhIDi6pcl8jsasjlTMtDQ==\n```\n\n### B.2. Test Cases\n\nThis section provides non-normative examples that may be used as test cases to validate implementation correctness. These examples are based on the following HTTP messages:\n\nFor requests, this test-request message is used:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: example.com\nDate: Tue, 20 Apr 2021 02:07:55 GMT\nContent-Type: application/json\nContent-Digest: sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+T\\\n aPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\nContent-Length: 18\n\n{\"hello\": \"world\"}\n```\n\nFor responses, this test-response message is used:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 200 OK\nDate: Tue, 20 Apr 2021 02:07:56 GMT\nContent-Type: application/json\nContent-Digest: sha-512=:mEWXIS7MaLRuGgxOBdODa3xqM1XdEvxoYhvlCFJ41Q\\\n JgJc4GTsPp29l5oGX69wWdXymyU0rjJuahq4l5aGgfLQ==:\nContent-Length: 23\n\n{\"message\": \"good dog\"}\n```\n\n#### B.2.1. Minimal Signature Using rsa-pss-sha512\n\nThis example presents a minimal signature using the rsa-pss-sha512 algorithm over test-request, covering none of the components of the HTTP message but providing a timestamped signature proof of possession of the key with a signer-provided nonce.\n\nThe corresponding signature base is:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"@signature-params\": ();created=1618884473;keyid=\"test-key-rsa-pss\"\\\n ;nonce=\"b3k2pp5k7z-50gnwp.yemd\"\n```\n\nThis results in the following Signature-Input and Signature header fields being added to the message under the signature label sig-b21:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nSignature-Input: sig-b21=();created=1618884473\\\n ;keyid=\"test-key-rsa-pss\";nonce=\"b3k2pp5k7z-50gnwp.yemd\"\nSignature: sig-b21=:d2pmTvmbncD3xQm8E9ZV2828BjQWGgiwAaw5bAkgibUopem\\\n LJcWDy/lkbbHAve4cRAtx31Iq786U7it++wgGxbtRxf8Udx7zFZsckzXaJMkA7ChG\\\n 52eSkFxykJeNqsrWH5S+oxNFlD4dzVuwe8DhTSja8xxbR/Z2cOGdCbzR72rgFWhzx\\\n 2VjBqJzsPLMIQKhO4DGezXehhWwE56YCE+O6c0mKZsfxVrogUvA4HELjVKWmAvtl6\\\n UnCh8jYzuVG5WSb/QEVPnP5TmcAnLH1g+s++v6d4s8m0gCw1fV5/SITLq9mhho8K3\\\n +7EPYTU8IU1bLhdxO5Nyt8C8ssinQ98Xw9Q==:\n```\n\nNote that since the covered components list is empty, this signature could be applied by an attacker to an unrelated HTTP message. In this example, the nonce parameter is included to prevent the same signature from being replayed more than once, but if an attacker intercepts the signature and prevents its delivery to the verifier, the attacker could apply this signature to another message. Therefore, the use of an empty covered components set is discouraged. See Section 7.2.1 for more discussion.\n\nNote that the RSA-PSS algorithm in use here is non-deterministic, meaning that a different signature value will be created every time the algorithm is run. The signature value provided here can be validated against the given keys, but newly generated signature values are not expected to match the example. See Section 7.3.5.\n\n#### B.2.2. Selective Covered Components Using rsa-pss-sha512\n\nThis example covers additional components (the authority, the Content-Digest header field, and a single named query parameter) in test-request using the rsa-pss-sha512 algorithm. This example also adds a tag parameter with the application-specific value of header-example.\n\nThe corresponding signature base is:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"@authority\": example.com\n\"content-digest\": sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX\\\n +TaPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\n\"@query-param\";name=\"Pet\": dog\n\"@signature-params\": (\"@authority\" \"content-digest\" \\\n \"@query-param\";name=\"Pet\")\\\n ;created=1618884473;keyid=\"test-key-rsa-pss\"\\\n ;tag=\"header-example\"\n```\n\nThis results in the following Signature-Input and Signature header fields being added to the message under the label sig-b22:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nSignature-Input: sig-b22=(\"@authority\" \"content-digest\" \\\n \"@query-param\";name=\"Pet\");created=1618884473\\\n ;keyid=\"test-key-rsa-pss\";tag=\"header-example\"\nSignature: sig-b22=:LjbtqUbfmvjj5C5kr1Ugj4PmLYvx9wVjZvD9GsTT4F7GrcQ\\\n EdJzgI9qHxICagShLRiLMlAJjtq6N4CDfKtjvuJyE5qH7KT8UCMkSowOB4+ECxCmT\\\n 8rtAmj/0PIXxi0A0nxKyB09RNrCQibbUjsLS/2YyFYXEu4TRJQzRw1rLEuEfY17SA\\\n RYhpTlaqwZVtR8NV7+4UKkjqpcAoFqWFQh62s7Cl+H2fjBSpqfZUJcsIk4N6wiKYd\\\n 4je2U/lankenQ99PZfB4jY3I5rSV2DSBVkSFsURIjYErOs0tFTQosMTAoxk//0RoK\\\n UqiYY8Bh0aaUEb0rQl3/XaVe4bXTugEjHSw==:\n```\n\nNote that the RSA-PSS algorithm in use here is non-deterministic, meaning that a different signature value will be created every time the algorithm is run. The signature value provided here can be validated against the given keys, but newly generated signature values are not expected to match the example. See Section 7.3.5.\n\n#### B.2.3. Full Coverage Using rsa-pss-sha512\n\nThis example covers all applicable message components in test-request (including the content type and length) plus many derived components, again using the rsa-pss-sha512 algorithm. Note that the Host header field is not covered because the @authority derived component is included instead.\n\nThe corresponding signature base is:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"date\": Tue, 20 Apr 2021 02:07:55 GMT\n\"@method\": POST\n\"@path\": /foo\n\"@query\": ?param=Value&Pet=dog\n\"@authority\": example.com\n\"content-type\": application/json\n\"content-digest\": sha-512=:WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX\\\n +TaPm+AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\n\"content-length\": 18\n\"@signature-params\": (\"date\" \"@method\" \"@path\" \"@query\" \\\n \"@authority\" \"content-type\" \"content-digest\" \"content-length\")\\\n ;created=1618884473;keyid=\"test-key-rsa-pss\"\n```\n\nThis results in the following Signature-Input and Signature header fields being added to the message under the label sig-b23:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nSignature-Input: sig-b23=(\"date\" \"@method\" \"@path\" \"@query\" \\\n \"@authority\" \"content-type\" \"content-digest\" \"content-length\")\\\n ;created=1618884473;keyid=\"test-key-rsa-pss\"\nSignature: sig-b23=:bbN8oArOxYoyylQQUU6QYwrTuaxLwjAC9fbY2F6SVWvh0yB\\\n iMIRGOnMYwZ/5MR6fb0Kh1rIRASVxFkeGt683+qRpRRU5p2voTp768ZrCUb38K0fU\\\n xN0O0iC59DzYx8DFll5GmydPxSmme9v6ULbMFkl+V5B1TP/yPViV7KsLNmvKiLJH1\\\n pFkh/aYA2HXXZzNBXmIkoQoLd7YfW91kE9o/CCoC1xMy7JA1ipwvKvfrs65ldmlu9\\\n bpG6A9BmzhuzF8Eim5f8ui9eH8LZH896+QIF61ka39VBrohr9iyMUJpvRX2Zbhl5Z\\\n JzSRxpJyoEZAFL2FUo5fTIztsDZKEgM4cUA==:\n```\n\nNote in this example that the value of the Date header field and the value of the created signature parameter need not be the same. This is due to the fact that the Date header field is added when creating the HTTP message and the created parameter is populated when creating the signature over that message, and these two times could vary. If the Date header field is covered by the signature, it is up to the verifier to determine whether its value has to match that of the created parameter or not. See Section 7.2.4 for more discussion.\n\nNote that the RSA-PSS algorithm in use here is non-deterministic, meaning that a different signature value will be created every time the algorithm is run. The signature value provided here can be validated against the given keys, but newly generated signature values are not expected to match the example. See Section 7.3.5.\n\n#### B.2.4. Signing a Response Using ecdsa-p256-sha256\n\nThis example covers portions of the test-response message using the ecdsa-p256-sha256 algorithm and the key test-key-ecc-p256.\n\nThe corresponding signature base is:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"@status\": 200\n\"content-type\": application/json\n\"content-digest\": sha-512=:mEWXIS7MaLRuGgxOBdODa3xqM1XdEvxoYhvlCFJ4\\\n 1QJgJc4GTsPp29l5oGX69wWdXymyU0rjJuahq4l5aGgfLQ==:\n\"content-length\": 23\n\"@signature-params\": (\"@status\" \"content-type\" \"content-digest\" \\\n \"content-length\");created=1618884473;keyid=\"test-key-ecc-p256\"\n```\n\nThis results in the following Signature-Input and Signature header fields being added to the message under the label sig-b24:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nSignature-Input: sig-b24=(\"@status\" \"content-type\" \\\n \"content-digest\" \"content-length\");created=1618884473\\\n ;keyid=\"test-key-ecc-p256\"\nSignature: sig-b24=:wNmSUAhwb5LxtOtOpNa6W5xj067m5hFrj0XQ4fvpaCLx0NK\\\n ocgPquLgyahnzDnDAUy5eCdlYUEkLIj+32oiasw==:\n```\n\nNote that the ECDSA signature algorithm in use here is non-deterministic, meaning that a different signature value will be created every time the algorithm is run. The signature value provided here can be validated against the given keys, but newly generated signature values are not expected to match the example. See Section 7.3.5.\n\n#### B.2.5. Signing a Request Using hmac-sha256\n\nThis example covers portions of the test-request message using the hmac-sha256 algorithm and the secret test-shared-secret.\n\nThe corresponding signature base is:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"date\": Tue, 20 Apr 2021 02:07:55 GMT\n\"@authority\": example.com\n\"content-type\": application/json\n\"@signature-params\": (\"date\" \"@authority\" \"content-type\")\\\n ;created=1618884473;keyid=\"test-shared-secret\"\n```\n\nThis results in the following Signature-Input and Signature header fields being added to the message under the label sig-b25:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nSignature-Input: sig-b25=(\"date\" \"@authority\" \"content-type\")\\\n ;created=1618884473;keyid=\"test-shared-secret\"\nSignature: sig-b25=:pxcQw6G3AjtMBQjwo8XzkZf/bws5LelbaMk5rGIGtE8=:\n```\n\nBefore using symmetric signatures in practice, see the discussion regarding security trade-offs in Section 7.3.3.\n\n#### B.2.6. Signing a Request Using ed25519\n\nThis example covers portions of the test-request message using the Ed25519 algorithm and the key test-key-ed25519.\n\nThe corresponding signature base is:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"date\": Tue, 20 Apr 2021 02:07:55 GMT\n\"@method\": POST\n\"@path\": /foo\n\"@authority\": example.com\n\"content-type\": application/json\n\"content-length\": 18\n\"@signature-params\": (\"date\" \"@method\" \"@path\" \"@authority\" \\\n \"content-type\" \"content-length\");created=1618884473\\\n ;keyid=\"test-key-ed25519\"\n```\n\nThis results in the following Signature-Input and Signature header fields being added to the message under the label sig-b26:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nSignature-Input: sig-b26=(\"date\" \"@method\" \"@path\" \"@authority\" \\\n \"content-type\" \"content-length\");created=1618884473\\\n ;keyid=\"test-key-ed25519\"\nSignature: sig-b26=:wqcAqbmYJ2ji2glfAMaRy4gruYYnx2nEFN2HN6jrnDnQCK1\\\n u02Gb04v9EDgwUPiu4A0w6vuQv5lIp5WPpBKRCw==:\n```\n\n### B.3. TLS-Terminating Proxies\n\nIn this example, there is a TLS-terminating reverse proxy sitting in front of the resource. The client does not sign the request but instead uses mutual TLS to make its call. The terminating proxy validates the TLS stream and injects a Client-Cert header field according to [CLIENT-CERT], and then applies a signature to this field. By signing this header field, a reverse proxy not only can attest to its own validation of the initial request's TLS parameters but can also authenticate itself to the backend system independently of the client's actions.\n\nThe client makes the following request to the TLS-terminating proxy using mutual TLS:\n\n```\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: example.com\nDate: Tue, 20 Apr 2021 02:07:55 GMT\nContent-Type: application/json\nContent-Length: 18\n\n{\"hello\": \"world\"}\n```\n\nThe proxy processes the TLS connection and extracts the client's TLS certificate to a Client-Cert header field and passes it along to the internal service hosted at service.internal.example. This results in the following unsigned request:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: service.internal.example\nDate: Tue, 20 Apr 2021 02:07:55 GMT\nContent-Type: application/json\nContent-Length: 18\nClient-Cert: :MIIBqDCCAU6gAwIBAgIBBzAKBggqhkjOPQQDAjA6MRswGQYDVQQKD\\\n BJMZXQncyBBdXRoZW50aWNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBDQT\\\n AeFw0yMDAxMTQyMjU1MzNaFw0yMTAxMjMyMjU1MzNaMA0xCzAJBgNVBAMMAkJDMFk\\\n wEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8YnXXfaUgmnMtOXU/IncWalRhebrXmck\\\n C8vdgJ1p5Be5F/3YC8OthxM4+k1M6aEAEFcGzkJiNy6J84y7uzo9M6NyMHAwCQYDV\\\n R0TBAIwADAfBgNVHSMEGDAWgBRm3WjLa38lbEYCuiCPct0ZaSED2DAOBgNVHQ8BAf\\\n 8EBAMCBsAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0RAQH/BBMwEYEPYmRjQGV\\\n 4YW1wbGUuY29tMAoGCCqGSM49BAMCA0gAMEUCIBHda/r1vaL6G3VliL4/Di6YK0Q6\\\n bMjeSkC3dFCOOB8TAiEAx/kHSB4urmiZ0NX5r5XarmPk0wmuydBVoU4hBVZ1yhk=:\n\n{\"hello\": \"world\"}\n```\n\nWithout a signature, the internal service would need to trust that the incoming connection has the right information. By signing the Client-Cert header field and other portions of the internal request, the internal service can be assured that the correct party, the trusted proxy, has processed the request and presented it to the correct service. The proxy's signature base consists of the following:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\n\"@path\": /foo\n\"@query\": ?param=Value&Pet=dog\n\"@method\": POST\n\"@authority\": service.internal.example\n\"client-cert\": :MIIBqDCCAU6gAwIBAgIBBzAKBggqhkjOPQQDAjA6MRswGQYDVQQ\\\n KDBJMZXQncyBBdXRoZW50aWNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBD\\\n QTAeFw0yMDAxMTQyMjU1MzNaFw0yMTAxMjMyMjU1MzNaMA0xCzAJBgNVBAMMAkJDM\\\n FkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8YnXXfaUgmnMtOXU/IncWalRhebrXm\\\n ckC8vdgJ1p5Be5F/3YC8OthxM4+k1M6aEAEFcGzkJiNy6J84y7uzo9M6NyMHAwCQY\\\n DVR0TBAIwADAfBgNVHSMEGDAWgBRm3WjLa38lbEYCuiCPct0ZaSED2DAOBgNVHQ8B\\\n Af8EBAMCBsAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0RAQH/BBMwEYEPYmRjQ\\\n GV4YW1wbGUuY29tMAoGCCqGSM49BAMCA0gAMEUCIBHda/r1vaL6G3VliL4/Di6YK0\\\n Q6bMjeSkC3dFCOOB8TAiEAx/kHSB4urmiZ0NX5r5XarmPk0wmuydBVoU4hBVZ1yhk=:\n\"@signature-params\": (\"@path\" \"@query\" \"@method\" \"@authority\" \\\n \"client-cert\");created=1618884473;keyid=\"test-key-ecc-p256\"\n```\n\nThis results in the following signature:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nxVMHVpawaAC/0SbHrKRs9i8I3eOs5RtTMGCWXm/9nvZzoHsIg6Mce9315T6xoklyy0y\\\nzhD9ah4JHRwMLOgmizw==\n```\n\nwhich results in the following signed request sent from the proxy to the internal service with the proxy's signature under the label ttrp:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /foo?param=Value&Pet=dog HTTP/1.1\nHost: service.internal.example\nDate: Tue, 20 Apr 2021 02:07:55 GMT\nContent-Type: application/json\nContent-Length: 18\nClient-Cert: :MIIBqDCCAU6gAwIBAgIBBzAKBggqhkjOPQQDAjA6MRswGQYDVQQKD\\\n BJMZXQncyBBdXRoZW50aWNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBDQT\\\n AeFw0yMDAxMTQyMjU1MzNaFw0yMTAxMjMyMjU1MzNaMA0xCzAJBgNVBAMMAkJDMFk\\\n wEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8YnXXfaUgmnMtOXU/IncWalRhebrXmck\\\n C8vdgJ1p5Be5F/3YC8OthxM4+k1M6aEAEFcGzkJiNy6J84y7uzo9M6NyMHAwCQYDV\\\n R0TBAIwADAfBgNVHSMEGDAWgBRm3WjLa38lbEYCuiCPct0ZaSED2DAOBgNVHQ8BAf\\\n 8EBAMCBsAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0RAQH/BBMwEYEPYmRjQGV\\\n 4YW1wbGUuY29tMAoGCCqGSM49BAMCA0gAMEUCIBHda/r1vaL6G3VliL4/Di6YK0Q6\\\n bMjeSkC3dFCOOB8TAiEAx/kHSB4urmiZ0NX5r5XarmPk0wmuydBVoU4hBVZ1yhk=:\nSignature-Input: ttrp=(\"@path\" \"@query\" \"@method\" \"@authority\" \\\n \"client-cert\");created=1618884473;keyid=\"test-key-ecc-p256\"\nSignature: ttrp=:xVMHVpawaAC/0SbHrKRs9i8I3eOs5RtTMGCWXm/9nvZzoHsIg6\\\n Mce9315T6xoklyy0yzhD9ah4JHRwMLOgmizw==:\n\n{\"hello\": \"world\"}\n```\n\nThe internal service can validate the proxy's signature and therefore be able to trust that the client's certificate has been appropriately processed.\n\n### B.4. HTTP Message Transformations\n\nHTTP allows intermediaries and applications to transform an HTTP message without affecting the semantics of the message itself. HTTP message signatures are designed to be robust against many of these transformations in different circumstances.\n\nFor example, the following HTTP request message has been signed using the Ed25519 algorithm and the key test-key-ed25519:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nGET /demo?name1=Value1&Name2=value2 HTTP/1.1\nHost: example.org\nDate: Fri, 15 Jul 2022 14:24:55 GMT\nAccept: application/json\nAccept: */*\nSignature-Input: transform=(\"@method\" \"@path\" \"@authority\" \\\n \"accept\");created=1618884473;keyid=\"test-key-ed25519\"\nSignature: transform=:ZT1kooQsEHpZ0I1IjCqtQppOmIqlJPeo7DHR3SoMn0s5J\\\n Z1eRGS0A+vyYP9t/LXlh5QMFFQ6cpLt2m0pmj3NDA==:\n```\n\nThe signature base string for this message is:\n\n```\n\"@method\": GET\n\"@path\": /demo\n\"@authority\": example.org\n\"accept\": application/json, */*\n\"@signature-params\": (\"@method\" \"@path\" \"@authority\" \"accept\")\\\n ;created=1618884473;keyid=\"test-key-ed25519\"\n```\n\nThe following message has been altered by adding the Accept-Language header field as well as adding a query parameter. However, since neither the Accept-Language header field nor the query is covered by the signature, the same signature is still valid:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nGET /demo?name1=Value1&Name2=value2¶m=added HTTP/1.1\nHost: example.org\nDate: Fri, 15 Jul 2022 14:24:55 GMT\nAccept: application/json\nAccept: */*\nAccept-Language: en-US,en;q=0.5\nSignature-Input: transform=(\"@method\" \"@path\" \"@authority\" \\\n \"accept\");created=1618884473;keyid=\"test-key-ed25519\"\nSignature: transform=:ZT1kooQsEHpZ0I1IjCqtQppOmIqlJPeo7DHR3SoMn0s5J\\\n Z1eRGS0A+vyYP9t/LXlh5QMFFQ6cpLt2m0pmj3NDA==:\n```\n\nThe following message has been altered by removing the Date header field, adding a Referer header field, and collapsing the Accept header field into a single line. The Date and Referer header fields are not covered by the signature, and the collapsing of the Accept header field is an allowed transformation that is already accounted for by the canonicalization algorithm for HTTP field values. The same signature is still valid:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nGET /demo?name1=Value1&Name2=value2 HTTP/1.1\nHost: example.org\nReferer: https://developer.example.org/demo\nAccept: application/json, */*\nSignature-Input: transform=(\"@method\" \"@path\" \"@authority\" \\\n \"accept\");created=1618884473;keyid=\"test-key-ed25519\"\nSignature: transform=:ZT1kooQsEHpZ0I1IjCqtQppOmIqlJPeo7DHR3SoMn0s5J\\\n Z1eRGS0A+vyYP9t/LXlh5QMFFQ6cpLt2m0pmj3NDA==:\n```\n\nThe following message has been altered by reordering the field values of the original message but not reordering the individual Accept header fields. The same signature is still valid:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nGET /demo?name1=Value1&Name2=value2 HTTP/1.1\nAccept: application/json\nAccept: */*\nDate: Fri, 15 Jul 2022 14:24:55 GMT\nHost: example.org\nSignature-Input: transform=(\"@method\" \"@path\" \"@authority\" \\\n \"accept\");created=1618884473;keyid=\"test-key-ed25519\"\nSignature: transform=:ZT1kooQsEHpZ0I1IjCqtQppOmIqlJPeo7DHR3SoMn0s5J\\\n Z1eRGS0A+vyYP9t/LXlh5QMFFQ6cpLt2m0pmj3NDA==:\n```\n\nThe following message has been altered by changing the method to POST and the authority to \"example.com\" (inside the Host header field). Since both the method and authority are covered by the signature, the same signature is NOT still valid:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPOST /demo?name1=Value1&Name2=value2 HTTP/1.1\nHost: example.com\nDate: Fri, 15 Jul 2022 14:24:55 GMT\nAccept: application/json\nAccept: */*\nSignature-Input: transform=(\"@method\" \"@path\" \"@authority\" \\\n \"accept\");created=1618884473;keyid=\"test-key-ed25519\"\nSignature: transform=:ZT1kooQsEHpZ0I1IjCqtQppOmIqlJPeo7DHR3SoMn0s5J\\\n Z1eRGS0A+vyYP9t/LXlh5QMFFQ6cpLt2m0pmj3NDA==:\n```\n\nThe following message has been altered by changing the order of the two instances of the Accept header field. Since the order of fields with the same name is semantically significant in HTTP, this changes the value used in the signature base, and the same signature is NOT still valid:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nGET /demo?name1=Value1&Name2=value2 HTTP/1.1\nHost: example.org\nDate: Fri, 15 Jul 2022 14:24:55 GMT\nAccept: */*\nAccept: application/json\nSignature-Input: transform=(\"@method\" \"@path\" \"@authority\" \\\n \"accept\");created=1618884473;keyid=\"test-key-ed25519\"\nSignature: transform=:ZT1kooQsEHpZ0I1IjCqtQppOmIqlJPeo7DHR3SoMn0s5J\\\n Z1eRGS0A+vyYP9t/LXlh5QMFFQ6cpLt2m0pmj3NDA==:\n```\n\n---\n\n## Acknowledgements\n\nThis specification was initially based on [SIGNING-HTTP-MESSAGES]. The editors would like to thank the authors of [SIGNING-HTTP-MESSAGES] -- Mark Cavage and Manu Sporny -- for their work on that Internet-Draft and their continuing contributions. This specification also includes contributions from [SIGNING-HTTP-REQS-OAUTH] and other similar efforts.\n\nThe editors would also like to thank the following individuals (listed in alphabetical order) for feedback, insight, and implementation of this document and its predecessors: Mark Adamcin, Mark Allen, Paul Annesley, Karl Böhlmark, StĂ©phane Bortzmeyer, Sarven Capadisli, Liam Dennehy, Stephen Farrell, Phillip Hallam-Baker, Tyler Ham, Eric Holmes, Andrey Kislyuk, Adam Knight, Dave Lehn, Ilari Liusvaara, Dave Longley, James H. Manger, Kathleen Moriarty, Yoav Nir, Mark Nottingham, Adrian Palmer, Lucas Pardue, Roberto Polli, Julian Reschke, Michael Richardson, Wojciech Rygielski, Rich Salz, Adam Scarr, Cory J. Slep, Dirk Stein, Henry Story, Lukasz Szewc, Chris Webber, and Jeffrey Yasskin.\n\n---\n\n## Authors' Addresses\n\n**Annabelle Backman** (editor)\nAmazon\nP.O. Box 81226\nSeattle, WA 98108-1226\nUnited States of America\nEMail: [richanna@amazon.com](mailto:richanna@amazon.com)\nURI: [https://www.amazon.com/](https://www.amazon.com/)\n\n**Justin Richer** (editor)\nBespoke Engineering\nEMail: [ietf@justin.richer.org](mailto:ietf@justin.richer.org)\nURI: [https://bspk.io/](https://bspk.io/)\n\n**Manu Sporny**\nDigital Bazaar\n203 Roanoke Street W.\nBlacksburg, VA 24060\nUnited States of America\nEMail: [msporny@digitalbazaar.com](mailto:msporny@digitalbazaar.com)", "znaku_textu": 219098, "slov": 30283, "odkazu": 426, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:25", "sha256": "4940a82a706be1b888b3be01f53da6d9924ddfed5bb0a628885883b5f7ddd07e", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9421", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc8941.html", "https://openjdk.java.net/groups/net/httpclient/intro.html", "https://www.rfc-editor.org/rfc/rfc7239.html", "https://www.rfc-editor.org/rfc/rfc9112.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://url.spec.whatwg.org/https://url.spec.whatwg.org/", "https://www.rfc-editor.org/rfc/rfc8032.html", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "https://www.rfc-editor.org/info/rfc5234", "https://www.rfc-editor.org/rfc/rfc20.html", "https://www.rfc-editor.org/info/std80", "https://dx.doi.org/10.17487/RFC0020", "https://www.rfc-editor.org/info/rfc20", "https://doi.org/10.6028/NIST.FIPS.186-5", "https://dx.doi.org/10.6028/NIST.FIPS.186-5", "https://url.spec.whatwg.org/", "https://www.rfc-editor.org/info/std99", "https://dx.doi.org/10.17487/RFC9112", "https://www.rfc-editor.org/info/rfc9112", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://pubs.opengroup.org/onlinepubs/9699919799/", "https://www.rfc-editor.org/rfc/rfc2104.html", "https://dx.doi.org/10.17487/RFC2104", "https://www.rfc-editor.org/info/rfc2104", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc6234.html", "https://dx.doi.org/10.17487/RFC6234", "https://www.rfc-editor.org/info/rfc6234", "https://www.rfc-editor.org/rfc/rfc7517.html", "https://dx.doi.org/10.17487/RFC7517", "https://www.rfc-editor.org/info/rfc7517", "https://www.rfc-editor.org/rfc/rfc7518.html", "https://dx.doi.org/10.17487/RFC7518", "https://www.rfc-editor.org/info/rfc7518", "https://www.rfc-editor.org/rfc/rfc8017.html", "https://dx.doi.org/10.17487/RFC8017", "https://www.rfc-editor.org/info/rfc8017", "https://dx.doi.org/10.17487/RFC8032", "https://www.rfc-editor.org/info/rfc8032", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC8941", "https://www.rfc-editor.org/info/rfc8941", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "https://www.rfc-editor.org/info/rfc3986", "https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html", "https://www.rfc-editor.org/rfc/rfc8996.html", "https://www.rfc-editor.org/info/bcp195", "https://dx.doi.org/10.17487/RFC8996", "https://www.rfc-editor.org/rfc/rfc9325.html", "https://dx.doi.org/10.17487/RFC9325", "https://www.rfc-editor.org/rfc/rfc9440.html", "https://dx.doi.org/10.17487/RFC9440", "https://www.rfc-editor.org/info/rfc9440", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://dx.doi.org/10.17487/RFC6265", "https://www.rfc-editor.org/info/rfc6265", "https://www.rfc-editor.org/rfc/rfc9530.html", "https://dx.doi.org/10.17487/RFC9530", "https://www.rfc-editor.org/info/rfc9530", "https://dl.acm.org/doi/10.1145/3319535.3339813", "https://dx.doi.org/10.1145/3319535.3339813", "https://www.rfc-editor.org/rfc/rfc7515.html", "https://dx.doi.org/10.17487/RFC7515", "https://www.rfc-editor.org/info/rfc7515", "https://dx.doi.org/10.17487/RFC7239", "https://www.rfc-editor.org/info/rfc7239", "https://www.rfc-editor.org/rfc/rfc7468.html", "https://dx.doi.org/10.17487/RFC7468", "https://www.rfc-editor.org/info/rfc7468", "https://www.rfc-editor.org/rfc/rfc7807.html", "https://dx.doi.org/10.17487/RFC7807", "https://www.rfc-editor.org/info/rfc7807", "https://www.rfc-editor.org/rfc/rfc8126.html", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC8126", "https://www.rfc-editor.org/info/rfc8126", "https://www.rfc-editor.org/rfc/rfc8792.html", "https://dx.doi.org/10.17487/RFC8792", "https://www.rfc-editor.org/info/rfc8792", "https://www.rfc-editor.org/rfc/rfc9457.html", "https://dx.doi.org/10.17487/RFC9457", "https://www.rfc-editor.org/info/rfc9457", "https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12"]} {"url": "https://httpwg.org/specs/rfc9440.html", "titulek": "RFC 9440 - Client-Cert HTTP Header Field", "h1": "Client-Cert HTTP Header Field", "popis": "This document describes HTTP extension header fields that allow a TLS terminating reverse proxy (TTRP) to convey the client certificate information of a mutually authenticated TLS connection to the origin server in a common and predictable manner.", "klicova_slova": "http, client certificate", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9440", "og:description": "Client-Cert HTTP Header Field", "og:url": "https://httpwg.org/specs/rfc9440.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Requirements Notation and Conventions"}, {"uroven": 3, "text": "1.2. Terminology and Applicability"}, {"uroven": 2, "text": "2. HTTP Header Fields and Processing Rules"}, {"uroven": 3, "text": "2.1. Encoding"}, {"uroven": 3, "text": "2.4. Processing Rules"}, {"uroven": 2, "text": "3. Deployment Considerations"}, {"uroven": 3, "text": "3.3. TLS Session Resumption"}, {"uroven": 2, "text": "4. Security Considerations"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 3, "text": "5.1. HTTP Field Name Registrations"}, {"uroven": 2, "text": "6. References"}, {"uroven": 3, "text": "6.1. Normative References"}, {"uroven": 3, "text": "6.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Example"}, {"uroven": 2, "text": "Appendix B. Select Design Considerations"}, {"uroven": 3, "text": "B.1. Field Injection"}, {"uroven": 3, "text": "B.2. The Forwarded HTTP Extension"}, {"uroven": 3, "text": "B.3. The Whole Certificate and Certificate Chain"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document describes HTTP extension header fields that allow a TLS terminating reverse proxy (TTRP) to convey the client certificate information of a mutually authenticated TLS connection to the origin server in a common and predictable manner.\n\n## Status of This Memo\n\nThis document is not an Internet Standards Track specification; it is published for informational purposes.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are candidates for any level of Internet Standard; see [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9440](https://www.rfc-editor.org/info/rfc9440).\n\n## Copyright Notice\n\nCopyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Requirements Notation and Conventions\n - 1.2. Terminology and Applicability\n- 2. HTTP Header Fields and Processing Rules\n - 2.1. Encoding\n - 2.2. Client-Cert HTTP Header Field\n - 2.3. Client-Cert-Chain HTTP Header Field\n - 2.4. Processing Rules\n- 3. Deployment Considerations\n - 3.1. Header Field Compression\n - 3.2. Message Header Size\n - 3.3. TLS Session Resumption\n- 4. Security Considerations\n- 5. IANA Considerations\n - 5.1. HTTP Field Name Registrations\n- 6. References\n - 6.1. Normative References\n - 6.2. Informative References\n- Appendix A. Example\n- Appendix B. Select Design Considerations\n - B.1. Field Injection\n - B.2. The Forwarded HTTP Extension\n - B.3. The Whole Certificate and Certificate Chain\n- Acknowledgements\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nA fairly common deployment pattern for HTTPS applications is to have the origin HTTP application servers sit behind a reverse proxy that terminates TLS connections from clients. The proxy is accessible to the Internet and dispatches client requests to the appropriate origin server within a private or protected network. The origin servers are not directly accessible by clients and are only reachable through the reverse proxy. The backend details of this type of deployment are typically opaque to clients who make requests to the proxy server and see responses as though they originated from the proxy server itself. Although HTTPS is also usually employed between the proxy and the origin server, the TLS connection that the client establishes for HTTPS is only between itself and the reverse proxy server.\n\nThe deployment pattern is found in a number of varieties such as n-tier architectures, content delivery networks, application load-balancing services, and ingress controllers.\n\nAlthough not exceedingly prevalent, TLS client certificate authentication is sometimes employed, and in such cases the origin server often requires information about the client certificate for its application logic. Such logic might include access control decisions, audit logging, and binding issued tokens or cookies to a certificate, including the respective validation of such bindings. The specific details needed from the certificate also vary with the application requirements. In order for these types of application deployments to work in practice, the reverse proxy needs to convey information about the client certificate to the origin application server. At the time of writing, a common way this information is conveyed is by using non-standard fields to carry the certificate (in some encoding) or individual parts thereof in the HTTP request that is dispatched to the origin server. This solution works, but interoperability between independently developed components can be cumbersome or even impossible depending on the implementation choices respectively made (like what field names are used or are configurable, which parts of the certificate are exposed, or how the certificate is encoded). A well-known predictable approach to this commonly occurring functionality could improve and simplify interoperability between independent implementations.\n\nThe scope of this document is to describe existing practice while codifying specific details sufficient to facilitate improved and lower-touch interoperability. As such, this document describes two HTTP header fields, \"Client-Cert\" and \"Client-Cert-Chain\", which a TLS terminating reverse proxy (TTRP) adds to requests sent to the backend origin servers. The Client-Cert field value contains the end-entity client certificate from the mutually authenticated TLS connection between the originating client and the TTRP. Optionally, the Client-Cert-Chain field value contains the certificate chain used for validation of the end-entity certificate. This enables the backend origin server to utilize the client certificate information in its application logic. While there may be additional proxies or hops between the TTRP and the origin server (potentially even with mutually authenticated TLS connections between them), the scope of the Client-Cert header field is intentionally limited to exposing to the origin server the certificate that was presented by the originating client in its connection to the TTRP.\n\n### 1.1. Requirements Notation and Conventions\n\nThe 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.\n\n### 1.2. Terminology and Applicability\n\nThis document uses the following terminology from [Section 3](https://www.rfc-editor.org/rfc/rfc8941.html#section-3) of [STRUCTURED-FIELDS] to specify syntax and parsing: List and Byte Sequence.\n\nPhrases like \"TLS client certificate authentication\" or \"mutually authenticated TLS\" are used throughout this document to refer to the process whereby, in addition to the normal TLS server authentication with a certificate, a client presents its X.509 certificate [RFC5280] and proves possession of the corresponding private key to a server when negotiating a TLS connection or the resumption of such a connection. In contemporary versions of TLS [TLS] [TLS1.2], mutual authentication requires the client to send the Certificate and CertificateVerify messages during the handshake and the server to verify the CertificateVerify and Finished messages.\n\nHTTP/2 restricts TLS 1.2 renegotiation ([Section 9.2.1](https://www.rfc-editor.org/rfc/rfc9113.html#section-9.2.1) of [HTTP/2]) and prohibits TLS 1.3 post-handshake authentication ([Section 9.2.3](https://www.rfc-editor.org/rfc/rfc9113.html#section-9.2.3) of [HTTP/2]). However, they are sometimes used to implement reactive client certificate authentication in HTTP/1.1 [HTTP/1.1] where the server decides whether to request a client certificate based on the HTTP request. HTTP application data sent on such a connection after receipt and verification of the client certificate is also mutually authenticated and thus suitable for the mechanisms described in this document. With post-handshake authentication, there is also the possibility, though unlikely in practice, of multiple certificates and certificate chains from the client on a connection. In this case, only the certificate and chain of the last post-handshake authentication are to be utilized for the header fields described herein.\n\n---\n\n## 2. HTTP Header Fields and Processing Rules\n\nThis document designates the following headers, defined further in Sections 2.2 and 2.3, respectively, to carry the client certificate information of a mutually authenticated TLS connection. The headers convey the information from the reverse proxy to the origin server.\n\nClient-Cert:\n\nThe end-entity certificate used by the client in the TLS handshake with the reverse proxy.\n\nClient-Cert-Chain:\n\nThe certificate chain used for validation of the end-entity certificate provided by the client in the TLS handshake with the reverse proxy.\n\n### 2.1. Encoding\n\nThe headers in this document encode certificates as Byte Sequences ([Section 3.3.5](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.5) of [STRUCTURED-FIELDS]) where the value of the binary data is a DER-encoded [ITU.X690] X.509 certificate [RFC5280]. In effect, this means that the binary DER certificate is encoded using base64 (without line breaks, spaces, or other characters outside the base64 alphabet) and delimited with colons on either side.\n\nNote that certificates are often stored in an encoded textual format, such as the one described in [Section 5.1](https://www.rfc-editor.org/rfc/rfc7468.html#section-5.1) of [RFC7468], which is already nearly compatible with a Byte Sequence. If certificates are encoded as such, it will be sufficient to replace \"---(BEGIN|END) CERTIFICATE---\" with \":\" and remove line breaks in order to generate an appropriate item.\n\n### 2.4. Processing Rules\n\nThis section outlines the applicable processing rules for a TTRP that has negotiated a mutually authenticated TLS connection to convey the client certificate from that connection to the backend origin servers. This technique is to be used as a configuration or deployment option, and the processing rules described herein are for servers operating with that option enabled.\n\nA TTRP negotiates the use of a mutually authenticated TLS connection with the client, such as is described in [TLS] or [TLS1.2], and validates the client certificate per its policy and trusted certificate authorities. Each HTTP request on the underlying TLS connection is dispatched to the origin server with the following modifications:\n\n1. The client certificate is placed in the Client-Cert header field of the dispatched request, as described in Section 2.2 .\n2. If so configured, the validation chain of the client certificate is placed in the Client-Cert-Chain header field of the request, as described in Section 2.3 .\n3. Any occurrence of the Client-Cert or Client-Cert-Chain header fields in the original incoming request *MUST* be removed or overwritten before forwarding the request. An incoming request that has a Client-Cert or Client-Cert-Chain header field *MAY* be rejected with an HTTP 400 response.\n\nRequests to the TTRP made over a TLS connection where the use of client certificate authentication was not negotiated *MUST* be sanitized by removing any and all occurrences of the Client-Cert and Client-Cert-Chain header fields prior to dispatching the request to the backend server.\n\nBackend origin servers may then use the Client-Cert header field of the request to determine if the connection from the client to the TTRP was mutually authenticated and, if so, the certificate thereby presented by the client. Access control decisions based on the client certificate (or lack thereof) can be conveyed by selecting response content as appropriate or with an HTTP 403 response, if the certificate is deemed unacceptable for the given context. Note that TLS clients that rely on error indications at the TLS layer for an unacceptable certificate will not receive those signals.\n\nWhen the value of the Client-Cert request header field is used to select a response (e.g., the response content is access-controlled), the response *MUST* either be uncacheable (e.g., by sending Cache-Control: no-store) or be designated for selective reuse only for subsequent requests with the same Client-Cert header field value by sending a \"Vary: Client-Cert\" response header. If a TTRP encounters a response with Client-Cert or Client-Cert-Chain in the Vary header field ([Section 12.5.5](https://www.rfc-editor.org/rfc/rfc9110.html#section-12.5.5) of [HTTP]), it *SHOULD* prevent the user agent from caching the response by transforming the value of the Vary response header field to \"*\".\n\nForward proxies and other intermediaries *MUST NOT* add the Client-Cert or Client-Cert-Chain header fields to requests or modify an existing Client-Cert or Client-Cert-Chain header field. Similarly, clients *MUST NOT* employ the Client-Cert or Client-Cert-Chain header field in requests.\n\n---\n\n## 3. Deployment Considerations\n\n### 3.3. TLS Session Resumption\n\nSome TLS implementations do not retain client certificate information when resuming. Providing inconsistent values of Client-Cert and Client-Cert-Chain when resuming might lead to errors, so implementations that are unable to provide these values *SHOULD* either disable resumption for connections with client certificates or initially omit a Client-Cert or Client-Cert-Chain field if it might not be available after resuming.\n\n---\n\n## 4. Security Considerations\n\nThe header fields described herein enable a TTRP and backend or origin server to function together as though, from the client's perspective, they are a single logical server-side deployment of HTTPS over a mutually authenticated TLS connection. However, use of the header fields outside that intended use case may undermine the protections afforded by TLS client certificate authentication. Therefore, steps such as those described below need to be taken to prevent unintended use, both in sending the header field and in relying on its value.\n\nProducing and consuming the Client-Cert and Client-Cert-Chain header fields *SHOULD* be configurable options, respectively, in a TTRP and backend server (or in an individual application in that server). The default configuration for both should be to not use the header fields, thus requiring an \"opt-in\" to the functionality.\n\nIn order to prevent field injection, backend servers *MUST* only accept the Client-Cert and Client-Cert-Chain header fields from a trusted TTRP (or other proxy in a trusted path from the TTRP). A TTRP *MUST* sanitize the incoming request before forwarding it on by removing or overwriting any existing instances of the fields. Otherwise, arbitrary clients can control the field values as seen and used by the backend server. It is important to note that neglecting to prevent field injection does not \"fail safe\" in that the nominal functionality will still work as expected even when malicious actions are possible. As such, extra care is recommended in ensuring that proper field sanitation is in place.\n\nThe communication between a TTRP and backend server needs to be secured against eavesdropping and modification by unintended parties.\n\nThe configuration options and request sanitization are necessary functionalities of the respective servers. The other requirements can be met in a number of ways, which will vary based on specific deployments. The communication between a TTRP and backend or origin server, for example, might be authenticated in some way with the insertion and consumption of the Client-Cert and Client-Cert-Chain header fields occurring only on that connection. Appendix B.3 of [HTTPSIG] gives one example of this with an application of HTTP Message Signatures. Alternatively, the network topology might dictate a private network such that the backend application is only able to accept requests from the TTRP and the proxy can only make requests to that server. Other deployments that meet the requirements set forth herein are also possible.\n\n---\n\n## 5. IANA Considerations\n\n### 5.1. HTTP Field Name Registrations\n\nIANA has registered the following entries in the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" defined by \"HTTP Semantics\" [HTTP]:\n\n| Field Name | Status | Reference |\n| --- | --- | --- |\n| Client-Cert | permanent | RFC 9440, Section 2 |\n| Client-Cert-Chain | permanent | RFC 9440, Section 2 |\n\n## 6. References\n\n### 6.1. Normative References\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[ITU.X690]\n\nITU-T, “[Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)](https://www.itu.int/rec/T-REC-X.690/en)”, ITU-T Recommendation X.690, February 2021, <[https://www.itu.int/rec/T-REC-X.690/en](https://www.itu.int/rec/T-REC-X.690/en)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC5280]\n\nCooper, 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](https://www.rfc-editor.org/rfc/rfc5280.html)”, RFC 5280, [DOI 10.17487/RFC5280](https://dx.doi.org/10.17487/RFC5280), May 2008, <[https://www.rfc-editor.org/info/rfc5280](https://www.rfc-editor.org/info/rfc5280)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc8941.html)”, RFC 8941, [DOI 10.17487/RFC8941](https://dx.doi.org/10.17487/RFC8941), February 2021, <[https://www.rfc-editor.org/info/rfc8941](https://www.rfc-editor.org/info/rfc8941)>.\n\n### 6.2. Informative References\n\n[HPACK]\n\nPeon, R. and H. Ruellan, “[HPACK: Header Compression for HTTP/2](https://www.rfc-editor.org/rfc/rfc7541.html)”, RFC 7541, [DOI 10.17487/RFC7541](https://dx.doi.org/10.17487/RFC7541), May 2015, <[https://www.rfc-editor.org/info/rfc7541](https://www.rfc-editor.org/info/rfc7541)>.\n\n[HTTP/1.1]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html)”, [STD 99](https://www.rfc-editor.org/info/std99), RFC 9112, [DOI 10.17487/RFC9112](https://dx.doi.org/10.17487/RFC9112), June 2022, <[https://www.rfc-editor.org/info/rfc9112](https://www.rfc-editor.org/info/rfc9112)>.\n\n[HTTP/2]\n\nThomson, M., Ed. and C. Benfield, Ed., “[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html)”, RFC 9113, [DOI 10.17487/RFC9113](https://dx.doi.org/10.17487/RFC9113), June 2022, <[https://www.rfc-editor.org/info/rfc9113](https://www.rfc-editor.org/info/rfc9113)>.\n\n[HTTP/3]\n\nBishop, M., Ed., “[HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html)”, RFC 9114, [DOI 10.17487/RFC9114](https://dx.doi.org/10.17487/RFC9114), June 2022, <[https://www.rfc-editor.org/info/rfc9114](https://www.rfc-editor.org/info/rfc9114)>.\n\n[HTTPSIG]\n\nBackman, A., Ed., Richer, J., Ed., and M. Sporny, “[HTTP Message Signatures](https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures-17)”, [Work in Progress](https://datatracker.ietf.org/doc/draft-ietf-httpbis-message-signatures), draft-ietf-httpbis-message-signatures-17, Work in Progress, May 2023, <[https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures-17](https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures-17)>.\n\n[QPACK]\n\nKrasic, C., Bishop, M., and A. Frindell, Ed., “[QPACK: Field Compression for HTTP/3](https://www.rfc-editor.org/rfc/rfc9204.html)”, RFC 9204, [DOI 10.17487/RFC9204](https://dx.doi.org/10.17487/RFC9204), June 2022, <[https://www.rfc-editor.org/info/rfc9204](https://www.rfc-editor.org/info/rfc9204)>.\n\n[RFC6585]\n\nNottingham, M. and R. Fielding, “[Additional HTTP Status Codes](https://www.rfc-editor.org/rfc/rfc6585.html)”, RFC 6585, [DOI 10.17487/RFC6585](https://dx.doi.org/10.17487/RFC6585), April 2012, <[https://www.rfc-editor.org/info/rfc6585](https://www.rfc-editor.org/info/rfc6585)>.\n\n[RFC7239]\n\nPetersson, A. and M. Nilsson, “[Forwarded HTTP Extension](https://www.rfc-editor.org/rfc/rfc7239.html)”, RFC 7239, [DOI 10.17487/RFC7239](https://dx.doi.org/10.17487/RFC7239), June 2014, <[https://www.rfc-editor.org/info/rfc7239](https://www.rfc-editor.org/info/rfc7239)>.\n\n[RFC7468]\n\nJosefsson, S. and S. Leonard, “[Textual Encodings of PKIX, PKCS, and CMS Structures](https://www.rfc-editor.org/rfc/rfc7468.html)”, RFC 7468, [DOI 10.17487/RFC7468](https://dx.doi.org/10.17487/RFC7468), April 2015, <[https://www.rfc-editor.org/info/rfc7468](https://www.rfc-editor.org/info/rfc7468)>.\n\n[RFC8705]\n\nCampbell, B., Bradley, J., Sakimura, N., and T. Lodderstedt, “[OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens](https://www.rfc-editor.org/rfc/rfc8705.html)”, RFC 8705, [DOI 10.17487/RFC8705](https://dx.doi.org/10.17487/RFC8705), February 2020, <[https://www.rfc-editor.org/info/rfc8705](https://www.rfc-editor.org/info/rfc8705)>.\n\n[TLS1.2]\n\nDierks, T. and E. Rescorla, “[The Transport Layer Security (TLS) Protocol Version 1.2](https://www.rfc-editor.org/rfc/rfc5246.html)”, RFC 5246, [DOI 10.17487/RFC5246](https://dx.doi.org/10.17487/RFC5246), August 2008, <[https://www.rfc-editor.org/info/rfc5246](https://www.rfc-editor.org/info/rfc5246)>.\n\n[TLS]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n---\n\n## Appendix A. Example\n\nIn a hypothetical example where a TLS client would present the client and intermediate certificate from Figure 1 when establishing a mutually authenticated TLS connection with the TTRP, the proxy would send the Client-Cert field shown in Figure 2 to the backend. Note that line breaks and extra spaces have been added to the field value in Figures 2 and 3 for display and formatting purposes only.\n\n```\n-----BEGIN CERTIFICATE-----\nMIIBqDCCAU6gAwIBAgIBBzAKBggqhkjOPQQDAjA6MRswGQYDVQQKDBJMZXQncyBB\ndXRoZW50aWNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBDQTAeFw0yMDAx\nMTQyMjU1MzNaFw0yMTAxMjMyMjU1MzNaMA0xCzAJBgNVBAMMAkJDMFkwEwYHKoZI\nzj0CAQYIKoZIzj0DAQcDQgAE8YnXXfaUgmnMtOXU/IncWalRhebrXmckC8vdgJ1p\n5Be5F/3YC8OthxM4+k1M6aEAEFcGzkJiNy6J84y7uzo9M6NyMHAwCQYDVR0TBAIw\nADAfBgNVHSMEGDAWgBRm3WjLa38lbEYCuiCPct0ZaSED2DAOBgNVHQ8BAf8EBAMC\nBsAwEwYDVR0lBAwwCgYIKwYBBQUHAwIwHQYDVR0RAQH/BBMwEYEPYmRjQGV4YW1w\nbGUuY29tMAoGCCqGSM49BAMCA0gAMEUCIBHda/r1vaL6G3VliL4/Di6YK0Q6bMje\nSkC3dFCOOB8TAiEAx/kHSB4urmiZ0NX5r5XarmPk0wmuydBVoU4hBVZ1yhk=\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIB5jCCAYugAwIBAgIBFjAKBggqhkjOPQQDAjBWMQswCQYDVQQGEwJVUzEbMBkG\nA1UECgwSTGV0J3MgQXV0aGVudGljYXRlMSowKAYDVQQDDCFMZXQncyBBdXRoZW50\naWNhdGUgUm9vdCBBdXRob3JpdHkwHhcNMjAwMTE0MjEzMjMwWhcNMzAwMTExMjEz\nMjMwWjA6MRswGQYDVQQKDBJMZXQncyBBdXRoZW50aWNhdGUxGzAZBgNVBAMMEkxB\nIEludGVybWVkaWF0ZSBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJf+aA54\nRC5pyLAR5yfXVYmNpgd+CGUTDp2KOGhc0gK91zxhHesEYkdXkpS2UN8Kati+yHtW\nCV3kkhCngGyv7RqjZjBkMB0GA1UdDgQWBBRm3WjLa38lbEYCuiCPct0ZaSED2DAf\nBgNVHSMEGDAWgBTEA2Q6eecKu9g9yb5glbkhhVINGDASBgNVHRMBAf8ECDAGAQH/\nAgEAMA4GA1UdDwEB/wQEAwIBhjAKBggqhkjOPQQDAgNJADBGAiEA5pLvaFwRRkxo\nmIAtDIwg9D7gC1xzxBl4r28EzmSO1pcCIQCJUShpSXO9HDIQMUgH69fNDEMHXD3R\nRX5gP7kuu2KGMg==\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIICBjCCAaygAwIBAgIJAKS0yiqKtlhoMAoGCCqGSM49BAMCMFYxCzAJBgNVBAYT\nAlVTMRswGQYDVQQKDBJMZXQncyBBdXRoZW50aWNhdGUxKjAoBgNVBAMMIUxldCdz\nIEF1dGhlbnRpY2F0ZSBSb290IEF1dGhvcml0eTAeFw0yMDAxMTQyMTI1NDVaFw00\nMDAxMDkyMTI1NDVaMFYxCzAJBgNVBAYTAlVTMRswGQYDVQQKDBJMZXQncyBBdXRo\nZW50aWNhdGUxKjAoBgNVBAMMIUxldCdzIEF1dGhlbnRpY2F0ZSBSb290IEF1dGhv\ncml0eTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFoaHU+Z5bPKmGzlYXtCf+E6\nHYj62fORaHDOrt+yyh3H/rTcs7ynFfGn+gyFsrSP3Ez88rajv+U2NfD0o0uZ4Pmj\nYzBhMB0GA1UdDgQWBBTEA2Q6eecKu9g9yb5glbkhhVINGDAfBgNVHSMEGDAWgBTE\nA2Q6eecKu9g9yb5glbkhhVINGDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE\nAwIBhjAKBggqhkjOPQQDAgNIADBFAiEAmAeg1ycKHriqHnaD4M/UDBpQRpkmdcRF\nYGMg1Qyrkx4CIB4ivz3wQcQkGhcsUZ1SOImd/lq1Q0FLf09rGfLQPWDc\n-----END CERTIFICATE-----\n```\n\nFigure 1: Certificate Chain (with Client Certificate First)\n\n```\nClient-Cert: :MIIBqDCCAU6gAwIBAgIBBzAKBggqhkjOPQQDAjA6MRswGQYDVQQKDBJ\n MZXQncyBBdXRoZW50aWNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBDQTAeFw0\n yMDAxMTQyMjU1MzNaFw0yMTAxMjMyMjU1MzNaMA0xCzAJBgNVBAMMAkJDMFkwEwYHKoZ\n Izj0CAQYIKoZIzj0DAQcDQgAE8YnXXfaUgmnMtOXU/IncWalRhebrXmckC8vdgJ1p5Be\n 5F/3YC8OthxM4+k1M6aEAEFcGzkJiNy6J84y7uzo9M6NyMHAwCQYDVR0TBAIwADAfBgN\n VHSMEGDAWgBRm3WjLa38lbEYCuiCPct0ZaSED2DAOBgNVHQ8BAf8EBAMCBsAwEwYDVR0\n lBAwwCgYIKwYBBQUHAwIwHQYDVR0RAQH/BBMwEYEPYmRjQGV4YW1wbGUuY29tMAoGCCq\n GSM49BAMCA0gAMEUCIBHda/r1vaL6G3VliL4/Di6YK0Q6bMjeSkC3dFCOOB8TAiEAx/k\n HSB4urmiZ0NX5r5XarmPk0wmuydBVoU4hBVZ1yhk=:\n```\n\nFigure 2: Header Field in HTTP Request to Origin Server\n\nIf the proxy were configured to also include the certificate chain, it would also include the Client-Cert-Chain header field. Note that while the following example does illustrate the TTRP inserting the root certificate, many deployments will opt to omit the trust anchor.\n\n```\nClient-Cert-Chain: :MIIB5jCCAYugAwIBAgIBFjAKBggqhkjOPQQDAjBWMQsw\n CQYDVQQGEwJVUzEbMBkGA1UECgwSTGV0J3MgQXV0aGVudGljYXRlMSowKAYDVQQ\n DDCFMZXQncyBBdXRoZW50aWNhdGUgUm9vdCBBdXRob3JpdHkwHhcNMjAwMTE0Mj\n EzMjMwWhcNMzAwMTExMjEzMjMwWjA6MRswGQYDVQQKDBJMZXQncyBBdXRoZW50a\n WNhdGUxGzAZBgNVBAMMEkxBIEludGVybWVkaWF0ZSBDQTBZMBMGByqGSM49AgEG\n CCqGSM49AwEHA0IABJf+aA54RC5pyLAR5yfXVYmNpgd+CGUTDp2KOGhc0gK91zx\n hHesEYkdXkpS2UN8Kati+yHtWCV3kkhCngGyv7RqjZjBkMB0GA1UdDgQWBBRm3W\n jLa38lbEYCuiCPct0ZaSED2DAfBgNVHSMEGDAWgBTEA2Q6eecKu9g9yb5glbkhh\n VINGDASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjAKBggqhkjO\n PQQDAgNJADBGAiEA5pLvaFwRRkxomIAtDIwg9D7gC1xzxBl4r28EzmSO1pcCIQC\n JUShpSXO9HDIQMUgH69fNDEMHXD3RRX5gP7kuu2KGMg==:, :MIICBjCCAaygAw\n IBAgIJAKS0yiqKtlhoMAoGCCqGSM49BAMCMFYxCzAJBgNVBAYTAlVTMRswGQYDV\n QQKDBJMZXQncyBBdXRoZW50aWNhdGUxKjAoBgNVBAMMIUxldCdzIEF1dGhlbnRp\n Y2F0ZSBSb290IEF1dGhvcml0eTAeFw0yMDAxMTQyMTI1NDVaFw00MDAxMDkyMTI\n 1NDVaMFYxCzAJBgNVBAYTAlVTMRswGQYDVQQKDBJMZXQncyBBdXRoZW50aWNhdG\n UxKjAoBgNVBAMMIUxldCdzIEF1dGhlbnRpY2F0ZSBSb290IEF1dGhvcml0eTBZM\n BMGByqGSM49AgEGCCqGSM49AwEHA0IABFoaHU+Z5bPKmGzlYXtCf+E6HYj62fOR\n aHDOrt+yyh3H/rTcs7ynFfGn+gyFsrSP3Ez88rajv+U2NfD0o0uZ4PmjYzBhMB0\n GA1UdDgQWBBTEA2Q6eecKu9g9yb5glbkhhVINGDAfBgNVHSMEGDAWgBTEA2Q6ee\n cKu9g9yb5glbkhhVINGDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBh\n jAKBggqhkjOPQQDAgNIADBFAiEAmAeg1ycKHriqHnaD4M/UDBpQRpkmdcRFYGMg\n 1Qyrkx4CIB4ivz3wQcQkGhcsUZ1SOImd/lq1Q0FLf09rGfLQPWDc:\n```\n\nFigure 3: Certificate Chain in HTTP Request to Origin Server\n\n---\n\n## Appendix B. Select Design Considerations\n\n### B.1. Field Injection\n\nThis document requires that the TTRP sanitize the fields of the incoming request by removing or overwriting any existing instances of the Client-Cert and Client-Cert-Chain header fields before dispatching that request to the backend application. Otherwise, a client could inject its own values that would appear to the backend to have come from the TTRP. Although numerous other methods of detecting and preventing field injection are possible, such as the use of a unique secret value as part of the field name or value or the application of a signature, HMAC, or AEAD, there is no common general mechanism. The potential problem of client field injection is not at all unique to the functionality of this document; therefore, it would be inappropriate for this document to define a one-off solution. Since a generic common solution does not currently exist, stripping and sanitizing the fields is the de facto means of protecting against field injection in practice. Sanitizing the fields is sufficient when properly implemented and is a normative requirement of Section 4.\n\n### B.2. The Forwarded HTTP Extension\n\nThe Forwarded HTTP header field defined in [RFC7239] allows proxy components to disclose information lost in the proxying process. The TLS client certificate information of concern to this document could have been communicated with an extension parameter to the Forwarded field; however, doing so would have had some disadvantages that this document endeavored to avoid. The Forwarded field syntax allows for information about a full chain of proxied HTTP requests, whereas the Client-Cert and Client-Cert-Chain header fields of this document are concerned only with conveying information about the certificate presented by the originating client on the TLS connection to the TTRP (which appears as the server from that client's perspective) to backend applications. The multi-hop syntax of the Forwarded field is expressive but also more complicated, which would make processing it more cumbersome and, more importantly, would make properly sanitizing its content, as required by Section 4 to prevent field injection, considerably more difficult and error-prone. Thus, this document opted for a flatter and more straightforward structure.\n\n### B.3. The Whole Certificate and Certificate Chain\n\nDifferent applications will have varying requirements about what information from the client certificate is needed, such as the subject and/or issuer distinguished name, subject alternative name(s), serial number, subject public key info, fingerprint, etc. Furthermore, some applications, such as that described in [RFC8705], make use of the entire certificate. In order to accommodate the latter and ensure wide applicability by not trying to cherry-pick particular certificate information, this document opted to pass the full, encoded certificate as the value of the Client-Cert field.\n\nThe validation of the client certificate and chain of the mutually authenticated TLS connection is typically performed by the TTRP during the handshake. With the responsibility of certificate validation falling on the TTRP, the end-entity certificate is oftentimes sufficient for the needs of the origin server. The separate Client-Cert-Chain field can convey the certificate chain for origin server deployments that require this additional information.\n\n---\n\n## Acknowledgements\n\nThe authors would like to thank the following individuals who have contributed to this document in various ways, ranging from just being generally supportive of bringing forth the document to providing specific feedback or content:\n\n- Evan Anderson\n- Annabelle Backman\n- Alan Frindell\n- Rory Hewitt\n- Fredrik Jeansson\n- Benjamin Kaduk\n- Torsten Lodderstedt\n- Kathleen Moriarty\n- Mark Nottingham\n- Erik Nygren\n- Mike Ounsworth\n- Lucas Pardue\n- Matt Peterson\n- Eric Rescorla\n- Justin Richer\n- Michael Richardson\n- Joe Salowey\n- Rich Salz\n- Mohit Sethi\n- Rifaat Shekh-Yusef\n- Travis Spencer\n- Nick Sullivan\n- Willy Tarreau\n- Martin Thomson\n- Peter Wu\n- Hans Zandbelt\n\n---\n\n## Authors' Addresses\n\n**Brian Campbell**\nPing Identity\nEMail: [bcampbell@pingidentity.com](mailto:bcampbell@pingidentity.com)\n\n**Mike Bishop** (editor)\nAkamai\nEMail: [mbishop@evequefou.be](mailto:mbishop@evequefou.be)", "znaku_textu": 31494, "slov": 3778, "odkazu": 153, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:19", "sha256": "f4306050c7788c5969923e6a0449f0122a6b04c809a863e44d27ee0e94c733ca", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9440", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc8941.html", "https://www.rfc-editor.org/rfc/rfc9113.html", "https://www.rfc-editor.org/rfc/rfc7468.html", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc8446.html", "https://www.rfc-editor.org/rfc/rfc6585.html", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.itu.int/rec/T-REC-X.690/en", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc5280.html", "https://dx.doi.org/10.17487/RFC5280", "https://www.rfc-editor.org/info/rfc5280", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC8941", "https://www.rfc-editor.org/info/rfc8941", "https://www.rfc-editor.org/rfc/rfc7541.html", "https://dx.doi.org/10.17487/RFC7541", "https://www.rfc-editor.org/info/rfc7541", "https://www.rfc-editor.org/rfc/rfc9112.html", "https://www.rfc-editor.org/info/std99", "https://dx.doi.org/10.17487/RFC9112", "https://www.rfc-editor.org/info/rfc9112", "https://dx.doi.org/10.17487/RFC9113", "https://www.rfc-editor.org/info/rfc9113", "https://www.rfc-editor.org/rfc/rfc9114.html", "https://dx.doi.org/10.17487/RFC9114", "https://www.rfc-editor.org/info/rfc9114", "https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures-17", "https://datatracker.ietf.org/doc/draft-ietf-httpbis-message-signatures", "https://www.rfc-editor.org/rfc/rfc9204.html", "https://dx.doi.org/10.17487/RFC9204", "https://www.rfc-editor.org/info/rfc9204", "https://dx.doi.org/10.17487/RFC6585", "https://www.rfc-editor.org/info/rfc6585", "https://www.rfc-editor.org/rfc/rfc7239.html", "https://dx.doi.org/10.17487/RFC7239", "https://www.rfc-editor.org/info/rfc7239", "https://dx.doi.org/10.17487/RFC7468", "https://www.rfc-editor.org/info/rfc7468", "https://www.rfc-editor.org/rfc/rfc8705.html", "https://dx.doi.org/10.17487/RFC8705", "https://www.rfc-editor.org/info/rfc8705", "https://www.rfc-editor.org/rfc/rfc5246.html", "https://dx.doi.org/10.17487/RFC5246", "https://www.rfc-editor.org/info/rfc5246", "https://dx.doi.org/10.17487/RFC8446", "https://www.rfc-editor.org/info/rfc8446"]} {"url": "https://httpwg.org/specs/rfc9530.html", "titulek": "RFC 9530 - Digest Fields", "h1": "Digest Fields", "popis": "This document defines HTTP fields that support integrity digests. The Content-Digest field can be used for the integrity of HTTP message content. The Repr-Digest field can be used for the integrity of HTTP representations. Want-Content-Digest and Want-Repr-Digest can be used to indicate a sender's interest and preferences for receiving the respective Integrity fields.This document obsoletes RFC 3230 and the Digest and Want-Digest HTTP fields.", "klicova_slova": "Digest", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9530", "og:description": "Digest Fields", "og:url": "https://httpwg.org/specs/rfc9530.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Document Structure"}, {"uroven": 3, "text": "1.2. Concept Overview"}, {"uroven": 3, "text": "1.3. Obsoleting RFC 3230"}, {"uroven": 3, "text": "1.4. Notational Conventions"}, {"uroven": 2, "text": "2. The Content-Digest Field"}, {"uroven": 2, "text": "3. The Repr-Digest Field"}, {"uroven": 3, "text": "3.1. Using Repr-Digest in State-Changing Requests"}, {"uroven": 3, "text": "3.2. Repr-Digest and Content-Location in Responses"}, {"uroven": 2, "text": "4. Integrity Preference Fields"}, {"uroven": 2, "text": "5. Hash Algorithm Considerations and Registration"}, {"uroven": 2, "text": "6. Security Considerations"}, {"uroven": 3, "text": "6.1. HTTP Messages Are Not Protected in Full"}, {"uroven": 3, "text": "6.2. End-to-End Integrity"}, {"uroven": 3, "text": "6.3. Usage in Signatures"}, {"uroven": 3, "text": "6.4. Usage in Trailer Fields"}, {"uroven": 3, "text": "6.5. Variations within Content-Encoding"}, {"uroven": 3, "text": "6.6. Algorithm Agility"}, {"uroven": 3, "text": "6.7. Resource Exhaustion"}, {"uroven": 2, "text": "7. IANA Considerations"}, {"uroven": 3, "text": "7.1. HTTP Field Name Registration"}, {"uroven": 3, "text": "7.2. Creation of the Hash Algorithms for HTTP Digest Fields Registry"}, {"uroven": 3, "text": "7.3. Deprecate the Hypertext Transfer Protocol (HTTP) Digest Algorithm Values Registry"}, {"uroven": 2, "text": "8. References"}, {"uroven": 3, "text": "8.1. Normative References"}, {"uroven": 3, "text": "8.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Resource Representation and Representation Data"}, {"uroven": 2, "text": "Appendix B. Examples of Unsolicited Digest"}, {"uroven": 3, "text": "B.1. Server Returns Full Representation Data"}, {"uroven": 3, "text": "B.2. Server Returns No Representation Data"}, {"uroven": 3, "text": "B.3. Server Returns Partial Representation Data"}, {"uroven": 3, "text": "B.4. Client and Server Provide Full Representation Data"}, {"uroven": 3, "text": "B.5. Client Provides Full Representation Data and Server Provides No Representation Data"}, {"uroven": 3, "text": "B.6. Client and Server Provide Full Representation Data"}, {"uroven": 3, "text": "B.7. POST Response Does Not Reference the Request URI"}, {"uroven": 3, "text": "B.8. POST Response Describes the Request Status"}, {"uroven": 3, "text": "B.9. Digest with PATCH"}, {"uroven": 3, "text": "B.10. Error Responses"}, {"uroven": 3, "text": "B.11. Use with Trailer Fields and Transfer Coding"}, {"uroven": 2, "text": "Appendix C. Examples of Want-Repr-Digest Solicited Digest"}, {"uroven": 3, "text": "C.1. Server Selects Client's Least Preferred Algorithm"}, {"uroven": 3, "text": "C.2. Server Selects Algorithm Unsupported by Client"}, {"uroven": 3, "text": "C.3. Server Does Not Support Client Algorithm and Returns an Error"}, {"uroven": 2, "text": "Appendix D. Sample Digest Values"}, {"uroven": 2, "text": "Appendix E. Migrating from RFC 3230"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document defines HTTP fields that support integrity digests. The Content-Digest field can be used for the integrity of HTTP message content. The Repr-Digest field can be used for the integrity of HTTP representations. Want-Content-Digest and Want-Repr-Digest can be used to indicate a sender's interest and preferences for receiving the respective Integrity fields.\n\nThis document obsoletes RFC 3230 and the Digest and Want-Digest HTTP fields.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9530](https://www.rfc-editor.org/info/rfc9530).\n\n## Copyright Notice\n\nCopyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Document Structure\n - 1.2. Concept Overview\n - 1.3. Obsoleting RFC 3230\n - 1.4. Notational Conventions\n- 2. The Content-Digest Field\n- 3. The Repr-Digest Field\n - 3.1. Using Repr-Digest in State-Changing Requests\n - 3.2. Repr-Digest and Content-Location in Responses\n- 4. Integrity Preference Fields\n- 5. Hash Algorithm Considerations and Registration\n- 6. Security Considerations\n - 6.1. HTTP Messages Are Not Protected in Full\n - 6.2. End-to-End Integrity\n - 6.3. Usage in Signatures\n - 6.4. Usage in Trailer Fields\n - 6.5. Variations within Content-Encoding\n - 6.6. Algorithm Agility\n - 6.7. Resource Exhaustion\n- 7. IANA Considerations\n - 7.1. HTTP Field Name Registration\n - 7.2. Creation of the Hash Algorithms for HTTP Digest Fields Registry\n - 7.3. Deprecate the Hypertext Transfer Protocol (HTTP) Digest Algorithm Values Registry\n- 8. References\n - 8.1. Normative References\n - 8.2. Informative References\n- Appendix A. Resource Representation and Representation Data\n- Appendix B. Examples of Unsolicited Digest\n - B.1. Server Returns Full Representation Data\n - B.2. Server Returns No Representation Data\n - B.3. Server Returns Partial Representation Data\n - B.4. Client and Server Provide Full Representation Data\n - B.5. Client Provides Full Representation Data and Server Provides No Representation Data\n - B.6. Client and Server Provide Full Representation Data\n - B.7. POST Response Does Not Reference the Request URI\n - B.8. POST Response Describes the Request Status\n - B.9. Digest with PATCH\n - B.10. Error Responses\n - B.11. Use with Trailer Fields and Transfer Coding\n- Appendix C. Examples of Want-Repr-Digest Solicited Digest\n - C.1. Server Selects Client's Least Preferred Algorithm\n - C.2. Server Selects Algorithm Unsupported by Client\n - C.3. Server Does Not Support Client Algorithm and Returns an Error\n- Appendix D. Sample Digest Values\n- Appendix E. Migrating from RFC 3230\n- Acknowledgements\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nHTTP does not define the means to protect the data integrity of content or representations. When HTTP messages are transferred between endpoints, lower-layer features or properties such as TCP checksums or TLS records [TLS] can provide some integrity protection. However, transport-oriented integrity provides a limited utility because it is opaque to the application layer and only covers the extent of a single connection. HTTP messages often travel over a chain of separate connections. In between connections, there is a possibility for data corruption. An HTTP integrity mechanism can provide the means for endpoints, or applications using HTTP, to detect data corruption and make a choice about how to act on it. An example use case is to aid fault detection and diagnosis across system boundaries.\n\nThis document defines two digest integrity mechanisms for HTTP. First, content integrity, which acts on conveyed content ([Section 6.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.4) of [HTTP]). Second, representation data integrity, which acts on representation data ([Section 8.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.1) of [HTTP]). This supports advanced use cases, such as validating the integrity of a resource that was reconstructed from parts retrieved using multiple requests or connections.\n\nThis document obsoletes [RFC3230] and therefore the Digest and Want-Digest HTTP fields; see Section 1.3.\n\n### 1.1. Document Structure\n\nThis document is structured as follows:\n\n- New request and response header and trailer field definitions. Section 2 (Content-Digest),Section 3 (Repr-Digest), andSection 4 (Want-Content-Digest and Want-Repr-Digest).\n- Considerations specific to representation data integrity. Section 3.1 (State-changing requests),Section 3.2 (Content-Location),Appendix A contains worked examples of representation data in message exchanges, andAppendixes B and C contain worked examples of Repr-Digest and Want-Repr-Digest fields in message exchanges.\n- Section 5 presents hash algorithm considerations and defines registration procedures for future entries.\n\n### 1.2. Concept Overview\n\nThe HTTP fields defined in this document can be used for HTTP integrity. Senders choose a hashing algorithm and calculate a digest from an input related to the HTTP message. The algorithm identifier and digest are transmitted in an HTTP field. Receivers can validate the digest for integrity purposes. Hashing algorithms are registered in the \"Hash Algorithms for HTTP Digest Fields\" registry (see Section 7.2).\n\nSelecting the data on which digests are calculated depends on the use case of the HTTP messages. This document provides different fields for HTTP representation data and HTTP content.\n\nThere are use cases where a simple digest of the HTTP content bytes is required. The Content-Digest request and response header and trailer field is defined to support digests of content ([Section 6.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.4) of [HTTP]); see Section 2.\n\nFor more advanced use cases, the Repr-Digest request and response header and trailer field (Section 3) is defined. It contains a digest value computed by applying a hashing algorithm to selected representation data ([Section 8.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.1) of [HTTP]). Basing Repr-Digest on the selected representation makes it straightforward to apply it to use cases where the message content requires some sort of manipulation to be considered as representation of the resource or the content conveys a partial representation of a resource, such as range requests (see [Section 14](https://www.rfc-editor.org/rfc/rfc9110.html#section-14) of [HTTP]).\n\nContent-Digest and Repr-Digest support hashing algorithm agility. The Want-Content-Digest and Want-Repr-Digest fields allow endpoints to express interest in Content-Digest and Repr-Digest, respectively, and to express algorithm preferences in either.\n\nContent-Digest and Repr-Digest are collectively termed \"Integrity fields\". Want-Content-Digest and Want-Repr-Digest are collectively termed \"Integrity preference fields\".\n\nIntegrity fields are tied to the Content-Encoding and Content-Type header fields. Therefore, a given resource may have multiple different digest values when transferred with HTTP.\n\nIntegrity fields apply to HTTP message content or HTTP representations. They do not apply to HTTP messages or fields. However, they can be combined with other mechanisms that protect metadata, such as digital signatures, in order to protect the phases of an HTTP exchange in whole or in part. For example, HTTP Message Signatures [SIGNATURES] could be used to sign Integrity fields, thus providing coverage for HTTP content or representation data.\n\nThis specification does not define means for authentication, authorization, or privacy.\n\n### 1.3. Obsoleting RFC 3230\n\n[RFC3230] defined the Digest and Want-Digest HTTP fields for HTTP integrity. It also coined the terms \"instance\" and \"instance manipulation\" in order to explain concepts, such as selected representation data ([Section 8.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.1) of [HTTP]), that are now more universally defined and implemented as HTTP semantics.\n\nExperience has shown that implementations of [RFC3230] have interpreted the meaning of \"instance\" inconsistently, leading to interoperability issues. The most common issue relates to the mistake of calculating the digest using (what we now call) message content, rather than using (what we now call) representation data as was originally intended. Interestingly, time has also shown that a digest of message content can be beneficial for some use cases, so it is difficult to detect if non-conformance to [RFC3230] is intentional or unintentional.\n\nIn order to address potential inconsistencies and ambiguity across implementations of Digest and Want-Digest, this document obsoletes [RFC3230]. The Integrity fields (Sections 2 and 3) and Integrity preference fields (Section 4) defined in this document are better aligned with current HTTP semantics and have names that more clearly articulate the intended usages.\n\n### 1.4. Notational Conventions\n\nThe 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.\n\nThis document uses the Augmented BNF defined in [RFC5234] and updated by [RFC7405]. This includes the rules CR (carriage return), LF (line feed), and CRLF (CR LF).\n\nThis document uses the following terminology from [Section 3](https://www.rfc-editor.org/rfc/rfc8941.html#section-3) of [STRUCTURED-FIELDS] to specify syntax and parsing: Boolean, Byte Sequence, Dictionary, Integer, and List.\n\nThe definitions \"representation\", \"selected representation\", \"representation data\", \"representation metadata\", \"user agent\", and \"content\" in this document are to be interpreted as described in [HTTP].\n\nThis document uses the line folding strategies described in [FOLDING].\n\nHashing algorithm names respect the casing used in their definition document (e.g., SHA-1, CRC32c).\n\nHTTP messages indicate hashing algorithms using an Algorithm Key (algorithms). Where the document refers to an Algorithm Key in prose, it is quoted (e.g., \"sha\", \"crc32c\").\n\nThe term \"checksum\" describes the output of applying an algorithm to a sequence of bytes, whereas \"digest\" is only used in relation to the value contained in the fields.\n\n\"Integrity fields\" is the collective term for Content-Digest and Repr-Digest.\n\n\"Integrity preference fields\" is the collective term for Want-Repr-Digest and Want-Content-Digest.\n\n---\n\n## 2. The Content-Digest Field\n\nThe Content-Digest HTTP field can be used in requests and responses to communicate digests that are calculated using a hashing algorithm applied to the actual message content (see [Section 6.4](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.4) of [HTTP]). It is a Dictionary (see [Section 3.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.2) of [STRUCTURED-FIELDS]), where each:\n\n- key conveys the hashing algorithm (see Section 5 ) used to compute the digest;\n- value is a Byte Sequence ( [Section 3.3.5](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.5) of [STRUCTURED-FIELDS] ) that conveys an encoded version of the byte output produced by the digest calculation.\n\nFor example:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nContent-Digest: \\\n sha-512=:YMAam51Jz/jOATT6/zvHrLVgOYTGFy1d6GJiOHTohq4yP+pgk4vf2aCs\\\n yRZOtw8MjkM7iw7yZ/WkppmM44T3qg==:\n```\n\nThe Dictionary type can be used, for example, to attach multiple digests calculated using different hashing algorithms in order to support a population of endpoints with different or evolving capabilities. Such an approach could support transitions away from weaker algorithms (see Section 6.6).\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nContent-Digest: \\\n sha-256=:d435Qo+nKZ+gLcUHn7GQtQ72hiBVAgqoLsZnZPiTGPk=:,\\\n sha-512=:YMAam51Jz/jOATT6/zvHrLVgOYTGFy1d6GJiOHTohq4yP+pgk4vf2aCs\\\n yRZOtw8MjkM7iw7yZ/WkppmM44T3qg==:\n```\n\nA recipient *MAY* ignore any or all digests. Application-specific behavior or local policy *MAY* set additional constraints on the processing and validation practices of the conveyed digests. The security considerations cover some of the issues related to ignoring digests (see Section 6.6) and validating multiple digests (see Section 6.7).\n\nA sender *MAY* send a digest without knowing whether the recipient supports a given hashing algorithm. A sender *MAY* send a digest if it knows the recipient will ignore it.\n\nContent-Digest can be sent in a trailer section. In this case, Content-Digest *MAY* be merged into the header section; see [Section 6.5.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.5.1) of [HTTP].\n\n---\n\n## 3. The Repr-Digest Field\n\nThe Repr-Digest HTTP field can be used in requests and responses to communicate digests that are calculated using a hashing algorithm applied to the entire selected representation data (see [Section 8.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.1) of [HTTP]).\n\nRepresentations take into account the effect of the HTTP semantics on messages. For example, the content can be affected by range requests or methods, such as HEAD, while the way the content is transferred \"on the wire\" is dependent on other transformations (e.g., transfer codings for HTTP/1.1; see [Section 6.1](https://www.rfc-editor.org/rfc/rfc9112.html#section-6.1) of [HTTP/1.1]). To help illustrate HTTP representation concepts, several examples are provided in Appendix A.\n\nWhen a message has no representation data, it is still possible to assert that no representation data was sent by computing the digest on an empty string (see Section 6.3).\n\nRepr-Digest is a Dictionary (see [Section 3.2](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.2) of [STRUCTURED-FIELDS]), where each:\n\n- key conveys the hashing algorithm (see Section 5 ) used to compute the digest;\n- value is a Byte Sequence that conveys an encoded version of the byte output produced by the digest calculation.\n\nFor example:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nRepr-Digest: \\\n sha-512=:YMAam51Jz/jOATT6/zvHrLVgOYTGFy1d6GJiOHTohq4yP+pgk4vf2aCs\\\n yRZOtw8MjkM7iw7yZ/WkppmM44T3qg==:\n```\n\nThe Dictionary type can be used to attach multiple digests calculated using different hashing algorithms in order to support a population of endpoints with different or evolving capabilities. Such an approach could support transitions away from weaker algorithms (see Section 6.6).\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nRepr-Digest: \\\n sha-256=:d435Qo+nKZ+gLcUHn7GQtQ72hiBVAgqoLsZnZPiTGPk=:,\\\n sha-512=:YMAam51Jz/jOATT6/zvHrLVgOYTGFy1d6GJiOHTohq4yP+pgk4vf2aCs\\\n yRZOtw8MjkM7iw7yZ/WkppmM44T3qg==:\n```\n\nA recipient *MAY* ignore any or all digests. Application-specific behavior or local policy *MAY* set additional constraints on the processing and validation practices of the conveyed digests. The security considerations cover some of the issues related to ignoring digests (see Section 6.6) and validating multiple digests (see Section 6.7).\n\nA sender *MAY* send a digest without knowing whether the recipient supports a given hashing algorithm. A sender *MAY* send a digest if it knows the recipient will ignore it.\n\nRepr-Digest can be sent in a trailer section. In this case, Repr-Digest *MAY* be merged into the header section; see [Section 6.5.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.5.1) of [HTTP].\n\n### 3.1. Using Repr-Digest in State-Changing Requests\n\nWhen the representation enclosed in a state-changing request does not describe the target resource, the representation digest *MUST* be computed on the representation data. This is the only possible choice because representation digest requires complete representation metadata (see Section 3).\n\nIn responses,\n\n- if the representation describes the status of the request, Repr-Digest *MUST* be computed on the enclosed representation (see Appendix B.8 );\n- if there is a referenced resource, Repr-Digest *MUST* be computed on the selected representation of the referenced resource even if that is different from the target resource. This might or might not result in computing Repr-Digest on the enclosed representation.\n\nThe latter case is done according to the HTTP semantics of the given method, for example, using the Content-Location header field (see [Section 8.7](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.7) of [HTTP]). In contrast, the Location header field does not affect Repr-Digest because it is not representation metadata.\n\nFor example, in PATCH requests, the representation digest will be computed on the patch document because the representation metadata refers to the patch document and not the target resource (see [Section 2](https://www.rfc-editor.org/rfc/rfc5789.html#section-2) of [PATCH]). In responses, instead, the representation digest will be computed on the selected representation of the patched resource.\n\n### 3.2. Repr-Digest and Content-Location in Responses\n\nWhen a state-changing method returns the Content-Location header field, the enclosed representation refers to the resource identified by its value and Repr-Digest is computed accordingly. An example is given in Appendix B.7.\n\n---\n\n## 4. Integrity Preference Fields\n\nSenders can indicate their interest in Integrity fields and hashing algorithm preferences using the Want-Content-Digest or Want-Repr-Digest HTTP fields. These can be used in both requests and responses.\n\nWant-Content-Digest indicates that the sender would like to receive (via the Content-Digest field) a content digest on messages associated with the request URI and representation metadata. Want-Repr-Digest indicates that the sender would like to receive (via the Repr-Digest field) a representation digest on messages associated with the request URI and representation metadata.\n\nIf Want-Content-Digest or Want-Repr-Digest are used in a response, it indicates that the server would like the client to provide the respective Integrity field on future requests.\n\nIntegrity preference fields are only a hint. The receiver of the field can ignore it and send an Integrity field using any algorithm or omit the field entirely; for example, see Appendix C.2. It is not a protocol error if preferences are ignored. Applications that use Integrity fields and Integrity preferences can define expectations or constraints that operate in addition to this specification. Ignored preferences are an application-specific concern.\n\nWant-Content-Digest and Want-Repr-Digest are of type Dictionary where each:\n\n- key conveys the hashing algorithm (see Section 5 );\n- value is an Integer ( [Section 3.3.1](https://www.rfc-editor.org/rfc/rfc8941.html#section-3.3.1) of [STRUCTURED-FIELDS] ) that conveys an ascending, relative, weighted preference. It must be in the range 0 to 10 inclusive. 1 is the least preferred, 10 is the most preferred, and a value of 0 means \"not acceptable\".\n\nExamples:\n\n```\nWant-Repr-Digest: sha-256=1\nWant-Repr-Digest: sha-512=3, sha-256=10, unixsum=0\nWant-Content-Digest: sha-256=1\nWant-Content-Digest: sha-512=3, sha-256=10, unixsum=0\n```\n\n---\n\n## 5. Hash Algorithm Considerations and Registration\n\nThere are a wide variety of hashing algorithms that can be used for the purposes of integrity. The choice of algorithm depends on several factors such as the integrity use case, implementation needs or constraints, or application design and workflows.\n\nAn initial set of algorithms will be registered with IANA in the \"Hash Algorithms for HTTP Digest Fields\" registry; see Section 7.2. Additional algorithms can be registered in accordance with the policies set out in this section.\n\nEach algorithm has a status field that is intended to provide an aid to implementation selection.\n\nAlgorithms with a status value of \"Active\" are suitable for many purposes and it is *RECOMMENDED* that applications use these algorithms. These can be used in adversarial situations where hash functions might need to provide resistance to collision, first-preimage, and second-preimage attacks. For adversarial situations, selection of the acceptable \"Active\" algorithms will depend on the level of protection the circumstances demand. More considerations are presented in Section 6.6.\n\nAlgorithms with a status value of \"Deprecated\" either provide none of these properties or are known to be weak (see [NO-MD5] and [NO-SHA]). These algorithms *MAY* be used to preserve integrity against corruption, but *MUST NOT* be used in a potentially adversarial setting, for example, when signing Integrity fields' values for authenticity. Permitting the use of these algorithms can help some applications (such as those that previously used [RFC3230], are migrating to this specification (Appendix E), and have existing stored collections of computed digest values) avoid undue operational overhead caused by recomputation using other more-secure algorithms. Such applications are not exempt from the requirements in this section. Furthermore, applications without such legacy or history ought to follow the guidance for using algorithms with the status value \"Active\".\n\nDiscussion of algorithm agility is presented in Section 6.6.\n\nRegistration requests for the \"Hash Algorithms for HTTP Digest Fields\" registry use the Specification Required policy ([Section 4.6](https://www.rfc-editor.org/rfc/rfc8126.html#section-4.6) of [RFC8126]). Requests should use the following template:\n\nAlgorithm Key:\n\nThe Structured Fields key value used in Content-Digest, Repr-Digest, Want-Content-Digest, or Want-Repr-Digest field Dictionary member keys.\n\nStatus:\n\nThe status of the algorithm. The options are:\n\n\"Active\":Algorithms without known problems\"Provisional\":Unproven algorithms\"Deprecated\":Deprecated or insecure algorithms\n\nDescription:\n\nA short description of the algorithm.\n\nReference(s):\n\nPointer(s) to the primary document(s) defining the Algorithm Key and technical details of the algorithm.\n\nWhen reviewing registration requests, the designated expert(s) should pay attention to the requested status. The status value should reflect standardization status and the broad opinion of relevant interest groups such as the IETF or security-related Standards Development Organizations (SDOs). The \"Active\" status is not suitable for an algorithm that is known to be weak, broken, or experimental. If a registration request attempts to register such an algorithm as \"Active\", the designated expert(s) should suggest an alternative status of \"Deprecated\" or \"Provisional\".\n\nWhen reviewing registration requests, the designated expert(s) cannot use a status of \"Deprecated\" or \"Provisional\" as grounds for rejection.\n\nRequests to update or change the fields in an existing registration are permitted. For example, this could allow for the transition of an algorithm status from \"Active\" to \"Deprecated\" as the security environment evolves.\n\n---\n\n## 6. Security Considerations\n\n### 6.1. HTTP Messages Are Not Protected in Full\n\nThis document specifies a data integrity mechanism that protects HTTP representation data or content, but not HTTP header and trailer fields, from certain kinds of corruption.\n\nIntegrity fields are not intended to be a general protection against malicious tampering with HTTP messages. In the absence of additional security mechanisms, an on-path malicious actor can either remove a digest value entirely or substitute it with a new digest value computed over manipulated representation data or content. This attack can be mitigated by combining mechanisms described in this document with other approaches such as Transport Layer Security (TLS) or digital signatures (for example, HTTP Message Signatures [SIGNATURES]).\n\n### 6.2. End-to-End Integrity\n\nIntegrity fields can help detect representation data or content modification due to implementation errors, undesired \"transforming proxies\" (see [Section 7.7](https://www.rfc-editor.org/rfc/rfc9110.html#section-7.7) of [HTTP]), or other actions as the data passes across multiple hops or system boundaries. Even a simple mechanism for end-to-end representation data integrity is valuable because a user agent can validate that resource retrieval succeeded before handing off to an HTML parser, video player, etc., for parsing.\n\nNote that using these mechanisms alone does not provide end-to-end integrity of HTTP messages over multiple hops since metadata could be manipulated at any stage. Methods to protect metadata are discussed in Section 6.3.\n\n### 6.3. Usage in Signatures\n\nDigital signatures are widely used together with checksums to provide the certain identification of the origin of a message [FIPS186-5]. Such signatures can protect one or more HTTP fields and there are additional considerations when Integrity fields are included in this set.\n\nThere are no restrictions placed on the type or format of digital signature that Integrity fields can be used with. One possible approach is to combine them with HTTP Message Signatures [SIGNATURES].\n\nDigests explicitly depend on the \"representation metadata\" (e.g., the values of Content-Type, Content-Encoding, etc.). A signature that protects Integrity fields but not other \"representation metadata\" can expose the communication to tampering. For example, an actor could manipulate the Content-Type field-value and cause a digest validation failure at the recipient, preventing the application from accessing the representation. Such an attack consumes the resources of both endpoints. See also Section 3.2.\n\nSignatures are likely to be deemed an adversarial setting when applying Integrity fields; see Section 5. Repr-Digest offers an interesting possibility when combined with signatures. In the scenario where there is no content to send, the digest of an empty string can be included in the message and, if signed, can help the recipient detect if content was added either as a result of accident or purposeful manipulation. The opposite scenario is also supported; including an Integrity field for content and signing it can help a recipient detect where the content was removed.\n\nAny mangling of Integrity fields might affect signature validation. Examples of such mangling include de-duplicating digests or combining different field values (see [Section 5.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.2) of [HTTP]).\n\n### 6.4. Usage in Trailer Fields\n\nBefore sending Integrity fields in a trailer section, the sender should consider that intermediaries are explicitly allowed to drop any trailer (see [Section 6.5.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.5.2) of [HTTP]).\n\nWhen Integrity fields are used in a trailer section, the field-values are received after the content. Eager processing of content before the trailer section prevents digest validation, possibly leading to processing of invalid data.\n\nOne of the benefits of using Integrity fields in a trailer section is that it allows hashing of bytes as they are sent. However, it is possible to design a hashing algorithm that requires processing of content in such a way that would negate these benefits. For example, Merkle Integrity Content Encoding [MICE] requires content to be processed in reverse order. This means the complete data needs to be available, which means there is negligible processing difference in sending an Integrity field in a header versus a trailer section.\n\n### 6.5. Variations within Content-Encoding\n\nContent coding mechanisms can support different encoding parameters, meaning that the same input content can produce different outputs. For example, GZIP supports multiple compression levels. Such encoding parameters are generally not communicated as representation metadata. For instance, different compression levels would all use the same \"Content-Encoding: gzip\" field. Other examples include where encoding relies on nonces or timestamps, such as the aes128gcm content coding defined in [RFC8188].\n\nSince it is possible for there to be variation within content coding, the checksum conveyed by the Integrity fields cannot be used to provide a proof of integrity \"at rest\" unless the whole content is persisted.\n\n### 6.6. Algorithm Agility\n\nThe security properties of hashing algorithms are not fixed. Algorithm agility (see [RFC7696]) is achieved by providing implementations with flexibility to choose hashing algorithms from the IANA Hash Algorithms for HTTP Digest Fields registry; see Section 7.2.\n\nTransition from weak algorithms is supported by negotiation of hashing algorithm using Want-Content-Digest or Want-Repr-Digest (see Section 4) or by sending multiple digests from which the receiver chooses. A receiver that depends on a digest for security will be vulnerable to attacks on the weakest algorithm it is willing to accept. Endpoints are advised that sending multiple values consumes resources that may be wasted if the receiver ignores them (see Section 3).\n\nWhile algorithm agility allows the migration to stronger algorithms, it does not prevent the use of weaker algorithms. Integrity fields do not provide any mitigations for downgrade or substitution attacks (see [Section 1](https://www.rfc-editor.org/rfc/rfc6211.html#section-1) of [RFC6211]) of the hashing algorithm. To protect against such attacks, endpoints could restrict their set of supported algorithms to stronger ones and protect the fields' values by using TLS and/or digital signatures.\n\n### 6.7. Resource Exhaustion\n\nIntegrity field validation consumes computational resources. In order to avoid resource exhaustion, implementations can restrict validation of the algorithm types, the number of validations, or the size of content. In these cases, skipping validation entirely or ignoring validation failure of a more-preferred algorithm leaves the possibility of a downgrade attack (see Section 6.6).\n\n---\n\n## 7. IANA Considerations\n\n### 7.1. HTTP Field Name Registration\n\nIANA has updated the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" [HTTP] as shown in the table below:\n\n| Field Name | Status | Reference |\n| --- | --- | --- |\n| Content-Digest | permanent | Section 2 of RFC 9530 |\n| Repr-Digest | permanent | Section 3 of RFC 9530 |\n| Want-Content-Digest | permanent | Section 4 of RFC 9530 |\n| Want-Repr-Digest | permanent | Section 4 of RFC 9530 |\n| Digest | obsoleted | [RFC3230], Section 1.3 of RFC 9530 |\n| Want-Digest | obsoleted | [RFC3230], Section 1.3 of RFC 9530 |\n\n### 7.2. Creation of the Hash Algorithms for HTTP Digest Fields Registry\n\nIANA has created the new \"Hash Algorithms for HTTP Digest Fields\" registry at <[https://www.iana.org/assignments/http-digest-hash-alg/](https://www.iana.org/assignments/http-digest-hash-alg/)> and populated it with the entries in Table 2. The procedure for new registrations is provided in Section 5.\n\n| Algorithm Key | Status | Description | Reference |\n| --- | --- | --- | --- |\n| sha-512 | Active | The SHA-512 algorithm. | [RFC6234], [RFC4648], RFC 9530 |\n| sha-256 | Active | The SHA-256 algorithm. | [RFC6234], [RFC4648], RFC 9530 |\n| md5 | Deprecated | The MD5 algorithm. It is vulnerable to collision attacks; see [NO-MD5] and [CMU-836068] | [RFC1321], [RFC4648], RFC 9530 |\n| sha | Deprecated | The SHA-1 algorithm. It is vulnerable to collision attacks; see [NO-SHA] and [IACR-2020-014] | [RFC3174], [RFC4648], [RFC6234], RFC 9530 |\n| unixsum | Deprecated | The algorithm used by the UNIX \"sum\" command. | [RFC4648], [RFC6234], [UNIX], RFC 9530 |\n| unixcksum | Deprecated | The algorithm used by the UNIX \"cksum\" command. | [RFC4648], [RFC6234], [UNIX], RFC 9530 |\n| adler | Deprecated | The ADLER32 algorithm. | [RFC1950], RFC 9530 |\n| crc32c | Deprecated | The CRC32c algorithm. | [Appendix A](https://www.rfc-editor.org/rfc/rfc9260.html#appendix-A) of [RFC9260], RFC 9530 |\n\n### 7.3. Deprecate the Hypertext Transfer Protocol (HTTP) Digest Algorithm Values Registry\n\nIANA has deprecated the \"Hypertext Transfer Protocol (HTTP) Digest Algorithm Values\" registry at <[https://www.iana.org/assignments/http-dig-alg/](https://www.iana.org/assignments/http-dig-alg/)> and replaced the note on that registry with the following text:\n\n> This registry is deprecated since it lists the algorithms that can be used with the Digest and Want-Digest fields defined in [RFC3230], which has been obsoleted by RFC 9530. While registration is not closed, new registrations are encouraged to use the [Hash Algorithms for HTTP Digest Fields](https://www.iana.org/assignments/http-digest-hash-alg/) registry instead.\n\n## 8. References\n\n### 8.1. Normative References\n\n[FOLDING]\n\nWatsen, K., Auerswald, E., Farrel, A., and Q. Wu, “[Handling Long Lines in Content of Internet-Drafts and RFCs](https://www.rfc-editor.org/rfc/rfc8792.html)”, RFC 8792, [DOI 10.17487/RFC8792](https://dx.doi.org/10.17487/RFC8792), June 2020, <[https://www.rfc-editor.org/info/rfc8792](https://www.rfc-editor.org/info/rfc8792)>.\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[RFC1321]\n\nRivest, R., “[The MD5 Message-Digest Algorithm](https://www.rfc-editor.org/rfc/rfc1321.html)”, RFC 1321, [DOI 10.17487/RFC1321](https://dx.doi.org/10.17487/RFC1321), April 1992, <[https://www.rfc-editor.org/info/rfc1321](https://www.rfc-editor.org/info/rfc1321)>.\n\n[RFC1950]\n\nDeutsch, P. and J-L. Gailly, “[ZLIB Compressed Data Format Specification version 3.3](https://www.rfc-editor.org/rfc/rfc1950.html)”, RFC 1950, [DOI 10.17487/RFC1950](https://dx.doi.org/10.17487/RFC1950), May 1996, <[https://www.rfc-editor.org/info/rfc1950](https://www.rfc-editor.org/info/rfc1950)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC3174]\n\nEastlake 3rd, D. and P. Jones, “[US Secure Hash Algorithm 1 (SHA1)](https://www.rfc-editor.org/rfc/rfc3174.html)”, RFC 3174, [DOI 10.17487/RFC3174](https://dx.doi.org/10.17487/RFC3174), September 2001, <[https://www.rfc-editor.org/info/rfc3174](https://www.rfc-editor.org/info/rfc3174)>.\n\n[RFC4648]\n\nJosefsson, S., “[The Base16, Base32, and Base64 Data Encodings](https://www.rfc-editor.org/rfc/rfc4648.html)”, RFC 4648, [DOI 10.17487/RFC4648](https://dx.doi.org/10.17487/RFC4648), October 2006, <[https://www.rfc-editor.org/info/rfc4648](https://www.rfc-editor.org/info/rfc4648)>.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC6234]\n\nEastlake 3rd, D. and T. Hansen, “[US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)](https://www.rfc-editor.org/rfc/rfc6234.html)”, RFC 6234, [DOI 10.17487/RFC6234](https://dx.doi.org/10.17487/RFC6234), May 2011, <[https://www.rfc-editor.org/info/rfc6234](https://www.rfc-editor.org/info/rfc6234)>.\n\n[RFC7405]\n\nKyzivat, P., “[Case-Sensitive String Support in ABNF](https://www.rfc-editor.org/rfc/rfc7405.html)”, RFC 7405, [DOI 10.17487/RFC7405](https://dx.doi.org/10.17487/RFC7405), December 2014, <[https://www.rfc-editor.org/info/rfc7405](https://www.rfc-editor.org/info/rfc7405)>.\n\n[RFC8126]\n\nCotton, M., Leiba, B., and T. Narten, “[Guidelines for Writing an IANA Considerations Section in RFCs](https://www.rfc-editor.org/rfc/rfc8126.html)”, [BCP 26](https://www.rfc-editor.org/info/bcp26), RFC 8126, [DOI 10.17487/RFC8126](https://dx.doi.org/10.17487/RFC8126), June 2017, <[https://www.rfc-editor.org/info/rfc8126](https://www.rfc-editor.org/info/rfc8126)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc8941.html)”, RFC 8941, [DOI 10.17487/RFC8941](https://dx.doi.org/10.17487/RFC8941), February 2021, <[https://www.rfc-editor.org/info/rfc8941](https://www.rfc-editor.org/info/rfc8941)>.\n\n### 8.2. Informative References\n\n[CMU-836068]\n\nCarnegie Mellon University, Software Engineering Institute, “[MD5 vulnerable to collision attacks](https://www.kb.cert.org/vuls/id/836068/)”, December 2008, <[https://www.kb.cert.org/vuls/id/836068/](https://www.kb.cert.org/vuls/id/836068/)>.\n\n[FIPS186-5]\n\nNational Institute of Standards and Technology (NIST), “[Digital Signature Standard (DSS)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf)”, FIPS PUB 186-5, [DOI 10.6028/NIST.FIPS.186-5](https://dx.doi.org/10.6028/NIST.FIPS.186-5), February 2023, <[https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf)>.\n\n[HTTP/1.1]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9112.html)”, [STD 99](https://www.rfc-editor.org/info/std99), RFC 9112, [DOI 10.17487/RFC9112](https://dx.doi.org/10.17487/RFC9112), June 2022, <[https://www.rfc-editor.org/info/rfc9112](https://www.rfc-editor.org/info/rfc9112)>.\n\n[IACR-2020-014]\n\nLeurent, G. and T. Peyrin, “[SHA-1 is a Shambles](https://eprint.iacr.org/2020/014.pdf)”, January 2020, <[https://eprint.iacr.org/2020/014.pdf](https://eprint.iacr.org/2020/014.pdf)>.\n\n[MICE]\n\nThomson, M. and J. Yasskin, “[Merkle Integrity Content Encoding](https://datatracker.ietf.org/doc/html/draft-thomson-http-mice-03)”, [Work in Progress](https://datatracker.ietf.org/doc/draft-thomson-http-mice), draft-thomson-http-mice-03, Work in Progress, August 2018, <[https://datatracker.ietf.org/doc/html/draft-thomson-http-mice-03](https://datatracker.ietf.org/doc/html/draft-thomson-http-mice-03)>.\n\n[NO-MD5]\n\nTurner, S. and L. Chen, “[Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms](https://www.rfc-editor.org/rfc/rfc6151.html)”, RFC 6151, [DOI 10.17487/RFC6151](https://dx.doi.org/10.17487/RFC6151), March 2011, <[https://www.rfc-editor.org/info/rfc6151](https://www.rfc-editor.org/info/rfc6151)>.\n\n[NO-SHA]\n\nPolk, T., Chen, L., Turner, S., and P. Hoffman, “[Security Considerations for the SHA-0 and SHA-1 Message-Digest Algorithms](https://www.rfc-editor.org/rfc/rfc6194.html)”, RFC 6194, [DOI 10.17487/RFC6194](https://dx.doi.org/10.17487/RFC6194), March 2011, <[https://www.rfc-editor.org/info/rfc6194](https://www.rfc-editor.org/info/rfc6194)>.\n\n[PATCH]\n\nDusseault, L. and J. Snell, “[PATCH Method for HTTP](https://www.rfc-editor.org/rfc/rfc5789.html)”, RFC 5789, [DOI 10.17487/RFC5789](https://dx.doi.org/10.17487/RFC5789), March 2010, <[https://www.rfc-editor.org/info/rfc5789](https://www.rfc-editor.org/info/rfc5789)>.\n\n[RFC3230]\n\nMogul, J. and A. Van Hoff, “[Instance Digests in HTTP](https://www.rfc-editor.org/rfc/rfc3230.html)”, RFC 3230, [DOI 10.17487/RFC3230](https://dx.doi.org/10.17487/RFC3230), January 2002, <[https://www.rfc-editor.org/info/rfc3230](https://www.rfc-editor.org/info/rfc3230)>.\n\n[RFC6211]\n\nSchaad, J., “[Cryptographic Message Syntax (CMS) Algorithm Identifier Protection Attribute](https://www.rfc-editor.org/rfc/rfc6211.html)”, RFC 6211, [DOI 10.17487/RFC6211](https://dx.doi.org/10.17487/RFC6211), April 2011, <[https://www.rfc-editor.org/info/rfc6211](https://www.rfc-editor.org/info/rfc6211)>.\n\n[RFC7396]\n\nHoffman, P. and J. Snell, “[JSON Merge Patch](https://www.rfc-editor.org/rfc/rfc7396.html)”, RFC 7396, [DOI 10.17487/RFC7396](https://dx.doi.org/10.17487/RFC7396), October 2014, <[https://www.rfc-editor.org/info/rfc7396](https://www.rfc-editor.org/info/rfc7396)>.\n\n[RFC7696]\n\nHousley, R., “[Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory-to-Implement Algorithms](https://www.rfc-editor.org/rfc/rfc7696.html)”, [BCP 201](https://www.rfc-editor.org/info/bcp201), RFC 7696, [DOI 10.17487/RFC7696](https://dx.doi.org/10.17487/RFC7696), November 2015, <[https://www.rfc-editor.org/info/rfc7696](https://www.rfc-editor.org/info/rfc7696)>.\n\n[RFC8188]\n\nThomson, M., “[Encrypted Content-Encoding for HTTP](https://www.rfc-editor.org/rfc/rfc8188.html)”, RFC 8188, [DOI 10.17487/RFC8188](https://dx.doi.org/10.17487/RFC8188), June 2017, <[https://www.rfc-editor.org/info/rfc8188](https://www.rfc-editor.org/info/rfc8188)>.\n\n[RFC9260]\n\nStewart, R., TĂĽxen, M., and K. Nielsen, “[Stream Control Transmission Protocol](https://www.rfc-editor.org/rfc/rfc9260.html)”, RFC 9260, [DOI 10.17487/RFC9260](https://dx.doi.org/10.17487/RFC9260), June 2022, <[https://www.rfc-editor.org/info/rfc9260](https://www.rfc-editor.org/info/rfc9260)>.\n\n[RFC9457]\n\nNottingham, M., Wilde, E., and S. Dalal, “[Problem Details for HTTP APIs](https://www.rfc-editor.org/rfc/rfc9457.html)”, RFC 9457, [DOI 10.17487/RFC9457](https://dx.doi.org/10.17487/RFC9457), July 2023, <[https://www.rfc-editor.org/info/rfc9457](https://www.rfc-editor.org/info/rfc9457)>.\n\n[SIGNATURES]\n\nBackman, A., Ed., Richer, J., Ed., and M. Sporny, “[HTTP Message Signatures](https://www.rfc-editor.org/rfc/rfc9421.html)”, RFC 9421, [DOI 10.17487/RFC9421](https://dx.doi.org/10.17487/RFC9421), February 2024, <[https://www.rfc-editor.org/info/rfc9421](https://www.rfc-editor.org/info/rfc9421)>.\n\n[TLS]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n[UNIX]\n\nThe Open Group, “The Single UNIX Specification, Version 2 - 6 Vol Set for UNIX 98”, January 1998.\n\n---\n\n## Appendix A. Resource Representation and Representation Data\n\nThe following examples show how representation metadata, content transformations, and methods impact the message and content. These examples a not exhaustive.\n\nUnless otherwise indicated, the examples are based on the JSON object {\"hello\": \"world\"} followed by an LF. When the content contains non-printable characters (e.g., when it is encoded), it is shown as a sequence of hex-encoded bytes.\n\nConsider a client that wishes to upload a JSON object using the PUT method. It could do this using the application/json Content-Type without any content coding.\n\n```\nPUT /entries/1234 HTTP/1.1\nHost: foo.example\nContent-Type: application/json\nContent-Length: 19\n\n{\"hello\": \"world\"}\n```\n\nFigure 1: Request Containing a JSON Object without Any Content Coding\n\nHowever, the use of content coding is quite common. The client could also upload the same data with a GZIP coding ([Section 8.4.1.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.4.1.3) of [HTTP]). Note that in this case, the Content-Length contains a larger value due to the coding overheads.\n\n```\nPUT /entries/1234 HTTP/1.1\nHost: foo.example\nContent-Type: application/json\nContent-Encoding: gzip\nContent-Length: 39\n\n1F 8B 08 00 88 41 37 64 00 FF\nAB 56 CA 48 CD C9 C9 57 B2 52\n50 2A CF 2F CA 49 51 AA E5 02\n00 D9 E4 31 E7 13 00 00 00\n```\n\nFigure 2: Request Containing a GZIP-Encoded JSON Object\n\nSending the GZIP-coded data without indicating it via Content-Encoding means that the content is malformed. In this case, the server can reply with an error.\n\n```\nPUT /entries/1234 HTTP/1.1\nHost: foo.example\nContent-Type: application/json\n\nContent-Length: 39\n\n1F 8B 08 00 88 41 37 64 00 FF\nAB 56 CA 48 CD C9 C9 57 B2 52\n50 2A CF 2F CA 49 51 AA E5 02\n00 D9 E4 31 E7 13 00 00 00\n```\n\nFigure 3: Request Containing Malformed JSON\n\n```\nHTTP/1.1 400 Bad Request\n```\n\nFigure 4: An Error Response for Malformed Content\n\nA Range-Request affects the transferred message content. In this example, the client is accessing the resource at /entries/1234, which is the JSON object {\"hello\": \"world\"} followed by an LF. However, the client has indicated a preferred content coding and a specific byte range.\n\n```\nGET /entries/1234 HTTP/1.1\nHost: foo.example\nAccept-Encoding: gzip\nRange: bytes=1-7\n```\n\nFigure 5: Request for Partial Content\n\nThe server satisfies the client request by responding with a partial representation (equivalent to the first 10 bytes of the JSON object displayed in whole in Figure 2).\n\n```\nHTTP/1.1 206 Partial Content\nContent-Encoding: gzip\nContent-Type: application/json\nContent-Range: bytes 0-9/39\n\n1F 8B 08 00 A5 B4 BD 62 02 FF\n```\n\nFigure 6: Partial Response from a GZIP-Encoded Representation\n\nAside from content coding or range requests, the method can also affect the transferred message content. For example, the response to a HEAD request does not carry content, but this example case includes Content-Length; see [Section 8.6](https://www.rfc-editor.org/rfc/rfc9110.html#section-8.6) of [HTTP].\n\n```\nHEAD /entries/1234 HTTP/1.1\nHost: foo.example\nAccept: application/json\nAccept-Encoding: gzip\n```\n\nFigure 7: HEAD Request\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/json\nContent-Encoding: gzip\nContent-Length: 39\n```\n\nFigure 8: Response to HEAD Request (Empty Content)\n\nFinally, the semantics of a response might decouple the target URI from the enclosed representation. In the example below, the client issues a POST request directed to /authors/, but the response includes a Content-Location header field indicating that the enclosed representation refers to the resource available at /authors/123. Note that Content-Length is not sent in this example.\n\n```\nPOST /authors/ HTTP/1.1\nHost: foo.example\nAccept: application/json\nContent-Type: application/json\n\n{\"author\": \"Camilleri\"}\n```\n\nFigure 9: POST Request\n\n```\nHTTP/1.1 201 Created\nContent-Type: application/json\nContent-Location: /authors/123\nLocation: /authors/123\n\n{\"id\": \"123\", \"author\": \"Camilleri\"}\n```\n\nFigure 10: Response with Content-Location Header\n\n---\n\n## Appendix B. Examples of Unsolicited Digest\n\nThe following examples demonstrate interactions where a server responds with a Content-Digest or Repr-Digest field, even though the client did not solicit one using Want-Content-Digest or Want-Repr-Digest.\n\nSome examples include JSON objects in the content. For presentation purposes, objects that fit completely within the line-length limits are presented on a single line using compact notation with no leading space. Objects that would exceed line-length limits are presented across multiple lines (one line per key-value pair) with two spaces of leading indentation.\n\nChecksum mechanisms defined in this document are media-type agnostic and do not provide canonicalization algorithms for specific formats. Examples are calculated inclusive of any space. While examples can include both fields, Content-Digest and Repr-Digest can be returned independently.\n\n### B.1. Server Returns Full Representation Data\n\nIn this example, the message content conveys complete representation data. This means that in the response, Content-Digest and Repr-Digest are both computed over the JSON object {\"hello\": \"world\"} followed by an LF; thus, they have the same value.\n\n```\nGET /items/123 HTTP/1.1\nHost: foo.example\n```\n\nFigure 11: GET Request for an Item\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 200 OK\nContent-Type: application/json\nContent-Length: 19\nContent-Digest: \\\n sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:\nRepr-Digest: \\\n sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:\n\n{\"hello\": \"world\"}\n```\n\nFigure 12: Response with Identical Repr-Digest and Content-Digest\n\n### B.2. Server Returns No Representation Data\n\nIn this example, a HEAD request is used to retrieve the checksum of a resource.\n\nThe response Content-Digest field-value is computed on empty content. Repr-Digest is calculated over the JSON object {\"hello\": \"world\"} followed by an LF, which is not shown because there is no content.\n\n```\nHEAD /items/123 HTTP/1.1\nHost: foo.example\n```\n\nFigure 13: HEAD Request for an Item\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 200 OK\nContent-Type: application/json\nContent-Digest: \\\n sha-256=:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=:\nRepr-Digest: \\\n sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:\n```\n\nFigure 14: Response with Both Content-Digest and Digest (Empty Content)\n\n### B.3. Server Returns Partial Representation Data\n\nIn this example, the client makes a range request and the server responds with partial content.\n\n```\nGET /items/123 HTTP/1.1\nHost: foo.example\nRange: bytes=10-18\n```\n\nFigure 15: Request for Partial Content\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 206 Partial Content\nContent-Type: application/json\nContent-Range: bytes 10-18/19\nContent-Digest: \\\n sha-256=:jjcgBDWNAtbYUXI37CVG3gRuGOAjaaDRGpIUFsdyepQ=:\nRepr-Digest: \\\n sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:\n\n\"world\"}\n```\n\nFigure 16: Partial Response with Both Content-Digest and Repr-Digest\n\nIn the response message above, note that the Repr-Digest and Content-Digests are different. The Repr-Digest field-value is calculated across the entire JSON object {\"hello\": \"world\"} followed by an LF, and the field appears as follows:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nRepr-Digest: \\\n sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:\n```\n\nHowever, since the message content is constrained to bytes 10-18, the Content-Digest field-value is calculated over the sequence \"world\"} followed by an LF, thus resulting in the following:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nContent-Digest: \\\n sha-256=:jjcgBDWNAtbYUXI37CVG3gRuGOAjaaDRGpIUFsdyepQ=:\n```\n\n### B.4. Client and Server Provide Full Representation Data\n\nThe request contains a Repr-Digest field-value calculated on the enclosed representation. It also includes an Accept-Encoding: br header field that advertises that the client supports Brotli encoding.\n\nThe response includes a Content-Encoding: br that indicates the selected representation is Brotli-encoded. The Repr-Digest field-value is therefore different compared to the request.\n\nFor presentation purposes, the response body is displayed as a sequence of hex-encoded bytes because it contains non-printable characters.\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPUT /items/123 HTTP/1.1\nHost: foo.example\nContent-Type: application/json\nAccept-Encoding: br\nRepr-Digest: \\\n sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:\n\n{\"hello\": \"world\"}\n```\n\nFigure 17: PUT Request with Digest\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 200 OK\nContent-Type: application/json\nContent-Location: /items/123\nContent-Encoding: br\nContent-Length: 23\nRepr-Digest: \\\n sha-256=:d435Qo+nKZ+gLcUHn7GQtQ72hiBVAgqoLsZnZPiTGPk=:\n\n8B 08 80 7B 22 68 65 6C 6C 6F\n22 3A 20 22 77 6F 72 6C 64 22\n7D 0A 03\n```\n\nFigure 18: Response with Digest of Encoded Response\n\n### B.5. Client Provides Full Representation Data and Server Provides No Representation Data\n\nThe request Repr-Digest field-value is calculated on the enclosed content, which is the JSON object {\"hello\": \"world\"} followed by an LF.\n\nThe response Repr-Digest field-value depends on the representation metadata header fields, including Content-Encoding: br, even when the response does not contain content.\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPUT /items/123 HTTP/1.1\nHost: foo.example\nContent-Type: application/json\nContent-Length: 19\nAccept-Encoding: br\nRepr-Digest: \\\n sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg==:\n\n{\"hello\": \"world\"}\n```\n\n```\nHTTP/1.1 204 No Content\nContent-Type: application/json\nContent-Encoding: br\nRepr-Digest: sha-256=:d435Qo+nKZ+gLcUHn7GQtQ72hiBVAgqoLsZnZPiTGPk=:\n```\n\nFigure 19: Empty Response with Digest\n\n### B.6. Client and Server Provide Full Representation Data\n\nThe response contains two digest values using different algorithms.\n\nFor presentation purposes, the response body is displayed as a sequence of hex-encoded bytes because it contains non-printable characters.\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nPUT /items/123 HTTP/1.1\nHost: foo.example\nContent-Type: application/json\nAccept-Encoding: br\nRepr-Digest: \\\n sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg==:\n\n{\"hello\": \"world\"}\n```\n\nFigure 20: PUT Request with Digest\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 200 OK\nContent-Type: application/json\nContent-Encoding: br\nContent-Location: /items/123\nRepr-Digest: \\\n sha-256=:d435Qo+nKZ+gLcUHn7GQtQ72hiBVAgqoLsZnZPiTGPk=:,\\\n sha-512=:db7fdBbgZMgX1Wb2MjA8zZj+rSNgfmDCEEXM8qLWfpfoNY0sCpHAzZbj\\\n 09X1/7HAb7Od5Qfto4QpuBsFbUO3dQ==:\n\n8B 08 80 7B 22 68 65 6C 6C 6F\n22 3A 20 22 77 6F 72 6C 64 22\n7D 0A 03\n```\n\nFigure 21: Response with Digest of Encoded Content\n\n### B.7. POST Response Does Not Reference the Request URI\n\nThe request Repr-Digest field-value is computed on the enclosed representation (see Section 3.1), which is the JSON object {\"title\": \"New Title\"} followed by an LF.\n\nThe representation enclosed in the response is a multiline JSON object followed by an LF. It refers to the resource identified by Content-Location (see [Section 6.4.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-6.4.2) of [HTTP]); thus, an application can use Repr-Digest in association with the resource referenced by Content-Location.\n\n```\nPOST /books HTTP/1.1\nHost: foo.example\nContent-Type: application/json\nAccept: application/json\nAccept-Encoding: identity\nRepr-Digest: sha-256=:mEkdbO7Srd9LIOegftO0aBX+VPTVz7/CSHes2Z27gc4=:\n\n{\"title\": \"New Title\"}\n```\n\nFigure 22: POST Request with Digest\n\n```\nHTTP/1.1 201 Created\nContent-Type: application/json\nContent-Location: /books/123\nLocation: /books/123\nRepr-Digest: sha-256=:uVSlinTTdQUwm2On4k8TJUikGN1bf/Ds8WPX4oe0h9I=:\n\n{\n \"id\": \"123\",\n \"title\": \"New Title\"\n}\n```\n\nFigure 23: Response with Digest of Resource\n\n### B.8. POST Response Describes the Request Status\n\nThe request Repr-Digest field-value is computed on the enclosed representation (see Section 3.1), which is the JSON object {\"title\": \"New Title\"} followed by an LF.\n\nThe representation enclosed in the response describes the status of the request, so Repr-Digest is computed on that enclosed representation. It is a multiline JSON object followed by an LF.\n\nResponse Repr-Digest has no explicit relation with the resource referenced by Location.\n\n```\nPOST /books HTTP/1.1\nHost: foo.example\nContent-Type: application/json\nAccept: application/json\nAccept-Encoding: identity\nRepr-Digest: sha-256=:mEkdbO7Srd9LIOegftO0aBX+VPTVz7/CSHes2Z27gc4=:\n\n{\"title\": \"New Title\"}\n```\n\nFigure 24: POST Request with Digest\n\n```\nHTTP/1.1 201 Created\nContent-Type: application/json\nRepr-Digest: sha-256=:yXIGDTN5VrfoyisKlXgRKUHHMs35SNtyC3szSz1dbO8=:\nLocation: /books/123\n\n{\n \"status\": \"created\",\n \"id\": \"123\",\n \"ts\": 1569327729,\n \"instance\": \"/books/123\"\n}\n```\n\nFigure 25: Response with Digest of Representation\n\n### B.9. Digest with PATCH\n\nThis case is analogous to a POST request where the target resource reflects the target URI.\n\nThe PATCH request uses the application/merge-patch+json media type defined in [RFC7396]. Repr-Digest is calculated on the content that corresponds to the patch document and is the JSON object {\"title\": \"New Title\"} followed by an LF.\n\nThe response Repr-Digest field-value is computed on the complete representation of the patched resource. It is a multiline JSON object followed by an LF.\n\n```\nPATCH /books/123 HTTP/1.1\nHost: foo.example\nContent-Type: application/merge-patch+json\nAccept: application/json\nAccept-Encoding: identity\nRepr-Digest: sha-256=:mEkdbO7Srd9LIOegftO0aBX+VPTVz7/CSHes2Z27gc4=:\n\n{\"title\": \"New Title\"}\n```\n\nFigure 26: PATCH Request with Digest\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/json\nRepr-Digest: sha-256=:uVSlinTTdQUwm2On4k8TJUikGN1bf/Ds8WPX4oe0h9I=:\n\n{\n \"id\": \"123\",\n \"title\": \"New Title\"\n}\n```\n\nFigure 27: Response with Digest of Representation\n\nNote that a 204 No Content response without content, but with the same Repr-Digest field-value, would have been legitimate too. In that case, Content-Digest would have been computed on an empty content.\n\n### B.10. Error Responses\n\nIn error responses, the representation data does not necessarily refer to the target resource. Instead, it refers to the representation of the error.\n\nIn the following example, a client sends the same request from Figure 26 to patch the resource located at /books/123. However, the resource does not exist and the server generates a 404 response with a body that describes the error in accordance with [RFC9457].\n\nThe response Repr-Digest field-value is computed on this enclosed representation. It is a multiline JSON object followed by an LF.\n\n```\nHTTP/1.1 404 Not Found\nContent-Type: application/problem+json\nRepr-Digest: sha-256=:EXB0S2VF2H7ijkAVJkH1Sm0pBho0iDZcvVUHHXTTZSA=:\n\n{\n \"title\": \"Not Found\",\n \"detail\": \"Cannot PATCH a non-existent resource\",\n \"status\": 404\n}\n```\n\nFigure 28: Response with Digest of Error Representation\n\n### B.11. Use with Trailer Fields and Transfer Coding\n\nAn origin server sends Repr-Digest as trailer field, so it can calculate digest-value while streaming content and thus mitigate resource consumption. The Repr-Digest field-value is the same as in Appendix B.1 because Repr-Digest is designed to be independent of the use of one or more transfer codings (see Section 3).\n\nIn the response content below, the string \"\\r\\n\" represents the CRLF bytes.\n\n```\nGET /items/123 HTTP/1.1\nHost: foo.example\n```\n\nFigure 29: GET Request\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 200 OK\nContent-Type: application/json\nTransfer-Encoding: chunked\nTrailer: Repr-Digest\n\n8\\r\\n\n{\"hello\"\\r\\n\n8\\r\\n\n: \"world\\r\\n\n3\\r\\n\n\"}\\n\\r\\n\n0\\r\\n\nRepr-Digest: \\\n sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg==:\\r\\n\n```\n\nFigure 30: Chunked Response with Digest\n\n---\n\n## Appendix C. Examples of Want-Repr-Digest Solicited Digest\n\nThe following examples demonstrate interactions where a client solicits a Repr-Digest using Want-Repr-Digest. The behavior of Content-Digest and Want-Content-Digest is identical.\n\nSome examples include JSON objects in the content. For presentation purposes, objects that fit completely within the line-length limits are presented on a single line using compact notation with no leading space. Objects that would exceed line-length limits are presented across multiple lines (one line per key-value pair) with two spaces of leading indentation.\n\nChecksum mechanisms described in this document are media-type agnostic and do not provide canonicalization algorithms for specific formats. Examples are calculated inclusive of any space.\n\n### C.1. Server Selects Client's Least Preferred Algorithm\n\nThe client requests a digest and prefers \"sha\". The server is free to reply with \"sha-256\" anyway.\n\n```\nGET /items/123 HTTP/1.1\nHost: foo.example\nWant-Repr-Digest: sha-256=3, sha=10\n```\n\nFigure 31: GET Request with Want-Repr-Digest\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 200 OK\nContent-Type: application/json\nRepr-Digest: \\\n sha-256=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg==:\n\n{\"hello\": \"world\"}\n```\n\nFigure 32: Response with Different Algorithm\n\n### C.2. Server Selects Algorithm Unsupported by Client\n\nThe client requests a \"sha\" digest because that is the only algorithm it supports. The server is not obliged to produce a response containing a \"sha\" digest; it instead uses a different algorithm.\n\n```\nGET /items/123 HTTP/1.1\nHost: foo.example\nWant-Repr-Digest: sha=10\n```\n\nFigure 33: GET Request with Want-Repr-Digest\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nHTTP/1.1 200 OK\nContent-Type: application/json\nRepr-Digest: \\\n sha-512=:YMAam51Jz/jOATT6/zvHrLVgOYTGFy1d6GJiOHTohq4yP+pgk4vf2aCs\\\n yRZOtw8MjkM7iw7yZ/WkppmM44T3qg==:\n\n{\"hello\": \"world\"}\n```\n\nFigure 34: Response with Unsupported Algorithm\n\n### C.3. Server Does Not Support Client Algorithm and Returns an Error\n\nAppendix C.2 is an example where a server ignores the client's preferred digest algorithm. Alternatively, a server can also reject the request and return a response with an error status code such as 4xx or 5xx. This specification does not prescribe any requirement on status code selection; the following example illustrates one possible option.\n\nIn this example, the client requests a \"sha\" Repr-Digest, and the server returns an error with problem details [RFC9457] contained in the content. The problem details contain a list of the hashing algorithms that the server supports. This is purely an example; this specification does not define any format or requirements for such content.\n\n```\nGET /items/123 HTTP/1.1\nHost: foo.example\nWant-Repr-Digest: sha=10\n```\n\nFigure 35: GET Request with Want-Repr-Digest\n\n```\nHTTP/1.1 400 Bad Request\nContent-Type: application/problem+json\n\n{\n \"title\": \"Bad Request\",\n \"detail\": \"Supported hashing algorithms: sha-256, sha-512\",\n \"status\": 400\n}\n```\n\nFigure 36: Response Advertising the Supported Algorithms\n\n---\n\n## Appendix D. Sample Digest Values\n\nThis section shows examples of digest values for different hashing algorithms. The input value is the JSON object {\"hello\": \"world\"}. The digest values are each produced by running the relevant hashing algorithm over the input and running the output bytes through Byte Sequence serialization; see [Section 4.1.8](https://www.rfc-editor.org/rfc/rfc8941.html#section-4.1.8) of [STRUCTURED-FIELDS].\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nsha-512 - :WZDPaVn/7XgHaAy8pmojAkGWoRx2UFChF41A2svX+TaPm+\\\n AbwAgBWnrIiYllu7BNNyealdVLvRwEmTHWXvJwew==:\n\nsha-256 - :X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:\n\nmd5 - :Sd/dVLAcvNLSq16eXua5uQ==:\n\nsha - :07CavjDP4u3/TungoUHJO/Wzr4c=:\n\nunixsum - :GQU=:\n\nunixcksum - :7zsHAA==:\n\nadler - :OZkGFw==:\n\ncrc32c - :Q3lHIA==:\n```\n\n---\n\n## Appendix E. Migrating from RFC 3230\n\nHTTP digests are computed by applying a hashing algorithm to input data. [RFC3230] defined the input data as an \"instance\", a term it also defined. The concept of an instance has since been superseded by the HTTP semantic term \"representation\". It is understood that some implementations of [RFC3230] mistook \"instance\" to mean HTTP content. Using content for the Digest field is an error that leads to interoperability problems between peers that implement [RFC3230].\n\n[RFC3230] was only ever intended to use what HTTP now defines as selected representation data. The semantic concept of digest and representation are explained alongside the definition of the Repr-Digest field (Section 3).\n\nWhile the syntax of Digest and Repr-Digest are different, the considerations and examples this document gives for Repr-Digest apply equally to Digest because they operate on the same input data; see Sections 3.1, 6 and 6.3.\n\n[RFC3230] could never communicate the digest of HTTP message content in the Digest field; Content-Digest now provides that capability.\n\n[RFC3230] allowed algorithms to define their output encoding format for use with the Digest field. This resulted in a mix of formats such as base64, hex, or decimal. By virtue of using Structured Fields, Content-Digest, and Repr-Digest use only a single encoding format. Further explanation and examples are provided in Appendix D.\n\n---\n\n## Acknowledgements\n\nThis document is based on ideas from [RFC3230], so thanks to Jeff Mogul and Arthur Van Hoff for their great work. The original idea of refreshing [RFC3230] arose from an interesting discussion with Mark Nottingham, Jeffrey Yasskin, and Martin Thomson when reviewing the MICE content coding.\n\nThanks to Julian Reschke for his valuable contributions to this document, and to the following contributors that have helped improve this specification by reporting bugs, asking smart questions, drafting or reviewing text, and evaluating open issues: Mike Bishop, Brian Campbell, Matthew Kerwin, James Manger, Tommy Pauly, Sean Turner, Justin Richer, and Erik Wilde.\n\n---\n\n## Authors' Addresses\n\n**Roberto Polli**\nTeam Digitale, Italian Government\nItaly\nEMail: [robipolli@gmail.com](mailto:robipolli@gmail.com)\n\n**Lucas Pardue**\nCloudflare\nEMail: [lucas@lucaspardue.com](mailto:lucas@lucaspardue.com)", "znaku_textu": 64459, "slov": 8632, "odkazu": 259, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:26", "sha256": "91c74bd02c7ffc959ff6867172c86469225bdc67740122e562068a995c31bbb9", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9530", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc8941.html", "https://www.rfc-editor.org/rfc/rfc9112.html", "https://www.rfc-editor.org/rfc/rfc5789.html", "https://www.rfc-editor.org/rfc/rfc8126.html", "https://www.rfc-editor.org/rfc/rfc6211.html", "https://www.iana.org/assignments/http-digest-hash-alg/", "https://www.rfc-editor.org/rfc/rfc9260.html", "https://www.iana.org/assignments/http-dig-alg/", "https://www.rfc-editor.org/rfc/rfc8792.html", "https://dx.doi.org/10.17487/RFC8792", "https://www.rfc-editor.org/info/rfc8792", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/rfc/rfc1321.html", "https://dx.doi.org/10.17487/RFC1321", "https://www.rfc-editor.org/info/rfc1321", "https://www.rfc-editor.org/rfc/rfc1950.html", "https://dx.doi.org/10.17487/RFC1950", "https://www.rfc-editor.org/info/rfc1950", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc3174.html", "https://dx.doi.org/10.17487/RFC3174", "https://www.rfc-editor.org/info/rfc3174", "https://www.rfc-editor.org/rfc/rfc4648.html", "https://dx.doi.org/10.17487/RFC4648", "https://www.rfc-editor.org/info/rfc4648", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "https://www.rfc-editor.org/info/rfc5234", "https://www.rfc-editor.org/rfc/rfc6234.html", "https://dx.doi.org/10.17487/RFC6234", "https://www.rfc-editor.org/info/rfc6234", "https://www.rfc-editor.org/rfc/rfc7405.html", "https://dx.doi.org/10.17487/RFC7405", "https://www.rfc-editor.org/info/rfc7405", "https://www.rfc-editor.org/info/bcp26", "https://dx.doi.org/10.17487/RFC8126", "https://www.rfc-editor.org/info/rfc8126", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC8941", "https://www.rfc-editor.org/info/rfc8941", "https://www.kb.cert.org/vuls/id/836068/", "https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf", "https://dx.doi.org/10.6028/NIST.FIPS.186-5", "https://www.rfc-editor.org/info/std99", "https://dx.doi.org/10.17487/RFC9112", "https://www.rfc-editor.org/info/rfc9112", "https://eprint.iacr.org/2020/014.pdf", "https://datatracker.ietf.org/doc/html/draft-thomson-http-mice-03", "https://datatracker.ietf.org/doc/draft-thomson-http-mice", "https://www.rfc-editor.org/rfc/rfc6151.html", "https://dx.doi.org/10.17487/RFC6151", "https://www.rfc-editor.org/info/rfc6151", "https://www.rfc-editor.org/rfc/rfc6194.html", "https://dx.doi.org/10.17487/RFC6194", "https://www.rfc-editor.org/info/rfc6194", "https://dx.doi.org/10.17487/RFC5789", "https://www.rfc-editor.org/info/rfc5789", "https://www.rfc-editor.org/rfc/rfc3230.html", "https://dx.doi.org/10.17487/RFC3230", "https://www.rfc-editor.org/info/rfc3230", "https://dx.doi.org/10.17487/RFC6211", "https://www.rfc-editor.org/info/rfc6211", "https://www.rfc-editor.org/rfc/rfc7396.html", "https://dx.doi.org/10.17487/RFC7396", "https://www.rfc-editor.org/info/rfc7396", "https://www.rfc-editor.org/rfc/rfc7696.html", "https://www.rfc-editor.org/info/bcp201", "https://dx.doi.org/10.17487/RFC7696", "https://www.rfc-editor.org/info/rfc7696", "https://www.rfc-editor.org/rfc/rfc8188.html", "https://dx.doi.org/10.17487/RFC8188", "https://www.rfc-editor.org/info/rfc8188", "https://dx.doi.org/10.17487/RFC9260", "https://www.rfc-editor.org/info/rfc9260", "https://www.rfc-editor.org/rfc/rfc9457.html", "https://dx.doi.org/10.17487/RFC9457", "https://www.rfc-editor.org/info/rfc9457", "https://www.rfc-editor.org/rfc/rfc9421.html", "https://dx.doi.org/10.17487/RFC9421", "https://www.rfc-editor.org/info/rfc9421", "https://www.rfc-editor.org/rfc/rfc8446.html", "https://dx.doi.org/10.17487/RFC8446", "https://www.rfc-editor.org/info/rfc8446"]} {"url": "https://httpwg.org/specs/rfc9651.html", "titulek": "RFC 9651 - Structured Field Values for HTTP", "h1": "Structured Field Values for HTTP", "popis": "This document describes a set of data types and associated algorithms that are intended to make it easier and safer to define and handle HTTP header and trailer fields, known as \"Structured Fields\", \"Structured Headers\", or \"Structured Trailers\". It is intended for use by specifications of new HTTP fields.This document obsoletes RFC 8941.", "klicova_slova": "trailer, header", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9651", "og:description": "Structured Field Values for HTTP", "og:url": "https://httpwg.org/specs/rfc9651.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Intentionally Strict Processing"}, {"uroven": 3, "text": "1.2. Notational Conventions"}, {"uroven": 2, "text": "2. Defining New Structured Fields"}, {"uroven": 3, "text": "2.1. Example"}, {"uroven": 3, "text": "2.2. Error Handling"}, {"uroven": 3, "text": "2.3. Preserving Extensibility"}, {"uroven": 3, "text": "2.4. Using New Structured Types in Extensions"}, {"uroven": 2, "text": "3. Structured Data Types"}, {"uroven": 3, "text": "3.1. Lists"}, {"uroven": 4, "text": "3.1.1. Inner Lists"}, {"uroven": 4, "text": "3.1.2. Parameters"}, {"uroven": 3, "text": "3.2. Dictionaries"}, {"uroven": 3, "text": "3.3. Items"}, {"uroven": 4, "text": "3.3.1. Integers"}, {"uroven": 4, "text": "3.3.2. Decimals"}, {"uroven": 4, "text": "3.3.3. Strings"}, {"uroven": 4, "text": "3.3.4. Tokens"}, {"uroven": 4, "text": "3.3.5. Byte Sequences"}, {"uroven": 4, "text": "3.3.6. Booleans"}, {"uroven": 4, "text": "3.3.7. Dates"}, {"uroven": 4, "text": "3.3.8. Display Strings"}, {"uroven": 2, "text": "4. Working with Structured Fields in HTTP"}, {"uroven": 3, "text": "4.1. Serializing Structured Fields"}, {"uroven": 4, "text": "4.1.1. Serializing a List"}, {"uroven": 5, "text": "4.1.1.1. Serializing an Inner List"}, {"uroven": 5, "text": "4.1.1.2. Serializing Parameters"}, {"uroven": 5, "text": "4.1.1.3. Serializing a Key"}, {"uroven": 4, "text": "4.1.2. Serializing a Dictionary"}, {"uroven": 4, "text": "4.1.3. Serializing an Item"}, {"uroven": 5, "text": "4.1.3.1. Serializing a Bare Item"}, {"uroven": 4, "text": "4.1.4. Serializing an Integer"}, {"uroven": 4, "text": "4.1.5. Serializing a Decimal"}, {"uroven": 4, "text": "4.1.6. Serializing a String"}, {"uroven": 4, "text": "4.1.7. Serializing a Token"}, {"uroven": 4, "text": "4.1.8. Serializing a Byte Sequence"}, {"uroven": 4, "text": "4.1.9. Serializing a Boolean"}, {"uroven": 4, "text": "4.1.10. Serializing a Date"}, {"uroven": 4, "text": "4.1.11. Serializing a Display String"}, {"uroven": 3, "text": "4.2. Parsing Structured Fields"}, {"uroven": 4, "text": "4.2.1. Parsing a List"}, {"uroven": 5, "text": "4.2.1.1. Parsing an Item or Inner List"}, {"uroven": 5, "text": "4.2.1.2. Parsing an Inner List"}, {"uroven": 4, "text": "4.2.2. Parsing a Dictionary"}, {"uroven": 4, "text": "4.2.3. Parsing an Item"}, {"uroven": 5, "text": "4.2.3.1. Parsing a Bare Item"}, {"uroven": 5, "text": "4.2.3.2. Parsing Parameters"}, {"uroven": 5, "text": "4.2.3.3. Parsing a Key"}, {"uroven": 4, "text": "4.2.4. Parsing an Integer or Decimal"}, {"uroven": 4, "text": "4.2.5. Parsing a String"}, {"uroven": 4, "text": "4.2.6. Parsing a Token"}, {"uroven": 4, "text": "4.2.7. Parsing a Byte Sequence"}, {"uroven": 4, "text": "4.2.8. Parsing a Boolean"}, {"uroven": 4, "text": "4.2.9. Parsing a Date"}, {"uroven": 4, "text": "4.2.10. Parsing a Display String"}, {"uroven": 2, "text": "5. IANA Considerations"}, {"uroven": 2, "text": "6. Security Considerations"}, {"uroven": 2, "text": "7. References"}, {"uroven": 3, "text": "7.1. Normative References"}, {"uroven": 3, "text": "7.2. Informative References"}, {"uroven": 2, "text": "Appendix A. Frequently Asked Questions"}, {"uroven": 3, "text": "A.1. Why Not JSON?"}, {"uroven": 2, "text": "Appendix B. Implementation Notes"}, {"uroven": 2, "text": "Appendix C. ABNF"}, {"uroven": 2, "text": "Appendix D. Changes from RFC 8941"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document describes a set of data types and associated algorithms that are intended to make it easier and safer to define and handle HTTP header and trailer fields, known as \"Structured Fields\", \"Structured Headers\", or \"Structured Trailers\". It is intended for use by specifications of new HTTP fields.\n\nThis document obsoletes RFC 8941.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9651](https://www.rfc-editor.org/info/rfc9651).\n\n## Copyright Notice\n\nCopyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Intentionally Strict Processing\n - 1.2. Notational Conventions\n- 2. Defining New Structured Fields\n - 2.1. Example\n - 2.2. Error Handling\n - 2.3. Preserving Extensibility\n - 2.4. Using New Structured Types in Extensions\n- 3. Structured Data Types\n - 3.1. Lists\n - 3.1.1. Inner Lists\n - 3.1.2. Parameters\n - 3.2. Dictionaries\n - 3.3. Items\n - 3.3.1. Integers\n - 3.3.2. Decimals\n - 3.3.3. Strings\n - 3.3.4. Tokens\n - 3.3.5. Byte Sequences\n - 3.3.6. Booleans\n - 3.3.7. Dates\n - 3.3.8. Display Strings\n- 4. Working with Structured Fields in HTTP\n - 4.1. Serializing Structured Fields\n - 4.1.1. Serializing a List\n - 4.1.2. Serializing a Dictionary\n - 4.1.3. Serializing an Item\n - 4.1.4. Serializing an Integer\n - 4.1.5. Serializing a Decimal\n - 4.1.6. Serializing a String\n - 4.1.7. Serializing a Token\n - 4.1.8. Serializing a Byte Sequence\n - 4.1.9. Serializing a Boolean\n - 4.1.10. Serializing a Date\n - 4.1.11. Serializing a Display String\n - 4.2. Parsing Structured Fields\n - 4.2.1. Parsing a List\n - 4.2.2. Parsing a Dictionary\n - 4.2.3. Parsing an Item\n - 4.2.4. Parsing an Integer or Decimal\n - 4.2.5. Parsing a String\n - 4.2.6. Parsing a Token\n - 4.2.7. Parsing a Byte Sequence\n - 4.2.8. Parsing a Boolean\n - 4.2.9. Parsing a Date\n - 4.2.10. Parsing a Display String\n- 5. IANA Considerations\n- 6. Security Considerations\n- 7. References\n - 7.1. Normative References\n - 7.2. Informative References\n- Appendix A. Frequently Asked Questions\n - A.1. Why Not JSON?\n- Appendix B. Implementation Notes\n- Appendix C. ABNF\n- Appendix D. Changes from RFC 8941\n- Acknowledgements\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nSpecifying the syntax of new HTTP header (and trailer) fields is an onerous task; even with the guidance in [Section 16.3.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-16.3.2) of [HTTP], there are many decisions -- and pitfalls -- for a prospective HTTP field author.\n\nOnce a field is defined, bespoke parsers and serializers often need to be written, because each field value has a slightly different handling of what looks like common syntax.\n\nThis document introduces a set of common data structures for use in definitions of new HTTP field values to address these problems. In particular, it defines a generic, abstract model for them, along with a concrete serialization for expressing that model in HTTP [HTTP] header and trailer fields.\n\nAn HTTP field that is defined as a \"Structured Header\" or \"Structured Trailer\" (if the field can be either, it is a \"Structured Field\") uses the types defined in this specification to define its syntax and basic handling rules, thereby simplifying both its definition by specification writers and handling by implementations.\n\nAdditionally, future versions of HTTP can define alternative serializations of the abstract model of these structures, allowing fields that use that model to be transmitted more efficiently without being redefined.\n\nNote that it is not a goal of this document to redefine the syntax of existing HTTP fields; the mechanisms described herein are only intended to be used with fields that explicitly opt into them.\n\nSection 2 describes how to specify a Structured Field.\n\nSection 3 defines a number of abstract data types that can be used in Structured Fields.\n\nThose abstract types can be serialized into and parsed from HTTP field values using the algorithms described in Section 4.\n\n### 1.1. Intentionally Strict Processing\n\nThis specification intentionally defines strict parsing and serialization behaviors using step-by-step algorithms; the only error handling defined is to fail the entire operation altogether.\n\nIt is designed to encourage faithful implementation and good interoperability. Therefore, an implementation that tried to be helpful by being more tolerant of input would make interoperability worse, since that would create pressure on other implementations to implement similar (but likely subtly different) workarounds.\n\nIn other words, strict processing is an intentional feature of this specification; it allows non-conformant input to be discovered and corrected by the producer early and avoids both interoperability and security issues that might otherwise result.\n\nNote that as a result of this strictness, if a field is appended to by multiple parties (e.g., intermediaries or different components in the sender), an error in one party's value is likely to cause the entire field value to fail parsing.\n\n### 1.2. Notational Conventions\n\nThe 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.\n\nThis document uses the VCHAR, SP, DIGIT, ALPHA, and DQUOTE rules from [RFC5234] to specify characters and/or their corresponding ASCII bytes, depending on context. It uses the tchar and OWS rules from [HTTP] for the same purpose.\n\nThis document uses algorithms to specify parsing and serialization behaviors. When parsing from HTTP fields, implementations *MUST* have behavior that is indistinguishable from following the algorithms.\n\nFor serialization to HTTP fields, the algorithms define the recommended way to produce them. Implementations *MAY* vary from the specified behavior so long as the output is still correctly handled by the parsing algorithm described in Section 4.2.\n\n---\n\n## 2. Defining New Structured Fields\n\nTo specify an HTTP field as a Structured Field, its authors need to:\n\n- Normatively reference this specification. Recipients and generators of the field need to know that the requirements of this document are in effect.\n- Identify whether the field is a Structured Header (i.e., it can only be used in the header section -- the common case), a Structured Trailer (only in the trailer section), or a Structured Field (both).\n- Specify the type of the field value; either List (Section 3.1), Dictionary (Section 3.2), or Item (Section 3.3).\n- Define the semantics of the field value.\n- Specify any additional constraints upon the field value, as well as the consequences when those constraints are violated.\n\nTypically, this means that a field definition will specify the top-level type -- List, Dictionary, or Item -- and then define its allowable types and constraints upon them. For example, a header defined as a List might have all Integer members, or a mix of types; a header defined as an Item might allow only Strings, and additionally only strings beginning with the letter \"Q\", or strings in lowercase. Likewise, Inner Lists (Section 3.1.1) are only valid when a field definition explicitly allows them.\n\nFields that use the Display String type are advised to carefully specify their allowable Unicode code points; for example, specifying the use of a profile from [PRECIS].\n\nField definitions can only use this specification for the entire field value, not a portion thereof.\n\nSpecifications can refer to a field name as a \"Structured Header name\", \"Structured Trailer name\", or \"Structured Field name\" as appropriate. Likewise, they can refer its field value as a \"Structured Header value\", \"Structured Trailer value\", or \"Structured Field value\" as necessary.\n\nThis specification defines minimums for the length or number of various structures supported by implementations. It does not specify maximum sizes in most cases, but authors should be aware that HTTP implementations do impose various limits on the size of individual fields, the total number of fields, and/or the size of the entire header or trailer section.\n\n### 2.1. Example\n\nA fictitious Foo-Example header field might be specified as:\n\n> 42. Foo-Example Header Field\n> \n> The Foo-Example HTTP header field conveys information about how much Foo the message has.\n> \n> Foo-Example is an Item Structured Header Field [RFC9651]. Its value *MUST* be an Integer (Section 3.3.1 of [RFC9651]).\n> \n> Its value indicates the amount of Foo in the message, and it *MUST* be between 0 and 10, inclusive; other values *MUST* cause the entire header field to be ignored.\n> \n> The following parameter is defined:\n> \n> - A parameter whose key is \"foourl\", and whose value is a String (Section 3.3.3 of [RFC9651]), conveying the Foo URL for the message. See below for processing requirements.\n> \n> \"foourl\" contains a URI-reference (Section 4.1 of [RFC3986]). If its value is not a valid URI-reference, the entire header field *MUST* be ignored. If its value is a relative reference (Section 4.2 of [RFC3986]), it *MUST* be resolved (Section 5 of [RFC3986]) before being used.\n> \n> For example:\n> \n> ```\n> Foo-Example: 2; foourl=\"https://foo.example.com/\"\n> ```\n\n### 2.2. Error Handling\n\nWhen parsing fails, the entire field is ignored (see Section 4.2). Field definitions cannot override this because doing so would preclude handling by generic software; they can only add additional constraints (for example, on the numeric range of Integers and Decimals, the format of Strings and Tokens, the types allowed in a Dictionary's values, or the number of Items in a List).\n\nWhen field-specific constraints are violated, the entire field is also ignored, unless the field definition defines other handling requirements. For example, if a header field is defined as an Item and required to be an Integer, but a String is received, it should be ignored unless that field's definition explicitly specifies otherwise.\n\n### 2.3. Preserving Extensibility\n\nStructured Fields are designed to be extensible because experience has shown that, even when it is not foreseen, it is often necessary to modify and add to the allowable syntax and semantics of a field in a controlled fashion.\n\nBoth Items and Inner Lists allow Parameters as an extensibility mechanism; this means that their values can later be extended to accommodate more information, if need be. To preserve forward compatibility, field specifications are discouraged from defining the presence of an unrecognized parameter as an error condition.\n\nField specifications are required to be either an Item, List, or Dictionary to preserve extensibility. Fields that erroneously defined as another type (e.g., Integer) are assumed to be Items (i.e., they allow Parameters).\n\nTo further assure that this extensibility is available in the future, and to encourage consumers to use a complete parser implementation, a field definition can specify that \"grease\" parameters be added by senders. A specification could stipulate that all parameters that fit a defined pattern are reserved for this use and then encourage them to be sent on some portion of requests. This helps to discourage recipients from writing a parser that does not account for Parameters.\n\nSpecifications that use Dictionaries can also allow for forward compatibility by requiring that the presence of -- as well as value and type associated with -- unknown keys be ignored. Subsequent specifications can then add additional keys, specifying constraints on them as appropriate.\n\nAn extension to a Structured Field can then require that an entire field value be ignored by a recipient that understands the extension if constraints on the value it defines are not met.\n\n### 2.4. Using New Structured Types in Extensions\n\nBecause a field definition needs to reference a specific RFC for Structured Fields, the types available for use in its value are limited to those defined in that RFC. For example, a field whose definition references this document can have a value that uses the Date type (Section 3.3.7), whereas a field whose definition references RFC 8941 cannot because it will be treated as invalid (and therefore discarded) by implementations of that specification.\n\nThis limitation also applies to future extensions to a field; for example, a field that is defined with a reference to RFC 8941 cannot use the Date type because some recipients might still be using a parser based on RFC 8941 to process it.\n\nHowever, this document is designed to be backward compatible with RFC 8941; a parser that implements the requirements here can also parse valid Structured Fields whose definitions reference RFC 8941.\n\nUpgrading a Structured Fields implementation to support a newer revision of the specification (such as this document) brings the possibility that some field values that were invalid according to the earlier RFC might become valid when processed.\n\nFor example, a field instance might contain a syntactically valid Date (Section 3.3.7), even though that field's definition does not accommodate Dates. An implementation based on RFC 8941 would fail parsing such a field instance because it is not defined in that specification. If that implementation were upgraded to this specification, parsing would now succeed. In some cases, the resulting Date value will be rejected by field-specific logic, but values in fields that are otherwise ignored (such as extension parameters) might not be detected, and the field might subsequently be accepted and processed.\n\n---\n\n## 3. Structured Data Types\n\nThis section provides an overview of the abstract types that Structured Fields use and gives a brief description and examples of how each of those types are serialized into textual HTTP fields. Section 4 specifies the details of how they are parsed from and serialized into textual HTTP fields.\n\nIn summary:\n\n- There are three top-level types that an HTTP field can be defined as: Lists, Dictionaries, and Items.\n- Lists and Dictionaries are containers; their members can be Items or Inner Lists (which are themselves arrays of Items).\n- Both Items and Inner Lists can be Parameterized with key/value pairs.\n\n### 3.1. Lists\n\nLists are arrays of zero or more members, each of which can be an Item (Section 3.3) or an Inner List (Section 3.1.1), both of which can be Parameterized (Section 3.1.2).\n\nAn empty List is denoted by not serializing the field at all. This implies that fields defined as Lists have a default empty value.\n\nWhen serialized as a textual HTTP field, each member is separated by a comma and optional whitespace. For example, a field whose value is defined as a List of Tokens could look like:\n\n```\nExample-List: sugar, tea, rum\n```\n\nNote that Lists can have their members split across multiple lines of the same header or trailer section, as per [Section 5.3](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.3) of [HTTP]; for example, the following are equivalent:\n\n```\nExample-List: sugar, tea, rum\n```\n\nand\n\n```\nExample-List: sugar, tea\nExample-List: rum\n```\n\nHowever, individual members of a List cannot be safely split between lines; see Section 4.2 for details.\n\nParsers *MUST* support Lists containing at least 1024 members. Field specifications can constrain the types and cardinality of individual List values as they require.\n\n#### 3.1.1. Inner Lists\n\nAn Inner List is an array of zero or more Items (Section 3.3). Both the individual Items and the Inner List itself can be Parameterized (Section 3.1.2).\n\nWhen serialized in a textual HTTP field, Inner Lists are denoted by surrounding parenthesis, and their values are delimited by one or more spaces. A field whose value is defined as a List of Inner Lists of Strings could look like:\n\n```\nExample-List: (\"foo\" \"bar\"), (\"baz\"), (\"bat\" \"one\"), ()\n```\n\nNote that the last member in this example is an empty Inner List.\n\nA header field whose value is defined as a List of Inner Lists with Parameters at both levels could look like:\n\n```\nExample-List: (\"foo\"; a=1;b=2);lvl=5, (\"bar\" \"baz\");lvl=1\n```\n\nParsers *MUST* support Inner Lists containing at least 256 members. Field specifications can constrain the types and cardinality of individual Inner List members as they require.\n\n#### 3.1.2. Parameters\n\nParameters are an ordered map of key-value pairs that are associated with an Item (Section 3.3) or Inner List (Section 3.1.1). The keys are unique within the scope of the Parameters they occur within, and the values are bare items (i.e., they themselves cannot be parameterized; see Section 3.3).\n\nImplementations *MUST* provide access to Parameters both by index and by key. Specifications *MAY* use either means of accessing them.\n\nNote that parameters are ordered, and parameter keys cannot contain uppercase letters.\n\nWhen serialized in a textual HTTP field, a Parameter is separated from its Item or Inner List and other Parameters by a semicolon. For example:\n\n```\nExample-List: abc;a=1;b=2; cde_456, (ghi;jk=4 l);q=\"9\";r=w\n```\n\nParameters whose value is Boolean (see Section 3.3.6) true *MUST* omit that value when serialized. For example, the \"a\" parameter here is true, while the \"b\" parameter is false:\n\n```\nExample-Integer: 1; a; b=?0\n```\n\nNote that this requirement is only on serialization; parsers are still required to correctly handle the true value when it appears in a parameter.\n\nParsers *MUST* support at least 256 parameters on an Item or Inner List, and support parameter keys with at least 64 characters. Field specifications can constrain the order of individual parameters, as well as their values' types as required.\n\n### 3.2. Dictionaries\n\nDictionaries are ordered maps of key-value pairs, where the keys are short textual strings and the values are Items (Section 3.3) or arrays of Items, both of which can be Parameterized (Section 3.1.2). There can be zero or more members, and their keys are unique in the scope of the Dictionary they occur within.\n\nImplementations *MUST* provide access to Dictionaries both by index and by key. Specifications *MAY* use either means of accessing the members.\n\nAs with Lists, an empty Dictionary is represented by omitting the entire field. This implies that fields defined as Dictionaries have a default empty value.\n\nTypically, a field specification will define the semantics of Dictionaries by specifying the allowed type(s) for individual members by their keys, as well as whether their presence is required or optional. Recipients *MUST* ignore members whose keys are undefined or unknown, unless the field's specification specifically disallows them.\n\nWhen serialized as a textual HTTP field, members are ordered as serialized and separated by a comma with optional whitespace. Member keys cannot contain uppercase characters. Keys and values are separated by \"=\" (without whitespace). For example:\n\n```\nExample-Dict: en=\"Applepie\", da=:w4ZibGV0w6ZydGU=:\n```\n\nNote that in this example, the final \"=\" is due to the inclusion of a Byte Sequence; see Section 3.3.5.\n\nMembers whose value is Boolean (see Section 3.3.6) true *MUST* omit that value when serialized. For example, here both \"b\" and \"c\" are true:\n\n```\nExample-Dict: a=?0, b, c; foo=bar\n```\n\nNote that this requirement is only on serialization; parsers are still required to correctly handle the true Boolean value when it appears in Dictionary values.\n\nA Dictionary with a member whose value is an Inner List of Tokens:\n\n```\nExample-Dict: rating=1.5, feelings=(joy sadness)\n```\n\nA Dictionary with a mix of Items and Inner Lists, some with parameters:\n\n```\nExample-Dict: a=(1 2), b=3, c=4;aa=bb, d=(5 6);valid\n```\n\nNote that Dictionaries can have their members split across multiple lines of the same header or trailer section; for example, the following are equivalent:\n\n```\nExample-Dict: foo=1, bar=2\n```\n\nand\n\n```\nExample-Dict: foo=1\nExample-Dict: bar=2\n```\n\nHowever, individual members of a Dictionary cannot be safely split between lines; see Section 4.2 for details.\n\nParsers *MUST* support Dictionaries containing at least 1024 key/value pairs and keys with at least 64 characters. Field specifications can constrain the order of individual Dictionary members, as well as their values' types as required.\n\n### 3.3. Items\n\nAn Item can be an Integer (Section 3.3.1), a Decimal (Section 3.3.2), a String (Section 3.3.3), a Token (Section 3.3.4), a Byte Sequence (Section 3.3.5), a Boolean (Section 3.3.6), or a Date (Section 3.3.7). It can have associated parameters (Section 3.1.2).\n\nFor example, a header field that is defined to be an Item that is an Integer might look like:\n\n```\nExample-Integer: 5\n```\n\nor with parameters:\n\n```\nExample-Integer: 5; foo=bar\n```\n\n#### 3.3.1. Integers\n\nIntegers have a range of -999,999,999,999,999 to 999,999,999,999,999 inclusive (i.e., up to fifteen digits, signed), for IEEE 754 compatibility [IEEE754].\n\nFor example:\n\n```\nExample-Integer: 42\n```\n\nIntegers larger than 15 digits can be supported in a variety of ways; for example, by using a String (Section 3.3.3), a Byte Sequence (Section 3.3.5), or a parameter on an Integer that acts as a scaling factor.\n\nWhile it is possible to serialize Integers with leading zeros (e.g., \"0002\", \"-01\") and signed zero (\"-0\"), these distinctions may not be preserved by implementations.\n\nNote that commas in Integers are used in this section's prose only for readability; they are not valid in the wire format.\n\n#### 3.3.2. Decimals\n\nDecimals are numbers with an integer and a fractional component. The integer component has at most 12 digits; the fractional component has at most three digits.\n\nFor example, a header whose value is defined as a Decimal could look like:\n\n```\nExample-Decimal: 4.5\n```\n\nWhile it is possible to serialize Decimals with leading zeros (e.g., \"0002.5\", \"-01.334\"), trailing zeros (e.g., \"5.230\", \"-0.40\"), and signed zero (e.g., \"-0.0\"), these distinctions may not be preserved by implementations.\n\nNote that the serialization algorithm (Section 4.1.5) rounds input with more than three digits of precision in the fractional component. If an alternative rounding strategy is desired, this should be specified by the field definition to occur before serialization.\n\n#### 3.3.3. Strings\n\nStrings are zero or more printable ASCII [RFC0020] characters (i.e., the range %x20 to %x7E). Note that this excludes tabs, newlines, carriage returns, etc.\n\nNon-ASCII characters are not directly supported in Strings because they cause a number of interoperability issues, and -- with few exceptions -- field values do not require them.\n\nWhen it is necessary for a field value to convey non-ASCII content, a Display String (Section 3.3.8) can be specified.\n\nWhen serialized in a textual HTTP field, Strings are delimited with double quotes, using a backslash (\"\\\") to escape double quotes and backslashes. For example:\n\n```\nExample-String: \"hello world\"\n```\n\nNote that Strings only use DQUOTE as a delimiter; single quotes do not delimit Strings. Furthermore, only DQUOTE and \"\\\" can be escaped; other characters after \"\\\" *MUST* cause parsing to fail.\n\nParsers *MUST* support Strings (after any decoding) with at least 1024 characters.\n\n#### 3.3.4. Tokens\n\nTokens are short textual words that begin with an alphabetic character or \"*\", followed by zero to many token characters, which are the same as those allowed by the \"token\" ABNF rule defined in [HTTP] plus the \":\" and \"/\" characters.\n\nFor example:\n\n```\nExample-Token: foo123/456\n```\n\nParsers *MUST* support Tokens with at least 512 characters.\n\nNote that Tokens are defined largely for compatibility with the data model of existing HTTP fields and may require additional steps to use in some implementations. As a result, new fields are encouraged to use Strings.\n\n#### 3.3.5. Byte Sequences\n\nByte Sequences can be conveyed in Structured Fields.\n\nWhen serialized in a textual HTTP field, a Byte Sequence is delimited with colons and encoded using base64 ([RFC4648], [Section 4](https://www.rfc-editor.org/rfc/rfc4648.html#section-4)). For example:\n\n```\nExample-ByteSequence: :cHJldGVuZCB0aGlzIGlzIGJpbmFyeSBjb250ZW50Lg==:\n```\n\nParsers *MUST* support Byte Sequences with at least 16384 octets after decoding.\n\n#### 3.3.6. Booleans\n\nBoolean values can be conveyed in Structured Fields.\n\nWhen serialized in a textual HTTP field, a Boolean is indicated with a leading \"?\" character followed by a \"1\" for a true value or \"0\" for false. For example:\n\n```\nExample-Boolean: ?1\n```\n\nNote that in Dictionary (Section 3.2) and Parameter (Section 3.1.2) values, Boolean true is indicated by omitting the value.\n\n#### 3.3.7. Dates\n\nDate values can be conveyed in Structured Fields.\n\nDates have a data model that is similar to Integers, representing a (possibly negative) delta in seconds from 1970-01-01T00:00:00Z, excluding leap seconds. Accordingly, their serialization in textual HTTP fields is similar to that of Integers, distinguished from them with a leading \"@\".\n\nFor example:\n\n```\nExample-Date: @1659578233\n```\n\nParsers *MUST* support Dates whose values include all days in years 1 to 9999 (i.e., -62,135,596,800 to 253,402,214,400 delta seconds from 1970-01-01T00:00:00Z).\n\n#### 3.3.8. Display Strings\n\nDisplay Strings are similar to Strings, in that they consist of zero or more characters, but they allow Unicode scalar values (i.e., all Unicode code points except for surrogates), unlike Strings.\n\nDisplay Strings are intended for use in cases where a value is displayed to end users and therefore may need to carry non-ASCII content. It is *NOT RECOMMENDED* that they be used in situations where a String (Section 3.3.3) or Token (Section 3.3.4) would be adequate because Unicode has processing considerations (e.g., normalization) and security considerations (e.g., homograph attacks) that make it more difficult to handle correctly.\n\nNote that Display Strings do not indicate the language used in the value; that can be done separately if necessary (e.g., with a parameter).\n\nIn textual HTTP fields, Display Strings are represented in a manner similar to Strings, except that non-ASCII characters are percent-encoded; there is a leading \"%\" to distinguish them from Strings.\n\nFor example:\n\n```\nExample-DisplayString: %\"This is intended for display to %c3%bcsers.\"\n```\n\nSee Section 6 for additional security considerations when handling Display Strings.\n\n---\n\n## 4. Working with Structured Fields in HTTP\n\nThis section defines how to serialize and parse the abstract types defined by Section 3 into textual HTTP field values and other encodings compatible with them (e.g., in HTTP/2 [HTTP/2] before compression with HPACK [HPACK]).\n\n### 4.1. Serializing Structured Fields\n\nGiven a structure defined in this specification, return an ASCII string suitable for use in an HTTP field value.\n\n1. If the structure is a Dictionary or List and its value is empty (i.e., it has no members), do not serialize the field at all (i.e., omit both the field-name and field-value).\n2. If the structure is a List, let output_string be the result of running Serializing a List (Section 4.1.1) with the structure.\n3. Else, if the structure is a Dictionary, let output_string be the result of running Serializing a Dictionary (Section 4.1.2) with the structure.\n4. Else, if the structure is an Item, let output_string be the result of running Serializing an Item (Section 4.1.3) with the structure.\n5. Else, fail serialization.\n6. Return output_string converted into an array of bytes, using ASCII encoding [RFC0020].\n\n#### 4.1.1. Serializing a List\n\nGiven an array of (member_value, parameters) tuples as input_list, return an ASCII string suitable for use in an HTTP field value.\n\n1. Let output be an empty string.\n2. For each (member_value, parameters) of input_list: If member_value is an array, append the result of running Serializing an Inner List (Section 4.1.1.1) with (member_value, parameters) to output. Otherwise, append the result of running Serializing an Item (Section 4.1.3) with (member_value, parameters) to output. If more member_values remain in input_list: Append \",\" to output. Append a single SP to output.\n3. Return output.\n\n##### 4.1.1.1. Serializing an Inner List\n\nGiven an array of (member_value, parameters) tuples as inner_list, and parameters as list_parameters, return an ASCII string suitable for use in an HTTP field value.\n\n1. Let output be the string \"(\".\n2. For each (member_value, parameters) of inner_list: Append the result of running Serializing an Item (Section 4.1.3) with (member_value, parameters) to output. If more values remain in inner_list, append a single SP to output.\n3. Append \")\" to output.\n4. Append the result of running Serializing Parameters (Section 4.1.1.2) with list_parameters to output.\n5. Return output.\n\n##### 4.1.1.2. Serializing Parameters\n\nGiven an ordered Dictionary as input_parameters (each member having a param_key and a param_value), return an ASCII string suitable for use in an HTTP field value.\n\n1. Let output be an empty string.\n2. For each param_key with a value of param_value in input_parameters: Append \";\" to output. Append the result of running Serializing a Key (Section 4.1.1.3) with param_key to output. If param_value is not Boolean true: Append \"=\" to output. Append the result of running Serializing a bare Item (Section 4.1.3.1) with param_value to output.\n3. Return output.\n\n##### 4.1.1.3. Serializing a Key\n\nGiven a key as input_key, return an ASCII string suitable for use in an HTTP field value.\n\n1. Convert input_key into a sequence of ASCII characters; if conversion fails, fail serialization.\n2. If input_key contains characters not in lcalpha, DIGIT, \"_\", \"-\", \".\", or \"*\", fail serialization.\n3. If the first character of input_key is not lcalpha or \"*\", fail serialization.\n4. Let output be an empty string.\n5. Append input_key to output.\n6. Return output.\n\n#### 4.1.2. Serializing a Dictionary\n\nGiven an ordered Dictionary as input_dictionary (each member having a member_key and a tuple value of (member_value, parameters)), return an ASCII string suitable for use in an HTTP field value.\n\n1. Let output be an empty string.\n2. For each member_key with a value of (member_value, parameters) in input_dictionary: Append the result of running Serializing a Key (Section 4.1.1.3) with member's member_key to output. If member_value is Boolean true: Append the result of running Serializing Parameters (Section 4.1.1.2) with parameters to output. Otherwise: Append \"=\" to output. If member_value is an array, append the result of running Serializing an Inner List (Section 4.1.1.1) with (member_value, parameters) to output. Otherwise, append the result of running Serializing an Item (Section 4.1.3) with (member_value, parameters) to output. If more members remain in input_dictionary: Append \",\" to output. Append a single SP to output.\n3. Return output.\n\n#### 4.1.3. Serializing an Item\n\nGiven an Item as bare_item and Parameters as item_parameters, return an ASCII string suitable for use in an HTTP field value.\n\n1. Let output be an empty string.\n2. Append the result of running Serializing a Bare Item (Section 4.1.3.1) with bare_item to output.\n3. Append the result of running Serializing Parameters (Section 4.1.1.2) with item_parameters to output.\n4. Return output.\n\n##### 4.1.3.1. Serializing a Bare Item\n\nGiven an Item as input_item, return an ASCII string suitable for use in an HTTP field value.\n\n1. If input_item is an Integer, return the result of running Serializing an Integer (Section 4.1.4) with input_item.\n2. If input_item is a Decimal, return the result of running Serializing a Decimal (Section 4.1.5) with input_item.\n3. If input_item is a String, return the result of running Serializing a String (Section 4.1.6) with input_item.\n4. If input_item is a Token, return the result of running Serializing a Token (Section 4.1.7) with input_item.\n5. If input_item is a Byte Sequence, return the result of running Serializing a Byte Sequence (Section 4.1.8) with input_item.\n6. If input_item is a Boolean, return the result of running Serializing a Boolean (Section 4.1.9) with input_item.\n7. If input_item is a Date, return the result of running Serializing a Date (Section 4.1.10) with input_item.\n8. If input_item is a Display String, return the result of running Serializing a Display String (Section 4.1.11) with input_item.\n9. Otherwise, fail serialization.\n\n#### 4.1.4. Serializing an Integer\n\nGiven an Integer as input_integer, return an ASCII string suitable for use in an HTTP field value.\n\n1. If input_integer is not an integer in the range of -999,999,999,999,999 to 999,999,999,999,999 inclusive, fail serialization.\n2. Let output be an empty string.\n3. If input_integer is less than (but not equal to) 0, append \"-\" to output.\n4. Append input_integer's numeric value represented in base 10 using only decimal digits to output.\n5. Return output.\n\n#### 4.1.5. Serializing a Decimal\n\nGiven a decimal number as input_decimal, return an ASCII string suitable for use in an HTTP field value.\n\n1. If input_decimal is not a decimal number, fail serialization.\n2. If input_decimal has more than three significant digits to the right of the decimal point, round it to three decimal places, rounding the final digit to the nearest value, or to the even value if it is equidistant.\n3. If input_decimal has more than 12 significant digits to the left of the decimal point after rounding, fail serialization.\n4. Let output be an empty string.\n5. If input_decimal is less than (but not equal to) 0, append \"-\" to output.\n6. Append input_decimal's integer component represented in base 10 (using only decimal digits) to output; if it is zero, append \"0\".\n7. Append \".\" to output.\n8. If input_decimal's fractional component is zero, append \"0\" to output.\n9. Otherwise, append the significant digits of input_decimal's fractional component represented in base 10 (using only decimal digits) to output.\n10. Return output.\n\n#### 4.1.6. Serializing a String\n\nGiven a String as input_string, return an ASCII string suitable for use in an HTTP field value.\n\n1. Convert input_string into a sequence of ASCII characters; if conversion fails, fail serialization.\n2. If input_string contains characters in the range %x00-1f or %x7f-ff (i.e., not in VCHAR or SP), fail serialization.\n3. Let output be the string DQUOTE.\n4. For each character char in input_string: If char is \"\\\" or DQUOTE: Append \"\\\" to output. Append char to output.\n5. Append DQUOTE to output.\n6. Return output.\n\n#### 4.1.7. Serializing a Token\n\nGiven a Token as input_token, return an ASCII string suitable for use in an HTTP field value.\n\n1. Convert input_token into a sequence of ASCII characters; if conversion fails, fail serialization.\n2. If the first character of input_token is not ALPHA or \"*\", or the remaining portion contains a character not in tchar, \":\", or \"/\", fail serialization.\n3. Let output be an empty string.\n4. Append input_token to output.\n5. Return output.\n\n#### 4.1.8. Serializing a Byte Sequence\n\nGiven a Byte Sequence as input_bytes, return an ASCII string suitable for use in an HTTP field value.\n\n1. If input_bytes is not a sequence of bytes, fail serialization.\n2. Let output be an empty string.\n3. Append \":\" to output.\n4. Append the result of base64-encoding input_bytes as per [RFC4648], [Section 4](https://www.rfc-editor.org/rfc/rfc4648.html#section-4), taking account of the requirements below.\n5. Append \":\" to output.\n6. Return output.\n\nThe encoded data is required to be padded with \"=\", as per [RFC4648], [Section 3.2](https://www.rfc-editor.org/rfc/rfc4648.html#section-3.2).\n\nLikewise, encoded data *SHOULD* have pad bits set to zero, as per [RFC4648], [Section 3.5](https://www.rfc-editor.org/rfc/rfc4648.html#section-3.5), unless it is not possible to do so due to implementation constraints.\n\n#### 4.1.9. Serializing a Boolean\n\nGiven a Boolean as input_boolean, return an ASCII string suitable for use in an HTTP field value.\n\n1. If input_boolean is not a boolean, fail serialization.\n2. Let output be an empty string.\n3. Append \"?\" to output.\n4. If input_boolean is true, append \"1\" to output.\n5. If input_boolean is false, append \"0\" to output.\n6. Return output.\n\n#### 4.1.10. Serializing a Date\n\nGiven a Date as input_date, return an ASCII string suitable for use in an HTTP field value.\n\n1. Let output be \"@\".\n2. Append to output the result of running Serializing an Integer with input_date (Section 4.1.4).\n3. Return output.\n\n#### 4.1.11. Serializing a Display String\n\nGiven a sequence of Unicode code points as input_sequence, return an ASCII string suitable for use in an HTTP field value.\n\n1. If input_sequence is not a sequence of Unicode code points, fail serialization.\n2. Let byte_array be the result of applying UTF-8 encoding ([Section 3](https://www.rfc-editor.org/rfc/rfc3629.html#section-3) of [UTF8]) to input_sequence. If encoding fails, fail serialization.\n3. Let encoded_string be a string containing \"%\" followed by DQUOTE.\n4. For each byte in byte_array: If byte is %x25 (\"%\"), %x22 (DQUOTE), or in the ranges %x00-1f or %x7f-ff: Append \"%\" to encoded_string. Let encoded_byte be the result of applying base16 encoding ([Section 8](https://www.rfc-editor.org/rfc/rfc4648.html#section-8) of [RFC4648]) to byte, with any alphabetic characters converted to lowercase. Append encoded_byte to encoded_string. Otherwise, decode byte as an ASCII character and append the result to encoded_string.\n5. Append DQUOTE to encoded_string.\n6. Return encoded_string.\n\nNote that [UTF8] prohibits the encoding of code points between U+D800 and U+DFFF (surrogates); if they occur in input_sequence, serialization will fail.\n\n### 4.2. Parsing Structured Fields\n\nWhen a receiving implementation parses HTTP fields that are known to be Structured Fields, it is important that care be taken, as there are a number of edge cases that can cause interoperability or even security problems. This section specifies the algorithm for doing so.\n\nGiven an array of bytes as input_bytes that represent the chosen field's field-value (which is empty if that field is not present) and field_type (one of \"dictionary\", \"list\", or \"item\"), return the parsed field value.\n\n1. Convert input_bytes into an ASCII string input_string; if conversion fails, fail parsing.\n2. Discard any leading SP characters from input_string.\n3. If field_type is \"list\", let output be the result of running Parsing a List (Section 4.2.1) with input_string.\n4. If field_type is \"dictionary\", let output be the result of running Parsing a Dictionary (Section 4.2.2) with input_string.\n5. If field_type is \"item\", let output be the result of running Parsing an Item (Section 4.2.3) with input_string.\n6. Discard any leading SP characters from input_string.\n7. If input_string is not empty, fail parsing.\n8. Otherwise, return output.\n\nWhen generating input_bytes, parsers *MUST* combine all field lines in the same section (header or trailer) that case-insensitively match the field name into one comma-separated field-value, as per [Section 5.2](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.2) of [HTTP]; this assures that the entire field value is processed correctly.\n\nFor Lists and Dictionaries, this has the effect of correctly concatenating all of the field's lines, as long as individual members of the top-level data structure are not split across multiple field instances. The parsing algorithms for both types allow tab characters, since these might be used to combine field lines by some implementations.\n\nStrings split across multiple field lines will have unpredictable results, because one or more commas (with optional whitespace) will become part of the string output by the parser. Since concatenation might be done by an upstream intermediary, the results are not under the control of the serializer or the parser, even when they are both under the control of the same party.\n\nTokens, Integers, Decimals, and Byte Sequences cannot be split across multiple field lines because the inserted commas will cause parsing to fail.\n\nParsers *MAY* fail when processing a field value spread across multiple field lines, when one of those lines does not parse as that field. For example, a parsing handling an Example-String field that's defined as an sf-string is allowed to fail when processing this field section:\n\n```\nExample-String: \"foo\nExample-String: bar\"\n```\n\nIf parsing fails, either the entire field value *MUST* be ignored (i.e., treated as if the field were not present in the section), or alternatively the complete HTTP message *MUST* be treated as malformed. This is intentionally strict to improve interoperability and safety, and field specifications that use Structured Fields are not allowed to loosen this requirement.\n\nNote that this requirement does not apply to an implementation that is not parsing the field; for example, an intermediary is not required to strip a failing field from a message before forwarding it.\n\n#### 4.2.1. Parsing a List\n\nGiven an ASCII string as input_string, return an array of (item_or_inner_list, parameters) tuples. input_string is modified to remove the parsed value.\n\n1. Let members be an empty array.\n2. While input_string is not empty: Append the result of running Parsing an Item or Inner List (Section 4.2.1.1) with input_string to members. Discard any leading OWS characters from input_string. If input_string is empty, return members. Consume the first character of input_string; if it is not \",\", fail parsing. Discard any leading OWS characters from input_string. If input_string is empty, there is a trailing comma; fail parsing.\n3. No structured data has been found; return members (which is empty).\n\n##### 4.2.1.1. Parsing an Item or Inner List\n\nGiven an ASCII string as input_string, return the tuple (item_or_inner_list, parameters), where item_or_inner_list can be either a single bare item or an array of (bare_item, parameters) tuples. input_string is modified to remove the parsed value.\n\n1. If the first character of input_string is \"(\", return the result of running Parsing an Inner List (Section 4.2.1.2) with input_string.\n2. Return the result of running Parsing an Item (Section 4.2.3) with input_string.\n\n##### 4.2.1.2. Parsing an Inner List\n\nGiven an ASCII string as input_string, return the tuple (inner_list, parameters), where inner_list is an array of (bare_item, parameters) tuples. input_string is modified to remove the parsed value.\n\n1. Consume the first character of input_string; if it is not \"(\", fail parsing.\n2. Let inner_list be an empty array.\n3. While input_string is not empty: Discard any leading SP characters from input_string. If the first character of input_string is \")\": Consume the first character of input_string. Let parameters be the result of running Parsing Parameters (Section 4.2.3.2) with input_string. Return the tuple (inner_list, parameters). Let item be the result of running Parsing an Item (Section 4.2.3) with input_string. Append item to inner_list. If the first character of input_string is not SP or \")\", fail parsing.\n4. The end of the Inner List was not found; fail parsing.\n\n#### 4.2.2. Parsing a Dictionary\n\nGiven an ASCII string as input_string, return an ordered map whose values are (item_or_inner_list, parameters) tuples. input_string is modified to remove the parsed value.\n\n1. Let dictionary be an empty, ordered map.\n2. While input_string is not empty: Let this_key be the result of running Parsing a Key (Section 4.2.3.3) with input_string. If the first character of input_string is \"=\": Consume the first character of input_string. Let member be the result of running Parsing an Item or Inner List (Section 4.2.1.1) with input_string. Otherwise: Let value be Boolean true. Let parameters be the result of running Parsing Parameters (Section 4.2.3.2) with input_string. Let member be the tuple (value, parameters). If dictionary already contains a key this_key (comparing character for character), overwrite its value with member. Otherwise, append key this_key with value member to dictionary. Discard any leading OWS characters from input_string. If input_string is empty, return dictionary. Consume the first character of input_string; if it is not \",\", fail parsing. Discard any leading OWS characters from input_string. If input_string is empty, there is a trailing comma; fail parsing.\n3. No structured data has been found; return dictionary (which is empty).\n\nNote that when duplicate Dictionary keys are encountered, all but the last instance are ignored.\n\n#### 4.2.3. Parsing an Item\n\nGiven an ASCII string as input_string, return a (bare_item, parameters) tuple. input_string is modified to remove the parsed value.\n\n1. Let bare_item be the result of running Parsing a Bare Item (Section 4.2.3.1) with input_string.\n2. Let parameters be the result of running Parsing Parameters (Section 4.2.3.2) with input_string.\n3. Return the tuple (bare_item, parameters).\n\n##### 4.2.3.1. Parsing a Bare Item\n\nGiven an ASCII string as input_string, return a bare Item. input_string is modified to remove the parsed value.\n\n1. If the first character of input_string is a \"-\" or a DIGIT, return the result of running Parsing an Integer or Decimal (Section 4.2.4) with input_string.\n2. If the first character of input_string is a DQUOTE, return the result of running Parsing a String (Section 4.2.5) with input_string.\n3. If the first character of input_string is an ALPHA or \"*\", return the result of running Parsing a Token (Section 4.2.6) with input_string.\n4. If the first character of input_string is \":\", return the result of running Parsing a Byte Sequence (Section 4.2.7) with input_string.\n5. If the first character of input_string is \"?\", return the result of running Parsing a Boolean (Section 4.2.8) with input_string.\n6. If the first character of input_string is \"@\", return the result of running Parsing a Date (Section 4.2.9) with input_string.\n7. If the first character of input_string is \"%\", return the result of running Parsing a Display String (Section 4.2.10) with input_string.\n8. Otherwise, the item type is unrecognized; fail parsing.\n\n##### 4.2.3.2. Parsing Parameters\n\nGiven an ASCII string as input_string, return an ordered map whose values are bare Items. input_string is modified to remove the parsed value.\n\n1. Let parameters be an empty, ordered map.\n2. While input_string is not empty: If the first character of input_string is not \";\", exit the loop. Consume the \";\" character from the beginning of input_string. Discard any leading SP characters from input_string. Let param_key be the result of running Parsing a Key (Section 4.2.3.3) with input_string. Let param_value be Boolean true. If the first character of input_string is \"=\": Consume the \"=\" character at the beginning of input_string. Let param_value be the result of running Parsing a Bare Item (Section 4.2.3.1) with input_string. If parameters already contains a key param_key (comparing character for character), overwrite its value with param_value. Otherwise, append key param_key with value param_value to parameters.\n3. Return parameters.\n\nNote that when duplicate parameter keys are encountered, all but the last instance are ignored.\n\n##### 4.2.3.3. Parsing a Key\n\nGiven an ASCII string as input_string, return a key. input_string is modified to remove the parsed value.\n\n1. If the first character of input_string is not lcalpha or \"*\", fail parsing.\n2. Let output_string be an empty string.\n3. While input_string is not empty: If the first character of input_string is not one of lcalpha, DIGIT, \"_\", \"-\", \".\", or \"*\", return output_string. Let char be the result of consuming the first character of input_string. Append char to output_string.\n4. Return output_string.\n\n#### 4.2.4. Parsing an Integer or Decimal\n\nGiven an ASCII string as input_string, return an Integer or Decimal. input_string is modified to remove the parsed value.\n\nNOTE: This algorithm parses both Integers (Section 3.3.1) and Decimals (Section 3.3.2), and returns the corresponding structure.\n\n1. Let type be \"integer\".\n2. Let sign be 1.\n3. Let input_number be an empty string.\n4. If the first character of input_string is \"-\", consume it and set sign to -1.\n5. If input_string is empty, there is an empty integer; fail parsing.\n6. If the first character of input_string is not a DIGIT, fail parsing.\n7. While input_string is not empty: Let char be the result of consuming the first character of input_string. If char is a DIGIT, append it to input_number. Else, if type is \"integer\" and char is \".\": If input_number contains more than 12 characters, fail parsing. Otherwise, append char to input_number and set type to \"decimal\". Otherwise, prepend char to input_string, and exit the loop. If type is \"integer\" and input_number contains more than 15 characters, fail parsing. If type is \"decimal\" and input_number contains more than 16 characters, fail parsing.\n8. If type is \"integer\": Let output_number be an Integer that is the result of parsing input_number as an integer.\n9. Otherwise: If the final character of input_number is \".\", fail parsing. If the number of characters after \".\" in input_number is greater than three, fail parsing. Let output_number be a Decimal that is the result of parsing input_number as a decimal number.\n10. Let output_number be the product of output_number and sign.\n11. Return output_number.\n\n#### 4.2.5. Parsing a String\n\nGiven an ASCII string as input_string, return an unquoted String. input_string is modified to remove the parsed value.\n\n1. Let output_string be an empty string.\n2. If the first character of input_string is not DQUOTE, fail parsing.\n3. Discard the first character of input_string.\n4. While input_string is not empty: Let char be the result of consuming the first character of input_string. If char is a backslash (\"\\\"): If input_string is now empty, fail parsing. Let next_char be the result of consuming the first character of input_string. If next_char is not DQUOTE or \"\\\", fail parsing. Append next_char to output_string. Else, if char is DQUOTE, return output_string. Else, if char is in the range %x00-1f or %x7f-ff (i.e., it is not in VCHAR or SP), fail parsing. Else, append char to output_string.\n5. Reached the end of input_string without finding a closing DQUOTE; fail parsing.\n\n#### 4.2.6. Parsing a Token\n\nGiven an ASCII string as input_string, return a Token. input_string is modified to remove the parsed value.\n\n1. If the first character of input_string is not ALPHA or \"*\", fail parsing.\n2. Let output_string be an empty string.\n3. While input_string is not empty: If the first character of input_string is not in tchar, \":\", or \"/\", return output_string. Let char be the result of consuming the first character of input_string. Append char to output_string.\n4. Return output_string.\n\n#### 4.2.7. Parsing a Byte Sequence\n\nGiven an ASCII string as input_string, return a Byte Sequence. input_string is modified to remove the parsed value.\n\n1. If the first character of input_string is not \":\", fail parsing.\n2. Discard the first character of input_string.\n3. If there is not a \":\" character before the end of input_string, fail parsing.\n4. Let b64_content be the result of consuming content of input_string up to but not including the first instance of the character \":\".\n5. Consume the \":\" character at the beginning of input_string.\n6. If b64_content contains a character not included in ALPHA, DIGIT, \"+\", \"/\", and \"=\", fail parsing.\n7. Let binary_content be the result of base64-decoding [RFC4648] b64_content, synthesizing padding if necessary (note the requirements about recipient behavior below). If base64 decoding fails, parsing fails.\n8. Return binary_content.\n\nBecause some implementations of base64 do not allow rejection of encoded data that is not properly \"=\" padded (see [RFC4648], [Section 3.2](https://www.rfc-editor.org/rfc/rfc4648.html#section-3.2)), parsers *SHOULD NOT* fail when \"=\" padding is not present, unless they cannot be configured to do so.\n\nBecause some implementations of base64 do not allow rejection of encoded data that has non-zero pad bits (see [RFC4648], [Section 3.5](https://www.rfc-editor.org/rfc/rfc4648.html#section-3.5)), parsers *SHOULD NOT* fail when non-zero pad bits are present, unless they cannot be configured to do so.\n\nThis specification does not relax the requirements in Sections [3.1](https://www.rfc-editor.org/rfc/rfc4648.html#section-3.1) and [3.3](https://www.rfc-editor.org/rfc/rfc4648.html#section-3.3) of [RFC4648]; therefore, parsers *MUST* fail on characters outside the base64 alphabet and on line feeds in encoded data.\n\n#### 4.2.8. Parsing a Boolean\n\nGiven an ASCII string as input_string, return a Boolean. input_string is modified to remove the parsed value.\n\n1. If the first character of input_string is not \"?\", fail parsing.\n2. Discard the first character of input_string.\n3. If the first character of input_string matches \"1\", discard the first character, and return true.\n4. If the first character of input_string matches \"0\", discard the first character, and return false.\n5. No value has matched; fail parsing.\n\n#### 4.2.9. Parsing a Date\n\nGiven an ASCII string as input_string, return a Date. input_string is modified to remove the parsed value.\n\n1. If the first character of input_string is not \"@\", fail parsing.\n2. Discard the first character of input_string.\n3. Let output_date be the result of running Parsing an Integer or Decimal (Section 4.2.4) with input_string.\n4. If output_date is a Decimal, fail parsing.\n5. Return output_date.\n\n#### 4.2.10. Parsing a Display String\n\nGiven an ASCII string as input_string, return a sequence of Unicode code points. input_string is modified to remove the parsed value.\n\n1. If the first two characters of input_string are not \"%\" followed by DQUOTE, fail parsing.\n2. Discard the first two characters of input_string.\n3. Let byte_array be an empty byte array.\n4. While input_string is not empty: Let char be the result of consuming the first character of input_string. If char is in the range %x00-1f or %x7f-ff (i.e., it is not in VCHAR or SP), fail parsing. If char is \"%\": Let octet_hex be the result of consuming two characters from input_string. If there are not two characters, fail parsing. If octet_hex contains characters outside the range %x30-39 or %x61-66 (i.e., it is not in 0-9 or lowercase a-f), fail parsing. Let octet be the result of hex decoding octet_hex ([Section 8](https://www.rfc-editor.org/rfc/rfc4648.html#section-8) of [RFC4648]). Append octet to byte_array. If char is DQUOTE: Let unicode_sequence be the result of decoding byte_array as a UTF-8 string ([Section 3](https://www.rfc-editor.org/rfc/rfc3629.html#section-3) of [UTF8]). Fail parsing if decoding fails. Return unicode_sequence. Otherwise, if char is not \"%\" or DQUOTE: Let byte be the result of applying ASCII encoding to char. Append byte to byte_array.\n5. Reached the end of input_string without finding a closing DQUOTE; fail parsing.\n\n---\n\n## 5. IANA Considerations\n\nIANA has added the following note to the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\":\n\n> The \"Structured Type\" column indicates the type of the field (per RFC 9651), if any, and may be \"Dictionary\", \"List\", or \"Item\".\n> \n> Note that field names beginning with characters other than ALPHA or \"*\" will not be able to be represented as a Structured Fields Token and therefore may be incompatible with being mapped into field values that refer to it.\n\nA new column, \"Structured Type\", has been added to the registry.\n\nThe indicated Structured Type for each existing registry entry listed in Table 1 has also been added.\n\n| Field Name | Structured Type |\n| --- | --- |\n| Accept-CH | List |\n| Cache-Status | List |\n| CDN-Cache-Control | Dictionary |\n| Cross-Origin-Embedder-Policy | Item |\n| Cross-Origin-Embedder-Policy-Report-Only | Item |\n| Cross-Origin-Opener-Policy | Item |\n| Cross-Origin-Opener-Policy-Report-Only | Item |\n| Origin-Agent-Cluster | Item |\n| Priority | Dictionary |\n| Proxy-Status | List |\n\n---\n\n## 6. Security Considerations\n\nThe size of most types defined by Structured Fields is not limited; as a result, extremely large fields could be an attack vector (e.g., for resource consumption). Most HTTP implementations limit the sizes of individual fields as well as the overall header or trailer section size to mitigate such attacks.\n\nIt is possible for parties with the ability to inject new HTTP fields to change the meaning of a Structured Field. In some circumstances, this will cause parsing to fail, but it is not possible to reliably fail in all such circumstances.\n\nThe Display String type can convey any possible Unicode code point without sanitization; for example, they might contain unassigned code points, control points (including NUL), or noncharacters. Therefore, applications consuming Display Strings need to consider strategies such as filtering or escaping untrusted content before displaying it. See [PRECIS] and [UNICODE-SECURITY].\n\n## 7. References\n\n### 7.1. Normative References\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[RFC0020]\n\nCerf, V., “[ASCII format for network interchange](https://www.rfc-editor.org/rfc/rfc20.html)”, [STD 80](https://www.rfc-editor.org/info/std80), RFC 20, [DOI 10.17487/RFC0020](https://dx.doi.org/10.17487/RFC0020), October 1969, <[https://www.rfc-editor.org/info/rfc20](https://www.rfc-editor.org/info/rfc20)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC4648]\n\nJosefsson, S., “[The Base16, Base32, and Base64 Data Encodings](https://www.rfc-editor.org/rfc/rfc4648.html)”, RFC 4648, [DOI 10.17487/RFC4648](https://dx.doi.org/10.17487/RFC4648), October 2006, <[https://www.rfc-editor.org/info/rfc4648](https://www.rfc-editor.org/info/rfc4648)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[UTF8]\n\nYergeau, F., “[UTF-8, a transformation format of ISO 10646](https://www.rfc-editor.org/rfc/rfc3629.html)”, [STD 63](https://www.rfc-editor.org/info/std63), RFC 3629, [DOI 10.17487/RFC3629](https://dx.doi.org/10.17487/RFC3629), November 2003, <[https://www.rfc-editor.org/info/rfc3629](https://www.rfc-editor.org/info/rfc3629)>.\n\n### 7.2. Informative References\n\n[HPACK]\n\nPeon, R. and H. Ruellan, “[HPACK: Header Compression for HTTP/2](https://www.rfc-editor.org/rfc/rfc7541.html)”, RFC 7541, [DOI 10.17487/RFC7541](https://dx.doi.org/10.17487/RFC7541), May 2015, <[https://www.rfc-editor.org/info/rfc7541](https://www.rfc-editor.org/info/rfc7541)>.\n\n[HTTP/2]\n\nThomson, M., Ed. and C. Benfield, Ed., “[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html)”, RFC 9113, [DOI 10.17487/RFC9113](https://dx.doi.org/10.17487/RFC9113), June 2022, <[https://www.rfc-editor.org/info/rfc9113](https://www.rfc-editor.org/info/rfc9113)>.\n\n[IEEE754]\n\nIEEE, “[IEEE Standard for Floating-Point Arithmetic](https://ieeexplore.ieee.org/document/8766229)”, IEEE Std 754-2019, [DOI 10.1109/IEEESTD.2019.8766229](https://dx.doi.org/10.1109/IEEESTD.2019.8766229), [ISBN 978-1-5044-5924-2](https://www.worldcat.org/search?q=isbn:9781504459242), July 2019, <[https://ieeexplore.ieee.org/document/8766229](https://ieeexplore.ieee.org/document/8766229)>.\n\n[PRECIS]\n\nSaint-Andre, P. and M. Blanchet, “[PRECIS Framework: Preparation, Enforcement, and Comparison of Internationalized Strings in Application Protocols](https://www.rfc-editor.org/rfc/rfc8264.html)”, RFC 8264, [DOI 10.17487/RFC8264](https://dx.doi.org/10.17487/RFC8264), October 2017, <[https://www.rfc-editor.org/info/rfc8264](https://www.rfc-editor.org/info/rfc8264)>.\n\n[RFC5234]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[RFC7493]\n\nBray, T., Ed., “[The I-JSON Message Format](https://www.rfc-editor.org/rfc/rfc7493.html)”, RFC 7493, [DOI 10.17487/RFC7493](https://dx.doi.org/10.17487/RFC7493), March 2015, <[https://www.rfc-editor.org/info/rfc7493](https://www.rfc-editor.org/info/rfc7493)>.\n\n[RFC8259]\n\nBray, T., Ed., “[The JavaScript Object Notation (JSON) Data Interchange Format](https://www.rfc-editor.org/rfc/rfc8259.html)”, [STD 90](https://www.rfc-editor.org/info/std90), RFC 8259, [DOI 10.17487/RFC8259](https://dx.doi.org/10.17487/RFC8259), December 2017, <[https://www.rfc-editor.org/info/rfc8259](https://www.rfc-editor.org/info/rfc8259)>.\n\n[UNICODE-SECURITY]\n\nDavis, M. and M. Suignard, “[Unicode Security Considerations](https://www.unicode.org/reports/tr36/tr36-15.html)”, Unicode Technical Report #36, September 2014, <[https://www.unicode.org/reports/tr36/tr36-15.html](https://www.unicode.org/reports/tr36/tr36-15.html)>.\nLatest version available at <[https://www.unicode.org/reports/tr36/](https://www.unicode.org/reports/tr36/)>.\n\n---\n\n## Appendix A. Frequently Asked Questions\n\n### A.1. Why Not JSON?\n\nEarlier proposals for Structured Fields were based upon JSON [RFC8259]. However, constraining its use to make it suitable for HTTP fields required senders and recipients to implement specific additional handling.\n\nFor example, JSON has specification issues around large numbers and objects with duplicate members. Although advice for avoiding these issues is available (e.g., [RFC7493]), it cannot be relied upon.\n\nLikewise, JSON strings are by default Unicode strings, which have a number of potential interoperability issues (e.g., in comparison). Although implementers can be advised to avoid non-ASCII content where unnecessary, this is difficult to enforce.\n\nAnother example is JSON's ability to nest content to arbitrary depths. Since the resulting memory commitment might be unsuitable (e.g., in embedded and other limited server deployments), it's necessary to limit it in some fashion; however, existing JSON implementations have no such limits, and even if a limit is specified, it's likely that some field definition will find a need to violate it.\n\nBecause of JSON's broad adoption and implementation, it is difficult to impose such additional constraints across all implementations; some deployments would fail to enforce them, thereby harming interoperability. In short, if it looks like JSON, people will be tempted to use a JSON parser/serializer on field values.\n\nSince a major goal for Structured Fields is to improve interoperability and simplify implementation, these concerns led to a format that requires a dedicated parser and serializer.\n\nAdditionally, there were widely shared feelings that JSON doesn't \"look right\" in HTTP fields.\n\n---\n\n## Appendix B. Implementation Notes\n\nA generic implementation of this specification should expose the top-level serialize (Section 4.1) and parse (Section 4.2) functions. They need not be functions; for example, it could be implemented as an object, with methods for each of the different top-level types.\n\nFor interoperability, it's important that generic implementations be complete and follow the algorithms closely; see Section 1.1. To aid this, a common test suite is being maintained by the community at .\n\nImplementers should note that Dictionaries and Parameters are order-preserving maps. Some fields may not convey meaning in the ordering of these data types, but it should still be exposed so that it will be available to applications that need to use it.\n\nLikewise, implementations should note that it's important to preserve the distinction between Tokens and Strings. While most programming languages have built-in types that map to the other types well, it may be necessary to create a wrapper \"token\" object or use a parameter on functions to assure that these types remain separate.\n\nThe serialization algorithm is defined in a way that it is not strictly limited to the data types defined in Section 3 in every case. For example, Decimals are designed to take broader input and round to allowed values.\n\nImplementations are allowed to limit the size of different structures, subject to the minimums defined for each type. When a structure exceeds an implementation limit, that structure fails parsing or serialization.\n\n---\n\n## Appendix C. ABNF\n\nThis section uses the Augmented Backus-Naur Form (ABNF) notation [RFC5234] to illustrate the expected syntax of Structured Fields. However, it cannot be used to validate their syntax because it does not capture all requirements.\n\nThis section is non-normative. If there is disagreement between the parsing algorithms and ABNF, the specified algorithms take precedence.\n\n```\nsf-list = list-member *( OWS \",\" OWS list-member )\nlist-member = sf-item / inner-list\n\ninner-list = \"(\" *SP [ sf-item *( 1*SP sf-item ) *SP ] \")\"\n parameters\n\nparameters = *( \";\" *SP parameter )\nparameter = param-key [ \"=\" param-value ]\nparam-key = key\nkey = ( lcalpha / \"*\" )\n *( lcalpha / DIGIT / \"_\" / \"-\" / \".\" / \"*\" )\nlcalpha = %x61-7A ; a-z\nparam-value = bare-item\n\nsf-dictionary = dict-member *( OWS \",\" OWS dict-member )\ndict-member = member-key ( parameters / ( \"=\" member-value ))\nmember-key = key\nmember-value = sf-item / inner-list\n\nsf-item = bare-item parameters\nbare-item = sf-integer / sf-decimal / sf-string / sf-token\n / sf-binary / sf-boolean / sf-date / sf-displaystring\n\nsf-integer = [\"-\"] 1*15DIGIT\nsf-decimal = [\"-\"] 1*12DIGIT \".\" 1*3DIGIT\nsf-string = DQUOTE *( unescaped / \"%\" / bs-escaped ) DQUOTE\nsf-token = ( ALPHA / \"*\" ) *( tchar / \":\" / \"/\" )\nsf-binary = \":\" base64 \":\"\nsf-boolean = \"?\" ( \"0\" / \"1\" )\nsf-date = \"@\" sf-integer\nsf-displaystring = \"%\" DQUOTE *( unescaped / \"\\\" / pct-encoded )\n DQUOTE\n\nbase64 = *( ALPHA / DIGIT / \"+\" / \"/\" ) *\"=\"\n\nunescaped = %x20-21 / %x23-24 / %x26-5B / %x5D-7E\nbs-escaped = \"\\\" ( DQUOTE / \"\\\" )\n\npct-encoded = \"%\" lc-hexdig lc-hexdig\nlc-hexdig = DIGIT / %x61-66 ; 0-9, a-f\n```\n\n---\n\n## Appendix D. Changes from RFC 8941\n\nThis revision of the \"Structured Field Values for HTTP\" specification has made the following changes:\n\n- Added the Date Structured Type. (Section 3.3.7)\n- Stopped encouraging use of ABNF in definitions of new Structured Fields. (Section 2)\n- Moved ABNF to an informative appendix. (Appendix C)\n- Added a \"Structured Type\" column to the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\". (Section 5)\n- Refined parse failure handling. (Section 4.2)\n- Added the Display String Structured Type. (Section 3.3.8)\n\n---\n\n## Acknowledgements\n\nMany thanks to Matthew Kerwin for his detailed feedback and careful consideration during the development of this specification.\n\nThanks also to Ian Clelland, Roy Fielding, Anne van Kesteren, Kazuho Oku, Evert Pot, Julian Reschke, Martin Thomson, Mike West, and Jeffrey Yasskin for their contributions.\n\n---\n\n## Authors' Addresses\n\n**Mark Nottingham**\nCloudflare\nPrahran, VIC\nAustralia\nEMail: [mnot@mnot.net](mailto:mnot@mnot.net)\nURI: [https://www.mnot.net/](https://www.mnot.net/)\n\n**Poul-Henning Kamp**\nThe Varnish Cache Project\nEMail: [phk@varnish-cache.org](mailto:phk@varnish-cache.org)", "znaku_textu": 68089, "slov": 10313, "odkazu": 226, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:06:53", "sha256": "6d383f7f0dde9de46fe541188a134d606455938dec105aa5dd755de36ea3a2c3", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc8941.html", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9651", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc4648.html", "https://www.rfc-editor.org/rfc/rfc3629.html", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/rfc/rfc20.html", "https://www.rfc-editor.org/info/std80", "https://dx.doi.org/10.17487/RFC0020", "https://www.rfc-editor.org/info/rfc20", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://dx.doi.org/10.17487/RFC4648", "https://www.rfc-editor.org/info/rfc4648", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/info/std63", "https://dx.doi.org/10.17487/RFC3629", "https://www.rfc-editor.org/info/rfc3629", "https://www.rfc-editor.org/rfc/rfc7541.html", "https://dx.doi.org/10.17487/RFC7541", "https://www.rfc-editor.org/info/rfc7541", "https://www.rfc-editor.org/rfc/rfc9113.html", "https://dx.doi.org/10.17487/RFC9113", "https://www.rfc-editor.org/info/rfc9113", "https://ieeexplore.ieee.org/document/8766229", "https://dx.doi.org/10.1109/IEEESTD.2019.8766229", "https://www.worldcat.org/search?q=isbn%3A9781504459242", "https://www.rfc-editor.org/rfc/rfc8264.html", "https://dx.doi.org/10.17487/RFC8264", "https://www.rfc-editor.org/info/rfc8264", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "https://www.rfc-editor.org/info/rfc5234", "https://www.rfc-editor.org/rfc/rfc7493.html", "https://dx.doi.org/10.17487/RFC7493", "https://www.rfc-editor.org/info/rfc7493", "https://www.rfc-editor.org/rfc/rfc8259.html", "https://www.rfc-editor.org/info/std90", "https://dx.doi.org/10.17487/RFC8259", "https://www.rfc-editor.org/info/rfc8259", "https://www.unicode.org/reports/tr36/tr36-15.html", "https://www.unicode.org/reports/tr36/", "https://www.mnot.net/"]} {"url": "https://httpwg.org/specs/rfc9729.html", "titulek": "RFC 9729 - The Concealed HTTP Authentication Scheme", "h1": "The Concealed HTTP Authentication Scheme", "popis": "Most HTTP authentication schemes are probeable in the sense that it is possible for an unauthenticated client to probe whether an origin serves resources that require authentication. It is possible for an origin to hide the fact that it requires authentication by not generating Unauthorized status codes; however, that only works with non-cryptographic authentication schemes: cryptographic signatures require a fresh nonce to be signed. Prior to this document, there was no existing way for the origin to share such a nonce without exposing the fact that it serves resources that require authentication. This document defines a new non-probeable cryptographic authentication scheme.", "klicova_slova": "secure, tunnels, masque, http-ng", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9729", "og:description": "The Concealed HTTP Authentication Scheme", "og:url": "https://httpwg.org/specs/rfc9729.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Conventions and Definitions"}, {"uroven": 2, "text": "2. The Concealed HTTP Authentication Scheme"}, {"uroven": 2, "text": "3. Client Handling"}, {"uroven": 3, "text": "3.1. Key Exporter Context"}, {"uroven": 4, "text": "3.1.1. Public Key Encoding"}, {"uroven": 3, "text": "3.2. Key Exporter Output"}, {"uroven": 3, "text": "3.3. Signature Computation"}, {"uroven": 2, "text": "4. Authentication Parameters"}, {"uroven": 3, "text": "4.1. The k Parameter"}, {"uroven": 3, "text": "4.2. The a Parameter"}, {"uroven": 3, "text": "4.3. The p Parameter"}, {"uroven": 3, "text": "4.4. The s Parameter"}, {"uroven": 3, "text": "4.5. The v Parameter"}, {"uroven": 2, "text": "5. Example"}, {"uroven": 2, "text": "6. Server Handling"}, {"uroven": 3, "text": "6.1. Frontend Handling"}, {"uroven": 3, "text": "6.2. Communication Between Frontend and Backend"}, {"uroven": 3, "text": "6.3. Backend Handling"}, {"uroven": 3, "text": "6.4. Non-Probeable Server Handling"}, {"uroven": 2, "text": "7. Requirements on TLS Usage"}, {"uroven": 2, "text": "8. Security Considerations"}, {"uroven": 2, "text": "9. IANA Considerations"}, {"uroven": 3, "text": "9.1. HTTP Authentication Schemes Registry"}, {"uroven": 3, "text": "9.2. TLS Keying Material Exporter Labels"}, {"uroven": 3, "text": "9.3. HTTP Field Name"}, {"uroven": 2, "text": "10. References"}, {"uroven": 3, "text": "10.1. Normative References"}, {"uroven": 3, "text": "10.2. Informative References"}, {"uroven": 2, "text": "Acknowledgments"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nMost HTTP authentication schemes are probeable in the sense that it is possible for an unauthenticated client to probe whether an origin serves resources that require authentication. It is possible for an origin to hide the fact that it requires authentication by not generating Unauthorized status codes; however, that only works with non-cryptographic authentication schemes: cryptographic signatures require a fresh nonce to be signed. Prior to this document, there was no existing way for the origin to share such a nonce without exposing the fact that it serves resources that require authentication. This document defines a new non-probeable cryptographic authentication scheme.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9729](https://www.rfc-editor.org/info/rfc9729).\n\n## Copyright Notice\n\nCopyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Conventions and Definitions\n- 2. The Concealed HTTP Authentication Scheme\n- 3. Client Handling\n - 3.1. Key Exporter Context\n - 3.1.1. Public Key Encoding\n - 3.2. Key Exporter Output\n - 3.3. Signature Computation\n- 4. Authentication Parameters\n - 4.1. The k Parameter\n - 4.2. The a Parameter\n - 4.3. The p Parameter\n - 4.4. The s Parameter\n - 4.5. The v Parameter\n- 5. Example\n- 6. Server Handling\n - 6.1. Frontend Handling\n - 6.2. Communication Between Frontend and Backend\n - 6.3. Backend Handling\n - 6.4. Non-Probeable Server Handling\n- 7. Requirements on TLS Usage\n- 8. Security Considerations\n- 9. IANA Considerations\n - 9.1. HTTP Authentication Schemes Registry\n - 9.2. TLS Keying Material Exporter Labels\n - 9.3. HTTP Field Name\n- 10. References\n - 10.1. Normative References\n - 10.2. Informative References\n- Acknowledgments\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nHTTP authentication schemes (see [Section 11](https://www.rfc-editor.org/rfc/rfc9110.html#section-11) of [HTTP]) allow origins to restrict access for some resources to only authenticated requests. While these schemes commonly involve a challenge where the origin asks the client to provide authentication information, it is possible for clients to send such information unprompted. This is particularly useful in cases where an origin wants to offer a service or capability only to \"those who know\", while all others are given no indication the service or capability exists. Such designs rely on an externally defined mechanism by which keys are distributed. For example, a company might offer remote employee access to company services directly via its website using their employee credentials or offer access to limited special capabilities for specific employees while making discovering (or probing for) such capabilities difficult. As another example, members of less well-defined communities might use more ephemeral keys to acquire access to geography- or capability-specific resources, as issued by an entity whose user base is larger than the available resources can support (by having that entity metering the availability of keys temporally or geographically).\n\nWhile digital-signature-based HTTP authentication schemes already exist (e.g., [HOBA]), they rely on the origin explicitly sending a fresh challenge to the client, to ensure that the signature input is fresh. That makes the origin probeable as it sends the challenge to unauthenticated clients. This document defines a new signature-based authentication scheme that is not probeable.\n\n### 1.1. Conventions and Definitions\n\nThe 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.\n\nThis document uses the notation from [Section 1.3](https://www.rfc-editor.org/rfc/rfc9000.html#section-1.3) of [QUIC].\n\nVarious examples in this document contain long lines that may be folded, as described in [RFC8792].\n\n---\n\n## 2. The Concealed HTTP Authentication Scheme\n\nThis document defines the \"Concealed\" HTTP authentication scheme. It uses asymmetric cryptography. Clients possess a key ID and a public/private key pair, and origin servers maintain a mapping of authorized key IDs to associated public keys.\n\nThe client uses a TLS keying material exporter to generate data to be signed (see Section 3) then sends the signature using the Authorization (or Proxy-Authorization) header field (see [Section 11](https://www.rfc-editor.org/rfc/rfc9110.html#section-11) of [HTTP]). The signature and additional information are exchanged using authentication parameters (see Section 4). Once the server receives these, it can check whether the signature validates against an entry in its database of known keys. The server can then use the validation result to influence its response to the client, for example, by restricting access to certain resources.\n\n---\n\n## 3. Client Handling\n\nWhen a client wishes to use the Concealed HTTP authentication scheme with a request, it *SHALL* compute the authentication proof using a TLS keying material exporter with the following parameters:\n\n- The label is set to \"EXPORTER-HTTP-Concealed-Authentication\".\n- The context is set to the structure described in Section 3.1.\n- The exporter output length is set to 48 bytes (see Section 3.2).\n\nNote that TLS 1.3 keying material exporters are defined in [Section 7.5](https://www.rfc-editor.org/rfc/rfc8446.html#section-7.5) of [TLS], while TLS 1.2 keying material exporters are defined in [KEY-EXPORT].\n\n### 3.1. Key Exporter Context\n\nThe TLS key exporter context is described in Figure 1, using the notation from [Section 1.3](https://www.rfc-editor.org/rfc/rfc9000.html#section-1.3) of [QUIC]:\n\n```\n Signature Algorithm (16),\n Key ID Length (i),\n Key ID (..),\n Public Key Length (i),\n Public Key (..),\n Scheme Length (i),\n Scheme (..),\n Host Length (i),\n Host (..),\n Port (16),\n Realm Length (i),\n Realm (..),\n```\n\nFigure 1: Key Exporter Context Format\n\nThe key exporter context contains the following fields:\n\nSignature Algorithm:\n\nThe signature scheme sent in the s Parameter (see Section 4.4).\n\nKey ID:\n\nThe key ID sent in the k Parameter (see Section 4.1).\n\nPublic Key:\n\nThe public key used by the server to validate the signature provided by the client. Its encoding is described in Section 3.1.1.\n\nScheme:\n\nThe scheme for this request, encoded using the format of the scheme portion of a URI as defined in [Section 3.1](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.1) of [URI].\n\nHost:\n\nThe host for this request, encoded using the format of the host portion of a URI as defined in [Section 3.2.2](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2) of [URI].\n\nPort:\n\nThe port for this request, encoded in network byte order. Note that the port is either included in the URI or is the default port for the scheme in use; see [Section 3.2.3](https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.3) of [URI].\n\nRealm:\n\nThe realm of authentication that is sent in the realm authentication parameter (see [Section 11.5](https://www.rfc-editor.org/rfc/rfc9110.html#section-11.5) of [HTTP]). If the realm authentication parameter is not present, this *SHALL* be empty. This document does not define a means for the origin to communicate a realm to the client. If a client is not configured to use a specific realm, it *SHALL* use an empty realm and *SHALL NOT* send the realm authentication parameter.\n\nThe Signature Algorithm and Port fields are encoded as unsigned 16-bit integers in network byte order. The Key ID, Public Key, Scheme, Host, and Realm fields are length-prefixed strings; they are preceded by a Length field that represents their length in bytes. These length fields are encoded using the variable-length integer encoding from [Section 16](https://www.rfc-editor.org/rfc/rfc9000.html#section-16) of [QUIC] and *MUST* be encoded in the minimum number of bytes necessary.\n\n#### 3.1.1. Public Key Encoding\n\nBoth the \"Public Key\" field of the TLS key exporter context (see above) and the a Parameter (see Section 4.2) carry the same public key. The encoding of the public key is determined by the signature algorithm in use as follows:\n\nRSASSA-PSS algorithms:\n\nThe public key is an RSAPublicKey structure [PKCS1] encoded in DER [X.690]. BER encodings that are not DER *MUST* be rejected.\n\nECDSA algorithms:\n\nThe public key is an UncompressedPointRepresentation structure defined in [Section 4.2.8.2](https://www.rfc-editor.org/rfc/rfc8446.html#section-4.2.8.2) of [TLS], using the curve specified by the SignatureScheme.\n\nEdDSA algorithms:\n\nThe public key is the byte string encoding defined in [EdDSA].\n\nThis document does not define the public key encodings for other algorithms. In order for a SignatureScheme to be usable with the Concealed HTTP authentication scheme, its public key encoding needs to be defined in a corresponding document.\n\n### 3.2. Key Exporter Output\n\nThe key exporter output is 48 bytes long. Of those, the first 32 bytes are part of the input to the signature and the next 16 bytes are sent alongside the signature. This allows the recipient to confirm that the exporter produces the right values. This is described in Figure 2, using the notation from [Section 1.3](https://www.rfc-editor.org/rfc/rfc9000.html#section-1.3) of [QUIC]:\n\n```\n Signature Input (256),\n Verification (128),\n```\n\nFigure 2: Key Exporter Output Format\n\nThe key exporter output contains the following fields:\n\nSignature Input:\n\nThis is part of the data signed using the client's chosen asymmetric private key (see Section 3.3).\n\nVerification:\n\nThe verification is transmitted to the server using the v Parameter (see Section 4.5).\n\n### 3.3. Signature Computation\n\nOnce the Signature Input has been extracted from the key exporter output (see Section 3.2), it is prefixed with static data before being signed. The signature is computed over the concatenation of:\n\n- A string that consists of octet 32 (0x20) repeated 64 times\n- The context string \"HTTP Concealed Authentication\"\n- A single 0 byte that serves as a separator\n- The Signature Input extracted from the key exporter output (see Section 3.2)\n\nFor example, if the Signature Input has all its 32 bytes set to 01, the content covered by the signature (in hexadecimal format) would be:\n\n```\n2020202020202020202020202020202020202020202020202020202020202020\n2020202020202020202020202020202020202020202020202020202020202020\n48545450205369676E61747572652041757468656E7469636174696F6E\n00\n0101010101010101010101010101010101010101010101010101010101010101\n```\n\nFigure 3: Example Content Covered by Signature\n\nThe purpose of this static prefix is to mitigate issues that could arise if authentication asymmetric keys were accidentally reused across protocols (even though this is forbidden, see Section 8). This construction mirrors that of the TLS 1.3 CertificateVerify message defined in [Section 4.4.3](https://www.rfc-editor.org/rfc/rfc8446.html#section-4.4.3) of [TLS].\n\nThe resulting signature is then transmitted to the server using the p Parameter (see Section 4.3).\n\n---\n\n## 4. Authentication Parameters\n\nThis specification defines the following authentication parameters.\n\nAll of the byte sequences below are encoded using base64url (see [Section 5](https://www.rfc-editor.org/rfc/rfc4648.html#section-5) of [BASE64]) without quotes and without padding. In other words, the values of these byte-sequence authentication parameters *MUST NOT* include any characters other than ASCII letters, digits, dash, and underscore.\n\nThe integer below is encoded without a minus and without leading zeroes. In other words, the value of this integer authentication parameter *MUST NOT* include any characters other than digits and *MUST NOT* start with a zero unless the full value is \"0\".\n\nUsing the syntax from [ABNF]:\n\n```\nconcealed-byte-sequence-param-value = *( ALPHA / DIGIT / \"-\" / \"_\" )\nconcealed-integer-param-value = %x31-39 1*4( DIGIT ) / \"0\"\n```\n\nFigure 4: Authentication Parameter Value ABNF\n\n### 4.1. The k Parameter\n\nThe *REQUIRED* \"k\" (key ID) Parameter is a byte sequence that identifies which key the client wishes to use to authenticate. This is used by the backend to point to an entry in a server-side database of known keys (see Section 6.3).\n\n### 4.2. The a Parameter\n\nThe *REQUIRED* \"a\" (public key) Parameter is a byte sequence that specifies the public key used by the server to validate the signature provided by the client. This avoids key confusion issues (see [SEEMS-LEGIT]). The encoding of the public key is described in Section 3.1.1.\n\n### 4.3. The p Parameter\n\nThe *REQUIRED* \"p\" (proof) Parameter is a byte sequence that specifies the proof that the client provides to attest to possessing the credential that matches its key ID.\n\n### 4.4. The s Parameter\n\nThe *REQUIRED* \"s\" (signature scheme) Parameter is an integer that specifies the signature scheme used to compute the proof transmitted in the p Parameter. Its value is an integer between 0 and 65535 inclusive from the IANA \"TLS SignatureScheme\" registry maintained at <[https://www.iana.org/assignments/tls-parameters](https://www.iana.org/assignments/tls-parameters)>.\n\n### 4.5. The v Parameter\n\nThe *REQUIRED* \"v\" (verification) Parameter is a byte sequence that specifies the verification that the client provides to attest to possessing the key exporter output (see Section 3.2 for details). This avoids issues with signature schemes where certain keys can generate signatures that are valid for multiple inputs (see [SEEMS-LEGIT]).\n\n---\n\n## 5. Example\n\nFor example, a client using the key ID \"basement\" and the signature algorithm Ed25519 [ED25519] could produce the following header field:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nAuthorization: Concealed \\\n k=YmFzZW1lbnQ, \\\n a=VGhpcyBpcyBh-HB1YmxpYyBrZXkgaW4gdXNl_GhlcmU, \\\n s=2055, \\\n v=dmVyaWZpY2F0aW9u_zE2Qg, \\\n p=QzpcV2luZG93c_xTeXN0ZW0zMlxkcml2ZXJz-ENyb3dkU\\\n 3RyaWtlXEMtMDAwMDAwMDAyOTEtMD-wMC0w_DAwLnN5cw\n```\n\nFigure 5: Example Header Field\n\n---\n\n## 6. Server Handling\n\nIn this section, we subdivide the server role in two:\n\n- The \"frontend\" runs in the HTTP server that terminates the TLS or QUIC connection created by the client.\n- The \"backend\" runs in the HTTP server that has access to the database of accepted key identifiers and public keys.\n\nIn most deployments, we expect both the frontend and backend roles to be implemented in a single HTTP origin server (as defined in [Section 3.6](https://www.rfc-editor.org/rfc/rfc9110.html#section-3.6) of [HTTP]). However, these roles can be split such that the frontend is an HTTP gateway (as defined in [Section 3.7](https://www.rfc-editor.org/rfc/rfc9110.html#section-3.7) of [HTTP]) and the backend is an HTTP origin server.\n\n### 6.1. Frontend Handling\n\nIf a frontend is configured to check the Concealed HTTP authentication scheme, it will parse the Authorization (or Proxy-Authorization) header field. If the authentication scheme is set to \"Concealed\", the frontend *MUST* validate that all the required authentication parameters are present and can be parsed correctly as defined in Section 4. If any parameter is missing or fails to parse, the frontend *MUST* ignore the entire Authorization (or Proxy-Authorization) header field.\n\nThe frontend then uses the data from these authentication parameters to compute the key exporter output, as defined in Section 3.2. The frontend then shares the header field and the key exporter output with the backend.\n\n### 6.2. Communication Between Frontend and Backend\n\nIf the frontend and backend roles are implemented in the same machine, this can be handled by a simple function call.\n\nIf the roles are split between two separate HTTP servers, then the backend won't be able to directly access the TLS keying material exporter from the TLS connection between the client and frontend, so the frontend needs to explicitly send it. This document defines the \"Concealed-Auth-Export\" request header field for this purpose. The Concealed-Auth-Export header field's value is a Structured Field Byte Sequence (see [Section 3.3.5](https://www.rfc-editor.org/rfc/rfc9651.html#section-3.3.5) of [STRUCTURED-FIELDS]) that contains the 48-byte key exporter output (see Section 3.2), without any parameters. Note that Structured Field Byte Sequences are encoded using the non-URL-safe variant of base64. For example:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nConcealed-Auth-Export: :VGhpc+BleGFtcGxlIFRMU/BleHBvcn\\\n Rlc+BvdXRwdXQ/aXMgNDggYnl0ZXMgI/+h:\n```\n\nFigure 6: Example Concealed-Auth-Export Header Field\n\nThe frontend *SHALL* forward the HTTP request to the backend, including the original unmodified Authorization (or Proxy-Authorization) header field and the newly added Concealed-Auth-Export header field.\n\nNote that, since the security of this mechanism requires the key exporter output to be correct, backends need to trust frontends to send it truthfully. This trust relationship is common because the frontend already needs access to the TLS certificate private key in order to respond to requests. HTTP servers that parse the Concealed-Auth-Export header field *MUST* ignore it unless they have already established that they trust the sender. Similarly, frontends that send the Concealed-Auth-Export header field *MUST* ensure that they do not forward any Concealed-Auth-Export header field received from the client.\n\n### 6.3. Backend Handling\n\nOnce the backend receives the Authorization (or Proxy-Authorization) header field and the key exporter output, it looks up the key ID in its database of public keys. The backend *SHALL* then perform the following checks:\n\n- validate that all the required authentication parameters are present and can be parsed correctly as defined in Section 4\n- ensure the key ID is present in the backend's database and maps to a corresponding public key\n- validate that the public key from the database is equal to the one in the Authorization (or Proxy-Authorization) header field\n- validate that the verification field from the Authorization (or Proxy-Authorization) header field matches the one extracted from the key exporter output\n- verify the cryptographic signature as defined in Section 3.3\n\nIf all of these checks succeed, the backend can consider the request to be properly authenticated and can reply accordingly (the backend can also forward the request to another HTTP server).\n\nIf any of the above checks fail, the backend *MUST* treat it as if the Authorization (or Proxy-Authorization) header field was missing.\n\n### 6.4. Non-Probeable Server Handling\n\nServers that wish to introduce resources whose existence cannot be probed need to ensure that they do not reveal any information about those resources to unauthenticated clients. In particular, such servers *MUST* respond to authentication failures with the exact same response that they would have used for nonexistent resources. For example, this can mean using HTTP status code 404 (Not Found) instead of 401 (Unauthorized).\n\nThe authentication checks described above can take time to compute, and an attacker could detect use of this mechanism if that time is observable by comparing the timing of a request for a known nonexistent resource to the timing of a request for a potentially authenticated resource. Servers can mitigate this observability by slightly delaying responses to some nonexistent resources such that the timing of the authentication verification is not observable. This delay needs to be carefully considered to avoid having the delay itself leak the fact that this origin uses this mechanism at all.\n\nNon-probeable resources also need to be non-discoverable for unauthenticated users. For example, if a server operator wishes to hide an authenticated resource by pretending it does not exist to unauthenticated users, then the server operator needs to ensure there are no unauthenticated pages with links to that resource and no other out-of-band ways for unauthenticated users to discover this resource.\n\n---\n\n## 7. Requirements on TLS Usage\n\nThis authentication scheme is only defined for uses of HTTP with TLS [TLS]. This includes any use of HTTP over TLS as typically used for HTTP/2 [HTTP/2], or HTTP/3 [HTTP/3] where the transport protocol uses TLS as its authentication and key exchange mechanism [QUIC-TLS].\n\nBecause the TLS keying material exporter is only secure for authentication when it is uniquely bound to the TLS session [RFC7627], the Concealed authentication scheme requires either one of the following properties:\n\n- The TLS version in use is greater than or equal to 1.3 [TLS].\n- The TLS version in use is 1.2, and the extended master secret extension [RFC7627] has been negotiated.\n\nClients *MUST NOT* use the Concealed HTTP authentication scheme on connections that do not meet one of the two properties above. If a server receives a request that uses this authentication scheme on a connection that meets neither of the above properties, the server *MUST* treat the request as if the authentication were not present.\n\n---\n\n## 8. Security Considerations\n\nThe Concealed HTTP authentication scheme allows a client to authenticate to an origin server while guaranteeing freshness and without the need for the server to transmit a nonce to the client. This allows the server to accept authenticated clients without revealing that it supports or expects authentication for some resources. It also allows authentication without the client leaking the presence of authentication to observers due to cleartext TLS Client Hello extensions.\n\nSince the freshness described above is provided by a TLS key exporter, it can be as old as the underlying TLS connection. Servers can require better freshness by forcing clients to create new connections using mechanisms such as the GOAWAY frame (see [Section 5.2](https://www.rfc-editor.org/rfc/rfc9114.html#section-5.2) of [HTTP/3]).\n\nThe authentication proofs described in this document are not bound to individual HTTP requests; if the key is used for authentication proofs on multiple requests on the same connection, they will all be identical. This allows for better compression when sending over the wire, but it implies that client implementations that multiplex different security contexts over a single HTTP connection need to ensure that those contexts cannot read each other's header fields. Otherwise, one context would be able to replay the Authorization header field of another. This constraint is met by modern web browsers. If an attacker were to compromise the browser such that it could access another context's memory, the attacker might also be able to access the corresponding key, so binding authentication to requests would not provide much benefit in practice.\n\nAuthentication asymmetric keys used for the Concealed HTTP authentication scheme *MUST NOT* be reused in other protocols. Even though we attempt to mitigate these issues by adding a static prefix to the signed data (see Section 3.3), reusing keys could undermine the security guarantees of the authentication.\n\nOrigins offering this scheme can link requests that use the same key. However, requests are not linkable across origins if the keys used are specific to the individual origins using this scheme.\n\n---\n\n## 9. IANA Considerations\n\n### 9.1. HTTP Authentication Schemes Registry\n\nIANA has registered the following entry in the \"HTTP Authentication Schemes\" registry maintained at <[https://www.iana.org/assignments/http-authschemes](https://www.iana.org/assignments/http-authschemes)>:\n\nAuthentication Scheme Name:\n\nConcealed\n\nReference:\n\nRFC 9729\n\nNotes:\n\nNone\n\n### 9.2. TLS Keying Material Exporter Labels\n\nIANA has registered the following entry in the \"TLS Exporter Labels\" registry maintained at <[https://www.iana.org/assignments/tls-parameters](https://www.iana.org/assignments/tls-parameters)>:\n\nValue:\n\nEXPORTER-HTTP-Concealed-Authentication\n\nDTLS-OK:\n\nN\n\nRecommended:\n\nY\n\nReference:\n\nRFC 9729\n\n### 9.3. HTTP Field Name\n\nIANA has registered the following entry in the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\" maintained at <[https://www.iana.org/assignments/http-fields](https://www.iana.org/assignments/http-fields)>:\n\nField Name:\n\nConcealed-Auth-Export\n\nStatus:\n\npermanent\n\nStructured Type:\n\nItem\n\nReference:\n\nRFC 9729\n\nComments:\n\nNone\n\n## 10. References\n\n### 10.1. Normative References\n\n[ABNF]\n\nCrocker, D., Ed. and P. Overell, “[Augmented BNF for Syntax Specifications: ABNF](https://www.rfc-editor.org/rfc/rfc5234.html)”, [STD 68](https://www.rfc-editor.org/info/std68), RFC 5234, [DOI 10.17487/RFC5234](https://dx.doi.org/10.17487/RFC5234), January 2008, <[https://www.rfc-editor.org/info/rfc5234](https://www.rfc-editor.org/info/rfc5234)>.\n\n[BASE64]\n\nJosefsson, S., “[The Base16, Base32, and Base64 Data Encodings](https://www.rfc-editor.org/rfc/rfc4648.html)”, RFC 4648, [DOI 10.17487/RFC4648](https://dx.doi.org/10.17487/RFC4648), October 2006, <[https://www.rfc-editor.org/info/rfc4648](https://www.rfc-editor.org/info/rfc4648)>.\n\n[EdDSA]\n\nJosefsson, S. and I. Liusvaara, “[Edwards-Curve Digital Signature Algorithm (EdDSA)](https://www.rfc-editor.org/rfc/rfc8032.html)”, RFC 8032, [DOI 10.17487/RFC8032](https://dx.doi.org/10.17487/RFC8032), January 2017, <[https://www.rfc-editor.org/info/rfc8032](https://www.rfc-editor.org/info/rfc8032)>.\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[KEY-EXPORT]\n\nRescorla, E., “[Keying Material Exporters for Transport Layer Security (TLS)](https://www.rfc-editor.org/rfc/rfc5705.html)”, RFC 5705, [DOI 10.17487/RFC5705](https://dx.doi.org/10.17487/RFC5705), March 2010, <[https://www.rfc-editor.org/info/rfc5705](https://www.rfc-editor.org/info/rfc5705)>.\n\n[PKCS1]\n\nMoriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, “[PKCS #1: RSA Cryptography Specifications Version 2.2](https://www.rfc-editor.org/rfc/rfc8017.html)”, RFC 8017, [DOI 10.17487/RFC8017](https://dx.doi.org/10.17487/RFC8017), November 2016, <[https://www.rfc-editor.org/info/rfc8017](https://www.rfc-editor.org/info/rfc8017)>.\n\n[QUIC]\n\nIyengar, J., Ed. and M. Thomson, Ed., “[QUIC: A UDP-Based Multiplexed and Secure Transport](https://www.rfc-editor.org/rfc/rfc9000.html)”, RFC 9000, [DOI 10.17487/RFC9000](https://dx.doi.org/10.17487/RFC9000), May 2021, <[https://www.rfc-editor.org/info/rfc9000](https://www.rfc-editor.org/info/rfc9000)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC7627]\n\nBhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A., Langley, A., and M. Ray, “[Transport Layer Security (TLS) Session Hash and Extended Master Secret Extension](https://www.rfc-editor.org/rfc/rfc7627.html)”, RFC 7627, [DOI 10.17487/RFC7627](https://dx.doi.org/10.17487/RFC7627), September 2015, <[https://www.rfc-editor.org/info/rfc7627](https://www.rfc-editor.org/info/rfc7627)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[RFC8792]\n\nWatsen, K., Auerswald, E., Farrel, A., and Q. Wu, “[Handling Long Lines in Content of Internet-Drafts and RFCs](https://www.rfc-editor.org/rfc/rfc8792.html)”, RFC 8792, [DOI 10.17487/RFC8792](https://dx.doi.org/10.17487/RFC8792), June 2020, <[https://www.rfc-editor.org/info/rfc8792](https://www.rfc-editor.org/info/rfc8792)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc9651.html)”, RFC 9651, [DOI 10.17487/RFC9651](https://dx.doi.org/10.17487/RFC9651), September 2024, <[https://www.rfc-editor.org/info/rfc9651](https://www.rfc-editor.org/info/rfc9651)>.\n\n[TLS]\n\nRescorla, E., “[The Transport Layer Security (TLS) Protocol Version 1.3](https://www.rfc-editor.org/rfc/rfc8446.html)”, RFC 8446, [DOI 10.17487/RFC8446](https://dx.doi.org/10.17487/RFC8446), August 2018, <[https://www.rfc-editor.org/info/rfc8446](https://www.rfc-editor.org/info/rfc8446)>.\n\n[URI]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[https://www.rfc-editor.org/info/rfc3986](https://www.rfc-editor.org/info/rfc3986)>.\n\n[X.690]\n\nITU-T, “[Information technology - ASN.1 encoding Rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)](https://www.itu.int/rec/T-REC-X.690)”, ITU-T Recommendation X690, ISO/IEC 8825-1:2021, February 2021, <[https://www.itu.int/rec/T-REC-X.690](https://www.itu.int/rec/T-REC-X.690)>.\n\n### 10.2. Informative References\n\n[ED25519]\n\nJosefsson, S. and J. Schaad, “[Algorithm Identifiers for Ed25519, Ed448, X25519, and X448 for Use in the Internet X.509 Public Key Infrastructure](https://www.rfc-editor.org/rfc/rfc8410.html)”, RFC 8410, [DOI 10.17487/RFC8410](https://dx.doi.org/10.17487/RFC8410), August 2018, <[https://www.rfc-editor.org/info/rfc8410](https://www.rfc-editor.org/info/rfc8410)>.\n\n[HOBA]\n\nFarrell, S., Hoffman, P., and M. Thomas, “[HTTP Origin-Bound Authentication (HOBA)](https://www.rfc-editor.org/rfc/rfc7486.html)”, RFC 7486, [DOI 10.17487/RFC7486](https://dx.doi.org/10.17487/RFC7486), March 2015, <[https://www.rfc-editor.org/info/rfc7486](https://www.rfc-editor.org/info/rfc7486)>.\n\n[HTTP/2]\n\nThomson, M., Ed. and C. Benfield, Ed., “[HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html)”, RFC 9113, [DOI 10.17487/RFC9113](https://dx.doi.org/10.17487/RFC9113), June 2022, <[https://www.rfc-editor.org/info/rfc9113](https://www.rfc-editor.org/info/rfc9113)>.\n\n[HTTP/3]\n\nBishop, M., Ed., “[HTTP/3](https://www.rfc-editor.org/rfc/rfc9114.html)”, RFC 9114, [DOI 10.17487/RFC9114](https://dx.doi.org/10.17487/RFC9114), June 2022, <[https://www.rfc-editor.org/info/rfc9114](https://www.rfc-editor.org/info/rfc9114)>.\n\n[MASQUE-ORIGINAL]\n\nSchinazi, D., “[The MASQUE Protocol](https://datatracker.ietf.org/doc/html/draft-schinazi-masque-00)”, [Work in Progress](https://datatracker.ietf.org/doc/draft-schinazi-masque), draft-schinazi-masque-00, Work in Progress, February 2019, <[https://datatracker.ietf.org/doc/html/draft-schinazi-masque-00](https://datatracker.ietf.org/doc/html/draft-schinazi-masque-00)>.\n\n[QUIC-TLS]\n\nThomson, M., Ed. and S. Turner, Ed., “[Using TLS to Secure QUIC](https://www.rfc-editor.org/rfc/rfc9001.html)”, RFC 9001, [DOI 10.17487/RFC9001](https://dx.doi.org/10.17487/RFC9001), May 2021, <[https://www.rfc-editor.org/info/rfc9001](https://www.rfc-editor.org/info/rfc9001)>.\n\n[SEEMS-LEGIT]\n\nJackson, D., Cremers, C., Cohn-Gordon, K., and R. Sasse, “[Seems Legit: Automated Analysis of Subtle Attacks on Protocols That Use Signatures](https://doi.org/10.1145/3319535.3339813)”, [DOI 10.1145/3319535.3339813](https://dx.doi.org/10.1145/3319535.3339813), CCS '19: Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pp. 2165-2180, November 2019, <[https://doi.org/10.1145/3319535.3339813](https://doi.org/10.1145/3319535.3339813)>.\n\n---\n\n## Acknowledgments\n\nThe authors would like to thank many members of the IETF community, as this document is the fruit of many hallway conversations. In particular, the authors would like to thank David Benjamin, Reese Enghardt, Nick Harper, Dennis Jackson, Ilari Liusvaara, François Michel, Lucas Pardue, Justin Richer, Ben Schwartz, Martin Thomson, and Chris A. Wood for their reviews and contributions. The mechanism described in this document was originally part of the first iteration of MASQUE [MASQUE-ORIGINAL].\n\n---\n\n## Authors' Addresses\n\n**David Schinazi**\nGoogle LLC\n1600 Amphitheatre Parkway\nMountain View, CA 94043\nUnited States of America\nEMail: [dschinazi.ietf@gmail.com](mailto:dschinazi.ietf@gmail.com)\n\n**David M. Oliver**\nGuardian Project\nEMail: [david@guardianproject.info](mailto:david@guardianproject.info)\nURI: [https://guardianproject.info](https://guardianproject.info)\n\n**Jonathan Hoyland**\nCloudflare Inc.\nEMail: [jonathan.hoyland@gmail.com](mailto:jonathan.hoyland@gmail.com)", "znaku_textu": 33674, "slov": 4469, "odkazu": 190, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:27", "sha256": "1eb6ac1c19dd417402074048a892d3808040f990ad1044298e8f5f41061bbb8e", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9729", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc9000.html", "https://www.rfc-editor.org/rfc/rfc8446.html", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://www.rfc-editor.org/rfc/rfc4648.html", "https://www.iana.org/assignments/tls-parameters", "https://www.rfc-editor.org/rfc/rfc9651.html", "https://www.rfc-editor.org/rfc/rfc9114.html", "https://www.iana.org/assignments/http-authschemes", "https://www.iana.org/assignments/http-fields", "https://www.rfc-editor.org/rfc/rfc5234.html", "https://www.rfc-editor.org/info/std68", "https://dx.doi.org/10.17487/RFC5234", "https://www.rfc-editor.org/info/rfc5234", "https://dx.doi.org/10.17487/RFC4648", "https://www.rfc-editor.org/info/rfc4648", "https://www.rfc-editor.org/rfc/rfc8032.html", "https://dx.doi.org/10.17487/RFC8032", "https://www.rfc-editor.org/info/rfc8032", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/rfc/rfc5705.html", "https://dx.doi.org/10.17487/RFC5705", "https://www.rfc-editor.org/info/rfc5705", "https://www.rfc-editor.org/rfc/rfc8017.html", "https://dx.doi.org/10.17487/RFC8017", "https://www.rfc-editor.org/info/rfc8017", "https://dx.doi.org/10.17487/RFC9000", "https://www.rfc-editor.org/info/rfc9000", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc7627.html", "https://dx.doi.org/10.17487/RFC7627", "https://www.rfc-editor.org/info/rfc7627", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/rfc/rfc8792.html", "https://dx.doi.org/10.17487/RFC8792", "https://www.rfc-editor.org/info/rfc8792", "https://dx.doi.org/10.17487/RFC9651", "https://www.rfc-editor.org/info/rfc9651", "https://dx.doi.org/10.17487/RFC8446", "https://www.rfc-editor.org/info/rfc8446", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "https://www.rfc-editor.org/info/rfc3986", "https://www.itu.int/rec/T-REC-X.690", "https://www.rfc-editor.org/rfc/rfc8410.html", "https://dx.doi.org/10.17487/RFC8410", "https://www.rfc-editor.org/info/rfc8410", "https://www.rfc-editor.org/rfc/rfc7486.html", "https://dx.doi.org/10.17487/RFC7486", "https://www.rfc-editor.org/info/rfc7486", "https://www.rfc-editor.org/rfc/rfc9113.html", "https://dx.doi.org/10.17487/RFC9113", "https://www.rfc-editor.org/info/rfc9113", "https://dx.doi.org/10.17487/RFC9114", "https://www.rfc-editor.org/info/rfc9114", "https://datatracker.ietf.org/doc/html/draft-schinazi-masque-00", "https://datatracker.ietf.org/doc/draft-schinazi-masque", "https://www.rfc-editor.org/rfc/rfc9001.html", "https://dx.doi.org/10.17487/RFC9001", "https://www.rfc-editor.org/info/rfc9001", "https://doi.org/10.1145/3319535.3339813", "https://dx.doi.org/10.1145/3319535.3339813", "https://guardianproject.info/"]} {"url": "https://httpwg.org/specs/rfc9842.html", "titulek": "RFC 9842 - Compression Dictionary Transport", "h1": "Compression Dictionary Transport", "popis": "This document specifies a mechanism for dictionary-based compression in the Hypertext Transfer Protocol (HTTP). By utilizing this technique, clients and servers can reduce the size of transmitted data, leading to improved performance and reduced bandwidth consumption. This document extends existing HTTP compression methods and provides guidelines for the delivery and use of compression dictionaries within the HTTP protocol.", "klicova_slova": "compression dictionary, shared brotli, zstandard dictionary, delta compression", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9842", "og:description": "Compression Dictionary Transport", "og:url": "https://httpwg.org/specs/rfc9842.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Use Cases"}, {"uroven": 4, "text": "1.1.1. Version Upgrade"}, {"uroven": 4, "text": "1.1.2. Common Content"}, {"uroven": 3, "text": "1.2. Notational Conventions"}, {"uroven": 2, "text": "2. Dictionary Negotiation"}, {"uroven": 3, "text": "2.1. Use-As-Dictionary"}, {"uroven": 4, "text": "2.1.1. \"match\""}, {"uroven": 4, "text": "2.1.2. \"match-dest\""}, {"uroven": 4, "text": "2.1.3. \"id\""}, {"uroven": 4, "text": "2.1.4. \"type\""}, {"uroven": 4, "text": "2.1.5. Examples"}, {"uroven": 5, "text": "2.1.5.1. Path Prefix"}, {"uroven": 5, "text": "2.1.5.2. Versioned Directories"}, {"uroven": 3, "text": "2.2. Available-Dictionary"}, {"uroven": 4, "text": "2.2.1. Dictionary Freshness Requirement"}, {"uroven": 4, "text": "2.2.2. Dictionary URL Matching"}, {"uroven": 4, "text": "2.2.3. Multiple Matching Dictionaries"}, {"uroven": 3, "text": "2.3. Dictionary-ID"}, {"uroven": 2, "text": "3. The \"compression-dictionary\" Link Relation Type"}, {"uroven": 2, "text": "4. Dictionary-Compressed Brotli"}, {"uroven": 2, "text": "5. Dictionary-Compressed Zstandard"}, {"uroven": 2, "text": "6. Negotiating the Content Encoding"}, {"uroven": 3, "text": "6.1. Accept-Encoding"}, {"uroven": 3, "text": "6.2. Content-Encoding"}, {"uroven": 2, "text": "7. IANA Considerations"}, {"uroven": 3, "text": "7.1. Content Encoding Registration"}, {"uroven": 3, "text": "7.3. Link Relation Registration"}, {"uroven": 2, "text": "8. Compatibility Considerations"}, {"uroven": 2, "text": "9. Security Considerations"}, {"uroven": 3, "text": "9.1. Changing Content"}, {"uroven": 3, "text": "9.2. Reading Content"}, {"uroven": 3, "text": "9.3. Security Mitigations"}, {"uroven": 4, "text": "9.3.1. Cross-Origin Protection"}, {"uroven": 4, "text": "9.3.2. Response Readability"}, {"uroven": 4, "text": "9.3.3. Server Responsibility"}, {"uroven": 2, "text": "10. Privacy Considerations"}, {"uroven": 2, "text": "11. References"}, {"uroven": 3, "text": "11.1. Normative References"}, {"uroven": 3, "text": "11.2. Informative References"}, {"uroven": 2, "text": "Authors' Addresses"}], "markdown": "---\n\n## Abstract\n\nThis document specifies a mechanism for dictionary-based compression in the Hypertext Transfer Protocol (HTTP). By utilizing this technique, clients and servers can reduce the size of transmitted data, leading to improved performance and reduced bandwidth consumption. This document extends existing HTTP compression methods and provides guidelines for the delivery and use of compression dictionaries within the HTTP protocol.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9842](https://www.rfc-editor.org/info/rfc9842).\n\n## Copyright Notice\n\nCopyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Use Cases\n - 1.1.1. Version Upgrade\n - 1.1.2. Common Content\n - 1.2. Notational Conventions\n- 2. Dictionary Negotiation\n - 2.1. Use-As-Dictionary\n - 2.1.1. \"match\"\n - 2.1.2. \"match-dest\"\n - 2.1.3. \"id\"\n - 2.1.4. \"type\"\n - 2.1.5. Examples\n - 2.2. Available-Dictionary\n - 2.2.1. Dictionary Freshness Requirement\n - 2.2.2. Dictionary URL Matching\n - 2.2.3. Multiple Matching Dictionaries\n - 2.3. Dictionary-ID\n- 3. The \"compression-dictionary\" Link Relation Type\n- 4. Dictionary-Compressed Brotli\n- 5. Dictionary-Compressed Zstandard\n- 6. Negotiating the Content Encoding\n - 6.1. Accept-Encoding\n - 6.2. Content-Encoding\n- 7. IANA Considerations\n - 7.1. Content Encoding Registration\n - 7.2. Header Field Registration\n - 7.3. Link Relation Registration\n- 8. Compatibility Considerations\n- 9. Security Considerations\n - 9.1. Changing Content\n - 9.2. Reading Content\n - 9.3. Security Mitigations\n - 9.3.1. Cross-Origin Protection\n - 9.3.2. Response Readability\n - 9.3.3. Server Responsibility\n- 10. Privacy Considerations\n- 11. References\n - 11.1. Normative References\n - 11.2. Informative References\n- Authors' Addresses\n\n---\n\n## 1. Introduction\n\nThis specification defines a mechanism for using designated HTTP [HTTP] responses as an external dictionary for future HTTP responses for compression schemes that support using external dictionaries (e.g., Brotli [RFC7932] and Zstandard [ZSTD]).\n\nThis document describes the HTTP headers used for negotiating dictionary usage and registers content-encoding values for compressing with Brotli and Zstandard using a negotiated dictionary.\n\nThe negotiation of dictionary usage leverages HTTP's content negotiation (see [Section 12](https://www.rfc-editor.org/rfc/rfc9110.html#section-12) of [HTTP]) and is usable with all versions of HTTP.\n\n### 1.1. Use Cases\n\nAny HTTP response can be specified for use as a compression dictionary for future HTTP requests, which provides a lot of flexibility. Two common use cases that are seen frequently are described below.\n\n#### 1.1.1. Version Upgrade\n\nUsing a previous version of a resource as a dictionary for a newer version enables delivery of a delta-compressed version of the changes, usually resulting in significantly smaller responses than what can be achieved by compression alone.\n\nFor example:\n\nFigure 1: Version Upgrade Example\n\n#### 1.1.2. Common Content\n\nIf several resources share common patterns in their responses, then it can be useful to reference an external dictionary that contains those common patterns, effectively compressing them out of the responses. Some examples of this are common template HTML for similar pages across a site and common keys and values in API calls.\n\nFor example:\n\nFigure 2: Common Content Example\n\n### 1.2. Notational Conventions\n\nThe 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.\n\nThis document uses the following terminology from [Section 3](https://www.rfc-editor.org/rfc/rfc9651.html#section-3) of [STRUCTURED-FIELDS] to specify syntax and parsing: Dictionary, String, Inner List, Token, and Byte Sequence.\n\nThis document uses the line folding strategies described in [FOLDING].\n\nThis document also uses terminology from [HTTP] and [HTTP-CACHING].\n\n---\n\n## 2. Dictionary Negotiation\n\n### 2.1. Use-As-Dictionary\n\nWhen responding to an HTTP Request, a server can advertise that the response can be used as a dictionary for future requests for URLs that match the rules specified in the \"Use-As-Dictionary\" response header.\n\nThe \"Use-As-Dictionary\" response header is a Structured Field [STRUCTURED-FIELDS] Dictionary with values for \"match\", \"match-dest\", \"id\", and \"type\".\n\n#### 2.1.1. \"match\"\n\nThe \"match\" value of the \"Use-As-Dictionary\" response header is a String value that provides the URL Pattern to use for request matching (see [URLPATTERN]).\n\nThe URL Pattern used for matching does not support using regular expressions.\n\nThe following algorithm is used to validate that a given String value is a valid URL Pattern that does not use regular expressions and is for the same Origin ([Section 4.3.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.3.1) of [HTTP]) as the dictionary. It will return TRUE for a valid match pattern and FALSE for an invalid pattern that *MUST NOT* be used.\n\n1. Let MATCH be the value of \"match\" for the given dictionary.\n2. Let URL be the URL of the dictionary request.\n3. Let PATTERN be a \"URL pattern struct\" created by running the steps to \"create a URL pattern\" by setting input=MATCH and baseURL=URL (see [Section 1.4](https://urlpattern.spec.whatwg.org/#high-level-operations) of [URLPATTERN]).\n4. If the result of running the \"has regexp groups\" steps for PATTERN returns TRUE, then return FALSE (see the last list in [Section 1.4](https://urlpattern.spec.whatwg.org/#high-level-operations) of [URLPATTERN]).\n5. Return TRUE.\n\nThe \"match\" value is required and *MUST* be included in the \"Use-As-Dictionary\" response header for the dictionary to be considered valid.\n\nOperating at the HTTP level, the specified match patterns will operate on the percent-encoded version of the URL path (see [Section 2](https://www.rfc-editor.org/rfc/rfc3986.html#section-2) of [URL]).\n\nFor example, the URL \"http://www.example.com/dĂĽsseldorf\" would be encoded as \"http://www.example.com/d%C3%BCsseldorf\" and a relevant match pattern would be:\n\n```\nUse-As-Dictionary: match=\"/d%C3%BCsseldorf\"\n```\n\n#### 2.1.2. \"match-dest\"\n\nThe \"match-dest\" value of the \"Use-As-Dictionary\" response header is an Inner List of String values that provides a list of Fetch request destinations for the dictionary to match (see \"RequestDestination\" in [Section 5.4](https://fetch.spec.whatwg.org/#request-class) of [FETCH]).\n\nAn empty list for \"match-dest\" *MUST* match all destinations.\n\nFor clients that do not support request destinations, the client *MUST* treat it as an empty list and match all destinations.\n\nThe \"match-dest\" value is optional and defaults to an empty list.\n\n#### 2.1.3. \"id\"\n\nThe \"id\" value of the \"Use-As-Dictionary\" response header is a String value that specifies a server identifier for the dictionary. If an \"id\" value is present and has a string length longer than zero, then it *MUST* be sent to the server in a \"Dictionary-ID\" request header when the client sends an \"Available-Dictionary\" request header for the same dictionary (see Section 2.2).\n\nThe server identifier *MUST* be treated as an opaque string by the client.\n\nThe server identifier *MUST NOT* be relied upon by the server to guarantee the contents of the dictionary. The dictionary hash *MUST* be validated before use.\n\nThe \"id\" value string length (after any decoding) supports up to 1024 characters.\n\nThe \"id\" value is optional and defaults to the empty string.\n\n#### 2.1.4. \"type\"\n\nThe \"type\" value of the \"Use-As-Dictionary\" response header is a Token value that describes the file format of the supplied dictionary.\n\n\"raw\" is defined as a dictionary format that represents an unformatted blob of bytes suitable for any compression scheme to use.\n\nIf a client receives a dictionary with a type that it does not understand, it *MUST NOT* use the dictionary.\n\nThe \"type\" value is optional and defaults to \"raw\".\n\n#### 2.1.5. Examples\n\n##### 2.1.5.1. Path Prefix\n\nA response that contained a response header (as shown below) would specify matching any document request for a URL with a path prefix of /product/ on the same Origin ([Section 4.3.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.3.1) of [HTTP]) as the original request:\n\n```\nNOTE: '\\' line wrapping per RFC 8792\n\nUse-As-Dictionary: \\\n match=\"/product/*\", match-dest=(\"document\")\n```\n\n##### 2.1.5.2. Versioned Directories\n\nA response that contained a response header (as shown below) would match any path that starts with \"/app/\" and ends with \"/main.js\":\n\n```\nUse-As-Dictionary: match=\"/app/*/main.js\"\n```\n\n### 2.2. Available-Dictionary\n\nWhen an HTTP client makes a request for a resource for which it has an appropriate dictionary, it can add an \"Available-Dictionary\" request header to the request to indicate to the server that it has a dictionary available to use for compression.\n\nThe \"Available-Dictionary\" request header is a Structured Field [STRUCTURED-FIELDS] Byte Sequence containing the SHA-256 [SHA-256] hash of the contents of a single available dictionary.\n\nThe client *MUST* only send a single \"Available-Dictionary\" request header with a single hash value for the best available match that it has available.\n\nFor example:\n\n```\nAvailable-Dictionary: :pZGm1Av0IEBKARczz7exkNYsZb8LzaMrV7J32a2fFG4=:\n```\n\n#### 2.2.1. Dictionary Freshness Requirement\n\nTo be considered as a match, the dictionary resource *MUST* be either fresh [HTTP-CACHING] or allowed to be served stale (see [RFC5861]).\n\n#### 2.2.2. Dictionary URL Matching\n\nWhen a dictionary is stored as a result of a \"Use-As-Dictionary\" directive, it includes a \"match\" string and an optional \"match-dest\" string that are used to match an outgoing request from a client to the available dictionaries.\n\nTo see if an outbound request matches a given dictionary, the following algorithm will return TRUE for a successful match and FALSE for no-match:\n\n1. If the current client supports request destinations and a \"match-dest\" string was provided with the dictionary: Let DEST be the value of \"match-dest\" for the given dictionary. Let REQUEST_DEST be the value of the destination for the current request. If DEST is not an empty list and if REQUEST_DEST is not in the DEST list of destinations, return FALSE.\n2. Let BASEURL be the URL of the dictionary request.\n3. Let URL represent the URL of the outbound request being checked.\n4. If the Origin of BASEURL and the Origin of URL are not the same, return FALSE (see [Section 4.3.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.3.1) of [HTTP]).\n5. Let MATCH be the value of \"match\" for the given dictionary.\n6. Let PATTERN be a \"URL pattern struct\" created by running the steps to \"create a URL pattern\" by setting input=MATCH and baseURL=URL (see [Section 1.4](https://urlpattern.spec.whatwg.org/#high-level-operations) of [URLPATTERN]).\n7. Return the result of running the \"match\" steps on PATTERN with input=URL, which will check for a match between the request URL and the supplied \"match\" string (see \"Match\" in [Section 1.4](https://urlpattern.spec.whatwg.org/#high-level-operations) of [URLPATTERN]).\n\n#### 2.2.3. Multiple Matching Dictionaries\n\nWhen there are multiple dictionaries that match a given request URL, the client *MUST* pick a single dictionary using the following rules:\n\n1. For clients that support request destinations, a dictionary that specifies and matches a \"match-dest\" takes precedence over a match that does not use a destination.\n2. Given equivalent destination precedence, the dictionary with the longest \"match\" takes precedence.\n3. Given equivalent destination and match length precedence, the most recently fetched dictionary takes precedence.\n\n### 2.3. Dictionary-ID\n\nWhen an HTTP client makes a request for a resource for which it has an appropriate dictionary and the dictionary was stored with a server-provided \"id\" in the \"Use-As-Dictionary\" response header, the client *MUST* echo the stored \"id\" in a \"Dictionary-ID\" request header.\n\nThe \"Dictionary-ID\" request header is a Structured Field [STRUCTURED-FIELDS] String of up to 1024 characters (after any decoding) and *MUST* be identical to the server-provided \"id\".\n\nFor example, given an HTTP response that set a dictionary ID:\n\n```\nUse-As-Dictionary: match=\"/app/*/main.js\", id=\"dictionary-12345\"\n```\n\nA future request that matches the given dictionary will include both the hash and the ID:\n\n```\nAvailable-Dictionary: :pZGm1Av0IEBKARczz7exkNYsZb8LzaMrV7J32a2fFG4=:\nDictionary-ID: \"dictionary-12345\"\n```\n\n---\n\n## 3. The \"compression-dictionary\" Link Relation Type\n\nThis specification defines the \"compression-dictionary\" link relation type [WEB-LINKING] that provides a mechanism for an HTTP response to provide a URL for a compression dictionary that is related to but not directly used by the current HTTP response.\n\nThe \"compression-dictionary\" link relation type indicates that fetching and caching the specified resource is likely to be beneficial for future requests. The response to some of those future requests likely have the ability to use the indicated resource as a compression dictionary.\n\nClients can fetch the provided resource at a time that they determine would be appropriate.\n\nThe response to the fetch for the compression dictionary needs to include a \"Use-As-Dictionary\" response header and a caching response header for it to be usable as a compression dictionary. The link relation only provides the mechanism for triggering the fetch of the dictionary.\n\nThe following example shows a link to a resource at https://example.org/dict.dat that is expected to produce a compression dictionary:\n\n```\nLink: ; rel=\"compression-dictionary\"\n```\n\n---\n\n## 4. Dictionary-Compressed Brotli\n\nThe \"dcb\" content encoding identifies a resource that is a \"Dictionary-Compressed Brotli\" stream.\n\nA \"Dictionary-Compressed Brotli\" stream has a fixed header that is followed by a Shared Brotli [SHARED-BROTLI] stream. The header consists of a fixed 4-byte sequence and a 32-byte hash of the external dictionary that was used. The Shared Brotli stream is created using the referenced external dictionary and a compression window that is at most 16 MB in size.\n\nThe dictionary used for the \"dcb\" content encoding is a \"raw\" dictionary type as defined in Section 2.1.4 and is treated as a prefix dictionary as defined in [Section 8.2](https://www.rfc-editor.org/rfc/rfc9841.html#section-8.2) of [SHARED-BROTLI].\n\nThe 36-byte fixed header is as follows:\n\nMagic_Number:\n\n4 fixed bytes -- 0xff, 0x44, 0x43, 0x42.\n\nSHA_256_Hash:\n\n32 bytes. SHA-256 hash digest of the dictionary [SHA-256].\n\nClients that announce support for dcb content encoding *MUST* be able to decompress resources that were compressed with a window size of up to 16 MB.\n\nWith Brotli compression, the full dictionary is available during compression and decompression independent of the compression window, allowing for delta-compression of resources larger than the compression window.\n\n---\n\n## 5. Dictionary-Compressed Zstandard\n\nThe \"dcz\" content encoding identifies a resource that is a \"Dictionary-Compressed Zstandard\" stream.\n\nA \"Dictionary-Compressed Zstandard\" stream is a binary stream that starts with a 40-byte fixed header and is followed by a Zstandard [ZSTD] stream of the response that has been compressed with an external dictionary.\n\nThe dictionary used for the \"dcz\" content encoding is a \"raw\" dictionary type as defined in Section 2.1.4 and is treated as a raw dictionary as per [Section 5](https://www.rfc-editor.org/rfc/rfc8878.html#section-5) of [ZSTD].\n\nThe 40-byte header consists of a fixed 8-byte sequence followed by the 32-byte SHA-256 hash of the external dictionary that was used to compress the resource:\n\nMagic_Number:\n\n8 fixed bytes -- 0x5e, 0x2a, 0x4d, 0x18, 0x20, 0x00, 0x00, 0x00.\n\nSHA_256_Hash:\n\n32 bytes. SHA-256 hash digest of the dictionary [SHA-256].\n\nThe 40-byte header is a Zstandard skippable frame (little-endian 0x184D2A5E) with a 32-byte length (little-endian 0x00000020) that is compatible with existing Zstandard decoders.\n\nClients that announce support for dcz content encoding *MUST* be able to decompress resources that were compressed with a window size of at least 8 MB or 1.25 times the size of the dictionary, whichever is greater, up to a maximum of 128 MB.\n\nThe window size used will be encoded in the content (currently, this can be expressed in powers of two only) and it *MUST* be lower than this limit. An implementation *MAY* treat a window size that exceeds the limit as a decoding error.\n\nWith Zstandard compression, the full dictionary is available during compression and decompression until the size of the input exceeds the compression window. Beyond that point, the dictionary becomes unavailable. Using a compression window that is 1.25 times the size of the dictionary allows for full delta compression of resources that have grown by 25% between releases while still giving the client control over the memory it will need to allocate for a given response.\n\n---\n\n## 6. Negotiating the Content Encoding\n\nWhen a compression dictionary is available to compress the response to a given request, the encoding to be used is negotiated through the regular mechanism for negotiating content encoding in HTTP through the \"Accept-Encoding\" request header and \"Content-Encoding\" response header.\n\nThe dictionary to use is negotiated separately and advertised in the \"Available-Dictionary\" request header.\n\n### 6.1. Accept-Encoding\n\nWhen a dictionary is available for use on a given request and the client chooses to make dictionary-based content encoding available, the client adds the dictionary-aware content encodings that it supports to the \"Accept-Encoding\" request header. For example:\n\n```\nAccept-Encoding: gzip, deflate, br, zstd, dcb, dcz\n```\n\nWhen a client does not have a stored dictionary that matches the request or chooses not to use one for the request, the client *MUST NOT* send its dictionary-aware content encodings in the \"Accept-Encoding\" request header.\n\n### 6.2. Content-Encoding\n\nIf a server supports one of the dictionary encodings advertised by the client and chooses to compress the content of the response using the dictionary that the client has advertised, then it sets the \"Content-Encoding\" response header to the appropriate value for the algorithm selected. For example:\n\n```\nContent-Encoding: dcb\n```\n\nIf the response is cacheable, it *MUST* include a \"Vary\" header to prevent caches from serving dictionary-compressed resources to clients that don't support them or serving the response compressed with the wrong dictionary. For example:\n\n```\nVary: accept-encoding, available-dictionary\n```\n\n---\n\n## 7. IANA Considerations\n\n### 7.1. Content Encoding Registration\n\nIANA has added the following entries to the \"HTTP Content Coding Registry\" maintained at <[https://www.iana.org/assignments/http-parameters/](https://www.iana.org/assignments/http-parameters/)>:\n\nName:\n\ndcb\n\nDescription:\n\n\"Dictionary-Compressed Brotli\" data format.\n\nReference:\n\nRFC 9842, Section 4\n\nName:\n\ndcz\n\nDescription:\n\n\"Dictionary-Compressed Zstandard\" data format.\n\nReference:\n\nRFC 9842, Section 5\n\n### 7.3. Link Relation Registration\n\nIANA has added the following entry to the \"Link Relation Types\" registry maintained at <[https://www.iana.org/assignments/link-relations/](https://www.iana.org/assignments/link-relations/)>:\n\nRelation Name:\n\ncompression-dictionary\n\nDescription:\n\nRefers to a compression dictionary used for content encoding.\n\nReference:\n\nRFC 9842, Section 3\n\n---\n\n## 8. Compatibility Considerations\n\nIt is not unusual for devices to be on the network path that intercept, inspect, and process HTTP requests (web proxies, firewalls, intrusion detection systems, etc.). To minimize the risk of these devices incorrectly processing dictionary-compressed responses, compression dictionary transport *MUST* only be used in secure contexts (HTTPS).\n\n---\n\n## 9. Security Considerations\n\nThe security considerations for Brotli [RFC7932], Shared Brotli [SHARED-BROTLI], and Zstandard [ZSTD] apply to the dictionary-based versions of the respective algorithms.\n\n### 9.1. Changing Content\n\nThe dictionary must be treated with the same security precautions as the content because a change to the dictionary can result in a change to the decompressed content.\n\nThe dictionary is validated using an SHA-256 hash of the content to make sure that the client and server are both using the same dictionary. The strength of the SHA-256 hash algorithm isn't explicitly needed to counter attacks since the dictionary is being served from the same origin as the content. That said, if a weakness is discovered in SHA-256 and it is determined that the dictionary negotiation should use a different hash algorithm, the \"Use-As-Dictionary\" response header can be extended to specify a different algorithm and the server would just ignore any \"Available-Dictionary\" requests that do not use the updated hash.\n\n### 9.2. Reading Content\n\nThe compression attacks in [Section 2.6](https://www.rfc-editor.org/rfc/rfc7457.html#section-2.6) of [RFC7457] show that it's a bad idea to compress data from mixed (e.g., public and private) sources. The data sources include not only the compressed data but also the dictionaries. For example, if secret cookies are compressed using a public-data-only dictionary, information about the cookies is still leaked.\n\nThe dictionary can reveal information about the compressed data and vice versa. That is, data compressed with the dictionary can reveal contents of the dictionary when an adversary can control parts of the data to compress and see the compressed size. On the other hand, if the adversary can control the dictionary, the adversary can learn information about the compressed data.\n\n### 9.3. Security Mitigations\n\nIf any of the mitigations do not pass, the client *MUST* drop the response and return an error.\n\n#### 9.3.1. Cross-Origin Protection\n\nTo make sure that a dictionary can only impact content from the same origin where the dictionary was served, the URL Pattern used for matching a dictionary to requests (Section 2.1.1) is guaranteed to be for the same origin that the dictionary is served from.\n\n#### 9.3.2. Response Readability\n\nFor clients, like web browsers, that provide additional protection against the readability of the payload of a response and against user tracking, additional protections *MUST* be taken to make sure that the use of dictionary-based compression does not reveal information that would not otherwise be available.\n\nIn these cases, dictionary compression *MUST* only be used when both the dictionary and the compressed response are fully readable by the client.\n\nIn browser terms, that means either the dictionary and compressed response are same-origin to the context they are being fetched from or the response is cross-origin and passes the Cross-Origin Resource Sharing (CORS) check (see [Section 4.9](https://fetch.spec.whatwg.org/#cors-check) of [FETCH]).\n\n#### 9.3.3. Server Responsibility\n\nAs with any usage of compressed content in a secure context, a potential timing attack exists if the attacker can control any part of the dictionary or if it can read the dictionary and control any part of the content being compressed while performing multiple requests that vary the dictionary or injected content. Under such an attack, the changing size or processing time of the response reveals information about the content, which might be sufficient to read the supposedly secure response.\n\nIn general, a server can mitigate such attacks by preventing variations per request, as in preventing active use of multiple dictionaries for the same content, disabling compression when any portion of the content comes from uncontrolled sources, and securing access and control over the dictionary content in the same way as the response content. In addition, the following requirements on a server are intended to disable dictionary-aware compression when the client provides CORS request header fields that indicate a cross-origin request context.\n\nThe following algorithm will return FALSE for cross-origin requests where precautions such as not using dictionary-based compression should be considered:\n\n1. If there is no \"Sec-Fetch-Site\" request header, return TRUE.\n2. If the value of the \"Sec-Fetch-Site\" request header is \"same-origin\", return TRUE.\n3. If there is no \"Sec-Fetch-Mode\" request header, return TRUE.\n4. If the value of the \"Sec-Fetch-Mode\" request header is \"navigate\" or \"same-origin\", return TRUE.\n5. If the value of the \"Sec-Fetch-Mode\" request header is \"cors\": If the response does not include an \"Access-Control-Allow-Origin\" response header, return FALSE. If the request does not include an \"Origin\" request header, return FALSE. If the value of the \"Access-Control-Allow-Origin\" response header is \"*\", return TRUE. If the value of the \"Access-Control-Allow-Origin\" response header matches the value of the \"Origin\" request header, return TRUE.\n6. Return FALSE.\n\n---\n\n## 10. Privacy Considerations\n\nSince dictionaries are advertised in future requests using the hash of the content of the dictionary, it is possible to abuse the dictionary to turn it into a tracking cookie.\n\nTo mitigate any additional tracking concerns, clients *MUST* treat dictionaries in the same way that they treat cookies [RFC6265]. This includes partitioning the storage using partitioning similar to or stricter than the partitioning used for cookies, as well as clearing the dictionaries whenever cookies are cleared.\n\n## 11. References\n\n### 11.1. Normative References\n\n[FETCH]\n\nWHATWG, “[Fetch Standard](https://fetch.spec.whatwg.org/)”, WHATWG Living Standard, <[https://fetch.spec.whatwg.org/](https://fetch.spec.whatwg.org/)>.\nCommit snapshot: <[https://fetch.spec.whatwg.org/commit-snapshots/5a9680638ebfc2b3b7f4efb2bef0b579a2663951/](https://fetch.spec.whatwg.org/commit-snapshots/5a9680638ebfc2b3b7f4efb2bef0b579a2663951/)>\n\n[FOLDING]\n\nWatsen, K., Auerswald, E., Farrel, A., and Q. Wu, “[Handling Long Lines in Content of Internet-Drafts and RFCs](https://www.rfc-editor.org/rfc/rfc8792.html)”, RFC 8792, [DOI 10.17487/RFC8792](https://dx.doi.org/10.17487/RFC8792), June 2020, <[https://www.rfc-editor.org/info/rfc8792](https://www.rfc-editor.org/info/rfc8792)>.\n\n[HTTP-CACHING]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html)”, [STD 98](https://www.rfc-editor.org/info/std98), RFC 9111, [DOI 10.17487/RFC9111](https://dx.doi.org/10.17487/RFC9111), June 2022, <[https://www.rfc-editor.org/info/rfc9111](https://www.rfc-editor.org/info/rfc9111)>.\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[SHA-256]\n\nEastlake 3rd, D. and T. Hansen, “[US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)](https://www.rfc-editor.org/rfc/rfc6234.html)”, RFC 6234, [DOI 10.17487/RFC6234](https://dx.doi.org/10.17487/RFC6234), May 2011, <[https://www.rfc-editor.org/info/rfc6234](https://www.rfc-editor.org/info/rfc6234)>.\n\n[SHARED-BROTLI]\n\nAlakuijala, J., Duong, T., Kliuchnikov, E., Szabadka, Z., and L. Vandevenne, Ed., “[Shared Brotli Compressed Data Format](https://www.rfc-editor.org/rfc/rfc9841.html)”, RFC 9841, [DOI 10.17487/RFC9841](https://dx.doi.org/10.17487/RFC9841), September 2025, <[https://www.rfc-editor.org/info/rfc9841](https://www.rfc-editor.org/info/rfc9841)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc9651.html)”, RFC 9651, [DOI 10.17487/RFC9651](https://dx.doi.org/10.17487/RFC9651), September 2024, <[https://www.rfc-editor.org/info/rfc9651](https://www.rfc-editor.org/info/rfc9651)>.\n\n[URLPATTERN]\n\nWHATWG, “[URL Pattern Standard](https://urlpattern.spec.whatwg.org/)”, WHATWG Living Standard, <[https://urlpattern.spec.whatwg.org/](https://urlpattern.spec.whatwg.org/)>.\nCommit snapshot: <[https://urlpattern.spec.whatwg.org/commit-snapshots/696b4029d52e5854044bac6b72cdb198cb962ed0/](https://urlpattern.spec.whatwg.org/commit-snapshots/696b4029d52e5854044bac6b72cdb198cb962ed0/)>\n\n[URL]\n\nBerners-Lee, T., Fielding, R., and L. Masinter, “[Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986.html)”, [STD 66](https://www.rfc-editor.org/info/std66), RFC 3986, [DOI 10.17487/RFC3986](https://dx.doi.org/10.17487/RFC3986), January 2005, <[https://www.rfc-editor.org/info/rfc3986](https://www.rfc-editor.org/info/rfc3986)>.\n\n[WEB-LINKING]\n\nNottingham, M., “[Web Linking](https://www.rfc-editor.org/rfc/rfc8288.html)”, RFC 8288, [DOI 10.17487/RFC8288](https://dx.doi.org/10.17487/RFC8288), October 2017, <[https://www.rfc-editor.org/info/rfc8288](https://www.rfc-editor.org/info/rfc8288)>.\n\n[ZSTD]\n\nCollet, Y. and M. Kucherawy, Ed., “[Zstandard Compression and the 'application/zstd' Media Type](https://www.rfc-editor.org/rfc/rfc8878.html)”, RFC 8878, [DOI 10.17487/RFC8878](https://dx.doi.org/10.17487/RFC8878), February 2021, <[https://www.rfc-editor.org/info/rfc8878](https://www.rfc-editor.org/info/rfc8878)>.\n\n### 11.2. Informative References\n\n[RFC5861]\n\nNottingham, M., “[HTTP Cache-Control Extensions for Stale Content](https://www.rfc-editor.org/rfc/rfc5861.html)”, RFC 5861, [DOI 10.17487/RFC5861](https://dx.doi.org/10.17487/RFC5861), May 2010, <[https://www.rfc-editor.org/info/rfc5861](https://www.rfc-editor.org/info/rfc5861)>.\n\n[RFC6265]\n\nBarth, A., “[HTTP State Management Mechanism](https://www.rfc-editor.org/rfc/rfc6265.html)”, RFC 6265, [DOI 10.17487/RFC6265](https://dx.doi.org/10.17487/RFC6265), April 2011, <[https://www.rfc-editor.org/info/rfc6265](https://www.rfc-editor.org/info/rfc6265)>.\n\n[RFC7457]\n\nSheffer, Y., Holz, R., and P. Saint-Andre, “[Summarizing Known Attacks on Transport Layer Security (TLS) and Datagram TLS (DTLS)](https://www.rfc-editor.org/rfc/rfc7457.html)”, RFC 7457, [DOI 10.17487/RFC7457](https://dx.doi.org/10.17487/RFC7457), February 2015, <[https://www.rfc-editor.org/info/rfc7457](https://www.rfc-editor.org/info/rfc7457)>.\n\n[RFC7932]\n\nAlakuijala, J. and Z. Szabadka, “[Brotli Compressed Data Format](https://www.rfc-editor.org/rfc/rfc7932.html)”, RFC 7932, [DOI 10.17487/RFC7932](https://dx.doi.org/10.17487/RFC7932), July 2016, <[https://www.rfc-editor.org/info/rfc7932](https://www.rfc-editor.org/info/rfc7932)>.\n\n---\n\n## Authors' Addresses\n\n**Patrick Meenan** (editor)\nGoogle LLC\nEMail: [pmeenan@google.com](mailto:pmeenan@google.com)\n\n**Yoav Weiss** (editor)\nShopify Inc.\nEMail: [yoav.weiss@shopify.com](mailto:yoav.weiss@shopify.com)", "znaku_textu": 32385, "slov": 4441, "odkazu": 186, "kodovani": "windows-1250", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:11", "sha256": "f8303a2936490473f03ea1deae82d153fb63c145d2d3cd611607df0fa9d7e23d", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9842", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc9651.html", "https://urlpattern.spec.whatwg.org/", "https://www.rfc-editor.org/rfc/rfc3986.html", "https://fetch.spec.whatwg.org/", "https://www.rfc-editor.org/rfc/rfc9841.html", "https://www.rfc-editor.org/rfc/rfc8878.html", "https://www.iana.org/assignments/http-parameters/", "https://www.iana.org/assignments/http-fields/", "https://www.iana.org/assignments/link-relations/", "https://www.rfc-editor.org/rfc/rfc7457.html", "https://fetch.spec.whatwg.org/commit-snapshots/5a9680638ebfc2b3b7f4efb2bef0b579a2663951/", "https://www.rfc-editor.org/rfc/rfc8792.html", "https://dx.doi.org/10.17487/RFC8792", "https://www.rfc-editor.org/info/rfc8792", "https://www.rfc-editor.org/rfc/rfc9111.html", "https://www.rfc-editor.org/info/std98", "https://dx.doi.org/10.17487/RFC9111", "https://www.rfc-editor.org/info/rfc9111", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://www.rfc-editor.org/rfc/rfc6234.html", "https://dx.doi.org/10.17487/RFC6234", "https://www.rfc-editor.org/info/rfc6234", "https://dx.doi.org/10.17487/RFC9841", "https://www.rfc-editor.org/info/rfc9841", "https://dx.doi.org/10.17487/RFC9651", "https://www.rfc-editor.org/info/rfc9651", "https://urlpattern.spec.whatwg.org/commit-snapshots/696b4029d52e5854044bac6b72cdb198cb962ed0/", "https://www.rfc-editor.org/info/std66", "https://dx.doi.org/10.17487/RFC3986", "https://www.rfc-editor.org/info/rfc3986", "https://www.rfc-editor.org/rfc/rfc8288.html", "https://dx.doi.org/10.17487/RFC8288", "https://www.rfc-editor.org/info/rfc8288", "https://dx.doi.org/10.17487/RFC8878", "https://www.rfc-editor.org/info/rfc8878", "https://www.rfc-editor.org/rfc/rfc5861.html", "https://dx.doi.org/10.17487/RFC5861", "https://www.rfc-editor.org/info/rfc5861", "https://www.rfc-editor.org/rfc/rfc6265.html", "https://dx.doi.org/10.17487/RFC6265", "https://www.rfc-editor.org/info/rfc6265", "https://dx.doi.org/10.17487/RFC7457", "https://www.rfc-editor.org/info/rfc7457", "https://www.rfc-editor.org/rfc/rfc7932.html", "https://dx.doi.org/10.17487/RFC7932", "https://www.rfc-editor.org/info/rfc7932"]} {"url": "https://httpwg.org/specs/rfc9875.html", "titulek": "RFC 9875 - HTTP Cache Groups", "h1": "HTTP Cache Groups", "popis": "This specification introduces a means of describing the relationships between stored responses in HTTP caches, grouping them by associating a stored response with one or more strings.", "klicova_slova": "HTTP, Caching, Invalidation", "kanonicka": "", "jazyk": "en", "robots_meta": "", "og": {"og:type": "article", "og:title": "RFC9875", "og:description": "HTTP Cache Groups", "og:url": "https://httpwg.org/specs/rfc9875.html", "og:site_name": "IETF HTTP Working Group Specifications", "og:image": "https://httpwg.org/assets/favicon/apple-icon-180x180.png"}, "jsonld": [], "drobecky": [], "osnova": [{"uroven": 2, "text": "Abstract"}, {"uroven": 2, "text": "Status of This Memo"}, {"uroven": 2, "text": "Copyright Notice"}, {"uroven": 2, "text": "1. Introduction"}, {"uroven": 3, "text": "1.1. Notational Conventions"}, {"uroven": 2, "text": "2. The Cache-Groups Response Header Field"}, {"uroven": 3, "text": "2.1. Identifying Grouped Responses"}, {"uroven": 3, "text": "2.2. Cache Behaviour"}, {"uroven": 4, "text": "2.2.1. Invalidation"}, {"uroven": 2, "text": "3. The Cache-Group-Invalidation Response Header Field"}, {"uroven": 2, "text": "4. IANA Considerations"}, {"uroven": 2, "text": "5. Security Considerations"}, {"uroven": 2, "text": "6. References"}, {"uroven": 3, "text": "6.1. Normative References"}, {"uroven": 3, "text": "6.2. Informative References"}, {"uroven": 2, "text": "Acknowledgements"}, {"uroven": 2, "text": "Author's Address"}], "markdown": "---\n\n## Abstract\n\nThis specification introduces a means of describing the relationships between stored responses in HTTP caches, grouping them by associating a stored response with one or more strings.\n\n## Status of This Memo\n\nThis is an Internet Standards Track document.\n\nThis document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in [Section 2 of RFC 7841](https://www.rfc-editor.org/rfc/rfc7841.html#section-2).\n\nInformation 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/rfc9875](https://www.rfc-editor.org/info/rfc9875).\n\n## Copyright Notice\n\nCopyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved.\n\nThis document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents ([https://trustee.ietf.org/license-info](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.\n\n- 1. Introduction\n - 1.1. Notational Conventions\n- 2. The Cache-Groups Response Header Field\n - 2.1. Identifying Grouped Responses\n - 2.2. Cache Behaviour\n - 2.2.1. Invalidation\n- 3. The Cache-Group-Invalidation Response Header Field\n- 4. IANA Considerations\n- 5. Security Considerations\n- 6. References\n - 6.1. Normative References\n - 6.2. Informative References\n- Acknowledgements\n- Author's Address\n\n---\n\n## 1. Introduction\n\nHTTP caching [HTTP-CACHING] operates at the granularity of a single resource; the freshness of one stored response does not affect that of others. This granularity can make caching more efficient -- for example, when a page is composed of many assets that have different requirements for caching.\n\nHowever, there are also cases where the relationship between stored responses could be used to improve cache efficiency.\n\nFor example, it is often necessary to invalidate a set of related resources. This might be because a state-changing request has side effects on other resources, or it might be purely for administrative convenience (e.g., \"invalidate this part of the site\"). Grouping responses together provides a dedicated way to express these relationships, instead of relying on things like URL structure.\n\nIn addition to sharing invalidation events, the relationships indicated by grouping can also be used by caches to optimise their operation (e.g., to inform the operation of cache eviction algorithms).\n\nSection 2 introduces a means of describing the relationships between stored responses in HTTP caches, by associating those responses with one or more groups that reflect those relationships. It also describes how caches can use that information to apply invalidation events to members of a group.\n\nSection 3 introduces one new source of such events: an HTTP response header field that allows a state-changing response to trigger a group invalidation.\n\nThese mechanisms operate within a single cache, across the stored responses associated with a single origin server (see Section 2.1). They do not address the issues of synchronising state between multiple caches (e.g., in a hierarchy or mesh), nor do they facilitate association of stored responses from disparate origins.\n\n### 1.1. Notational Conventions\n\nThe 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.\n\nThis specification uses the following terminology from [STRUCTURED-FIELDS]: List, String, and Parameter.\n\n---\n\n## 2. The Cache-Groups Response Header Field\n\nThe Cache-Groups response header field is a List of Strings (Sections [3.1](https://www.rfc-editor.org/rfc/rfc9651.html#section-3.1) and [3.3.3](https://www.rfc-editor.org/rfc/rfc9651.html#section-3.3.3) of [STRUCTURED-FIELDS]). Each member of the List is a value that identifies a group that the response belongs to. These Strings are opaque -- while they might have some meaning to the server that creates them, the cache does not have any insight into their structure or content (beyond uniquely identifying a group).\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/javascript\nCache-Control: max-age=3600\nCache-Groups: \"scripts\"\n```\n\nThe ordering of members is not significant. Unrecognised Parameters are to be ignored.\n\nImplementations *MUST* support at least 32 groups in a field value, with up to at least 32 characters in each member. Note that generic limitations on HTTP field lengths may constrain the size of this field value in practice.\n\n### 2.1. Identifying Grouped Responses\n\nTwo responses stored in the same cache are considered to belong to the same group when all of the following conditions are met:\n\n1. They both contain a Cache-Groups response header field that contains the same String (in any position in the List), when compared character-by-character (case sensitive).\n2. They both share the same URI origin (per [Section 4.3.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-4.3.1) of [HTTP]).\n\n### 2.2. Cache Behaviour\n\n#### 2.2.1. Invalidation\n\nA cache that invalidates a stored response *MAY* invalidate any stored responses that share groups (per Section 2.1) with that response. Note that further grouped invalidations are not triggered by a grouped invalidation; i.e., this mechanism does not cascade.\n\nCache extensions can explicitly strengthen the requirement above. For example, a targeted cache control header field [TARGETED] might specify that caches processing it are required to invalidate such responses.\n\n---\n\n## 3. The Cache-Group-Invalidation Response Header Field\n\nThe Cache-Group-Invalidation response header field is a List of Strings (Sections [3.1](https://www.rfc-editor.org/rfc/rfc9651.html#section-3.1) and [3.3.3](https://www.rfc-editor.org/rfc/rfc9651.html#section-3.3.3) of [STRUCTURED-FIELDS]). Each member of the List is a value that identifies a group that the response invalidates, per Section 2.2.1.\n\nFor example, following a POST request that has side effects on two cache groups, the corresponding response could indicate that stored responses associated with either or both of those groups should be invalidated with:\n\n```\nHTTP/1.1 200 OK\nContent-Type: text/html\nCache-Group-Invalidation: \"eurovision-results\", \"australia\"\n```\n\nThe Cache-Group-Invalidation header field *MUST* be ignored on responses to requests that have a safe method (e.g., GET; see [Section 9.2.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.1) of [HTTP]).\n\nA cache that receives a Cache-Group-Invalidation header field on a response to an unsafe request *MAY* invalidate any stored responses that share groups (per Section 2.1) with any of the listed groups.\n\nCache extensions can explicitly strengthen the requirement above. For example, a targeted cache control header field [TARGETED] might specify that caches processing it are required to respect the Cache-Group-Invalidation signal.\n\nThe ordering of members is not significant. Unrecognised Parameters are to be ignored.\n\nImplementations *MUST* support at least 32 groups in a field value, with up to at least 32 characters in each member. Note that generic limitations on HTTP field lengths may constrain the size of this field value in practice.\n\n---\n\n## 4. IANA Considerations\n\nIANA has added the following entries to the \"Hypertext Transfer Protocol (HTTP) Field Name Registry\":\n\nField Name:\n\nCache-Groups\n\nStatus:\n\npermanent\n\nReference:\n\nRFC 9875\n\nField Name:\n\nCache-Group-Invalidation\n\nStatus:\n\npermanent\n\nReference:\n\nRFC 9875\n\n---\n\n## 5. Security Considerations\n\nThis mechanism allows resources that share an origin to invalidate each other. Because of this, origins that represent multiple parties (sometimes referred to as \"shared hosting\") might allow one party to group its resources with those of others or to send signals that have side effects upon them.\n\nShared hosts that wish to mitigate these risks can control access to the header fields defined in this specification.\n\n## 6. References\n\n### 6.1. Normative References\n\n[HTTP-CACHING]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Caching](https://www.rfc-editor.org/rfc/rfc9111.html)”, [STD 98](https://www.rfc-editor.org/info/std98), RFC 9111, [DOI 10.17487/RFC9111](https://dx.doi.org/10.17487/RFC9111), June 2022, <[https://www.rfc-editor.org/info/rfc9111](https://www.rfc-editor.org/info/rfc9111)>.\n\n[HTTP]\n\nFielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., “[HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html)”, [STD 97](https://www.rfc-editor.org/info/std97), RFC 9110, [DOI 10.17487/RFC9110](https://dx.doi.org/10.17487/RFC9110), June 2022, <[https://www.rfc-editor.org/info/rfc9110](https://www.rfc-editor.org/info/rfc9110)>.\n\n[RFC2119]\n\nBradner, S., “[Key words for use in RFCs to Indicate Requirement Levels](https://www.rfc-editor.org/rfc/rfc2119.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 2119, [DOI 10.17487/RFC2119](https://dx.doi.org/10.17487/RFC2119), March 1997, <[https://www.rfc-editor.org/info/rfc2119](https://www.rfc-editor.org/info/rfc2119)>.\n\n[RFC8174]\n\nLeiba, B., “[Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words](https://www.rfc-editor.org/rfc/rfc8174.html)”, [BCP 14](https://www.rfc-editor.org/info/bcp14), RFC 8174, [DOI 10.17487/RFC8174](https://dx.doi.org/10.17487/RFC8174), May 2017, <[https://www.rfc-editor.org/info/rfc8174](https://www.rfc-editor.org/info/rfc8174)>.\n\n[STRUCTURED-FIELDS]\n\nNottingham, M. and P-H. Kamp, “[Structured Field Values for HTTP](https://www.rfc-editor.org/rfc/rfc9651.html)”, RFC 9651, [DOI 10.17487/RFC9651](https://dx.doi.org/10.17487/RFC9651), September 2024, <[https://www.rfc-editor.org/info/rfc9651](https://www.rfc-editor.org/info/rfc9651)>.\n\n### 6.2. Informative References\n\n[TARGETED]\n\nLudin, S., Nottingham, M., and Y. Wu, “[Targeted HTTP Cache Control](https://www.rfc-editor.org/rfc/rfc9213.html)”, RFC 9213, [DOI 10.17487/RFC9213](https://dx.doi.org/10.17487/RFC9213), June 2022, <[https://www.rfc-editor.org/info/rfc9213](https://www.rfc-editor.org/info/rfc9213)>.\n\n---\n\n## Acknowledgements\n\nThanks to Stephen Ludin for his review and suggestions.\n\n---\n\n## Author's Address\n\n**Mark Nottingham**\nCloudflare\nMelbourne\nAustralia\nEMail: [mnot@mnot.net](mailto:mnot@mnot.net)\nURI: [https://www.mnot.net/](https://www.mnot.net/)", "znaku_textu": 10841, "slov": 1449, "odkazu": 77, "kodovani": "utf-8", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:07:03", "sha256": "70751c83fe15283d010690a40e3b12a55e2446277ec37a1610da85842545e133", "hloubka": 1, "zdroj_objevu": "odkaz", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://github.com/httpwg/admin/issues?q=is%3Aissue+is%3Aopen+label%3Aadoption", "http://datatracker.ietf.org/wg/httpbis/charter/", "http://lists.w3.org/Archives/Public/ietf-http-wg/", "https://www.rfc-editor.org/rfc/rfc7841.html", "https://www.rfc-editor.org/info/rfc9875", "https://trustee.ietf.org/license-info", "https://www.rfc-editor.org/rfc/rfc9651.html", "https://www.rfc-editor.org/rfc/rfc9110.html", "https://www.rfc-editor.org/rfc/rfc9111.html", "https://www.rfc-editor.org/info/std98", "https://dx.doi.org/10.17487/RFC9111", "https://www.rfc-editor.org/info/rfc9111", "https://www.rfc-editor.org/info/std97", "https://dx.doi.org/10.17487/RFC9110", "https://www.rfc-editor.org/info/rfc9110", "https://www.rfc-editor.org/rfc/rfc2119.html", "https://www.rfc-editor.org/info/bcp14", "https://dx.doi.org/10.17487/RFC2119", "https://www.rfc-editor.org/info/rfc2119", "https://www.rfc-editor.org/rfc/rfc8174.html", "https://dx.doi.org/10.17487/RFC8174", "https://www.rfc-editor.org/info/rfc8174", "https://dx.doi.org/10.17487/RFC9651", "https://www.rfc-editor.org/info/rfc9651", "https://www.rfc-editor.org/rfc/rfc9213.html", "https://dx.doi.org/10.17487/RFC9213", "https://www.rfc-editor.org/info/rfc9213", "https://www.mnot.net/"]}