idnits 2.17.1 draft-kazuho-early-hints-status-code-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 31, 2016) is 2734 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7540 (Obsoleted by RFC 9113) Summary: 3 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group K. Oku 3 Internet-Draft DeNA Co., Ltd. 4 Intended status: Informational October 31, 2016 5 Expires: May 4, 2017 7 An HTTP Status Code for Indicating Hints 8 draft-kazuho-early-hints-status-code-00 10 Abstract 12 This memo introduces an informational status code for HTTP that can 13 be used for indicating hints to help a client start making 14 preparations for processing the final response. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at http://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on May 4, 2017. 33 Copyright Notice 35 Copyright (c) 2016 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (http://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 52 2. 103 Early Hints . . . . . . . . . . . . . . . . . . . . . . . 3 53 3. Interoperatibility Issues . . . . . . . . . . . . . . . . . . 3 54 4. Security Considerations . . . . . . . . . . . . . . . . . . . 3 55 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 3 56 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 6.1. Normative References . . . . . . . . . . . . . . . . . . 4 58 6.2. Informative References . . . . . . . . . . . . . . . . . 4 59 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 4 61 1. Introduction 63 Most if not all of the web pages processed by a web browser contain 64 links to external resources that need to be fetched prior to 65 rendering the documents. Therefore, it is beneficial to send such 66 links as early as possible in order to minimize the time spent until 67 the browser becomes possible to render the document. Link header of 68 type "preload" ([Preload]) can be used to indicate such links within 69 the response headers of an HTTP response. 71 However, it is not always possible for an origin server to send a 72 response immediately after receiving a request. In fact, it is often 73 the contrary. There are many deployments in which an origin server 74 needs to query a database before generating a response. It is also 75 not unusual for an origin server to delegate a request to an upstream 76 HTTP server running at a distant location. 78 The dilemma here is that even though it is preferable for an origin 79 server to send some headers as soon as it receives a request, it 80 cannot do so until the status code and the headers of the final HTTP 81 response is determined. 83 HTTP/2 ([RFC7540]) push can be used as a solution to the issue, but 84 has its own limitations. The resources that can be pushed using 85 HTTP/2 are limited to those belonging to the same origin. Also, it 86 is impossible to send only the links of the resources using HTTP/2 87 push. Sending HTTP responses for every resource is an inefficient 88 way of using bandwidth, especially when a caching server exists as an 89 intermediary. 91 This memo defines a status code for sending an informational response 92 ([RFC7231], section 6.2) that contains headers that are likely to be 93 included in the final response. A server can send the informational 94 response containing some of the headers to help the client start 95 making preparations for processing the final response, and then run 96 time-consuming operations to generate the final response. The 97 informational response can also be used by an origin server to 98 trigger HTTP/2 push at an caching intermediary. 100 1.1. Notational Conventions 102 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 103 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 104 document are to be interpreted as described in [RFC2119]. 106 2. 103 Early Hints 108 This informational status code indicates the client that the server 109 is likely to send a final request with the headers included in the 110 informational response. 112 A server MUST NOT include Content-Length, Transfer-Encoding, or any 113 hop-by-hop headers ([RFC7230], section 6.1) in the informational 114 response using the status code. 116 A client MAY speculatively evaluate the headers included in the 117 informational response while waiting for the final response. For 118 example, a client may recognize the link header of type preload and 119 start fetching the resource. However, the evaluation MUST NOT affect 120 how the final response is processed; the client must behave as if it 121 had not seen the informational response. 123 An intermediary MAY drop the informational response. It MAY send 124 HTTP/2 ([RFC7540]) push responses using the information found in the 125 informational response. 127 3. Interoperatibility Issues 129 Clients may have issues handling Early Hints, since informational 130 response is rarely used for requests not including an Expect header 131 ([RFC7231], section 5.1.1). Therefore, it is desirable to negotiate 132 the capability to use the status code. 134 4. Security Considerations 136 TBD 138 5. IANA Considerations 140 If Early Hints is standardized, the HTTP Status Codes Registry should 141 be updated with the following entries: 143 o Code: 103 144 o Description: Early Hints 146 o Specification: this document 148 6. References 150 6.1. Normative References 152 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 153 Requirement Levels", BCP 14, RFC 2119, 154 DOI 10.17487/RFC2119, March 1997, 155 . 157 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 158 Protocol (HTTP/1.1): Message Syntax and Routing", 159 RFC 7230, DOI 10.17487/RFC7230, June 2014, 160 . 162 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 163 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 164 DOI 10.17487/RFC7231, June 2014, 165 . 167 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 168 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 169 DOI 10.17487/RFC7540, May 2015, 170 . 172 6.2. Informative References 174 [Preload] Grigorik, I., "Preload", September 2016, 175 . 177 Author's Address 179 Kazuho Oku 180 DeNA Co., Ltd. 182 Email: kazuhooku@gmail.com