Changeset 2741


Ignore:
Timestamp:
Oct 1, 2015, 6:06:06 AM (4 years ago)
Author:
julian.reschke@…
Message:

remove feedback link

Location:
specs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • specs/rfc7538.html

    r2740 r2741  
    55      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    66   <title>The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)</title><script type="application/javascript">
    7 var buttonsAdded = false;
    8 
    9 function initFeedback() {
    10   var fb = document.createElement("div");
    11   fb.className = "feedback noprint";
    12   fb.setAttribute("onclick", "feedback();");
    13   fb.appendChild(document.createTextNode("feedback"));
    14 
    15   document.body.appendChild(fb);
    16 }
    17 
    18 function feedback() {
    19   toggleButtonsToElementsByName("h1");
    20   toggleButtonsToElementsByName("h2");
    21   toggleButtonsToElementsByName("h3");
    22   toggleButtonsToElementsByName("h4");
    23 
    24   buttonsAdded = !buttonsAdded;
    25 }
    26 
    27 function toggleButtonsToElementsByName(name) {
    28   var list = document.getElementsByTagName(name);
    29   for (var i = 0; i < list.length; i++) {
    30     toggleButton(list.item(i));
    31   }
    32 }
    33 
    34 function toggleButton(node) {
    35   if (! buttonsAdded) {
    36 
    37     // docname
    38     var template = "mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&body=<{ref}>:";
    39 
    40     var id = node.getAttribute("id");
    41     // better id available?
    42     var titlelinks = node.getElementsByTagName("a");
    43     for (var i = 0; i < titlelinks.length; i++) {
    44       var tl = titlelinks.item(i);
    45       if (tl.getAttribute("id")) {
    46         id = tl.getAttribute("id");
    47       }
    48     }
    49 
    50     // ref
    51     var ref = window.location.toString();
    52     var hash = ref.indexOf("#");
    53     if (hash != -1) {
    54       ref = ref.substring(0, hash);
    55     }
    56     if (id != "") {
    57       ref += "#" + id;
    58     }
    59 
    60     // docname
    61     var docname = "";
    62 
    63     // section
    64     var section = node.textContent;
    65     section = section.replace("\u00a0", " ");
    66 
    67     // build URI from template
    68     var uri = template.replace("{docname}", encodeURIComponent(docname));
    69     uri = uri.replace("{section}", encodeURIComponent(section));
    70     uri = uri.replace("{ref}", encodeURIComponent(ref));
    71 
    72     var button = document.createElement("a");
    73     button.className = "fbbutton noprint";
    74     button.setAttribute("href", uri);
    75     button.appendChild(document.createTextNode("send feedback"));
    76     node.appendChild(button);
    77   }
    78   else {
    79     var buttons = node.getElementsByTagName("a");
    80     for (var i = 0; i < buttons.length; i++) {
    81       var b = buttons.item(i);
    82       if (b.className == "fbbutton noprint") {
    83         node.removeChild(b);
    84       }
    85     }
    86   }
    87 }</script><script type="application/javascript">
    887function getMeta(rfcno, container) {
    898
     
    505424p:hover .self {
    506425    visibility: visible;
    507 }.feedback {
    508   position: fixed;
    509   bottom: 1%;
    510   right: 1%;
    511   padding: 3px 5px;
    512   color: white;
    513   border-radius: 5px;
    514   background: #006400;
    515   border: 1px solid silver;
    516   -webkit-user-select: none;
    517   -moz-user-select: none;
    518   -ms-user-select: none;
    519 }
    520 .fbbutton {
    521   margin-left: 1em;
    522   color: #303030;
    523   font-size: small;
    524   font-weight: normal;
    525   background: #d0d000;
    526   padding: 1px 4px;
    527   border: 1px solid silver;
    528   border-radius: 5px;
    529426}
    530427.docstatus {
     
    615512    }
    616513}
    617 </style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyrightnotice"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Notational Conventions" href="#rfc.section.2"><link rel="Chapter" title="3 308 Permanent Redirect" href="#rfc.section.3"><link rel="Chapter" title="4 Deployment Considerations" href="#rfc.section.4"><link rel="Chapter" title="5 Security Considerations" href="#rfc.section.5"><link rel="Chapter" title="6 IANA Considerations" href="#rfc.section.6"><link rel="Chapter" href="#rfc.section.7" title="7 References"><link rel="Appendix" title="Acknowledgements" href="#rfc.section.unnumbered-1"><link rel="Alternate" title="Authoritative ASCII Version" href="http://www.ietf.org/rfc/rfc7538.txt"><link rel="Help" title="RFC-Editor's Status Page" href="http://www.rfc-editor.org/info/rfc7538"><link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc7538"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.742, 2015/09/24 15:44:12, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="HTTP, redirect, status code"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Reschke, J. F."><meta name="dct.identifier" content="urn:ietf:rfc:7538"><meta name="dct.issued" scheme="ISO8601" content="2015-04"><meta name="dct.replaces" content="urn:ietf:rfc:7238"><meta name="dct.abstract" content="This document specifies the additional Hypertext Transfer Protocol (HTTP) status code 308 (Permanent Redirect)."><meta name="dct.isPartOf" content="urn:issn:2070-1721"><meta name="description" content="This document specifies the additional Hypertext Transfer Protocol (HTTP) status code 308 (Permanent Redirect)."></head><body onload="getMeta(7538,&#34;rfc.meta&#34;);initFeedback();"><table class="header" id="rfc.headerblock"><tbody><tr><td class="left">Internet Engineering Task Force (IETF)</td><td class="right">J. Reschke</td></tr><tr><td class="left">Request for Comments: 7538</td><td class="right">greenbytes</td></tr><tr><td class="left">Obsoletes: <a href="https://tools.ietf.org/html/rfc7238">7238</a></td><td class="right">April 2015</td></tr><tr><td class="left">Category: Standards Track</td><td class="right"></td></tr><tr><td class="left">ISSN: 2070-1721</td><td class="right"></td></tr></tbody></table><div id="rfc.title"><h1>The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)</h1></div><h2 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h2><p>This document specifies the additional Hypertext Transfer Protocol (HTTP) status code 308 (Permanent Redirect).</p><div id="rfc.meta" class="docstatus"></div><div id="rfc.status"><h2><a href="#rfc.status">Status of This Memo</a></h2><p>This is an Internet Standards Track document.</p><p>This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.</p><p>Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at <a href="http://www.rfc-editor.org/info/rfc7538">http://www.rfc-editor.org/info/rfc7538</a>.</p></div><div id="rfc.copyrightnotice"><h2><a href="#rfc.copyrightnotice">Copyright Notice</a></h2><p>Copyright &copy; 2015 IETF Trust and the persons identified as the document authors. All rights reserved.</p><p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) 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.</p></div><hr class="noprint"><div id="rfc.toc"><h2 class="np"><a href="#rfc.toc">Table of Contents</a></h2><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#notational.conventions">Notational Conventions</a></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#status.308">308 Permanent Redirect</a></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#deployment.considerations">Deployment Considerations</a></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#iana.considerations">IANA Considerations</a></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul><li><a href="#rfc.section.7.1">7.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li><li><a href="#rfc.section.7.2">7.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li></ul></li><li><a href="#acknowledgements">Acknowledgements</a></li><li><a href="#rfc.authors">Author's Address</a></li></ul></div><div id="introduction"><h2 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h2><div id="rfc.section.1.p.1"><p>HTTP defines a set of status codes for the purpose of redirecting a request to a different URI (<a href="#RFC3986"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>). The history of these status codes is summarized in <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#status.3xx" title="Redirection 3xx">Section 6.4</a> of <a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>, which also classifies the existing status codes into four categories.<a class="self" href="#rfc.section.1.p.1">&para;</a></p></div><div id="rfc.section.1.p.2" class="avoidbreakafter"><p>The first of these categories contains the status codes 301 (Moved Permanently), 302 (Found), and 307 (Temporary Redirect), which can be classified as below:<a class="self" href="#rfc.section.1.p.2">&para;</a></p></div><div id="rfc.table.u.1"><table class="tt full tleft" cellpadding="3" cellspacing="0"><thead><tr><th></th><th>Permanent</th><th>Temporary</th></tr></thead><tbody><tr><td class="left">Allows changing the request method from POST to GET</td><td class="left">301</td><td class="left">302</td></tr><tr><td class="left">Does not allow changing the request method from POST to GET</td><td class="left">-</td><td class="left">307</td></tr></tbody></table></div><div id="rfc.section.1.p.3"><p><a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#status.307" title="307 Temporary Redirect">Section 6.4.7</a> of <a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a> states that it does not define a permanent variant of status code 307; this specification adds the status code 308, defining this missing variant (<a href="#status.308" title="308 Permanent Redirect">Section&nbsp;3</a>).<a class="self" href="#rfc.section.1.p.3">&para;</a></p></div><div id="rfc.section.1.p.4"><p>This specification contains no technical changes from the Experimental RFC 7238, which it obsoletes.<a class="self" href="#rfc.section.1.p.4">&para;</a></p></div></div><div id="notational.conventions"><h2 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#notational.conventions">Notational Conventions</a></h2><div id="rfc.section.2.p.1"><p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <a href="#RFC2119"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.<a class="self" href="#rfc.section.2.p.1">&para;</a></p></div></div><div id="status.308"><h2 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a href="#status.308">308 Permanent Redirect</a></h2><div id="rfc.section.3.p.1"><p>The <dfn>308 (Permanent Redirect)</dfn> status code indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. Clients with link editing capabilities ought to automatically re-link references to the effective request URI (<a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#RFC7230"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>) to one or more of the new references sent by the server, where possible.<a class="self" href="#rfc.section.3.p.1">&para;</a></p></div><div id="rfc.section.3.p.2"><p>The server <em class="bcp14">SHOULD</em> generate a Location header field (<a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>, <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#header.location" title="Location">Section 7.1.2</a>) in the response containing a preferred URI reference for the new permanent URI. The user agent <em class="bcp14">MAY</em> use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the new URI(s).<a class="self" href="#rfc.section.3.p.2">&para;</a></p></div><div id="rfc.section.3.p.3"><p>A 308 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="#RFC7234"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>, <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a>).<a class="self" href="#rfc.section.3.p.3">&para;</a></p></div><div class="note"><div id="rfc.section.3.p.4"><p><b>Note:</b> This status code is similar to 301 (Moved Permanently) (<a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>, <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#status.301" title="301 Moved Permanently">Section 6.4.2</a>), except that it does not allow changing the request method from POST to GET.<a class="self" href="#rfc.section.3.p.4">&para;</a></p></div></div></div><div id="deployment.considerations"><h2 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a href="#deployment.considerations">Deployment Considerations</a></h2><div id="rfc.section.4.p.1"><p><a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#status.codes" title="Response Status Codes">Section 6</a> of <a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a> requires recipients to treat unknown 3xx status codes the same way as status code 300 (Multiple Choices) (<a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>, <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#status.300" title="300 Multiple Choices">Section 6.4.1</a>). Thus, servers will not be able to rely on automatic redirection happening similar to status codes 301, 302, or 307.<a class="self" href="#rfc.section.4.p.1">&para;</a></p></div><div id="rfc.section.4.p.2"><p>Therefore, the use of status code 308 is restricted to cases where the server has sufficient confidence in the client's understanding the new code or when a fallback to the semantics of status code 300 is not problematic. Server implementers are advised not to vary the status code based on characteristics of the request, such as the User-Agent header field ("User-Agent Sniffing") &#8212; doing so usually results in code that is both hard to maintain and hard to debug and would also require special attention to caching (i.e., setting a "Vary" response header field, as defined in <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#header.vary" title="Vary">Section 7.1.4</a> of <a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>).<a class="self" href="#rfc.section.4.p.2">&para;</a></p></div><div id="rfc.section.4.p.3" class="avoidbreakafter"><p>Note that many existing HTML-based user agents will emulate a refresh when encountering an HTML &lt;meta&gt; refresh directive (<a href="#HTML"><cite title="HTML5">[HTML]</cite></a>, <a href="http://www.w3.org/TR/2014/REC-html5-20141028/document-metadata.html#pragma-directives">Section 4.2.5.3</a>). This can be used as another fallback. For example:<a class="self" href="#rfc.section.4.p.3">&para;</a></p></div><div id="rfc.figure.u.1"><p>Client request:</p><pre class="text2">GET / HTTP/1.1
     514</style><link rel="Contents" href="#rfc.toc"><link rel="Author" href="#rfc.authors"><link rel="Copyright" href="#rfc.copyrightnotice"><link rel="Chapter" title="1 Introduction" href="#rfc.section.1"><link rel="Chapter" title="2 Notational Conventions" href="#rfc.section.2"><link rel="Chapter" title="3 308 Permanent Redirect" href="#rfc.section.3"><link rel="Chapter" title="4 Deployment Considerations" href="#rfc.section.4"><link rel="Chapter" title="5 Security Considerations" href="#rfc.section.5"><link rel="Chapter" title="6 IANA Considerations" href="#rfc.section.6"><link rel="Chapter" href="#rfc.section.7" title="7 References"><link rel="Appendix" title="Acknowledgements" href="#rfc.section.unnumbered-1"><link rel="Alternate" title="Authoritative ASCII Version" href="http://www.ietf.org/rfc/rfc7538.txt"><link rel="Help" title="RFC-Editor's Status Page" href="http://www.rfc-editor.org/info/rfc7538"><link rel="Help" title="Additional Information on tools.ietf.org" href="http://tools.ietf.org/html/rfc7538"><meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.743, 2015/09/25 12:36:08, XSLT vendor: SAXON 6.5.5 from Michael Kay http://saxon.sf.net/"><meta name="keywords" content="HTTP, redirect, status code"><link rel="schema.dct" href="http://purl.org/dc/terms/"><meta name="dct.creator" content="Reschke, J. F."><meta name="dct.identifier" content="urn:ietf:rfc:7538"><meta name="dct.issued" scheme="ISO8601" content="2015-04"><meta name="dct.replaces" content="urn:ietf:rfc:7238"><meta name="dct.abstract" content="This document specifies the additional Hypertext Transfer Protocol (HTTP) status code 308 (Permanent Redirect)."><meta name="dct.isPartOf" content="urn:issn:2070-1721"><meta name="description" content="This document specifies the additional Hypertext Transfer Protocol (HTTP) status code 308 (Permanent Redirect)."></head><body onload="getMeta(7538,&#34;rfc.meta&#34;);"><table class="header" id="rfc.headerblock"><tbody><tr><td class="left">Internet Engineering Task Force (IETF)</td><td class="right">J. Reschke</td></tr><tr><td class="left">Request for Comments: 7538</td><td class="right">greenbytes</td></tr><tr><td class="left">Obsoletes: <a href="https://tools.ietf.org/html/rfc7238">7238</a></td><td class="right">April 2015</td></tr><tr><td class="left">Category: Standards Track</td><td class="right"></td></tr><tr><td class="left">ISSN: 2070-1721</td><td class="right"></td></tr></tbody></table><div id="rfc.title"><h1>The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect)</h1></div><h2 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h2><p>This document specifies the additional Hypertext Transfer Protocol (HTTP) status code 308 (Permanent Redirect).</p><div id="rfc.meta" class="docstatus"></div><div id="rfc.status"><h2><a href="#rfc.status">Status of This Memo</a></h2><p>This is an Internet Standards Track document.</p><p>This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.</p><p>Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at <a href="http://www.rfc-editor.org/info/rfc7538">http://www.rfc-editor.org/info/rfc7538</a>.</p></div><div id="rfc.copyrightnotice"><h2><a href="#rfc.copyrightnotice">Copyright Notice</a></h2><p>Copyright &copy; 2015 IETF Trust and the persons identified as the document authors. All rights reserved.</p><p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) 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.</p></div><hr class="noprint"><div id="rfc.toc"><h2 class="np"><a href="#rfc.toc">Table of Contents</a></h2><ul class="toc"><li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#introduction">Introduction</a></li><li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#notational.conventions">Notational Conventions</a></li><li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#status.308">308 Permanent Redirect</a></li><li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#deployment.considerations">Deployment Considerations</a></li><li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#security.considerations">Security Considerations</a></li><li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#iana.considerations">IANA Considerations</a></li><li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a><ul><li><a href="#rfc.section.7.1">7.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.1">Normative References</a></li><li><a href="#rfc.section.7.2">7.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references.2">Informative References</a></li></ul></li><li><a href="#acknowledgements">Acknowledgements</a></li><li><a href="#rfc.authors">Author's Address</a></li></ul></div><div id="introduction"><h2 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#introduction">Introduction</a></h2><div id="rfc.section.1.p.1"><p>HTTP defines a set of status codes for the purpose of redirecting a request to a different URI (<a href="#RFC3986"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>). The history of these status codes is summarized in <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#status.3xx" title="Redirection 3xx">Section 6.4</a> of <a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>, which also classifies the existing status codes into four categories.<a class="self" href="#rfc.section.1.p.1">&para;</a></p></div><div id="rfc.section.1.p.2" class="avoidbreakafter"><p>The first of these categories contains the status codes 301 (Moved Permanently), 302 (Found), and 307 (Temporary Redirect), which can be classified as below:<a class="self" href="#rfc.section.1.p.2">&para;</a></p></div><div id="rfc.table.u.1"><table class="tt full tleft" cellpadding="3" cellspacing="0"><thead><tr><th></th><th>Permanent</th><th>Temporary</th></tr></thead><tbody><tr><td class="left">Allows changing the request method from POST to GET</td><td class="left">301</td><td class="left">302</td></tr><tr><td class="left">Does not allow changing the request method from POST to GET</td><td class="left">-</td><td class="left">307</td></tr></tbody></table></div><div id="rfc.section.1.p.3"><p><a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#status.307" title="307 Temporary Redirect">Section 6.4.7</a> of <a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a> states that it does not define a permanent variant of status code 307; this specification adds the status code 308, defining this missing variant (<a href="#status.308" title="308 Permanent Redirect">Section&nbsp;3</a>).<a class="self" href="#rfc.section.1.p.3">&para;</a></p></div><div id="rfc.section.1.p.4"><p>This specification contains no technical changes from the Experimental RFC 7238, which it obsoletes.<a class="self" href="#rfc.section.1.p.4">&para;</a></p></div></div><div id="notational.conventions"><h2 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#notational.conventions">Notational Conventions</a></h2><div id="rfc.section.2.p.1"><p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <a href="#RFC2119"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</cite></a>.<a class="self" href="#rfc.section.2.p.1">&para;</a></p></div></div><div id="status.308"><h2 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a href="#status.308">308 Permanent Redirect</a></h2><div id="rfc.section.3.p.1"><p>The <dfn>308 (Permanent Redirect)</dfn> status code indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. Clients with link editing capabilities ought to automatically re-link references to the effective request URI (<a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7230.html#effective.request.uri" title="Effective Request URI">Section 5.5</a> of <a href="#RFC7230"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[RFC7230]</cite></a>) to one or more of the new references sent by the server, where possible.<a class="self" href="#rfc.section.3.p.1">&para;</a></p></div><div id="rfc.section.3.p.2"><p>The server <em class="bcp14">SHOULD</em> generate a Location header field (<a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>, <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#header.location" title="Location">Section 7.1.2</a>) in the response containing a preferred URI reference for the new permanent URI. The user agent <em class="bcp14">MAY</em> use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the new URI(s).<a class="self" href="#rfc.section.3.p.2">&para;</a></p></div><div id="rfc.section.3.p.3"><p>A 308 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see <a href="#RFC7234"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Caching">[RFC7234]</cite></a>, <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7234.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 4.2.2</a>).<a class="self" href="#rfc.section.3.p.3">&para;</a></p></div><div class="note"><div id="rfc.section.3.p.4"><p><b>Note:</b> This status code is similar to 301 (Moved Permanently) (<a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>, <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#status.301" title="301 Moved Permanently">Section 6.4.2</a>), except that it does not allow changing the request method from POST to GET.<a class="self" href="#rfc.section.3.p.4">&para;</a></p></div></div></div><div id="deployment.considerations"><h2 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a href="#deployment.considerations">Deployment Considerations</a></h2><div id="rfc.section.4.p.1"><p><a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#status.codes" title="Response Status Codes">Section 6</a> of <a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a> requires recipients to treat unknown 3xx status codes the same way as status code 300 (Multiple Choices) (<a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>, <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#status.300" title="300 Multiple Choices">Section 6.4.1</a>). Thus, servers will not be able to rely on automatic redirection happening similar to status codes 301, 302, or 307.<a class="self" href="#rfc.section.4.p.1">&para;</a></p></div><div id="rfc.section.4.p.2"><p>Therefore, the use of status code 308 is restricted to cases where the server has sufficient confidence in the client's understanding the new code or when a fallback to the semantics of status code 300 is not problematic. Server implementers are advised not to vary the status code based on characteristics of the request, such as the User-Agent header field ("User-Agent Sniffing") &#8212; doing so usually results in code that is both hard to maintain and hard to debug and would also require special attention to caching (i.e., setting a "Vary" response header field, as defined in <a href="https://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7231.html#header.vary" title="Vary">Section 7.1.4</a> of <a href="#RFC7231"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[RFC7231]</cite></a>).<a class="self" href="#rfc.section.4.p.2">&para;</a></p></div><div id="rfc.section.4.p.3" class="avoidbreakafter"><p>Note that many existing HTML-based user agents will emulate a refresh when encountering an HTML &lt;meta&gt; refresh directive (<a href="#HTML"><cite title="HTML5">[HTML]</cite></a>, <a href="http://www.w3.org/TR/2014/REC-html5-20141028/document-metadata.html#pragma-directives">Section 4.2.5.3</a>). This can be used as another fallback. For example:<a class="self" href="#rfc.section.4.p.3">&para;</a></p></div><div id="rfc.figure.u.1"><p>Client request:</p><pre class="text2">GET / HTTP/1.1
    618515Host: example.com
    619516
  • specs/rfc7538.xml

    r2737 r2741  
    2727<rfc xmlns:x="http://purl.org/net/xml2rfc/ext" obsoletes="7238" xmlns:ed="http://greenbytes.de/2002/rfcedit" ipr="trust200902" number="7538" category="std" xml:lang="en">
    2828
    29   <x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>
     29  <!--<x:feedback template="mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&amp;body=&lt;{ref}&gt;:"/>-->
    3030
    3131        <front>
Note: See TracChangeset for help on using the changeset viewer.