* WGs marked with an * asterisk has had at least one new draft made available during the last 5 days

Changeset 1428


Ignore:
Timestamp:
2011-09-01 01:55:31 (3 years ago)
Author:
julian.reschke@gmx.de
Message:

explain types of redirects, history of changes, and allow POST->GET rewriting for 301/302 (see [160])

Location:
draft-ietf-httpbis/latest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p2-semantics.html

    r1427 r1428  
    16931693      <h2 id="rfc.section.7.3"><a href="#rfc.section.7.3">7.3</a>&nbsp;<a id="status.3xx" href="#status.3xx">Redirection 3xx</a></h2> 
    16941694      <p id="rfc.section.7.3.p.1">This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. 
    1695          The action required <em class="bcp14">MAY</em> be carried out by the user agent without interaction with the user if and only if the method used in the second request is 
    1696          known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section&nbsp;6.1.1</a>. A client <em class="bcp14">SHOULD</em> detect infinite redirection loops, since such loops generate network traffic for each redirection. 
    1697       </p> 
    1698       <div class="note" id="rfc.section.7.3.p.2">  
    1699          <p> <b>Note:</b> An earlier version of this specification recommended a maximum of five redirections (<a href="#RFC2068" id="rfc.xref.RFC2068.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>, <a href="http://tools.ietf.org/html/rfc2068#section-10.3">Section 10.3</a>). Content developers need to be aware that some clients might implement such a fixed limitation. 
     1695         If the required action involves a subsequent HTTP request, it <em class="bcp14">MAY</em> be carried out by the user agent without interaction with the user if and only if the method used in the second request is 
     1696         known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section&nbsp;6.1.1</a>. 
     1697      </p> 
     1698      <p id="rfc.section.7.3.p.2">There are several types of redirects: </p> 
     1699      <ol> 
     1700         <li> 
     1701            <p>Redirects of the request to another URI, either temporarily or permanently. The new URI is specified in the Location header 
     1702               field. In this specification, the status codes 301 (Moved Permanently), 302 (Found), and 307 (Temporary Redirect) fall under 
     1703               this category. 
     1704            </p> 
     1705         </li> 
     1706         <li> 
     1707            <p>Redirection to a new location that represents an indirect response to the request, such as the result of a POST operation 
     1708               to be retrieved with a subsequent GET request. This is status code 303 (See Other). 
     1709            </p> 
     1710         </li> 
     1711         <li> 
     1712            <p>Redirection offering a choice of matching resources for use by agent-driven content negotiation (<a href="p3-payload.html#agent-driven.negotiation" title="Agent-driven Negotiation">Section 5.2</a> of <a href="#Part3" id="rfc.xref.Part3.7"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). This is status code 300 (Multiple Choices). 
     1713            </p> 
     1714         </li> 
     1715         <li> 
     1716            <p>Other kinds of redirection, such as to a cached result (status code 304 (Not Modified)).</p> 
     1717         </li> 
     1718      </ol> 
     1719      <div class="note" id="rfc.section.7.3.p.3">  
     1720         <p> <b>Note:</b> In HTTP/1.0, only the status codes 301 (Moved Permanently) and 302 (Found) were defined for the first type of redirect, and 
     1721            the second type did not exist at all (<a href="#RFC1945" id="rfc.xref.RFC1945.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.0">[RFC1945]</cite></a>, <a href="http://tools.ietf.org/html/rfc1945#section-9.3">Section 9.3</a>). However it turned out that web forms using POST expected redirects to change the operation for the subsequent request to 
     1722            retrieval (GET). To address this use case, HTTP/1.1 introduced the second type of redirect with the status code 303 (See Other) 
     1723            (<a href="#RFC2068" id="rfc.xref.RFC2068.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>, <a href="http://tools.ietf.org/html/rfc2068#section-10.3.4">Section 10.3.4</a>). As user agents did not change their behavior to maintain backwards compatibility, the first revision of HTTP/1.1 added 
     1724            yet another status code, 307 (Temporary Redirect), for which the backwards compatibility problems did not apply (<a href="#RFC2616" id="rfc.xref.RFC2616.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>, <a href="http://tools.ietf.org/html/rfc2616#section-10.3.8">Section 10.3.8</a>). Over 10 years later, most user agents still do method rewriting for status codes 301 and 302, therefore this specification 
     1725            makes that behavior compliant in case the original request was POST. 
     1726         </p>  
     1727      </div> 
     1728      <p id="rfc.section.7.3.p.4">Clients <em class="bcp14">SHOULD</em> detect and intervene in cyclical redirections (i.e., "infinite" redirection loops). 
     1729      </p> 
     1730      <div class="note" id="rfc.section.7.3.p.5">  
     1731         <p> <b>Note:</b> An earlier version of this specification recommended a maximum of five redirections (<a href="#RFC2068" id="rfc.xref.RFC2068.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>, <a href="http://tools.ietf.org/html/rfc2068#section-10.3">Section 10.3</a>). Content developers need to be aware that some clients might implement such a fixed limitation. 
    17001732         </p>  
    17011733      </div> 
     
    17041736      <h3 id="rfc.section.7.3.1"><a href="#rfc.section.7.3.1">7.3.1</a>&nbsp;<a id="status.300" href="#status.300">300 Multiple Choices</a></h3> 
    17051737      <p id="rfc.section.7.3.1.p.1">The target resource has more than one representation, each with its own specific location, and agent-driven negotiation information 
    1706          (<a href="p3-payload.html#content.negotiation" title="Content Negotiation">Section 5</a> of <a href="#Part3" id="rfc.xref.Part3.7"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>) is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to that 
     1738         (<a href="p3-payload.html#content.negotiation" title="Content Negotiation">Section 5</a> of <a href="#Part3" id="rfc.xref.Part3.8"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>) is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to that 
    17071739         location. 
    17081740      </p> 
     
    17291761      </p> 
    17301762      <div class="note" id="rfc.section.7.3.2.p.5">  
    1731          <p> <b>Note:</b> When automatically redirecting a POST request after receiving a 301 status code, some existing HTTP/1.0 user agents will erroneously 
    1732             change it into a GET request. 
     1763         <p> <b>Note:</b> For historic reasons, user agents <em class="bcp14">MAY</em> change the request method from POST to GET for the subsequent request. If this behavior is undesired, status code 307 (Temporary 
     1764            Redirect) can be used instead. 
    17331765         </p>  
    17341766      </div> 
     
    17441776      </p> 
    17451777      <div class="note" id="rfc.section.7.3.3.p.4">  
    1746          <p> <b>Note:</b> HTTP/1.0 (<a href="#RFC1945" id="rfc.xref.RFC1945.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.0">[RFC1945]</cite></a>, <a href="http://tools.ietf.org/html/rfc1945#section-9.3">Section 9.3</a>) and the first version of HTTP/1.1 (<a href="#RFC2068" id="rfc.xref.RFC2068.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>, <a href="http://tools.ietf.org/html/rfc2068#section-10.3.3">Section 10.3.3</a>) specify that the client is not allowed to change the method on the redirected request. However, most existing user agent 
    1747             implementations treat 302 as if it were a 303 response, performing a GET on the Location field-value regardless of the original 
    1748             request method. Therefore, a previous version of this specification (<a href="#RFC2616" id="rfc.xref.RFC2616.2"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a>, <a href="http://tools.ietf.org/html/rfc2616#section-10.3.3">Section 10.3.3</a>) has added the status codes <a href="#status.303" id="rfc.xref.status.303.2">303</a> and <a href="#status.307" id="rfc.xref.status.307.2">307</a> for servers that wish to make unambiguously clear which kind of reaction is expected of the client. 
     1778         <p> <b>Note:</b> For historic reasons, user agents <em class="bcp14">MAY</em> change the request method from POST to GET for the subsequent request. If this behavior is undesired, status code 307 (Temporary 
     1779            Redirect) can be used instead. <span class="comment" id="issue312">[<a href="#issue312" class="smpl">issue312</a>: but see &lt;<a href="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/312">http://trac.tools.ietf.org/wg/httpbis/trac/ticket/312</a>&gt;]</span>  
    17491780         </p>  
    17501781      </div> 
     
    18451876      <h3 id="rfc.section.7.4.7"><a href="#rfc.section.7.4.7">7.4.7</a>&nbsp;<a id="status.406" href="#status.406">406 Not Acceptable</a></h3> 
    18461877      <p id="rfc.section.7.4.7.p.1">The resource identified by the request is only capable of generating response representations which have content characteristics 
    1847          not acceptable according to the Accept and Accept-* header fields sent in the request (see <a href="p3-payload.html#header.field.definitions" title="Header Field Definitions">Section 6</a> of <a href="#Part3" id="rfc.xref.Part3.8"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). 
     1878         not acceptable according to the Accept and Accept-* header fields sent in the request (see <a href="p3-payload.html#header.field.definitions" title="Header Field Definitions">Section 6</a> of <a href="#Part3" id="rfc.xref.Part3.9"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). 
    18481879      </p> 
    18491880      <p id="rfc.section.7.4.7.p.2">Unless it was a HEAD request, the response <em class="bcp14">SHOULD</em> include a representation containing a list of available representation characteristics and location(s) from which the user 
     
    20942125      </div> 
    20952126      <div class="note" id="rfc.section.8.4.p.9">  
    2096          <p> <b>Note:</b> The Content-Location header field (<a href="p3-payload.html#header.content-location" title="Content-Location">Section 6.7</a> of <a href="#Part3" id="rfc.xref.Part3.9"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>) differs from Location in that the Content-Location identifies the most specific resource corresponding to the enclosed representation. 
     2127         <p> <b>Note:</b> The Content-Location header field (<a href="p3-payload.html#header.content-location" title="Content-Location">Section 6.7</a> of <a href="#Part3" id="rfc.xref.Part3.10"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>) differs from Location in that the Content-Location identifies the most specific resource corresponding to the enclosed representation. 
    20972128            It is therefore possible for a response to contain header fields for both Location and Content-Location. 
    20982129         </p>  
     
    23392370                  <td class="left">303</td> 
    23402371                  <td class="left">See Other</td> 
    2341                   <td class="left"> <a href="#status.303" id="rfc.xref.status.303.3" title="303 See Other">Section&nbsp;7.3.4</a>  
     2372                  <td class="left"> <a href="#status.303" id="rfc.xref.status.303.2" title="303 See Other">Section&nbsp;7.3.4</a>  
    23422373                  </td> 
    23432374               </tr> 
     
    23572388                  <td class="left">307</td> 
    23582389                  <td class="left">Temporary Redirect</td> 
    2359                   <td class="left"> <a href="#status.307" id="rfc.xref.status.307.3" title="307 Temporary Redirect">Section&nbsp;7.3.8</a>  
     2390                  <td class="left"> <a href="#status.307" id="rfc.xref.status.307.2" title="307 Temporary Redirect">Section&nbsp;7.3.8</a>  
    23602391                  </td> 
    23612392               </tr> 
     
    27692800      </p> 
    27702801      <p id="rfc.section.A.p.6">Failed to consider that there are many other request methods that are safe to automatically redirect, and further that the 
    2771          user agent is able to make that determination based on the request method semantics. (Sections <a href="#status.301" id="rfc.xref.status.301.3" title="301 Moved Permanently">7.3.2</a>, <a href="#status.302" id="rfc.xref.status.302.3" title="302 Found">7.3.3</a> and <a href="#status.307" id="rfc.xref.status.307.4" title="307 Temporary Redirect">7.3.8</a>) 
     2802         user agent is able to make that determination based on the request method semantics. Furthermore, allow user agents to rewrite 
     2803         the method from POST to GET for status codes 301 and 302. (Sections <a href="#status.301" id="rfc.xref.status.301.3" title="301 Moved Permanently">7.3.2</a>, <a href="#status.302" id="rfc.xref.status.302.3" title="302 Found">7.3.3</a> and <a href="#status.307" id="rfc.xref.status.307.3" title="307 Temporary Redirect">7.3.8</a>) 
    27722804      </p> 
    27732805      <p id="rfc.section.A.p.7">Deprecate 305 Use Proxy status code, because user agents did not implement it. It used to indicate that the target resource 
     
    31233155      <p id="rfc.section.C.18.p.1">Closed issues: </p> 
    31243156      <ul> 
     3157         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/160">http://tools.ietf.org/wg/httpbis/trac/ticket/160</a>&gt;: "Redirects and non-GET methods" 
     3158         </li> 
    31253159         <li> &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/310">http://tools.ietf.org/wg/httpbis/trac/ticket/310</a>&gt;: "clarify 303 redirect on HEAD" 
    31263160         </li> 
     
    31553189                  <li>301 Moved Permanently (status code)&nbsp;&nbsp;<a href="#rfc.xref.status.301.1">4.1</a>, <a href="#rfc.iref.32"><b>7.3.2</b></a>, <a href="#rfc.xref.status.301.2">9.2</a>, <a href="#rfc.xref.status.301.3">A</a></li> 
    31563190                  <li>302 Found (status code)&nbsp;&nbsp;<a href="#rfc.xref.status.302.1">4.1</a>, <a href="#rfc.iref.33"><b>7.3.3</b></a>, <a href="#rfc.xref.status.302.2">9.2</a>, <a href="#rfc.xref.status.302.3">A</a></li> 
    3157                   <li>303 See Other (status code)&nbsp;&nbsp;<a href="#rfc.xref.status.303.1">4.1</a>, <a href="#rfc.xref.status.303.2">7.3.3</a>, <a href="#rfc.iref.34"><b>7.3.4</b></a>, <a href="#rfc.xref.status.303.3">9.2</a></li> 
     3191                  <li>303 See Other (status code)&nbsp;&nbsp;<a href="#rfc.xref.status.303.1">4.1</a>, <a href="#rfc.iref.34"><b>7.3.4</b></a>, <a href="#rfc.xref.status.303.2">9.2</a></li> 
    31583192                  <li>304 Not Modified (status code)&nbsp;&nbsp;<a href="#rfc.iref.35"><b>7.3.5</b></a></li> 
    31593193                  <li>305 Use Proxy (status code)&nbsp;&nbsp;<a href="#rfc.xref.status.305.1">4.1</a>, <a href="#rfc.iref.36"><b>7.3.6</b></a>, <a href="#rfc.xref.status.305.2">9.2</a>, <a href="#rfc.xref.status.305.3">A</a></li> 
    31603194                  <li>306 (Unused) (status code)&nbsp;&nbsp;<a href="#rfc.iref.37"><b>7.3.7</b></a>, <a href="#rfc.xref.status.306.1">9.2</a></li> 
    3161                   <li>307 Temporary Redirect (status code)&nbsp;&nbsp;<a href="#rfc.xref.status.307.1">4.1</a>, <a href="#rfc.xref.status.307.2">7.3.3</a>, <a href="#rfc.iref.38"><b>7.3.8</b></a>, <a href="#rfc.xref.status.307.3">9.2</a>, <a href="#rfc.xref.status.307.4">A</a></li> 
     3195                  <li>307 Temporary Redirect (status code)&nbsp;&nbsp;<a href="#rfc.xref.status.307.1">4.1</a>, <a href="#rfc.iref.38"><b>7.3.8</b></a>, <a href="#rfc.xref.status.307.2">9.2</a>, <a href="#rfc.xref.status.307.3">A</a></li> 
    31623196               </ul> 
    31633197            </li> 
     
    33093343                     </ul> 
    33103344                  </li> 
    3311                   <li><em>Part3</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.1">3.2</a>, <a href="#rfc.xref.Part3.2">3.2</a>, <a href="#rfc.xref.Part3.3">3.2</a>, <a href="#rfc.xref.Part3.4">3.2</a>, <a href="#rfc.xref.Part3.5">5</a>, <a href="#rfc.xref.Part3.6">6.5</a>, <a href="#rfc.xref.Part3.7">7.3.1</a>, <a href="#rfc.xref.Part3.8">7.4.7</a>, <a href="#rfc.xref.Part3.9">8.4</a>, <a href="#Part3"><b>12.1</b></a><ul> 
    3312                         <li><em>Section 5</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.7">7.3.1</a></li> 
     3345                  <li><em>Part3</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.1">3.2</a>, <a href="#rfc.xref.Part3.2">3.2</a>, <a href="#rfc.xref.Part3.3">3.2</a>, <a href="#rfc.xref.Part3.4">3.2</a>, <a href="#rfc.xref.Part3.5">5</a>, <a href="#rfc.xref.Part3.6">6.5</a>, <a href="#rfc.xref.Part3.7">7.3</a>, <a href="#rfc.xref.Part3.8">7.3.1</a>, <a href="#rfc.xref.Part3.9">7.4.7</a>, <a href="#rfc.xref.Part3.10">8.4</a>, <a href="#Part3"><b>12.1</b></a><ul> 
     3346                        <li><em>Section 5</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.8">7.3.1</a></li> 
     3347                        <li><em>Section 5.2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.7">7.3</a></li> 
    33133348                        <li><em>Section 6.1</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.1">3.2</a></li> 
    3314                         <li><em>Section 6</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.8">7.4.7</a></li> 
     3349                        <li><em>Section 6</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.9">7.4.7</a></li> 
    33153350                        <li><em>Section 6.2</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.2">3.2</a></li> 
    33163351                        <li><em>Section 6.3</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.3">3.2</a></li> 
    33173352                        <li><em>Section 6.4</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.4">3.2</a></li> 
    3318                         <li><em>Section 6.7</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.6">6.5</a>, <a href="#rfc.xref.Part3.9">8.4</a></li> 
     3353                        <li><em>Section 6.7</em>&nbsp;&nbsp;<a href="#rfc.xref.Part3.6">6.5</a>, <a href="#rfc.xref.Part3.10">8.4</a></li> 
    33193354                     </ul> 
    33203355                  </li> 
     
    33663401                  <li>Referer header field&nbsp;&nbsp;<a href="#rfc.xref.header.referer.1">3.2</a>, <a href="#rfc.iref.r.1"><b>8.6</b></a>, <a href="#rfc.xref.header.referer.2">9.3</a>, <a href="#rfc.xref.header.referer.3">A</a></li> 
    33673402                  <li>Retry-After header field&nbsp;&nbsp;<a href="#rfc.xref.header.retry-after.1">3.3</a>, <a href="#rfc.xref.header.retry-after.2">7.5.4</a>, <a href="#rfc.iref.r.2"><b>8.7</b></a>, <a href="#rfc.xref.header.retry-after.3">9.3</a></li> 
    3368                   <li><em>RFC1945</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC1945.1">7.3.3</a>, <a href="#RFC1945"><b>12.2</b></a><ul> 
    3369                         <li><em>Section 9.3</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC1945.1">7.3.3</a></li> 
     3403                  <li><em>RFC1945</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC1945.1">7.3</a>, <a href="#RFC1945"><b>12.2</b></a><ul> 
     3404                        <li><em>Section 9.3</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC1945.1">7.3</a></li> 
    33703405                     </ul> 
    33713406                  </li> 
    3372                   <li><em>RFC2068</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2068.1">7.3</a>, <a href="#rfc.xref.RFC2068.2">7.3.3</a>, <a href="#RFC2068"><b>12.2</b></a><ul> 
    3373                         <li><em>Section 10.3</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2068.1">7.3</a></li> 
    3374                         <li><em>Section 10.3.3</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2068.2">7.3.3</a></li> 
     3407                  <li><em>RFC2068</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2068.1">7.3</a>, <a href="#rfc.xref.RFC2068.2">7.3</a>, <a href="#RFC2068"><b>12.2</b></a><ul> 
     3408                        <li><em>Section 10.3</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2068.2">7.3</a></li> 
     3409                        <li><em>Section 10.3.4</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2068.1">7.3</a></li> 
    33753410                     </ul> 
    33763411                  </li> 
    33773412                  <li><em>RFC2119</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2119.1">1.1</a>, <a href="#RFC2119"><b>12.1</b></a></li> 
    3378                   <li><em>RFC2616</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.1">1</a>, <a href="#rfc.xref.RFC2616.2">7.3.3</a>, <a href="#RFC2616"><b>12.2</b></a>, <a href="#rfc.xref.RFC2616.3">C.1</a><ul> 
    3379                         <li><em>Section 10.3.3</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.2">7.3.3</a></li> 
     3413                  <li><em>RFC2616</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.1">1</a>, <a href="#rfc.xref.RFC2616.2">7.3</a>, <a href="#RFC2616"><b>12.2</b></a>, <a href="#rfc.xref.RFC2616.3">C.1</a><ul> 
     3414                        <li><em>Section 10.3.8</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.2">7.3</a></li> 
    33803415                     </ul> 
    33813416                  </li> 
     
    34263461                        <li>301 Moved Permanently&nbsp;&nbsp;<a href="#rfc.xref.status.301.1">4.1</a>, <a href="#rfc.iref.s.12"><b>7.3.2</b></a>, <a href="#rfc.xref.status.301.2">9.2</a>, <a href="#rfc.xref.status.301.3">A</a></li> 
    34273462                        <li>302 Found&nbsp;&nbsp;<a href="#rfc.xref.status.302.1">4.1</a>, <a href="#rfc.iref.s.13"><b>7.3.3</b></a>, <a href="#rfc.xref.status.302.2">9.2</a>, <a href="#rfc.xref.status.302.3">A</a></li> 
    3428                         <li>303 See Other&nbsp;&nbsp;<a href="#rfc.xref.status.303.1">4.1</a>, <a href="#rfc.xref.status.303.2">7.3.3</a>, <a href="#rfc.iref.s.14"><b>7.3.4</b></a>, <a href="#rfc.xref.status.303.3">9.2</a></li> 
     3463                        <li>303 See Other&nbsp;&nbsp;<a href="#rfc.xref.status.303.1">4.1</a>, <a href="#rfc.iref.s.14"><b>7.3.4</b></a>, <a href="#rfc.xref.status.303.2">9.2</a></li> 
    34293464                        <li>304 Not Modified&nbsp;&nbsp;<a href="#rfc.iref.s.15"><b>7.3.5</b></a></li> 
    34303465                        <li>305 Use Proxy&nbsp;&nbsp;<a href="#rfc.xref.status.305.1">4.1</a>, <a href="#rfc.iref.s.16"><b>7.3.6</b></a>, <a href="#rfc.xref.status.305.2">9.2</a>, <a href="#rfc.xref.status.305.3">A</a></li> 
    34313466                        <li>306 (Unused)&nbsp;&nbsp;<a href="#rfc.iref.s.17"><b>7.3.7</b></a>, <a href="#rfc.xref.status.306.1">9.2</a></li> 
    3432                         <li>307 Temporary Redirect&nbsp;&nbsp;<a href="#rfc.xref.status.307.1">4.1</a>, <a href="#rfc.xref.status.307.2">7.3.3</a>, <a href="#rfc.iref.s.18"><b>7.3.8</b></a>, <a href="#rfc.xref.status.307.3">9.2</a>, <a href="#rfc.xref.status.307.4">A</a></li> 
     3467                        <li>307 Temporary Redirect&nbsp;&nbsp;<a href="#rfc.xref.status.307.1">4.1</a>, <a href="#rfc.iref.s.18"><b>7.3.8</b></a>, <a href="#rfc.xref.status.307.2">9.2</a>, <a href="#rfc.xref.status.307.3">A</a></li> 
    34333468                        <li>400 Bad Request&nbsp;&nbsp;<a href="#rfc.xref.status.400.1">4.1</a>, <a href="#rfc.iref.s.19"><b>7.4.1</b></a>, <a href="#rfc.xref.status.400.2">9.2</a></li> 
    34343469                        <li>401 Unauthorized&nbsp;&nbsp;<a href="#rfc.iref.s.20"><b>7.4.2</b></a></li> 
  • draft-ietf-httpbis/latest/p2-semantics.xml

    r1427 r1428  
    2525  <!ENTITY auth                       "<xref target='Part7' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
    2626  <!ENTITY content-negotiation        "<xref target='Part3' x:rel='#content.negotiation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
     27  <!ENTITY agent-driven-negotiation    "<xref target='Part3' x:rel='#agent-driven.negotiation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
    2728  <!ENTITY notation-abnf              "<xref target='Part1' x:rel='#notation.abnf' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
    2829  <!ENTITY basic-rules                "<xref target='Part1' x:rel='#basic.rules' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 
     
    15671568<t> 
    15681569   This class of status code indicates that further action needs to be 
    1569    taken by the user agent in order to fulfill the request.  The action 
    1570    required &MAY; be carried out by the user agent without interaction 
    1571    with the user if and only if the method used in the second request is 
    1572    known to be "safe", as defined in <xref target="safe.methods"/>. 
    1573    A client &SHOULD; detect infinite redirection loops, since such loops 
    1574    generate network traffic for each redirection. 
     1570   taken by the user agent in order to fulfill the request.  If the required 
     1571   action involves a subsequent HTTP request, it &MAY; be carried out by the 
     1572   user agent without interaction with the user if and only if the method used 
     1573   in the second request is known to be "safe", as defined in 
     1574   <xref target="safe.methods"/>. 
     1575</t> 
     1576<t> 
     1577   There are several types of redirects: 
     1578   <list style="numbers"> 
     1579      <x:lt> 
     1580        <t> 
     1581          Redirects of the request to another URI, either temporarily or 
     1582          permanently. The new URI is specified in the Location header field. 
     1583          In this specification, the status codes 301 (Moved Permanently),  
     1584          302 (Found), and 307 (Temporary Redirect) fall under this category. 
     1585        </t> 
     1586      </x:lt> 
     1587      <x:lt> 
     1588        <t> 
     1589          Redirection to a new location that represents an indirect response to 
     1590          the request, such as the result of a POST operation to be retrieved 
     1591          with a subsequent GET request. This is status code 303 (See Other). 
     1592        </t> 
     1593      </x:lt> 
     1594      <x:lt> 
     1595        <t> 
     1596          Redirection offering a choice of matching resources for use by 
     1597          agent-driven content negotiation (&agent-driven-negotiation;). This 
     1598          is status code 300 (Multiple Choices). 
     1599        </t> 
     1600      </x:lt> 
     1601      <x:lt> 
     1602        <t> 
     1603          Other kinds of redirection, such as to a cached result (status code 304 
     1604          (Not Modified)).  
     1605        </t> 
     1606      </x:lt> 
     1607   </list> 
     1608</t> 
     1609<x:note> 
     1610  <t> 
     1611    <x:h>Note:</x:h> In HTTP/1.0, only the status codes 301 (Moved Permanently) 
     1612    and 302 (Found) were defined for the first type of redirect, and the second 
     1613    type did not exist at all (<xref target="RFC1945" x:fmt="," x:sec="9.3"/>). 
     1614    However it turned out that web forms using POST expected redirects to change 
     1615    the operation for the subsequent request to retrieval (GET). To address this 
     1616    use case, HTTP/1.1 introduced the second type of redirect with the status 
     1617    code 303 (See Other) (<xref target="RFC2068" x:fmt="," x:sec="10.3.4"/>). 
     1618    As user agents did not change their behavior to maintain backwards 
     1619    compatibility, the first revision of HTTP/1.1 added yet another status code, 
     1620    307 (Temporary Redirect), for which the backwards compatibility problems did 
     1621    not apply (<xref target="RFC2616" x:fmt="," x:sec="10.3.8"/>). 
     1622    Over 10 years later, most user agents still do method rewriting for 
     1623    status codes 301 and 302, therefore this specification makes that behavior 
     1624    compliant in case the original request was POST. 
     1625  </t> 
     1626</x:note> 
     1627<t> 
     1628   Clients &SHOULD; detect and intervene in cyclical redirections (i.e., 
     1629   "infinite" redirection loops). 
    15751630</t> 
    15761631<x:note> 
     
    16461701<x:note> 
    16471702  <t> 
    1648     <x:h>Note:</x:h> When automatically redirecting a POST request after 
    1649     receiving a 301 status code, some existing HTTP/1.0 user agents 
    1650     will erroneously change it into a GET request. 
     1703    <x:h>Note:</x:h> For historic reasons, user agents &MAY; change the 
     1704    request method from POST to GET for the subsequent request. If this 
     1705    behavior is undesired, status code 307 (Temporary Redirect) can be used 
     1706    instead. 
    16511707  </t> 
    16521708</x:note> 
     
    16771733<x:note> 
    16781734  <t> 
    1679     <x:h>Note:</x:h> HTTP/1.0 (<xref target="RFC1945" x:fmt="," x:sec="9.3"/>) 
    1680     and the first version of HTTP/1.1 (<xref target="RFC2068" x:fmt="," x:sec ="10.3.3"/>) 
    1681     specify that the client is not allowed to change the method on the 
    1682     redirected request.  However, most existing user agent implementations 
    1683     treat 302 as if it were a 303 response, performing a GET on the Location 
    1684     field-value regardless of the original request method. Therefore, a  
    1685     previous version of this specification 
    1686     (<xref target="RFC2616" x:fmt="," x:sec="10.3.3"/>) has added the  
    1687     status codes 
    1688     <xref target="status.303" format="none">303</xref> and 
    1689     <xref target="status.307" format="none">307</xref> for servers that wish 
    1690     to make unambiguously clear which kind of reaction is expected of the 
    1691     client. 
     1735    <x:h>Note:</x:h> For historic reasons, user agents &MAY; change the 
     1736    request method from POST to GET for the subsequent request. If this 
     1737    behavior is undesired, status code 307 (Temporary Redirect) can be used 
     1738    instead. 
     1739    <cref anchor="issue312">but see <eref target="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/312"/></cref> 
    16921740  </t> 
    16931741</x:note> 
     
    36173665</t> 
    36183666<t> 
    3619   Failed to consider that there are 
    3620   many other request methods that are safe to automatically redirect, 
    3621   and further that the user agent is able to make that determination 
    3622   based on the request method semantics. 
     3667  Failed to consider that there are many other request methods that are safe 
     3668  to automatically redirect, and further that the user agent is able to make 
     3669  that determination based on the request method semantics. 
     3670  Furthermore, allow user agents to rewrite the method from POST to GET 
     3671  for status codes 301 and 302. 
    36233672  (Sections <xref format="counter" target="status.301"/>, 
    36243673  <xref format="counter" target="status.302"/> and 
     
    42724321  <list style="symbols">  
    42734322    <t> 
     4323      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/160"/>: 
     4324      "Redirects and non-GET methods" 
     4325    </t> 
     4326    <t> 
    42744327      <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/310"/>: 
    42754328      "clarify 303 redirect on HEAD" 
Note: See TracChangeset for help on using the changeset viewer.