Network Working Group M. Nottingham Internet-Draft Rackspace Updates: 2616 (if approved) R. Fielding Intended status: Standards Track Adobe Expires: April 20, 2012 October 18, 2011 Additional HTTP Status Codes draft-nottingham-http-new-status-02 Abstract This document specifies additional HyperText Transfer Protocol (HTTP) status codes for a variety of common situations. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on April 20, 2012. Copyright Notice Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (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. Nottingham & Fielding Expires April 20, 2012 [Page 1]

Internet-Draft Additional HTTP Status Codes October 2011 1 . Introduction RFC2616] status codes for a variety of common situations, to improve interoperability and avoid confusion when other, less precise status codes are used. Feedback should occur on the ietf-http-wg@w3.org mailing list, although this draft is NOT a work item of the IETF HTTPbis Working Group. 2 . Requirements RFC2119]. 3 . 428 Precondition Required Nottingham & Fielding Expires April 20, 2012 [Page 3]

Internet-Draft Additional HTTP Status Codes October 2011 4 . 429 Too Many Requests 5 . 431 Request Header Fields Too Large Nottingham & Fielding Expires April 20, 2012 [Page 4]

Internet-Draft Additional HTTP Status Codes October 2011 HTTP/1.1 431 Request Header Fields Too Large Content-Type: text/html <html> <head> <title>Request Header Fields Too Large</title> </head> <body> <h1>Request Header Fields Too Large</h1> <p>The "Example" header was too large.</p> </body> </html> Responses with the 431 status code MUST NOT be stored by a cache. 6 . 511 Network Authentication Required 6.1 . The 511 Status Code and Captive Portals Nottingham & Fielding Expires April 20, 2012 [Page 5]

Internet-Draft Additional HTTP Status Codes October 2011 Upon receiving such a request, the login server would generate a 511 response: HTTP/1.1 511 Network Authentication Required Refresh: 0; url=https://login.example.net/ Content-Type: text/html <html> <head> <title>Network Authentication Required</title> </head> <body> <p>You need to <a href="https://login.example.net/"> authenticate with the local network</a> in order to get access.</p> </body> </html> Here, the 511 status code assures that non-browser clients will not interpret the response as being from the origin server, and the Refresh header redirects the user agent to the login server (an HTML META element can be used for this as well). Note that the 511 response can itself contain the login interface, but it may not be desirable to do so, because browsers would show the login interface as being associated with the originally requested URL, which may cause confusion. 7 . Security Considerations 7.1 . 428 Precondition Required 7.2 . 429 Too Many Requests 7.3 . 431 Request Header Fields Too Large Nottingham & Fielding Expires April 20, 2012 [Page 6]

Internet-Draft Additional HTTP Status Codes October 2011 9.2 . Informative References RFC4791] Daboo, C., Desruisseaux, B., and L. Dusseault, "Calendaring Extensions to WebDAV (CalDAV)", RFC 4791, March 2007. [RFC4918] Dusseault, L., "HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)", RFC 4918, June 2007. Appendix A . Acknowledgements Appendix B . Issues Raised by Captive Portals http://en.wikipedia.org/wiki/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. Another browser-based issue comes about when P3P <http://www.w3.org/TR/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 <http://code.google.com/p/webfinger/wiki/WebFingerProtocol>, CORS <http://www.w3.org/TR/cors/> and OAuth <http://tools.ietf.org/html/draft-ietf-oauth-v2> may also be vulnerable to such issues. Although HTTP is most widely used with Web browsers, a growing number of non-browsing applications use it as a substrate protocol. For example, WebDAV [RFC4918] and CalDAV [RFC4791] both use HTTP as the basis (for network filesystem access and calendaring, respectively). Nottingham & Fielding Expires April 20, 2012 [Page 8]

Internet-Draft Additional HTTP Status Codes October 2011 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. Similarly, other non-browser applications using HTTP can be affected as well; e.g., widgets <http://www.w3.org/TR/widgets/>, software updates, and other specialised software such as Twitter clients and the iTunes Music Store. It 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. Authors' Addresses Mark Nottingham Rackspace Email: mnot@mnot.net URI: http://www.mnot.net/ Roy T. Fielding Adobe Systems Incorporated 345 Park Ave San Jose, CA 95110 USA Email: fielding@gbiv.com URI: http://roy.gbiv.com/ Nottingham & Fielding Expires April 20, 2012 [Page 9]