Changeset 2075 for draft-ietf-httpbis/latest/p2-semantics.html
- Timestamp:
- 01/01/13 01:58:12 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p2-semantics.html
r2074 r2075 2918 2918 </p> 2919 2919 <div id="rfc.figure.u.51"></div><pre class="inline"><span id="rfc.iref.g.56"></span> <a href="#header.location" class="smpl">Location</a> = <a href="#imported.abnf" class="smpl">URI-reference</a> 2920 </pre><p id="rfc.section.7.1.2.p.3">The field value consists of a single URI-reference. When it has the form of a relative reference (<a href="#RFC3986" id="rfc.xref.RFC3986.2"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-4.2">Section 4.2</a>), the final value is computed by resolving it against the effective request URI (<a href="#RFC3986" id="rfc.xref.RFC3986.3"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-5">Section 5</a>). If the original URI, as navigated to by the user agent, contains a fragment identifier, and the Location value does not, 2921 then the original URI's fragment identifier is appended to the Location value. 2920 </pre><p id="rfc.section.7.1.2.p.3">The field value consists of a single URI-reference. When it has the form of a relative reference (<a href="#RFC3986" id="rfc.xref.RFC3986.2"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-4.2">Section 4.2</a>), the final value is computed by resolving it against the effective request URI (<a href="#RFC3986" id="rfc.xref.RFC3986.3"><cite title="Uniform Resource Identifier (URI): Generic Syntax">[RFC3986]</cite></a>, <a href="http://tools.ietf.org/html/rfc3986#section-5">Section 5</a>). 2922 2921 </p> 2923 2922 <p id="rfc.section.7.1.2.p.4">For <a href="#status.201" class="smpl">201 (Created)</a> responses, the Location value refers to the primary resource created by the request. For <a href="#status.3xx" class="smpl">3xx (Redirection)</a> responses, the Location value refers to the preferred target resource for automatically redirecting the request. 2924 2923 </p> 2924 <p id="rfc.section.7.1.2.p.5">When Location is provided in a <a href="#status.3xx" class="smpl">3xx (Redirection)</a> response and the URI reference that the user agent used to generate the request target contains a fragment identifier, the 2925 user agent <em class="bcp14">SHOULD</em> process the redirection as if the Location field value inherits the original fragment. In other words, if the Location does 2926 not have a fragment component, the user agent <em class="bcp14">SHOULD</em> interpret the Location reference as if it had the original reference's fragment. 2927 </p> 2925 2928 <div id="rfc.figure.u.52"></div> 2926 <p>For example, a GET request for the URI reference "http://www.example.org/~tim" might result in a <a href="#status.303" class="smpl">303 (See Other)</a> response containing the header field:2927 </p> <pre class="text"> Location: / pub/WWW/People.html#tim2928 </pre> <p>which suggests that the user agent redirect to "http://www.example.org/ pub/WWW/People.html#tim"</p>2929 <p>For example, a GET request generated for the URI reference "http://www.example.org/~tim" might result in a <a href="#status.303" class="smpl">303 (See Other)</a> response containing the header field: 2930 </p> <pre class="text"> Location: /People.html#tim 2931 </pre> <p>which suggests that the user agent redirect to "http://www.example.org/People.html#tim"</p> 2929 2932 <div id="rfc.figure.u.53"></div> 2930 <p>Likewise, a GET request for the URI reference "http://www.example.org/index.html#larry" might result in a <a href="#status.301" class="smpl">301 (Moved Permanently)</a> response containing the header field:2933 <p>Likewise, a GET request generated for the URI reference "http://www.example.org/index.html#larry" might result in a <a href="#status.301" class="smpl">301 (Moved Permanently)</a> response containing the header field: 2931 2934 </p> <pre class="text"> Location: http://www.example.net/index.html 2932 2935 </pre> <p>which suggests that the user agent redirect to "http://www.example.net/index.html#larry", preserving the original fragment 2933 2936 identifier. 2934 2937 </p> 2935 <p id="rfc.section.7.1.2.p. 7">There are circumstances in which a fragment identifier in a Location value would not be appropriate. For example, the Location2938 <p id="rfc.section.7.1.2.p.8">There are circumstances in which a fragment identifier in a Location value would not be appropriate. For example, the Location 2936 2939 header field in a <a href="#status.201" class="smpl">201 (Created)</a> response is supposed to provide a URI that is specific to the created resource. 2937 2940 </p> 2938 <div class="note" id="rfc.section.7.1.2.p. 8">2941 <div class="note" id="rfc.section.7.1.2.p.9"> 2939 2942 <p> <b>Note:</b> Some recipients attempt to recover from Location fields that are not valid URI references. This specification does not mandate 2940 2943 or define such processing, but does allow it for the sake of robustness. 2941 2944 </p> 2942 2945 </div> 2943 <div class="note" id="rfc.section.7.1.2.p. 9">2946 <div class="note" id="rfc.section.7.1.2.p.10"> 2944 2947 <p> <b>Note:</b> The <a href="#header.content-location" class="smpl">Content-Location</a> header field (<a href="#header.content-location" id="rfc.xref.header.content-location.3" title="Content-Location">Section 3.1.4.2</a>) differs from Location in that the Content-Location refers to the most specific resource corresponding to the enclosed representation. 2945 2948 It is therefore possible for a response to contain both the Location and Content-Location header fields.
Note: See TracChangeset
for help on using the changeset viewer.