idnits 2.17.1 draft-nottingham-http-new-status-01.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 draft header indicates that this document updates RFC2616, 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 (Using the creation date from RFC2616, updated by this document, for RFC5378 checks: 1997-10-16) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (August 13, 2011) is 4639 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Nottingham 3 Internet-Draft 4 Updates: 2616 (if approved) R. Fielding 5 Intended status: Standards Track Adobe 6 Expires: February 14, 2012 August 13, 2011 8 Additional HTTP Status Codes 9 draft-nottingham-http-new-status-01 11 Abstract 13 This document specifies additional HyperText Transfer Protocol (HTTP) 14 status codes for a variety of common situations. 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 February 14, 2012. 33 Copyright Notice 35 Copyright (c) 2011 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 51 2. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 3 52 3. 428 Network Authentication Required . . . . . . . . . . . . . . 3 53 3.1. The 428 Status Code and Captive Portals . . . . . . . . . . 3 54 4. 429 Limit Exceeded . . . . . . . . . . . . . . . . . . . . . . 4 55 5. 431 Request Header Fields Too Large . . . . . . . . . . . . . . 5 56 6. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 57 6.1. 428 Network Authentication Required . . . . . . . . . . . . 6 58 6.2. 429 Limit Exceeded . . . . . . . . . . . . . . . . . . . . 6 59 6.3. 431 Request Header Fields Too Large . . . . . . . . . . . . 6 60 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6 61 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7 62 8.1. Normative References . . . . . . . . . . . . . . . . . . . 7 63 8.2. Informative References . . . . . . . . . . . . . . . . . . 7 64 Appendix A. Issues Raised by Captive Portals . . . . . . . . . . . 7 65 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 8 67 1. Introduction 69 This document specifies additional HTTP [RFC2616] status codes for a 70 variety of common situations, to improve interoperability and avoid 71 confusion when other, less precise status codes are used. 73 Feedback should occur on the ietf-http-wg@w3.org mailing list, 74 although this draft is NOT a work item of the IETF HTTPbis Working 75 Group. 77 2. Requirements 79 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 80 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 81 document are to be interpreted as described in [RFC2119]. 83 3. 428 Network Authentication Required 85 This status code indicates that the client needs to authenticate to 86 gain network access. 88 The response representation SHOULD indicate how to do this; e.g., 89 with an HTML form for submitting credentials. 91 The 428 status SHOULD NOT be generated by origin servers; it is 92 intended for use by intermediaries. 94 Responses with the 428 status code MUST NOT be stored by a cache. 96 3.1. The 428 Status Code and Captive Portals 98 This section demonstrates a typical use of the 428 status code; it is 99 not normative. See Appendix A for an explanation of the issues that 100 motivate this status code. 102 A network operator wishing to require some authentication, acceptance 103 of terms or other user interaction before granting access usually 104 does so by identify clients who have not done so ("unknown clients") 105 using their MAC addresses. 107 Unknown clients then have all traffic blocked, except for that on TCP 108 port 80, which is sent to a HTTP server (the "login server") 109 dedicated to "logging in" unknown clients, and of course traffic to 110 the login server itself. 112 For example, a user agent might connect to a network and make the 113 following HTTP request on TCP port 80: 115 GET /index.htm HTTP/1.1 116 Host: www.example.com 118 Upon receiving such a request, the login server would generate a 428 119 response: 121 HTTP/1.1 428 Network Authentication Required 122 Refresh: 0; url=https://login.example.net/ 123 Content-Type: text/html 125 126 127 Network Authentication Required 128 129 130

You are being redirected to log into the network...

131 132 134 Here, the 428 status code assures that non-browser clients will not 135 interpret the response as being from the origin server, and the 136 Refresh header redirects the user agent to the login server (an HTML 137 META element can be used for this as well). 139 Note that the 428 response can itself contain the login interface, 140 but it may not be desirable to do so, because browsers would show the 141 login interface as being associated with the originally requested 142 URL, which may cause confusion. 144 4. 429 Limit Exceeded 146 This status code indicates that the client has exceeded some usage 147 limit on the origin server, such as sending too many requests in a 148 given amount of time ("rate limiting"). 150 The response representations SHOULD include details explaining the 151 limit, and MAY include a Retry-After header indicating how long to 152 wait before making a new request. 154 For example: 156 HTTP/1.1 429 Limit Exceeded 157 Content-Type: text/html 158 Retry-After: 3600 160 161 162 Limit Exceeded 163 164 165

Limit Exceeded

166

I only allow 50 requests per hour to this Web site. 167 Try again soon.

