Ticket #196: i196.6.diff
File i196.6.diff, 21.3 KB (added by julian.reschke@…, 13 years ago) |
---|
-
p1-messaging.xml
1589 1589 </t> 1590 1590 </section> 1591 1591 1592 <section title="Effective Request URI" anchor="effective.request.uri"> 1593 <iref primary="true" item="Effective Request URI"/> 1594 <t> 1595 HTTP requests often do not carry the absolute URI (<xref target="RFC3986" x:fmt="," x:sec="4.3"/>) 1596 for the resource they are intended for; instead, the value needs to be inferred from the 1597 request-target, Host header and other context. The result of this process is 1598 the "Effective Request URI". 1599 </t> 1600 <t> 1601 If the request-target is an absolute-URI, then the Effective Request URI is 1602 the request-target. 1603 </t> 1604 <t> 1605 If the request-target uses the path-absolute (plus optional query) syntax 1606 or if it is just the asterisk "*", then the Effective Request URI is 1607 constructed by concatenating 1608 </t> 1609 <t> 1610 <list style="symbols"> 1611 <t> 1612 the scheme name: "http" if the request was received over an insecure 1613 TCP connection, or "https" when received over SSL/TLS-secured TCP 1614 connection, 1615 </t> 1616 <t> 1617 the character sequence "://", 1618 </t> 1619 <t> 1620 the authority component, as specified in the Host header 1621 (<xref target="header.host"/>) and determined by the rules in 1622 <xref target="the.resource.identified.by.a.request"/>, 1623 <cref anchor="effrequri-nohost" source="jre">Do we need to include the handling of missing hosts in HTTP/1.0 messages, as 1624 described in <xref target="the.resource.identified.by.a.request"/>?</cref> 1625 and 1626 </t> 1627 <t> 1628 the request-target obtained from the Request-Line, unless the 1629 request-target is just the asterisk "*". 1630 </t> 1631 </list> 1632 </t> 1633 <t> 1634 Otherwise, when request-target uses the authority form, the Effective 1635 Request URI is undefined. 1636 </t> 1637 <figure> 1638 <preamble> 1639 Example 1: the Effective Request URI for the message 1640 </preamble> 1641 <artwork type="example" x:indent-with=" "> 1642 GET /pub/WWW/TheProject.html HTTP/1.1 1643 Host: www.example.org:8080 1644 </artwork> 1645 <postamble> 1646 (received over an insecure TCP connection) is "http", plus "://", plus the 1647 authority component "www.example.org:8080", plus the request-target 1648 "/pub/WWW/TheProject.html", thus 1649 "http://www.example.org:8080/pub/WWW/TheProject.html". 1650 </postamble> 1651 </figure> 1652 <figure> 1653 <preamble> 1654 Example 2: the Effective Request URI for the message 1655 </preamble> 1656 <artwork type="example" x:indent-with=" "> 1657 GET * HTTP/1.1 1658 Host: www.example.org 1659 </artwork> 1660 <postamble> 1661 (received over an SSL/TLS secured TCP connection) is "https", plus "://", plus the 1662 authority component "www.example.org", thus "https://www.example.org". 1663 </postamble> 1664 </figure> 1665 <t> 1666 Effective Request URIs are compared using the rules described in 1667 <xref target="uri.comparison"/>, except that empty path components &MUST-NOT; 1668 be treated as equivalent to an absolute path of "/". 1669 </t> 1592 1670 </section> 1593 1671 1672 </section> 1594 1673 1674 1595 1675 <section title="Response" anchor="response"> 1596 1676 <x:anchor-alias value="Response"/> 1597 1677 <t> -
p2-semantics.xml
26 26 <!ENTITY notation-abnf "<xref target='Part1' x:rel='#notation.abnf' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 27 27 <!ENTITY basic-rules "<xref target='Part1' x:rel='#basic.rules' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 28 28 <!ENTITY uri "<xref target='Part1' x:rel='#uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 29 <!ENTITY effective-request-uri "<xref target='Part1' x:rel='#effective.request.uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 29 30 <!ENTITY full-date "<xref target='Part1' x:rel='#date.time.formats.full.date' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 30 31 <!ENTITY http-url "<xref target='Part1' x:rel='#http-url' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 31 32 <!ENTITY http-version "<xref target='Part1' x:rel='#http.version' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> … … 670 671 </t> 671 672 <t> 672 673 In the common case, an HTTP response is a representation of the resource 673 located at the request-URI. However, this is not always the case. To 674 determine the URI of the resource a response is associated with, the 675 following rules are used (with the first applicable one being selected): 674 located at the Effective Request URI (see &effective-request-uri;). However, 675 this is not always the case. To determine the URI of the resource a 676 response is associated with, the following rules are used (with the first 677 applicable one being selected): 676 678 </t> 677 679 <t><list style="numbers"> 678 680 <t>If the response status code is 200 or 203 and the request method was GET, 679 the response is a representation of the resource at the request-URI.</t>681 the response is a representation of the resource at the Effective Request URI.</t> 680 682 <t>If the response status is 204, 206, or 304 and the request method was GET 681 683 or HEAD, the response is a partial representation of the resource at the 682 request-URI (see &caching-combining-headers;).</t>684 Effective Request URI (see &caching-combining-headers;).</t> 683 685 <t>If the response has a Content-Location header, and that URI is the same 684 as the request-URI <cref anchor="TODO-missref-requri">(see [ref])</cref>, the response is a representation of the685 resource at the request-URI.</t>686 as the Effective Request URI, the response is a representation of the 687 resource at the Effective Request URI.</t> 686 688 <t>If the response has a Content-Location header, and that URI is not the 687 same as the request-URI, the response asserts that it is a representation of 688 the resource at the Content-Location URI (but it may not be).</t> 689 same as the Effective Request URI, the response asserts that it is a 690 representation of the resource at the Content-Location URI (but it may not 691 be).</t> 689 692 <t>Otherwise, the response is a representation of an anonymous (i.e., 690 693 unidentified) resource.</t> 691 694 </list></t> 692 695 <t> 693 696 <cref anchor="TODO-req-uri"> 694 Note that "request-URI" is used here; however, we need to come up with a 695 term to denote "the URI that can be inferred from examining the 696 request-target and the Host header." (see <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/196" />). 697 Also, the comparison function is going to have to be defined somewhere, 697 The comparison function is going to have to be defined somewhere, 698 698 because we already need to compare URIs for things like cache invalidation.</cref> 699 699 </t> 700 700 </section> … … 760 760 <t> 761 761 The OPTIONS method represents a request for information about the 762 762 communication options available on the request/response chain 763 identified by the request-target. This method allows the client to763 identified by the Effective Request URI. This method allows the client to 764 764 determine the options and/or requirements associated with a resource, 765 765 or the capabilities of a server, without implying a resource action 766 766 or initiating a resource retrieval. … … 825 825 <t> 826 826 The GET method means retrieve whatever information (in the form of an 827 827 entity) currently corresponds to the resource identified by the 828 request-target.828 Effective Request URI. 829 829 </t> 830 830 <t> 831 If the request-targetidentifies a data-producing process, it is the831 If the Effective Request URI identifies a data-producing process, it is the 832 832 produced data which shall be returned as the entity in the response and not 833 833 the source text of the process, unless that text happens to be the output of 834 834 the process. … … 893 893 <t> 894 894 The POST method is used to request that the origin server accept the 895 895 entity enclosed in the request as data to be processed by the resource 896 identified by the request-target in the Request-Line. POST is designed896 identified by the Effective Request URI. POST is designed 897 897 to allow a uniform method to cover the following functions: 898 898 <list style="symbols"> 899 899 <t> … … 914 914 </t> 915 915 <t> 916 916 The actual function performed by the POST method is determined by the 917 server and is usually dependent on the request-target.917 server and is usually dependent on the Effective Request URI. 918 918 </t> 919 919 <t> 920 920 The action performed by the POST method might not result in a … … 942 942 <iref primary="true" item="Methods" subitem="PUT" x:for-anchor=""/> 943 943 <t> 944 944 The PUT method requests that the enclosed entity be stored at the 945 supplied request-target. If the request-targetrefers to an already945 Effective Request URI. If the Effective Request URI refers to an already 946 946 existing resource, the enclosed entity &SHOULD; be considered as a 947 modified version of the one residing on the origin server. If the948 request-targetdoes not point to an existing resource, and that URI is947 modified version of the one residing on the origin server. Otherwise, if the 948 Effective Request URI does not point to an existing resource, and that URI is 949 949 capable of being defined as a new resource by the requesting user 950 agent, the origin server can create the resource with that URI. If a 951 new resource is created at the request-target, the origin server &MUST; 952 inform the user agent 950 agent, the origin server can create the resource with that URI. 951 </t> 952 <t> 953 If a new resource is created at the Effective Request URI, the origin 954 server &MUST; inform the user agent 953 955 via the 201 (Created) response. If an existing resource is modified, 954 956 either the 200 (OK) or 204 (No Content) response codes &SHOULD; be sent 955 to indicate successful completion of the request. If the resource 956 could not be created or modified with the request-target, an appropriate 957 error response &SHOULD; be given that reflects the nature of the 958 problem. The recipient of the entity &MUST-NOT; ignore any Content-* 957 to indicate successful completion of the request. 958 </t> 959 <t> 960 If the resource could not be created or modified with the Effective Request 961 URI, an appropriate error response &SHOULD; be given that reflects the nature 962 of the problem. The recipient of the entity &MUST-NOT; ignore any Content-* 959 963 headers (headers starting with the prefix "Content-") that it does 960 964 not understand or implement 961 965 and &MUST; return a 501 (Not Implemented) response in such cases. 962 966 </t> 963 967 <t> 964 If the request passes through a cache and the request-target identifies965 one or more currently cached entities, those entries &SHOULD; be968 If the request passes through a cache and the Effective Request URI 969 identifies one or more currently cached entities, those entries &SHOULD; be 966 970 treated as stale. Responses to this method are not cacheable. 967 971 </t> 968 972 <t> 969 973 The fundamental difference between the POST and PUT requests is 970 reflected in the different meaning of the request-target. The URI in a974 reflected in the different meaning of the Effective Request URI. The URI in a 971 975 POST request identifies the resource that will handle the enclosed 972 976 entity. That resource might be a data-accepting process, a gateway to 973 977 some other protocol, or a separate entity that accepts annotations. … … 1002 1006 <iref primary="true" item="Methods" subitem="DELETE" x:for-anchor=""/> 1003 1007 <t> 1004 1008 The DELETE method requests that the origin server delete the resource 1005 identified by the request-target. This method &MAY; be overridden by human1006 intervention (or other means) on the origin server. The client cannot1009 identified by the Effective Request URI. This method &MAY; be overridden by 1010 human intervention (or other means) on the origin server. The client cannot 1007 1011 be guaranteed that the operation has been carried out, even if the 1008 1012 status code returned from the origin server indicates that the action 1009 1013 has been completed successfully. However, the server &SHOULD-NOT; … … 1018 1022 but the response does not include an entity. 1019 1023 </t> 1020 1024 <t> 1021 If the request passes through a cache and the request-target identifies1022 one or more currently cached entities, those entries &SHOULD; be1025 If the request passes through a cache and the Effective Request URI 1026 identifies one or more currently cached entities, those entries &SHOULD; be 1023 1027 treated as stale. Responses to this method are not cacheable. 1024 1028 </t> 1025 1029 </section> … … 1330 1334 The requested resource has been assigned a new permanent URI and any 1331 1335 future references to this resource &SHOULD; use one of the returned 1332 1336 URIs. Clients with link editing capabilities ought to automatically 1333 re-link references to the request-targetto one or more of the new1337 re-link references to the Effective Request URI to one or more of the new 1334 1338 references returned by the server, where possible. This response is 1335 1339 cacheable unless indicated otherwise. 1336 1340 </t> … … 1363 1367 <t> 1364 1368 The requested resource resides temporarily under a different URI. 1365 1369 Since the redirection might be altered on occasion, the client &SHOULD; 1366 continue to use the request-targetfor future requests. This response1370 continue to use the Effectice Request URI for future requests. This response 1367 1371 is only cacheable if indicated by a Cache-Control or Expires header 1368 1372 field. 1369 1373 </t> … … 1476 1480 <t> 1477 1481 The requested resource resides temporarily under a different URI. 1478 1482 Since the redirection &MAY; be altered on occasion, the client &SHOULD; 1479 continue to use the request-targetfor future requests. This response1483 continue to use the Effective Request URI for future requests. This response 1480 1484 is only cacheable if indicated by a Cache-Control or Expires header 1481 1485 field. 1482 1486 </t> … … 1566 1570 <iref primary="true" item="404 Not Found (status code)" x:for-anchor=""/> 1567 1571 <iref primary="true" item="Status Codes" subitem="404 Not Found" x:for-anchor=""/> 1568 1572 <t> 1569 The server has not found anything matching the request-target. No1573 The server has not found anything matching the Effective Request URI. No 1570 1574 indication is given of whether the condition is temporary or 1571 1575 permanent. The 410 (Gone) status code &SHOULD; be used if the server 1572 1576 knows, through some internally configurable mechanism, that an old … … 1582 1586 <iref primary="true" item="Status Codes" subitem="405 Method Not Allowed" x:for-anchor=""/> 1583 1587 <t> 1584 1588 The method specified in the Request-Line is not allowed for the 1585 resource identified by the request-target. The response &MUST; include an1589 resource identified by the Effective Request URI. The response &MUST; include an 1586 1590 Allow header containing a list of valid methods for the requested 1587 1591 resource. 1588 1592 </t> … … 1673 1677 The requested resource is no longer available at the server and no 1674 1678 forwarding address is known. This condition is expected to be 1675 1679 considered permanent. Clients with link editing capabilities &SHOULD; 1676 delete references to the request-targetafter user approval. If the1680 delete references to the Effective Request URI after user approval. If the 1677 1681 server does not know, or has no facility to determine, whether or not 1678 1682 the condition is permanent, the status code 404 (Not Found) &SHOULD; be 1679 1683 used instead. This response is cacheable unless indicated otherwise. … … 1735 1739 <iref primary="true" item="414 URI Too Long (status code)" x:for-anchor=""/> 1736 1740 <iref primary="true" item="Status Codes" subitem="414 URI Too Long" x:for-anchor=""/> 1737 1741 <t> 1738 The server is refusing to service the request because the request-target1742 The server is refusing to service the request because the Effective Request URI 1739 1743 is longer than the server is willing to interpret. This rare 1740 1744 condition is only likely to occur when a client has improperly 1741 1745 converted a POST request to a GET request with long query … … 1743 1747 redirection (e.g., a redirected URI prefix that points to a suffix of 1744 1748 itself), or when the server is under attack by a client attempting to 1745 1749 exploit security holes present in some servers using fixed-length 1746 buffers for reading or manipulating the request-target.1750 buffers for reading or manipulating the Effective Request URI. 1747 1751 </t> 1748 1752 </section> 1749 1753 … … 1895 1899 <x:anchor-alias value="Allow-v"/> 1896 1900 <t> 1897 1901 The "Allow" response-header field lists the set of methods advertised as 1898 supported by the resource identified by the request-target. The purpose of1902 supported by the resource identified by the Effective Request URI. The purpose of 1899 1903 this field is strictly to inform the recipient of valid methods 1900 1904 associated with the resource. 1901 1905 </t> … … 2128 2132 <x:anchor-alias value="Referer-v"/> 2129 2133 <t> 2130 2134 The "Referer" [sic] request-header field allows the client to specify the 2131 URI of the resource from which the request-targetwas obtained (the2135 URI of the resource from which the Effective Request URI was obtained (the 2132 2136 "referrer", although the header field is misspelled.). 2133 2137 </t> 2134 2138 <t> … … 2140 2144 required to contain a Referer header field. 2141 2145 </t> 2142 2146 <t> 2143 If the request-targetwas obtained from a source that does not have its own2147 If the Effective Request URI was obtained from a source that does not have its own 2144 2148 URI (e.g., input from the user keyboard), the Referer field &MUST; either be 2145 2149 sent with the value "about:blank", or not be sent at all. Note that this 2146 2150 requirement does not apply to sources with non-HTTP URIs (e.g., FTP). … … 2157 2161 </artwork></figure> 2158 2162 <t> 2159 2163 If the field value is a relative URI, it &SHOULD; be interpreted 2160 relative to the request-target. The URI &MUST-NOT; include a fragment. See2164 relative to the Effective Request URI. The URI &MUST-NOT; include a fragment. See 2161 2165 <xref target="encoding.sensitive.information.in.uris"/> for security considerations. 2162 2166 </t> 2163 2167 </section> -
p6-cache.xml
17 17 <!ENTITY notation "<xref target='Part1' x:rel='#notation' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 18 18 <!ENTITY basic-rules "<xref target='Part1' x:rel='#basic.rules' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 19 19 <!ENTITY uri "<xref target='Part1' x:rel='#uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 20 <!ENTITY effective-request-uri "<xref target='Part1' x:rel='#effective.request.uri' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 20 21 <!ENTITY messaging "<xref target='Part1' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 21 22 <!ENTITY conditional "<xref target='Part4' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> 22 23 <!ENTITY partial "<xref target='Part5' xmlns:x='http://purl.org/net/xml2rfc/ext'/>"> … … 477 478 <t> 478 479 For a presented request, a cache &MUST-NOT; return a stored response, unless: 479 480 <list style="symbols"> 480 <t>The presented Request-URI and that of the stored response match 481 (<cref anchor="TODO-Request-URI">Need to find a new term for this, as Part 482 1 doesn't define Request-URI anymore; the new term request-target does not 483 work for this. (see <eref target="http://tools.ietf.org/wg/httpbis/trac/ticket/196" />)</cref>), and</t> 481 <t>The presented Effective Request URI (&effective-request-uri;) and that of the stored response match, and</t> 484 482 <t>the request method associated with the stored response allows it to be 485 483 used for the presented request, and</t> 486 484 <t>selecting request-headers nominated by the stored response (if any) match those presented (see <xref … … 797 795 up-to-date. 798 796 </t> 799 797 <t> 800 The following HTTP methods &MUST; cause a cache to invalidate the Request-URIas well798 The following HTTP methods &MUST; cause a cache to invalidate the Effective Request URI (&effective-request-uri;) as well 801 799 as the URI(s) in the Location and Content-Location headers (if present): 802 800 <list style="symbols"> 803 801 <t>PUT</t> … … 807 805 </t> 808 806 <t> 809 807 An invalidation based on a URI from a Location or Content-Location header &MUST-NOT; 810 be performed if the host part of that URI differs from the host part in the Request-URI.808 be performed if the host part of that URI differs from the host part in the Effective Request URI (&effective-request-uri;). 811 809 This helps prevent denial of service attacks. 812 810 </t> 813 811 <t> … … 815 813 </t> 816 814 <t> 817 815 A cache that passes through requests for methods it does not understand &SHOULD; 818 invalidate the Request-URI.816 invalidate the Effective Request URI (&effective-request-uri;). 819 817 </t> 820 818 <t> 821 819 Here, "invalidate" means that the cache will either remove all stored responses related 822 to the Request-URI, or will mark these as "invalid" and in need of a mandatory validation820 to the Effective Request URI, or will mark these as "invalid" and in need of a mandatory validation 823 821 before they can be returned in response to a subsequent request. 824 822 </t> 825 823 <t>