idnits 2.17.1 draft-ietf-httpbis-bcp56bis-06.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 : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([2], [3], [1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. -- The draft header indicates that this document obsoletes RFC3205, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (July 1, 2018) is 2125 days in the past. Is this intentional? Checking references for intended status: Best Current Practice ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 1394 -- Looks like a reference, but probably isn't: '2' on line 1396 -- Looks like a reference, but probably isn't: '3' on line 1398 ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7232 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7233 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7234 (Obsoleted by RFC 9111) ** Obsolete normative reference: RFC 7235 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 7320 (Obsoleted by RFC 8820) ** Obsolete normative reference: RFC 7540 (Obsoleted by RFC 9113) == Outdated reference: A later version (-19) exists of draft-ietf-httpbis-header-structure-06 -- Obsolete informational reference (is this intentional?): RFC 3205 (Obsoleted by RFC 9205) -- Obsolete informational reference (is this intentional?): RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 5785 (Obsoleted by RFC 8615) -- Obsolete informational reference (is this intentional?): RFC 7049 (Obsoleted by RFC 8949) -- Obsolete informational reference (is this intentional?): RFC 7538 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 7807 (Obsoleted by RFC 9457) Summary: 10 errors (**), 0 flaws (~~), 2 warnings (==), 11 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HTTP M. Nottingham 3 Internet-Draft July 1, 2018 4 Obsoletes: 3205 (if approved) 5 Intended status: Best Current Practice 6 Expires: January 2, 2019 8 Building Protocols with HTTP 9 draft-ietf-httpbis-bcp56bis-06 11 Abstract 13 HTTP is often used as a substrate for other application protocols 14 (a.k.a. HTTP-based APIs). This document specifies best practices 15 for these protocols' use of HTTP. 17 Note to Readers 19 Discussion of this draft takes place on the HTTP working group 20 mailing list (ietf-http-wg@w3.org), which is archived at 21 https://lists.w3.org/Archives/Public/ietf-http-wg/ [1]. 23 Working Group information can be found at http://httpwg.github.io/ 24 [2]; source code and issues list for this draft can be found at 25 https://github.com/httpwg/http-extensions/labels/bcp56bis [3]. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at https://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on January 2, 2019. 44 Copyright Notice 46 Copyright (c) 2018 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (https://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 62 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 4 63 2. Is HTTP Being Used? . . . . . . . . . . . . . . . . . . . . . 4 64 3. What's Important About HTTP . . . . . . . . . . . . . . . . . 5 65 3.1. Generic Semantics . . . . . . . . . . . . . . . . . . . . 5 66 3.2. Links . . . . . . . . . . . . . . . . . . . . . . . . . . 6 67 3.3. Rich Functionality . . . . . . . . . . . . . . . . . . . 7 68 4. Best Practices for Using HTTP . . . . . . . . . . . . . . . . 7 69 4.1. Specifying the Use of HTTP . . . . . . . . . . . . . . . 8 70 4.2. Defining HTTP Resources . . . . . . . . . . . . . . . . . 8 71 4.3. Specifying Client Behaviours . . . . . . . . . . . . . . 9 72 4.4. HTTP URLs . . . . . . . . . . . . . . . . . . . . . . . . 10 73 4.4.1. Initial URL Discovery . . . . . . . . . . . . . . . . 11 74 4.4.2. URL Schemes . . . . . . . . . . . . . . . . . . . . . 11 75 4.4.3. Transport Ports . . . . . . . . . . . . . . . . . . . 12 76 4.5. HTTP Methods . . . . . . . . . . . . . . . . . . . . . . 12 77 4.5.1. GET . . . . . . . . . . . . . . . . . . . . . . . . . 13 78 4.5.2. OPTIONS . . . . . . . . . . . . . . . . . . . . . . . 14 79 4.6. HTTP Status Codes . . . . . . . . . . . . . . . . . . . . 14 80 4.6.1. Redirection . . . . . . . . . . . . . . . . . . . . . 16 81 4.7. HTTP Header Fields . . . . . . . . . . . . . . . . . . . 17 82 4.8. Defining Message Payloads . . . . . . . . . . . . . . . . 18 83 4.9. HTTP Caching . . . . . . . . . . . . . . . . . . . . . . 18 84 4.10. Application State . . . . . . . . . . . . . . . . . . . . 20 85 4.11. Client Authentication . . . . . . . . . . . . . . . . . . 20 86 4.12. Co-Existing with Web Browsing . . . . . . . . . . . . . . 21 87 4.13. Application Boundaries . . . . . . . . . . . . . . . . . 22 88 4.14. Server Push . . . . . . . . . . . . . . . . . . . . . . . 23 89 4.15. Versioning and Evolution . . . . . . . . . . . . . . . . 24 90 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 91 6. Security Considerations . . . . . . . . . . . . . . . . . . . 24 92 6.1. Privacy Considerations . . . . . . . . . . . . . . . . . 25 93 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 26 94 7.1. Normative References . . . . . . . . . . . . . . . . . . 26 95 7.2. Informative References . . . . . . . . . . . . . . . . . 27 96 7.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 30 98 Appendix A. Changes from RFC 3205 . . . . . . . . . . . . . . . 30 99 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 30 101 1. Introduction 103 HTTP [RFC7230] is often used as a substrate for applications other 104 than Web browsing; this is sometimes referred to as creating "HTTP- 105 based APIs", or just "HTTP APIs". This is done for a variety of 106 reasons, including: 108 o familiarity by implementers, specifiers, administrators, 109 developers and users, 111 o availability of a variety of client, server and proxy 112 implementations, 114 o ease of use, 116 o availability of Web browsers, 118 o reuse of existing mechanisms like authentication and encryption, 120 o presence of HTTP servers and clients in target deployments, and 122 o its ability to traverse firewalls. 124 These protocols are often ad hoc; they are intended for only 125 deployment by one or a few servers, and consumption by a limited set 126 of clients. As a result, a body of practices and tools has arisen 127 around defining HTTP-based APIs that favours these conditions. 129 However, when such a protocol is standarised, it is typically 130 deployed on multiple uncoordinated servers, implemented a number of 131 times, and consumed by a broader variety of clients. Such diversity 132 brings a different set of concerns, and tools and practices intended 133 for a single-server deployment might not be suitable. 135 For example, HTTP-based APIs deployed in these circumstances need to 136 more carefully consider how extensibility and evolution of the 137 service will be handled, how different deployment requirements will 138 be accommodated, and how clients will evolve with the API. 140 More generally, application protocols using HTTP face a number of 141 design decisions, including: 143 o Should it define a new URL scheme? Use new ports? 144 o Should it use standard HTTP methods and status codes, or define 145 new ones? 147 o How can the maximum value be extracted from the use of HTTP? 149 o How does it coexist with other uses of HTTP - especially Web 150 browsing? 152 o How can interoperability problems and "protocol dead ends" be 153 avoided? 155 This document contains best current practices regarding the use of 156 HTTP by applications other than Web browsing. Section 2 defines what 157 applications it applies to; Section 3 surveys the properties of HTTP 158 that are important to preserve, and Section 4 conveys best practices 159 for those applications that do use HTTP. 161 It is written primarily to guide IETF efforts to define application 162 protocols using HTTP for deployment on the Internet, but might be 163 applicable in other situations. Note that the requirements herein do 164 not necessarily apply to the development of generic HTTP extensions. 166 1.1. Notational Conventions 168 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 169 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 170 "OPTIONAL" in this document are to be interpreted as described in BCP 171 14 [RFC2119] [RFC8174] when, and only when, they appear in all 172 capitals, as shown here. 174 2. Is HTTP Being Used? 176 Different applications have different goals when using HTTP. In this 177 document, we say an application is "using HTTP" when any of the 178 following conditions are true: 180 o The transport port in use is 80 or 443, 182 o The URL scheme "http" or "https" is used, 184 o The ALPN protocol ID [RFC7301] generically identifies HTTP (e.g., 185 "http/1.1", "h2", "h2c"), or 187 o The IANA registries defined for HTTP are updated or modified. 189 When an application is using HTTP, all of the requirements of the 190 HTTP protocol suite are in force (including but not limited to 192 [RFC7230], [RFC7231], [RFC7232], [RFC7233], [RFC7234], [RFC7235] and 193 [RFC7540]). 195 An application might not be using HTTP according to this definition, 196 but still relying upon the HTTP specifications in some manner. For 197 example, an application might wish to avoid re-specifying parts of 198 the message format, but change others; or, it might want to use a 199 different set of methods. 201 Such applications are referred to as "protocols based upon HTTP" in 202 this document. These have more freedom to modify protocol 203 operations, but are also likely to lose at least a portion of the 204 benefits outlined above, as most HTTP implementations won't be easily 205 adaptable to these changes, and as the protocol diverges from HTTP, 206 the benefit of mindshare will be lost. 208 Protocols that are based upon HTTP MUST NOT reuse HTTP's URL schemes, 209 transport ports, ALPN protocol IDs or IANA registries; rather, they 210 are encouraged to establish their own. 212 3. What's Important About HTTP 214 There are many ways that applications using HTTP are defined and 215 deployed, and sometimes they are brought to the IETF for 216 standardisation. In that process, what might be workable for 217 deployment in a limited fashion isn't appropriate for standardisation 218 and the corresponding broader deployment. 220 This section examines the facets of the protocol that are important 221 to preserve in these situations. 223 3.1. Generic Semantics 225 When writing an application's specification, it's often tempting to 226 specify exactly how HTTP is to be implemented, supported and used. 228 However, this can easily lead to an unintended profile of HTTP's 229 behaviour. For example, it's common to see specifications with 230 language like this: 232 A `POST` request MUST result in a `201 Created` response. 234 This forms an expectation in the client that the response will always 235 be "201 Created", when in fact there are a number of reasons why the 236 status code might differ in a real deployment. If the client does 237 not anticipate this, the application's deployment is brittle. 239 Much of the value of HTTP is in its generic semantics - that is, the 240 protocol elements defined by HTTP are potentially applicable to every 241 resource, not specific to a particular context. Application-specific 242 semantics are expressed in the payload; mostly, in the body, but also 243 in header fields. 245 This allows a HTTP message to be examined by generic HTTP software 246 (e.g., HTTP servers, intermediaries, client implementations), and its 247 handling to be correctly determined. It also allows people to 248 leverage their knowledge of HTTP semantics without special-casing 249 them for a particular application. 251 Therefore, applications that use HTTP MUST NOT re-define, refine or 252 overlay the semantics of defined protocol elements. Instead, they 253 should focus their specifications on protocol elements that are 254 specific to that application; namely their HTTP resources. 256 See Section 4.2 for details. 258 3.2. Links 260 Another common practice is assuming that the HTTP server's name space 261 (or a portion thereof) is exclusively for the use of a single 262 application. This effectively overlays special, application-specific 263 semantics onto that space, precludes other applications from using 264 it. 266 As explained in [RFC7320], such "squatting" on a part of the URL 267 space by a standard usurps the server's authority over its own 268 resources, can cause deployment issues, and is therefore bad practice 269 in standards. 271 Instead of statically defining URL components like paths, it is 272 RECOMMENDED that applications using HTTP define links in payloads, to 273 allow flexibility in deployment. 275 Using runtime links in this fashion has a number of other benefits - 276 especially when an application is to have multiple implementations 277 and/or deployments (as is often the case for those that are 278 standardised). 280 For example, navigating with a link allows a request to be routed to 281 a different server without the overhead of a redirection, thereby 282 supporting deployment across machines well. 284 It also becomes possible to "mix and match" different applications on 285 the same server, and offers a natural mechanism for extensibility, 286 versioning and capability management, since the document containing 287 the links can also contain information about their targets. 289 Using links also offers a form of cache invalidation that's seen on 290 the Web; when a resource's state changes, the application can change 291 its link to it so that a fresh copy is always fetched. 293 3.3. Rich Functionality 295 HTTP offers a number of features to applications, such as: 297 o Message framing 299 o Multiplexing (in HTTP/2) 301 o Integration with TLS 303 o Support for intermediaries (proxies, gateways, Content Delivery 304 Networks) 306 o Client authentication 308 o Content negotiation for format, language, and other features 310 o Caching for server scalability, latency and bandwidth reduction, 311 and reliability 313 o Granularity of access control (through use of a rich space of 314 URLs) 316 o Partial content to selectively request part of a response 318 o The ability to interact with the application easily using a Web 319 browser 321 Applications that use HTTP are encouraged to utilise the various 322 features that the protocol offers, so that their users receive the 323 maximum benefit from it, and to allow it to be deployed in a variety 324 of situations. This document does not require specific features to 325 be used, since the appropriate design tradeoffs are highly specific 326 to a given situation. However, following the practices in Section 4 327 is a good starting point. 329 4. Best Practices for Using HTTP 331 This section contains best practices regarding the use of HTTP by 332 applications, including practices for specific HTTP protocol 333 elements. 335 4.1. Specifying the Use of HTTP 337 When specifying the use of HTTP, an application SHOULD use [RFC7230] 338 as the primary reference; it is not necessary to reference all of the 339 specifications in the HTTP suite unless there are specific reasons to 340 do so (e.g., a particular feature is called out). 342 Applications using HTTP SHOULD NOT specify a minimum version of HTTP 343 to be used; because it is a hop-by-hop protocol, a HTTP connection 344 can be handled by implementations that are not controlled by the 345 application; for example, proxies, CDNs, firewalls and so on. 346 Requiring a particular version of HTTP makes it difficult to use in 347 these situations, and harms interoperability for little reason (since 348 HTTP's semantics are stable between protocol versions). 350 However, if an application's deployment would benefit from the use of 351 a particular version of HTTP (for example, HTTP/2's multiplexing), 352 this SHOULD be noted. 354 Applications using HTTP MUST NOT specify a maximum version, to 355 preserve the protocol's ability to evolve. 357 When specifying examples of protocol interactions, applications 358 SHOULD document both the request and response messages, with full 359 headers, preferably in HTTP/1.1 format. For example: 361 GET /thing HTTP/1.1 362 Host: example.com 363 Accept: application/things+json 364 User-Agent: Foo/1.0 366 HTTP/1.1 200 OK 367 Content-Type: application/things+json 368 Content-Length: 500 369 Server: Bar/2.2 371 [payload here] 373 4.2. Defining HTTP Resources 375 Applications that use HTTP should focus on defining the following 376 application-specific protocol elements: 378 o Media types [RFC6838], often based upon a format convention such 379 as JSON [RFC8259], 381 o HTTP header fields, as per Section 4.7, and 382 o The behaviour of resources, as identified by link relations 383 [RFC8288]. 385 By composing these protocol elements, an application can define a set 386 of resources, identified by link relations, that implement specified 387 behaviours, including: 389 o Retrieval of their state using GET, in one or more formats 390 identified by media type; 392 o Resource creation or update using POST or PUT, with an 393 appropriately identified request body format; 395 o Data processing using POST and identified request and response 396 body format(s); and 398 o Resource deletion using DELETE. 400 For example, an application might specify: 402 Resources linked to with the "example-widget" link relation type are 403 Widgets. The state of a Widget can be fetched in the 404 "application/example-widget+json" format, and can be updated by PUT 405 to the same link. Widget resources can be deleted. 407 The "Example-Count" response header field on Widget representations 408 indicates how many Widgets are held by the sender. 410 The "application/example-widget+json" format is a JSON [RFC8259] 411 format representing the state of a Widget. It contains links to 412 related information in the link indicated by the Link header field 413 value with the "example-other-info" link relation type. 415 4.3. Specifying Client Behaviours 417 HTTP does not mandate some behaviours that have nevertheless become 418 very common; if these are not explicitly specified by applications 419 using HTTP, there may be confusion and interoperability problems. 420 This section recommends default handling for these mechanisms. 422 o Redirect handling - Applications need to specify how redirects are 423 expected to be handled; see Section 4.6.1. 425 o Cookies - Applications using HTTP MUST explicitly reference the 426 Cookie specification [RFC6265] if they are required. 428 o Certificates - Applications using HTTP MUST specify that TLS 429 certificates are to be checked according to [RFC2818] when HTTPS 430 is used. 432 In general, applications using HTTP ought to align their usage as 433 closely as possible with Web browsers, to avoid interoperability 434 issues when they are used. See Section 4.12. 436 If an application using HTTP has browser compatibility as a goal, 437 client interaction ought to be defined in terms of [FETCH], since 438 that is the abstraction that browsers use for HTTP; it enforces many 439 of these best practices. 441 Applications using HTTP MUST NOT require HTTP features that are 442 usually negotiated to be supported. For example, requiring that 443 clients support responses with a certain content-encoding ([RFC7231], 444 Section 3.1.2.2) instead of negotiating for it ([RFC7231], 445 Section 5.3.4) means that otherwise conformant clients cannot 446 interoperate with the application. Applications MAY encourage the 447 implementation of such features, though. 449 4.4. HTTP URLs 451 In HTTP, URLs are opaque identifiers under the control of the server. 452 As outlined in [RFC7320], standards cannot usurp this space, since it 453 might conflict with existing resources, and constrain implementation 454 and deployment. 456 In other words, applications that use HTTP shouldn't associate 457 application semantics with specific URL paths on arbitrary servers. 458 Doing so inappropriately conflates the identity of the resource (its 459 URL) with the capabilities that resource supports, bringing about 460 many of the same interoperability problems that [RFC4367] warns of. 462 For example, specifying that a "GET to the URL /foo retrieves a bar 463 document" is bad practice. Likewise, specifying "The widget API is 464 at the path /bar" violates [RFC7320]. 466 Instead, applications that use HTTP are encouraged to ensure that 467 URLs are discovered at runtime, allowing HTTP-based services to 468 describe their own capabilities. One way to do this is to use typed 469 links [RFC8288] to convey the URIs that are in use, as well as the 470 semantics of the resources that they identify. See Section 4.2 for 471 details. 473 4.4.1. Initial URL Discovery 475 Generally, a client will begin interacting with a given application 476 server by requesting an initial document that contains information 477 about that particular deployment, potentially including links to 478 other relevant resources. 480 Applications that use HTTP are encouraged to allow an arbitrary URL 481 to be used as that entry point. For example, rather than specifying 482 "the initial document is at "/foo/v1", they should allow a deployment 483 to use any URL as the entry point for the application. 485 In cases where doing so is impractical (e.g., it is not possible to 486 convey a whole URL, but only a hostname) standard applications that 487 use HTTP can request a well-known URL [RFC5785] as an entry point. 489 4.4.2. URL Schemes 491 Applications that use HTTP will typically employ the "http" and/or 492 "https" URL schemes. "https" is RECOMMENDED to provide 493 authentication, integrity and confidentiality, as well as mitigate 494 pervasive monitoring attacks [RFC7258]. 496 However, application-specific schemes can be defined as well. 498 When defining an URL scheme for an application using HTTP, there are 499 a number of tradeoffs and caveats to keep in mind: 501 o Unmodified Web browsers will not support the new scheme. While it 502 is possible to register new URL schemes with Web browsers (e.g. 503 registerProtocolHandler() in [HTML5], as well as several 504 proprietary approaches), support for these mechanisms is not 505 shared by all browsers, and their capabilities vary. 507 o Existing non-browser clients, intermediaries, servers and 508 associated software will not recognise the new scheme. For 509 example, a client library might fail to dispatch the request; a 510 cache might refuse to store the response, and a proxy might fail 511 to forward the request. 513 o Because URLs occur in HTTP artefacts commonly, often being 514 generated automatically (e.g., in the "Location" response header), 515 it can be difficult to assure that the new scheme is used 516 consistently. 518 o The resources identified by the new scheme will still be available 519 using "http" and/or "https" URLs. Those URLs can "leak" into use, 520 which can present security and operability issues. For example, 521 using a new scheme to assure that requests don't get sent to a 522 "normal" Web site is likely to fail. 524 o Features that rely upon the URL's origin [RFC6454], such as the 525 Web's same-origin policy, will be impacted by a change of scheme. 527 o HTTP-specific features such as cookies [RFC6265], authentication 528 [RFC7235], caching [RFC7234], HSTS [RFC6797], and CORS [FETCH] 529 might or might not work correctly, depending on how they are 530 defined and implemented. Generally, they are designed and 531 implemented with an assumption that the URL will always be "http" 532 or "https". 534 o Web features that require a secure context [SECCTXT] will likely 535 treat a new scheme as insecure. 537 See [RFC7595] for more information about minting new URL schemes. 539 4.4.3. Transport Ports 541 Applications that use HTTP can use the applicable default port (80 542 for HTTP, 443 for HTTPS), or they can be deployed upon other ports. 543 This decision can be made at deployment time, or might be encouraged 544 by the application's specification (e.g., by registering a port for 545 that application). 547 If a non-default port is used, it needs to be reflected in the 548 authority of all URLs for that resource; the only mechanism for 549 changing a default port is changing the scheme (see Section 4.4.2). 551 Using a port other than the default has privacy implications (i.e., 552 the protocol can now be distinguished from other traffic), as well as 553 operability concerns (as some networks might block or otherwise 554 interfere with it). Privacy implications should be documented in 555 Security Considerations. 557 See [RFC7605] for further guidance. 559 4.5. HTTP Methods 561 Applications that use HTTP MUST confine themselves to using 562 registered HTTP methods such as GET, POST, PUT, DELETE, and PATCH. 564 New HTTP methods are rare; they are required to be registered with 565 IETF Review (see [RFC7232]), and are also required to be generic. 566 That means that they need to be potentially applicable to all 567 resources, not just those of one application. 569 While historically some applications (e.g., [RFC4791]) have defined 570 non-generic methods, [RFC7231] now forbids this. 572 When authors believe that a new method is required, they are 573 encouraged to engage with the HTTP community early, and document 574 their proposal as a separate HTTP extension, rather than as part of 575 an application's specification. 577 4.5.1. GET 579 GET is one of the most common and useful HTTP methods; its retrieval 580 semantics allow caching, side-effect free linking and forms the basis 581 of many of the benefits of using HTTP. 583 A common use of GET is to perform queries, often using the query 584 component of the URL; this is a familiar pattern from Web browsing, 585 and the results can be cached, improving efficiency of an often 586 expensive process. 588 In some cases, however, GET might be unwieldy for expressing queries, 589 because of the limited syntax of the URL; in particular, if binary 590 data forms part of the query terms, it needs to be encoded to conform 591 to URL syntax. 593 While this is not an issue for short queries, it can become one for 594 larger query terms, or ones which need to sustain a high rate of 595 requests. Additionally, some HTTP implementations limit the size of 596 URLs they support - although modern HTTP software has much more 597 generous limits than previously (typically, considerably more than 598 8000 octets, as required by [RFC7230], Section 3.1.1). 600 In these cases, an application using HTTP might consider using POST 601 to express queries in the request body; doing so avoids encoding 602 overhead and URL length limits in implementations. However, in doing 603 so it should be noted that the benefits of GET such as caching and 604 linking to query results are lost. Therefore, applications using 605 HTTP that feel a need to allow POST queries ought consider allowing 606 both methods. 608 Applications that use HTTP SHOULD NOT define GET requests to have 609 side effects, since implementations can and do retry HTTP GET 610 requests that fail. 612 Finally, note that while HTTP allows GET requests to have a body 613 syntactically, this is done only to allow parsers to be generic; as 614 per [RFC7231], Section 4.3.1, a body on a GET has no meaning, and 615 will be either ignored or rejected by generic HTTP software. 617 4.5.2. OPTIONS 619 The OPTIONS method was defined for metadata retrieval, and is used 620 both by WebDAV [RFC4918] and CORS [FETCH]. Because HTTP-based APIs 621 often need to retrieve metadata about resources, it is often 622 considered for their use. 624 However, OPTIONS does have significant limitations: 626 o It isn't possible to link to the metadata with a simple URL, 627 because OPTIONS is not the default GET method. 629 o OPTIONS responses are not cacheable, because HTTP caches operate 630 on representations of the resource (i.e., GET and HEAD). If 631 OPTIONS responses are cached separately, their interaction with 632 HTTP cache expiry, secondary keys and other mechanisms needs to be 633 considered. 635 o OPTIONS is "chatty" - always separating metadata out into a 636 separate request increases the number of requests needed to 637 interact with the application. 639 o Implementation support for OPTIONS is not universal; some servers 640 do not expose the ability to respond to OPTIONS requests without 641 significant effort. 643 Instead of OPTIONS, one of these alternative approaches might be more 644 appropriate: 646 o For server-wide metadata, create a well-known URI [RFC5785], or 647 using an already existing one if it's appropriate (e.g., HostMeta 648 [RFC6415]). 650 o For metadata about a specific resource, use a Link response 651 header, or a link in the representation format for that resource. 652 See [RFC8288]. Note that the Link header is available on HEAD 653 responses, which is useful if the client wants to discover a 654 resource's capabilities before they interact with it. 656 4.6. HTTP Status Codes 658 The primary function of a HTTP status code is to convey semantics for 659 the benefit of generic HTTP software, not to convey application- 660 specific semantics. 662 In particular, status codes are often generated or overwritten by 663 intermediaries, as well as server and client implementations; for 664 example, when network errors are encountered, a captive portal is 665 present, when an implementation is overloaded, or it thinks it is 666 under attack. As a result, the status code that a server-side 667 application generates and the one that the client software receives 668 often differ. 670 This means that status codes are not a reliable way to carry 671 application-specific signals. Specifying that a particular status 672 code has a specific meaning in the context of an application can have 673 unintended side effects; if that status code is generated by a 674 generic HTTP component can lead clients to believe that the 675 application is in a state that wasn't intended. 677 Instead, applications using HTTP should specify the implications of 678 general classes of responses (e.g., "successful response" for 2xx; 679 "client error" for 4xx and "server error" for 5xx), conveying any 680 application-specific information in the message body and/or HTTP 681 header fields, not the status code. [RFC7807] provides one way for 682 applications using HTTP to do so for error conditions. 684 There are limited exceptions to this; for example, applications might 685 use 201 (Created) or 404 (Not Found) to convey application semantics 686 that are compatible with the generic HTTP semantics of those status 687 codes. In general, though, applications should resist the temptation 688 to map their semantics into fine-grained status codes. 690 Because the set of registered HTTP status codes can expand, 691 applications using HTTP should explicitly point out that clients 692 ought to be able to handle all applicable status codes gracefully 693 (i.e., falling back to the generic "n00" semantics of a given status 694 code; e.g., "499" can be safely handled as "400" by clients that 695 don't recognise it). This is preferable to creating a "laundry list" 696 of potential status codes, since such a list is never complete. 698 Applications using HTTP MUST NOT re-specify the semantics of HTTP 699 status codes, even if it is only by copying their definition. They 700 MUST NOT require specific reason phrases to be used; the reason 701 phrase has no function in HTTP, and is not guaranteed to be preserved 702 by implementations, and the reason phrase is not carried at all in 703 the [RFC7540] message format. 705 Applications that use HTTP MUST only use registered HTTP status 706 codes. As with methods, new HTTP status codes are rare, and required 707 (by [RFC7231]) to be registered with IETF review. Similarly, HTTP 708 status codes are generic; they are required (by [RFC7231]) to be 709 potentially applicable to all resources, not just to those of one 710 application. 712 When authors believe that a new status code is required, they are 713 encouraged to engage with the HTTP community early, and document 714 their proposal as a separate HTTP extension, rather than as part of 715 an application's specification. 717 4.6.1. Redirection 719 The 3xx series of status codes specified in [RFC7231], Section 6.4 720 are used to direct the user agent to another resource to satisfy the 721 request. The most common of these are 301, 302, 307 and 308 722 ([RFC7538]), all of which use the Location response header field to 723 indicate where the client should send the request to. 725 There are two ways that this group of status codes differ: 727 o Whether they are permanent or temporary. Permanent redirects can 728 be used to update links stored in the client (e.g., bookmarks), 729 whereas temporary ones can not. Note that this has no effect on 730 HTTP caching; it is completely separate. 732 o Whether they allow the redirected request to change the request 733 method from POST to GET. Web browsers generally do change POST to 734 GET for 301 and 302; therefore, 308 and 307 were created to allow 735 redirection without changing the method. 737 This table summarises their relationships: 739 +-------------------------------------------+-----------+-----------+ 740 | | Permanent | Temporary | 741 +-------------------------------------------+-----------+-----------+ 742 | Allows changing the request method from | 301 | 302 | 743 | POST to GET | | | 744 | Does not allow changing the request | 308 | 307 | 745 | method | | | 746 +-------------------------------------------+-----------+-----------+ 748 As noted in [RFC7231], a user agent is allowed to automatically 749 follow a 3xx redirect that has a Location response header field, even 750 if they don't understand the semantics of the specific status code. 751 However, they aren't required to do so; therefore, if an application 752 using HTTP desires redirects to be automatically followed, it needs 753 to explicitly specify the circumstances when this is required. 755 Applications using HTTP SHOULD specify that 301 and 302 responses 756 change the subsequent request method from POST (but no other method) 757 to GET, to be compatible with browsers. 759 Generally, when a redirected request is made, its header fields are 760 copied from the original request's. However, they can be modified by 761 various mechanisms; e.g., sent Authorization ([RFC7235]) and Cookie 762 ([RFC6265]) headers will change if the origin (and sometimes path) of 763 the request changes. Applications using HTTP SHOULD specify if any 764 request headers need to be modified or removed upon a redirect; 765 however, this behaviour cannot be relied upon, since a generic client 766 (like a browser) will be unaware of such requirements. 768 4.7. HTTP Header Fields 770 Applications that use HTTP MAY define new HTTP header fields. 771 Typically, using HTTP header fields is appropriate in a few different 772 situations: 774 o Their content is useful to intermediaries (who often wish to avoid 775 parsing the body), and/or 777 o Their content is useful to generic HTTP software (e.g., clients, 778 servers), and/or 780 o It is not possible to include their content in the message body 781 (usually because a format does not allow it). 783 New header fields MUST be registered, as per [RFC7231] and [RFC3864]. 785 See [RFC7231], Section 8.3.1 for guidelines to consider when minting 786 new header fields. [I-D.ietf-httpbis-header-structure] provides a 787 common structure for new header fields, and avoids many issues in 788 their parsing and handling; it is RECOMMENDED that new header fields 789 use it. 791 It is RECOMMENDED that header field names be short (even when HTTP/2 792 header compression is in effect, there is an overhead) but 793 appropriately specific. In particular, if a header field is specific 794 to an application, an identifier for that application SHOULD form a 795 prefix to the header field name, separated by a "-". 797 For example, if the "example" application needs to create three 798 headers, they might be called "example-foo", "example-bar" and 799 "example-baz". Note that the primary motivation here is to avoid 800 consuming more generic header names, not to reserve a portion of the 801 namespace for the application; see [RFC6648] for related 802 considerations. 804 The semantics of existing HTTP header fields MUST NOT be re-defined 805 without updating their registration or defining an extension to them 806 (if allowed). For example, an application using HTTP cannot specify 807 that the "Location" header has a special meaning in a certain 808 context. 810 See Section 4.9 for the interaction between headers and HTTP caching; 811 in particular, request headers that are used to "select" a response 812 have impact there, and need to be carefully considered. 814 See Section 4.10 for considerations regarding header fields that 815 carry application state (e.g., Cookie). 817 4.8. Defining Message Payloads 819 There are many potential formats for payloads; for example, JSON 820 [RFC8259], XML [XML], and CBOR [RFC7049]. Best practices for their 821 use are out of scope for this document. 823 Applications SHOULD register distinct media types for each format 824 they define; this makes it possible to identify them unambiguously 825 and negotiate for their use. See [RFC6838] for more information. 827 4.9. HTTP Caching 829 HTTP caching [RFC7234] is one of the primary benefits of using HTTP 830 for applications; it provides scalability, reduces latency and 831 improves reliability. Furthermore, HTTP caches are readily available 832 in browsers and other clients, networks as forward and reverse 833 proxies, Content Delivery Networks and as part of server software. 835 Assigning even a short freshness lifetime ([RFC7234], Section 4.2) - 836 e.g., 5 seconds - allows a response to be reused to satisfy multiple 837 clients, and/or a single client making the same request repeatedly. 838 In general, if it is safe to reuse something, consider assigning a 839 freshness lifetime; cache implementations take active measures to 840 remove content intelligently when they are out of space, so "it will 841 fill up the cache" is not a valid concern. 843 The most common method for specifying freshness is the max-age 844 response directive ([RFC7234], Section 5.2.2.8). The Expires header 845 ([RFC7234], Section 5.3) can also be used, but it is not necessary to 846 specify it; all modern cache implementations support Cache-Control, 847 and specifying freshness as a delta is both more convenient in most 848 cases, and less error-prone. 850 Understand that stale responses (e.g., one with "Cache-Control: max- 851 age=0") can be reused when the cache is disconnected from the origin 852 server; this can be useful for handling network issues. See 853 [RFC7234], Section 4.2.4, and also [RFC5861] for additional controls 854 over stale content. 856 Stale responses can be refreshed by assigning a validator, saving 857 both transfer bandwidth and latency for large responses; see 858 [RFC7232]. 860 If an application defines a request header field that might be used 861 by a server to change the response's headers or body, authors should 862 point out that this has implications for caching; in general, such 863 resources need to either make their responses uncacheable (e.g., with 864 the "no-store" cache-control directive defined in [RFC7234], 865 Section 5.2.2.3) or consistently send the Vary response header 866 ([RFC7231], Section 7.1.4). 868 For example, this response: 870 HTTP/1.1 200 OK 871 Content-Type: application/example+xml 872 Cache-Control: max-age=60 873 ETag: "sa0f8wf20fs0f" 874 Vary: Accept-Encoding 876 [content] 878 can be stored for 60 seconds by both private and shared caches, can 879 be revalidated with If-None-Match, and varies on the Accept-Encoding 880 request header field. 882 In some situations, responses without explicit cache directives 883 (e.g., Cache-Control or Expires) will be stored and served using a 884 heuristic freshness lifetime; see [RFC7234], Section 4.2.2. As the 885 heuristic is not under control of the application, it is generally 886 preferable to set an explicit freshness lifetime. 888 If caching of a response is not desired, the appropriate response 889 directive is "Cache-Control: no-store". This only need be sent in 890 situations where the response might be cached; see [RFC7234], 891 Section 3. Note that "Cache-Control: no-cache" allows a response to 892 be stored, just not reused by a cache; it does not prevent caching 893 (despite its name). 895 For example, this response cannot be stored or reused by a cache: 897 HTTP/1.1 200 OK 898 Content-Type: application/example+xml 899 Cache-Control: no-store 901 [content] 902 When an application has a need to express a lifetime that's separate 903 from the freshness lifetime, this should be expressed separately, 904 either in the response's body or in a separate header field. When 905 this happens, the relationship between HTTP caching and that lifetime 906 need to be carefully considered, since the response will be used as 907 long as it is considered fresh. 909 Like other functions, HTTP caching is generic; it does not have 910 knowledge of the application in use. Therefore, caching extensions 911 need to be backwards-compatible, as per [RFC7234], Section 5.2.3. 913 4.10. Application State 915 Applications that use HTTP MAY use stateful cookies [RFC6265] to 916 identify a client and/or store client-specific data to contextualise 917 requests. 919 When used, it is important to carefully specify the scoping and use 920 of cookies; if the application exposes sensitive data or capabilities 921 (e.g., by acting as an ambient authority), exploits are possible. 922 Mitigations include using a request-specific token to assure the 923 intent of the client. 925 Applications MUST NOT make assumptions about the relationship between 926 separate requests on a single transport connection; doing so breaks 927 many of the assumptions of HTTP as a stateless protocol, and will 928 cause problems in interoperability, security, operability and 929 evolution. 931 4.11. Client Authentication 933 Applications that use HTTP MAY use HTTP authentication [RFC7235] to 934 identify clients. The Basic authentication scheme [RFC7617] MUST NOT 935 be used unless the underlying transport is authenticated, integrity- 936 protected and confidential (e.g., as provided the "HTTPS" URL scheme, 937 or another using TLS). The Digest scheme [RFC7616] MUST NOT be used 938 unless the underlying transport is similarly secure, or the chosen 939 hash algorithm is not "MD5". 941 With HTTPS, clients might also be authenticated using certificates 942 [RFC5246]. 944 When used, it is important to carefully specify the scoping and use 945 of authentication; if the application exposes sensitive data or 946 capabilities (e.g., by acting as an ambient authority), exploits are 947 possible. Mitigations include using a request-specific token to 948 assure the intent of the client. 950 4.12. Co-Existing with Web Browsing 952 Even if there is not an intent for an application that uses HTTP to 953 be used with a Web browser, its resources will remain available to 954 browsers and other HTTP clients. 956 This means that all such applications need to consider how browsers 957 will interact with them, particularly regarding security. 959 For example, if an application's state can be changed using a POST 960 request, a Web browser can easily be coaxed into making that request 961 by a HTML form on an arbitrary Web site. 963 Or, If content returned from the application's resources is under 964 control of an attacker (for example, part of the request is reflected 965 in the response, or the response contains external information that 966 might be under the control of the attacker), a cross-site scripting 967 attack is possible, whereby an attacker can inject code into the 968 browser and access data and capabilities on that origin. 970 This is only a small sample of the kinds of issues that applications 971 using HTTP must consider. Generally, the best approach is to 972 consider the application actually as a Web application, and to follow 973 best practices for their secure development. 975 A complete enumeration of such practices is out of scope for this 976 document, but some considerations include: 978 o Using an application-specific media type in the Content-Type 979 header, and requiring clients to fail if it is not used 981 o Using X-Content-Type-Options: nosniff [FETCH] to assure that 982 content under attacker control can't be coaxed into a form that is 983 interpreted as active content by a Web browser 985 o Using Content-Security-Policy [CSP] to constrain the capabilities 986 of active content (such as HTML [HTML5]), thereby mitigating 987 Cross-Site Scripting attacks 989 o Using Referrer-Policy [REFERRER-POLICY] to prevent sensitive data 990 in URLs from being leaked in the Referer request header 992 o Using the 'HttpOnly' flag on Cookies to assure that cookies are 993 not exposed to browser scripting languages [RFC6265] 995 o Avoiding use of compression on any sensitive information (e.g., 996 authentication tokens, passwords), as the scripting environment 997 offered by Web browsers allows an attacker to repeatedly probe the 998 compression space; if the attacker has access to the path of the 999 communication, they can use this capability to recover that 1000 information. 1002 Depending on how they are intended to be deployed, specifications for 1003 applications using HTTP might require the use of these mechanisms in 1004 specific ways, or might merely point them out in Security 1005 Considerations. 1007 An example of a HTTP response from an application that does not 1008 intend for its content to be treated as active by browsers might look 1009 like this: 1011 HTTP/1.1 200 OK 1012 Content-Type: application/example+json 1013 X-Content-Type-Options: nosniff 1014 Content-Security-Policy: default-src 'none' 1015 Cache-Control: max-age=3600 1016 Referrer-Policy: no-referrer 1018 [content] 1020 If an application using HTTP has browser compatibility as a goal, 1021 client interaction ought to be defined in terms of [FETCH], since 1022 that is the abstraction that browsers use for HTTP; it enforces many 1023 of these best practices. 1025 4.13. Application Boundaries 1027 Because the origin [RFC6454] is how many HTTP capabilities are 1028 scoped, applications also need to consider how deployments might 1029 interact with other applications (including Web browsing) on the same 1030 origin. 1032 For example, if Cookies [RFC6265] are used to carry application 1033 state, they will be sent with all requests to the origin by default, 1034 unless scoped by path, and the application might receive cookies from 1035 other applications on the origin. This can lead to security issues, 1036 as well as collision in cookie names. 1038 One solution to these issues is to require a dedicated hostname for 1039 the application, so that it has a unique origin. However, it is 1040 often desirable to allow multiple applications to be deployed on a 1041 single hostname; doing so provides the most deployment flexibility 1042 and enables them to be "mixed" together (See [RFC7320] for details). 1043 Therefore, applications using HTTP should strive to allow multiple 1044 applications on an origin. 1046 To enable this, when specifying the use of Cookies, HTTP 1047 authentication realms [RFC7235], or other origin-wide HTTP 1048 mechanisms, applications using HTTP SHOULD NOT mandate the use of a 1049 particular identifier, but instead let deployments configure them. 1050 Consideration SHOULD be given to scoping them to part of the origin, 1051 using their specified mechanisms for doing so. 1053 Modern Web browsers constrain the ability of content from one origin 1054 to access resources from another, to avoid leaking private 1055 information. As a result, applications that wish to expose cross- 1056 origin data to browsers will need to implement the CORS protocol; see 1057 [FETCH]. 1059 4.14. Server Push 1061 HTTP/2 adds the ability for servers to "push" request/response pairs 1062 to clients in [RFC7540], Section 8.2. While server push seems like a 1063 natural fit for many common application semantics (e.g., "fanout" and 1064 publish/subscribe), a few caveats should be noted: 1066 o Server push is hop-by-hop; that is, it is not automatically 1067 forwarded by intermediaries. As a result, it might not work 1068 easily (or at all) with proxies, reverse proxies, and Content 1069 Delivery Networks. 1071 o Server push can have negative performance impact on HTTP when used 1072 incorrectly; in particular, if there is contention with resources 1073 that have actually been requested by the client. 1075 o Server push is implemented differently in different clients, 1076 especially regarding interaction with HTTP caching, and 1077 capabilities might vary. 1079 o APIs for server push are currently unavailable in some 1080 implementations, and vary widely in others. In particular, there 1081 is no current browser API for it. 1083 o Server push is not supported in HTTP/1.1 or HTTP/1.0. 1085 o Server push does not form part of the "core" semantics of HTTP, 1086 and therefore might not be supported by future versions of the 1087 protocol. 1089 Applications wishing to optimise cases where the client can perform 1090 work related to requests before the full response is available (e.g., 1091 fetching links for things likely to be contained within) might 1092 benefit from using the 103 (Early Hints) status code; see [RFC8297]. 1094 Applications using server push directly need to enforce the 1095 requirements regarding authority in [RFC7540], Section 8.2, to avoid 1096 cross-origin push attacks. 1098 4.15. Versioning and Evolution 1100 It's often necessary to introduce new features into application 1101 protocols, and change existing ones. 1103 In HTTP, backwards-incompatible changes are possible using a number 1104 of mechanisms: 1106 o Using a distinct link relation type [RFC8288] to identify a URL 1107 for a resource that implements the new functionality 1109 o Using a distinct media type [RFC6838] to identify formats that 1110 enable the new functionality 1112 o Using a distinct HTTP header field to implement new functionality 1113 outside the message body 1115 5. IANA Considerations 1117 This document has no requirements for IANA. 1119 6. Security Considerations 1121 Section 4.10 discusses the impact of using stateful mechanisms in the 1122 protocol as ambient authority, and suggests a mitigation. 1124 Section 4.4.2 requires support for 'https' URLs, and discourages the 1125 use of 'http' URLs, to provide authentication, integrity and 1126 confidentiality, as well as mitigate pervasive monitoring attacks. 1128 Section 4.12 highlights the implications of Web browsers' 1129 capabilities on applications that use HTTP. 1131 Section 4.13 discusses the issues that arise when applications are 1132 deployed on the same origin as Web sites (and other applications). 1134 Section 4.14 highlights risks of using HTTP/2 server push in a manner 1135 other than specified. 1137 Applications that use HTTP in a manner that involves modification of 1138 implementations - for example, requiring support for a new URL 1139 scheme, or a non-standard method - risk having those implementations 1140 "fork" from their parent HTTP implementations, with the possible 1141 result that they do not benefit from patches and other security 1142 improvements incorporated upstream. 1144 6.1. Privacy Considerations 1146 HTTP clients can expose a variety of information to servers. Besides 1147 information that's explicitly sent as part of an application's 1148 operation (for example, names and other user-entered data), and "on 1149 the wire" (which is one of the reasons https is recommended in 1150 Section 4.4.2), other information can be gathered through less 1151 obvious means - often by connecting activities of a user over time. 1153 This includes session information, tracking the client through 1154 fingerprinting, and mobile code. 1156 Session information includes things like the IP address of the 1157 client, TLS session tickets, Cookies, ETags stored in the client's 1158 cache, and other stateful mechanisms. Applications are advised to 1159 avoid using session mechanisms unless they are unavoidable or 1160 necessary for operation, in which case these risks needs to be 1161 documented. When they are used, implementations should be encouraged 1162 to allow clearing such state. 1164 Fingerprinting uses unique aspects of a client's messages and 1165 behaviours to connect disparate requests and connections. For 1166 example, the User-Agent request header conveys specific information 1167 about the implementation; the Accept-Language request header conveys 1168 the users' preferred language. In combination, a number of these 1169 markers can be used to uniquely identify a client, impacting its 1170 control over its data. As a result, applications are advised to 1171 specify that clients should only emit the information they need to 1172 function in requests. 1174 Finally, if an application exposes the ability to run mobile code, 1175 great care needs to be taken, since any ability to observe its 1176 environment can be used as an opportunity to both fingerprint the 1177 client and to obtain and manipulate private data (including session 1178 information). For example, access to high-resolution timers (even 1179 indirectly) can be used to profile the underlying hardware, creating 1180 a unique identifier for the system. Applications are advised avoid 1181 allowing the use of mobile code where possible; when it cannot be 1182 avoided, the resulting system's security properties need be carefully 1183 scrutinised. 1185 7. References 1187 7.1. Normative References 1189 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1190 Requirement Levels", BCP 14, RFC 2119, 1191 DOI 10.17487/RFC2119, March 1997, 1192 . 1194 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, 1195 DOI 10.17487/RFC2818, May 2000, 1196 . 1198 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 1199 Procedures for Message Header Fields", BCP 90, RFC 3864, 1200 DOI 10.17487/RFC3864, September 2004, 1201 . 1203 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 1204 DOI 10.17487/RFC6454, December 2011, 1205 . 1207 [RFC6648] Saint-Andre, P., Crocker, D., and M. Nottingham, 1208 "Deprecating the "X-" Prefix and Similar Constructs in 1209 Application Protocols", BCP 178, RFC 6648, 1210 DOI 10.17487/RFC6648, June 2012, 1211 . 1213 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 1214 Specifications and Registration Procedures", BCP 13, 1215 RFC 6838, DOI 10.17487/RFC6838, January 2013, 1216 . 1218 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1219 Protocol (HTTP/1.1): Message Syntax and Routing", 1220 RFC 7230, DOI 10.17487/RFC7230, June 2014, 1221 . 1223 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1224 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 1225 DOI 10.17487/RFC7231, June 2014, 1226 . 1228 [RFC7232] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1229 Protocol (HTTP/1.1): Conditional Requests", RFC 7232, 1230 DOI 10.17487/RFC7232, June 2014, 1231 . 1233 [RFC7233] Fielding, R., Ed., Lafon, Y., Ed., and J. Reschke, Ed., 1234 "Hypertext Transfer Protocol (HTTP/1.1): Range Requests", 1235 RFC 7233, DOI 10.17487/RFC7233, June 2014, 1236 . 1238 [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, 1239 Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", 1240 RFC 7234, DOI 10.17487/RFC7234, June 2014, 1241 . 1243 [RFC7235] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1244 Protocol (HTTP/1.1): Authentication", RFC 7235, 1245 DOI 10.17487/RFC7235, June 2014, 1246 . 1248 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 1249 "Transport Layer Security (TLS) Application-Layer Protocol 1250 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 1251 July 2014, . 1253 [RFC7320] Nottingham, M., "URI Design and Ownership", BCP 190, 1254 RFC 7320, DOI 10.17487/RFC7320, July 2014, 1255 . 1257 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 1258 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 1259 DOI 10.17487/RFC7540, May 2015, 1260 . 1262 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1263 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1264 May 2017, . 1266 [RFC8288] Nottingham, M., "Web Linking", RFC 8288, 1267 DOI 10.17487/RFC8288, October 2017, 1268 . 1270 7.2. Informative References 1272 [CSP] West, M., "Content Security Policy Level 3", World Wide 1273 Web Consortium WD WD-CSP3-20160913, September 2016, 1274 . 1276 [FETCH] WHATWG, "Fetch - Living Standard", n.d., 1277 . 1279 [HTML5] WHATWG, "HTML - Living Standard", n.d., 1280 . 1282 [I-D.ietf-httpbis-header-structure] 1283 Nottingham, M. and P. Kamp, "Structured Headers for HTTP", 1284 draft-ietf-httpbis-header-structure-06 (work in progress), 1285 June 2018. 1287 [REFERRER-POLICY] 1288 Eisinger, J. and E. Stark, "Referrer Policy", World Wide 1289 Web Consortium CR CR-referrer-policy-20170126, January 1290 2017, 1291 . 1293 [RFC3205] Moore, K., "On the use of HTTP as a Substrate", BCP 56, 1294 RFC 3205, DOI 10.17487/RFC3205, February 2002, 1295 . 1297 [RFC4367] Rosenberg, J., Ed. and IAB, "What's in a Name: False 1298 Assumptions about DNS Names", RFC 4367, 1299 DOI 10.17487/RFC4367, February 2006, 1300 . 1302 [RFC4791] Daboo, C., Desruisseaux, B., and L. Dusseault, 1303 "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, 1304 DOI 10.17487/RFC4791, March 2007, 1305 . 1307 [RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed 1308 Authoring and Versioning (WebDAV)", RFC 4918, 1309 DOI 10.17487/RFC4918, June 2007, 1310 . 1312 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1313 (TLS) Protocol Version 1.2", RFC 5246, 1314 DOI 10.17487/RFC5246, August 2008, 1315 . 1317 [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known 1318 Uniform Resource Identifiers (URIs)", RFC 5785, 1319 DOI 10.17487/RFC5785, April 2010, 1320 . 1322 [RFC5861] Nottingham, M., "HTTP Cache-Control Extensions for Stale 1323 Content", RFC 5861, DOI 10.17487/RFC5861, May 2010, 1324 . 1326 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 1327 DOI 10.17487/RFC6265, April 2011, 1328 . 1330 [RFC6415] Hammer-Lahav, E., Ed. and B. Cook, "Web Host Metadata", 1331 RFC 6415, DOI 10.17487/RFC6415, October 2011, 1332 . 1334 [RFC6797] Hodges, J., Jackson, C., and A. Barth, "HTTP Strict 1335 Transport Security (HSTS)", RFC 6797, 1336 DOI 10.17487/RFC6797, November 2012, 1337 . 1339 [RFC7049] Bormann, C. and P. Hoffman, "Concise Binary Object 1340 Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, 1341 October 2013, . 1343 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 1344 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 1345 2014, . 1347 [RFC7538] Reschke, J., "The Hypertext Transfer Protocol Status Code 1348 308 (Permanent Redirect)", RFC 7538, DOI 10.17487/RFC7538, 1349 April 2015, . 1351 [RFC7595] Thaler, D., Ed., Hansen, T., and T. Hardie, "Guidelines 1352 and Registration Procedures for URI Schemes", BCP 35, 1353 RFC 7595, DOI 10.17487/RFC7595, June 2015, 1354 . 1356 [RFC7605] Touch, J., "Recommendations on Using Assigned Transport 1357 Port Numbers", BCP 165, RFC 7605, DOI 10.17487/RFC7605, 1358 August 2015, . 1360 [RFC7616] Shekh-Yusef, R., Ed., Ahrens, D., and S. Bremer, "HTTP 1361 Digest Access Authentication", RFC 7616, 1362 DOI 10.17487/RFC7616, September 2015, 1363 . 1365 [RFC7617] Reschke, J., "The 'Basic' HTTP Authentication Scheme", 1366 RFC 7617, DOI 10.17487/RFC7617, September 2015, 1367 . 1369 [RFC7807] Nottingham, M. and E. Wilde, "Problem Details for HTTP 1370 APIs", RFC 7807, DOI 10.17487/RFC7807, March 2016, 1371 . 1373 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 1374 Interchange Format", STD 90, RFC 8259, 1375 DOI 10.17487/RFC8259, December 2017, 1376 . 1378 [RFC8297] Oku, K., "An HTTP Status Code for Indicating Hints", 1379 RFC 8297, DOI 10.17487/RFC8297, December 2017, 1380 . 1382 [SECCTXT] West, M., "Secure Contexts", World Wide Web Consortium CR 1383 CR-secure-contexts-20160915, September 2016, 1384 . 1386 [XML] Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and 1387 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth 1388 Edition)", World Wide Web Consortium Recommendation REC- 1389 xml-20081126, November 2008, 1390 . 1392 7.3. URIs 1394 [1] https://lists.w3.org/Archives/Public/ietf-http-wg/ 1396 [2] http://httpwg.github.io/ 1398 [3] https://github.com/httpwg/http-extensions/labels/bcp56bis 1400 Appendix A. Changes from RFC 3205 1402 [RFC3205] captured the Best Current Practice in the early 2000's, 1403 based on the concerns facing protocol designers at the time. Use of 1404 HTTP has changed considerably since then, and as a result this 1405 document is substantially different. As a result, the changes are 1406 too numerous to list individually. 1408 Author's Address 1410 Mark Nottingham 1412 Email: mnot@mnot.net 1413 URI: https://www.mnot.net/