168 169 171 Note that this specification does not define specific limits, nor 172 their scope. For example, an origin server that is limiting request 173 rates can do so based upon counts of requests on a per-resource 174 basis, across the entire server, or even among a set of servers. 176 Responses with the 429 status code MUST NOT be stored by a cache. 178 5. 431 Request Header Fields Too Large 180 This status code indicates that the server is unwilling to process 181 the request because its header fields are too large. The request MAY 182 be resubmitted after reducing the size of the request header fields. 184 It can be used both when the set of request header fields in total 185 are too large, and when a single header field is at fault. In the 186 latter case, the response representation SHOULD specify which header 187 field was too large. 189 For example: 191 HTTP/1.1 431 Request Header Fields Too Large 192 Content-Type: text/html 194 195 196 Request Header Fields Too Large 197 198 199

Request Header Fields Too Large

200

The "Example" header was too large.

201 202 203 Responses with the 431 status code MUST NOT be stored by a cache. 205 6. Security Considerations 207 6.1. 428 Network Authentication Required 209 In common use, a response carrying the 428 status code will not come 210 from the origin server indicated in the request's URL. This presents 211 many security issues; e.g., an attacking intermediary may be 212 inserting cookies into the original domain's name space, may be 213 observing cookies or HTTP authentication credentials sent from the 214 user agent, and so on. 216 However, these risks are not unique to the 428 status code; in other 217 words, a captive portal that is not using this status code introduces 218 the same issues. 220 6.2. 429 Limit Exceeded 222 Servers are not required to use the 429 status code; when limiting 223 resource usage, it may be more appropriate to just drop connections, 224 or take other steps. 226 6.3. 431 Request Header Fields Too Large 228 Servers are not required to use the 431 status code; when under 229 attack, it may be more appropriate to just drop connections, or take 230 other steps. 232 7. IANA Considerations 234 The HTTP Status Codes Registry should be updated with the following 235 entries: 237 o Code: 428 238 o Description: Network Authentication Required 239 o Specification: [ this document ] 241 o Code: 429 242 o Description: Limit Exceeded 243 o Specification: [ this document ] 245 o Code: 431 246 o Description: Request Header Fields Too Large 247 o Specification: [ this document ] 249 8. References 251 8.1. Normative References 253 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 254 Requirement Levels", BCP 14, RFC 2119, March 1997. 256 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 257 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 258 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 260 8.2. Informative References 262 [RFC4791] Daboo, C., Desruisseaux, B., and L. Dusseault, 263 "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, 264 March 2007. 266 [RFC4918] Dusseault, L., "HTTP Extensions for Web Distributed 267 Authoring and Versioning (WebDAV)", RFC 4918, June 2007. 269 Appendix A. Issues Raised by Captive Portals 271 Since clients cannot differentiate between a portal's response and 272 that of the HTTP server that they intended to communicate with, a 273 number of issues arise. 275 One example is the "favicon.ico" 276 commonly used by browsers to 277 identify the site being accessed. If the favicon for a given site is 278 fetched from a captive portal instead of the intended site (e.g., 279 because the user is unauthenticated), it will often "stick" in the 280 browser's cache (most implementations cache favicons aggressively) 281 beyond the portal session, so that it seems as if the portal's 282 favicon has "taken over" the legitimate site. 284 Another browser-based issue comes about when P3P 285 is supported. Depending on how it is 286 implemented, it's possible a browser might interpret a portal's 287 response for the p3p.xml file as the server's, resulting in the 288 privacy policy (or lack thereof) advertised by the portal being 289 interpreted as applying to the intended site. Other Web-based 290 protocols such as WebFinger 291 , CORS 292 and OAuth 293 may also be 294 vulnerable to such issues. 296 Although HTTP is most widely used with Web browsers, a growing number 297 of non-browsing applications use it as a substrate protocol. For 298 example, WebDAV [RFC4918] and CalDAV [RFC4791] both use HTTP as the 299 basis (for network filesystem access and calendaring, respectively). 300 Using these applications from behind a captive portal can result in 301 spurious errors being presented to the user, and might result in 302 content corruption, in extreme cases. 304 Similarly, other non-browser applications using HTTP can be affected 305 as well; e.g., widgets , software 306 updates, and other specialised software such as Twitter clients and 307 the iTunes Music Store. 309 It should be noted that it's sometimes believed that using HTTP 310 redirection to direct traffic to the portal addresses these issues. 311 However, since many of these uses "follow" redirects, this is not a 312 good solution. 314 Authors' Addresses 316 Mark Nottingham 318 Email: mnot@mnot.net 319 URI: http://www.mnot.net/ 321 Roy T. Fielding 322 Adobe Systems Incorporated 323 345 Park Ave 324 San Jose, CA 95110 325 USA 327 Email: fielding@gbiv.com 328 URI: http://roy.gbiv.com/