882 | | double quotes will likely cause unnecessary confusion. |
883 | | </p> |
884 | | <p id="rfc.section.3.1.p.8">Many header fields use a format including (case-insensitively) named parameters (for instance, Content-Type, defined in <a href="p3-payload.html#header.content-type" title="Content-Type">Section 6.8</a> of <a href="#Part3" id="rfc.xref.Part3.1"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). Allowing both unquoted (token) and quoted (quoted-string) syntax for the parameter value enables recipients to use existing |
885 | | parser components. When allowing both forms, the meaning of a parameter value ought to be independent of the syntax used for |
886 | | it (for an example, see the notes on parameter handling for media types in <a href="p3-payload.html#media.types" title="Media Types">Section 2.3</a> of <a href="#Part3" id="rfc.xref.Part3.2"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). |
887 | | </p> |
888 | | <p id="rfc.section.3.1.p.9">Authors of specifications defining new header fields are advised to consider documenting: </p> |
889 | | <ul> |
890 | | <li> |
891 | | <p>Whether the field is a single value, or whether it can be a list (delimited by commas; see <a href="p1-messaging.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#Part1" id="rfc.xref.Part1.21"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). |
892 | | </p> |
893 | | <p>If it does not use the list syntax, document how to treat messages where the header field occurs multiple times (a sensible |
894 | | default would be to ignore the header field, but this might not always be the right choice). |
895 | | </p> |
896 | | <p>Note that intermediaries and software libraries might combine multiple header field instances into a single one, despite the |
897 | | header field not allowing this. A robust format enables recipients to discover these situations (good example: "Content-Type", |
898 | | as the comma can only appear inside quoted strings; bad example: "Location", as a comma can occur inside a URI). |
899 | | </p> |
900 | | </li> |
901 | | <li> |
902 | | <p>Under what conditions the header field can be used; e.g., only in responses or requests, in all messages, only on responses |
903 | | to a particular request method. |
904 | | </p> |
905 | | </li> |
906 | | <li> |
907 | | <p>Whether it is appropriate to list the field-name in the Connection header (i.e., if the header is to be hop-by-hop, see <a href="p1-messaging.html#header.connection" title="Connection">Section 8.1</a> of <a href="#Part1" id="rfc.xref.Part1.22"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). |
908 | | </p> |
909 | | </li> |
910 | | <li> |
911 | | <p>Under what conditions intermediaries are allowed to modify the header field's value, insert or delete it.</p> |
912 | | </li> |
913 | | <li> |
914 | | <p>How the header might interact with caching (see <a href="#Part6" id="rfc.xref.Part6.2"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). |
915 | | </p> |
916 | | </li> |
917 | | <li> |
918 | | <p>Whether the header field is useful or allowable in trailers (see <a href="p1-messaging.html#chunked.encoding" title="Chunked Transfer Coding">Section 5.1.1</a> of <a href="#Part1" id="rfc.xref.Part1.23"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). |
919 | | </p> |
920 | | </li> |
921 | | <li> |
922 | | <p>Whether the header field should be preserved across redirects.</p> |
923 | | </li> |
924 | | </ul> |
925 | | <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> <a id="request.header.fields" href="#request.header.fields">Request Header Fields</a></h2> |
926 | | <p id="rfc.section.3.2.p.1">The request header fields allow the client to pass additional information about the request, and about the client itself, |
927 | | to the server. These fields act as request modifiers, with semantics equivalent to the parameters on a programming language |
928 | | method invocation. |
929 | | </p> |
930 | | <div id="rfc.table.u.2"> |
931 | | <table class="tt full left" cellpadding="3" cellspacing="0"> |
932 | | <thead> |
933 | | <tr> |
934 | | <th>Header Field Name</th> |
935 | | <th>Defined in...</th> |
936 | | </tr> |
937 | | </thead> |
938 | | <tbody> |
939 | | <tr> |
940 | | <td class="left">Accept</td> |
941 | | <td class="left"><a href="p3-payload.html#header.accept" title="Accept">Section 6.1</a> of <a href="#Part3" id="rfc.xref.Part3.3"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a></td> |
942 | | </tr> |
943 | | <tr> |
944 | | <td class="left">Accept-Charset</td> |
945 | | <td class="left"><a href="p3-payload.html#header.accept-charset" title="Accept-Charset">Section 6.2</a> of <a href="#Part3" id="rfc.xref.Part3.4"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a></td> |
946 | | </tr> |
947 | | <tr> |
948 | | <td class="left">Accept-Encoding</td> |
949 | | <td class="left"><a href="p3-payload.html#header.accept-encoding" title="Accept-Encoding">Section 6.3</a> of <a href="#Part3" id="rfc.xref.Part3.5"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a></td> |
950 | | </tr> |
951 | | <tr> |
952 | | <td class="left">Accept-Language</td> |
953 | | <td class="left"><a href="p3-payload.html#header.accept-language" title="Accept-Language">Section 6.4</a> of <a href="#Part3" id="rfc.xref.Part3.6"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a></td> |
954 | | </tr> |
955 | | <tr> |
956 | | <td class="left">Authorization</td> |
957 | | <td class="left"><a href="p7-auth.html#header.authorization" title="Authorization">Section 4.1</a> of <a href="#Part7" id="rfc.xref.Part7.1"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a></td> |
958 | | </tr> |
959 | | <tr> |
960 | | <td class="left">Expect</td> |
961 | | <td class="left"><a href="#header.expect" id="rfc.xref.header.expect.1" title="Expect">Section 9.3</a></td> |
962 | | </tr> |
963 | | <tr> |
964 | | <td class="left">From</td> |
965 | | <td class="left"><a href="#header.from" id="rfc.xref.header.from.1" title="From">Section 9.4</a></td> |
966 | | </tr> |
967 | | <tr> |
968 | | <td class="left">Host</td> |
969 | | <td class="left"><a href="p1-messaging.html#header.host" title="Host">Section 8.3</a> of <a href="#Part1" id="rfc.xref.Part1.24"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a></td> |
970 | | </tr> |
971 | | <tr> |
972 | | <td class="left">If-Match</td> |
973 | | <td class="left"><a href="p4-conditional.html#header.if-match" title="If-Match">Section 3.1</a> of <a href="#Part4" id="rfc.xref.Part4.1"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
974 | | </tr> |
975 | | <tr> |
976 | | <td class="left">If-Modified-Since</td> |
977 | | <td class="left"><a href="p4-conditional.html#header.if-modified-since" title="If-Modified-Since">Section 3.3</a> of <a href="#Part4" id="rfc.xref.Part4.2"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
978 | | </tr> |
979 | | <tr> |
980 | | <td class="left">If-None-Match</td> |
981 | | <td class="left"><a href="p4-conditional.html#header.if-none-match" title="If-None-Match">Section 3.2</a> of <a href="#Part4" id="rfc.xref.Part4.3"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
982 | | </tr> |
983 | | <tr> |
984 | | <td class="left">If-Range</td> |
985 | | <td class="left"><a href="p5-range.html#header.if-range" title="If-Range">Section 5.3</a> of <a href="#Part5" id="rfc.xref.Part5.1"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a></td> |
986 | | </tr> |
987 | | <tr> |
988 | | <td class="left">If-Unmodified-Since</td> |
989 | | <td class="left"><a href="p4-conditional.html#header.if-unmodified-since" title="If-Unmodified-Since">Section 3.4</a> of <a href="#Part4" id="rfc.xref.Part4.4"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
990 | | </tr> |
991 | | <tr> |
992 | | <td class="left">Max-Forwards</td> |
993 | | <td class="left"><a href="#header.max-forwards" id="rfc.xref.header.max-forwards.1" title="Max-Forwards">Section 9.6</a></td> |
994 | | </tr> |
995 | | <tr> |
996 | | <td class="left">Proxy-Authorization</td> |
997 | | <td class="left"><a href="p7-auth.html#header.proxy-authorization" title="Proxy-Authorization">Section 4.3</a> of <a href="#Part7" id="rfc.xref.Part7.2"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a></td> |
998 | | </tr> |
999 | | <tr> |
1000 | | <td class="left">Range</td> |
1001 | | <td class="left"><a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5.2"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a></td> |
1002 | | </tr> |
1003 | | <tr> |
1004 | | <td class="left">Referer</td> |
1005 | | <td class="left"><a href="#header.referer" id="rfc.xref.header.referer.1" title="Referer">Section 9.7</a></td> |
1006 | | </tr> |
1007 | | <tr> |
1008 | | <td class="left">TE</td> |
1009 | | <td class="left"><a href="p1-messaging.html#header.te" title="TE">Section 8.4</a> of <a href="#Part1" id="rfc.xref.Part1.25"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a></td> |
1010 | | </tr> |
1011 | | <tr> |
1012 | | <td class="left">User-Agent</td> |
1013 | | <td class="left"><a href="#header.user-agent" id="rfc.xref.header.user-agent.1" title="User-Agent">Section 9.10</a></td> |
1014 | | </tr> |
1015 | | </tbody> |
1016 | | </table> |
| 910 | double quotes will likely cause unnecessary confusion. |
| 911 | </p> |
| 912 | <p id="rfc.section.3.1.p.8">Many header fields use a format including (case-insensitively) named parameters (for instance, Content-Type, defined in <a href="p3-payload.html#header.content-type" title="Content-Type">Section 6.8</a> of <a href="#Part3" id="rfc.xref.Part3.1"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). Allowing both unquoted (token) and quoted (quoted-string) syntax for the parameter value enables recipients to use existing |
| 913 | parser components. When allowing both forms, the meaning of a parameter value ought to be independent of the syntax used for |
| 914 | it (for an example, see the notes on parameter handling for media types in <a href="p3-payload.html#media.types" title="Media Types">Section 2.3</a> of <a href="#Part3" id="rfc.xref.Part3.2"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). |
| 915 | </p> |
| 916 | <p id="rfc.section.3.1.p.9">Authors of specifications defining new header fields are advised to consider documenting: </p> |
| 917 | <ul> |
| 918 | <li> |
| 919 | <p>Whether the field is a single value, or whether it can be a list (delimited by commas; see <a href="p1-messaging.html#header.fields" title="Header Fields">Section 3.2</a> of <a href="#Part1" id="rfc.xref.Part1.21"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). |
| 920 | </p> |
| 921 | <p>If it does not use the list syntax, document how to treat messages where the header field occurs multiple times (a sensible |
| 922 | default would be to ignore the header field, but this might not always be the right choice). |
| 923 | </p> |
| 924 | <p>Note that intermediaries and software libraries might combine multiple header field instances into a single one, despite the |
| 925 | header field not allowing this. A robust format enables recipients to discover these situations (good example: "Content-Type", |
| 926 | as the comma can only appear inside quoted strings; bad example: "Location", as a comma can occur inside a URI). |
| 927 | </p> |
| 928 | </li> |
| 929 | <li> |
| 930 | <p>Under what conditions the header field can be used; e.g., only in responses or requests, in all messages, only on responses |
| 931 | to a particular request method. |
| 932 | </p> |
| 933 | </li> |
| 934 | <li> |
| 935 | <p>Whether it is appropriate to list the field-name in the Connection header (i.e., if the header is to be hop-by-hop, see <a href="p1-messaging.html#header.connection" title="Connection">Section 8.1</a> of <a href="#Part1" id="rfc.xref.Part1.22"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). |
| 936 | </p> |
| 937 | </li> |
| 938 | <li> |
| 939 | <p>Under what conditions intermediaries are allowed to modify the header field's value, insert or delete it.</p> |
| 940 | </li> |
| 941 | <li> |
| 942 | <p>How the header might interact with caching (see <a href="#Part6" id="rfc.xref.Part6.2"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). |
| 943 | </p> |
| 944 | </li> |
| 945 | <li> |
| 946 | <p>Whether the header field is useful or allowable in trailers (see <a href="p1-messaging.html#chunked.encoding" title="Chunked Transfer Coding">Section 5.1.1</a> of <a href="#Part1" id="rfc.xref.Part1.23"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). |
| 947 | </p> |
| 948 | </li> |
| 949 | <li> |
| 950 | <p>Whether the header field should be preserved across redirects.</p> |
| 951 | </li> |
| 952 | </ul> |
| 953 | </div> |
| 954 | <div id="request.header.fields"> |
| 955 | <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a> <a href="#request.header.fields">Request Header Fields</a></h2> |
| 956 | <p id="rfc.section.3.2.p.1">The request header fields allow the client to pass additional information about the request, and about the client itself, |
| 957 | to the server. These fields act as request modifiers, with semantics equivalent to the parameters on a programming language |
| 958 | method invocation. |
| 959 | </p> |
| 960 | <div id="rfc.table.u.2"> |
| 961 | <table class="tt full left" cellpadding="3" cellspacing="0"> |
| 962 | <thead> |
| 963 | <tr> |
| 964 | <th>Header Field Name</th> |
| 965 | <th>Defined in...</th> |
| 966 | </tr> |
| 967 | </thead> |
| 968 | <tbody> |
| 969 | <tr> |
| 970 | <td class="left">Accept</td> |
| 971 | <td class="left"><a href="p3-payload.html#header.accept" title="Accept">Section 6.1</a> of <a href="#Part3" id="rfc.xref.Part3.3"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a></td> |
| 972 | </tr> |
| 973 | <tr> |
| 974 | <td class="left">Accept-Charset</td> |
| 975 | <td class="left"><a href="p3-payload.html#header.accept-charset" title="Accept-Charset">Section 6.2</a> of <a href="#Part3" id="rfc.xref.Part3.4"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a></td> |
| 976 | </tr> |
| 977 | <tr> |
| 978 | <td class="left">Accept-Encoding</td> |
| 979 | <td class="left"><a href="p3-payload.html#header.accept-encoding" title="Accept-Encoding">Section 6.3</a> of <a href="#Part3" id="rfc.xref.Part3.5"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a></td> |
| 980 | </tr> |
| 981 | <tr> |
| 982 | <td class="left">Accept-Language</td> |
| 983 | <td class="left"><a href="p3-payload.html#header.accept-language" title="Accept-Language">Section 6.4</a> of <a href="#Part3" id="rfc.xref.Part3.6"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a></td> |
| 984 | </tr> |
| 985 | <tr> |
| 986 | <td class="left">Authorization</td> |
| 987 | <td class="left"><a href="p7-auth.html#header.authorization" title="Authorization">Section 4.1</a> of <a href="#Part7" id="rfc.xref.Part7.1"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a></td> |
| 988 | </tr> |
| 989 | <tr> |
| 990 | <td class="left">Expect</td> |
| 991 | <td class="left"><a href="#header.expect" id="rfc.xref.header.expect.1" title="Expect">Section 9.3</a></td> |
| 992 | </tr> |
| 993 | <tr> |
| 994 | <td class="left">From</td> |
| 995 | <td class="left"><a href="#header.from" id="rfc.xref.header.from.1" title="From">Section 9.4</a></td> |
| 996 | </tr> |
| 997 | <tr> |
| 998 | <td class="left">Host</td> |
| 999 | <td class="left"><a href="p1-messaging.html#header.host" title="Host">Section 8.3</a> of <a href="#Part1" id="rfc.xref.Part1.24"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a></td> |
| 1000 | </tr> |
| 1001 | <tr> |
| 1002 | <td class="left">If-Match</td> |
| 1003 | <td class="left"><a href="p4-conditional.html#header.if-match" title="If-Match">Section 3.1</a> of <a href="#Part4" id="rfc.xref.Part4.1"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
| 1004 | </tr> |
| 1005 | <tr> |
| 1006 | <td class="left">If-Modified-Since</td> |
| 1007 | <td class="left"><a href="p4-conditional.html#header.if-modified-since" title="If-Modified-Since">Section 3.3</a> of <a href="#Part4" id="rfc.xref.Part4.2"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
| 1008 | </tr> |
| 1009 | <tr> |
| 1010 | <td class="left">If-None-Match</td> |
| 1011 | <td class="left"><a href="p4-conditional.html#header.if-none-match" title="If-None-Match">Section 3.2</a> of <a href="#Part4" id="rfc.xref.Part4.3"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
| 1012 | </tr> |
| 1013 | <tr> |
| 1014 | <td class="left">If-Range</td> |
| 1015 | <td class="left"><a href="p5-range.html#header.if-range" title="If-Range">Section 5.3</a> of <a href="#Part5" id="rfc.xref.Part5.1"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a></td> |
| 1016 | </tr> |
| 1017 | <tr> |
| 1018 | <td class="left">If-Unmodified-Since</td> |
| 1019 | <td class="left"><a href="p4-conditional.html#header.if-unmodified-since" title="If-Unmodified-Since">Section 3.4</a> of <a href="#Part4" id="rfc.xref.Part4.4"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
| 1020 | </tr> |
| 1021 | <tr> |
| 1022 | <td class="left">Max-Forwards</td> |
| 1023 | <td class="left"><a href="#header.max-forwards" id="rfc.xref.header.max-forwards.1" title="Max-Forwards">Section 9.6</a></td> |
| 1024 | </tr> |
| 1025 | <tr> |
| 1026 | <td class="left">Proxy-Authorization</td> |
| 1027 | <td class="left"><a href="p7-auth.html#header.proxy-authorization" title="Proxy-Authorization">Section 4.3</a> of <a href="#Part7" id="rfc.xref.Part7.2"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a></td> |
| 1028 | </tr> |
| 1029 | <tr> |
| 1030 | <td class="left">Range</td> |
| 1031 | <td class="left"><a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5.2"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a></td> |
| 1032 | </tr> |
| 1033 | <tr> |
| 1034 | <td class="left">Referer</td> |
| 1035 | <td class="left"><a href="#header.referer" id="rfc.xref.header.referer.1" title="Referer">Section 9.7</a></td> |
| 1036 | </tr> |
| 1037 | <tr> |
| 1038 | <td class="left">TE</td> |
| 1039 | <td class="left"><a href="p1-messaging.html#header.te" title="TE">Section 8.4</a> of <a href="#Part1" id="rfc.xref.Part1.25"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a></td> |
| 1040 | </tr> |
| 1041 | <tr> |
| 1042 | <td class="left">User-Agent</td> |
| 1043 | <td class="left"><a href="#header.user-agent" id="rfc.xref.header.user-agent.1" title="User-Agent">Section 9.10</a></td> |
| 1044 | </tr> |
| 1045 | </tbody> |
| 1046 | </table> |
| 1047 | </div> |
| 1048 | </div> |
| 1049 | <div id="response.header.fields"> |
| 1050 | <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a> <a href="#response.header.fields">Response Header Fields</a></h2> |
| 1051 | <p id="rfc.section.3.3.p.1">The response header fields allow the server to pass additional information about the response which cannot be placed in the |
| 1052 | Status-Line. These header fields give information about the server and about further access to the target resource (<a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 4.3</a> of <a href="#Part1" id="rfc.xref.Part1.26"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). |
| 1053 | </p> |
| 1054 | <div id="rfc.table.u.3"> |
| 1055 | <table class="tt full left" cellpadding="3" cellspacing="0"> |
| 1056 | <thead> |
| 1057 | <tr> |
| 1058 | <th>Header Field Name</th> |
| 1059 | <th>Defined in...</th> |
| 1060 | </tr> |
| 1061 | </thead> |
| 1062 | <tbody> |
| 1063 | <tr> |
| 1064 | <td class="left">Accept-Ranges</td> |
| 1065 | <td class="left"><a href="p5-range.html#header.accept-ranges" title="Accept-Ranges">Section 5.1</a> of <a href="#Part5" id="rfc.xref.Part5.3"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a></td> |
| 1066 | </tr> |
| 1067 | <tr> |
| 1068 | <td class="left">Age</td> |
| 1069 | <td class="left"><a href="p6-cache.html#header.age" title="Age">Section 3.1</a> of <a href="#Part6" id="rfc.xref.Part6.3"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a></td> |
| 1070 | </tr> |
| 1071 | <tr> |
| 1072 | <td class="left">Allow</td> |
| 1073 | <td class="left"><a href="#header.allow" id="rfc.xref.header.allow.2" title="Allow">Section 9.1</a></td> |
| 1074 | </tr> |
| 1075 | <tr> |
| 1076 | <td class="left">Date</td> |
| 1077 | <td class="left"><a href="#header.date" id="rfc.xref.header.date.1" title="Date">Section 9.2</a></td> |
| 1078 | </tr> |
| 1079 | <tr> |
| 1080 | <td class="left">ETag</td> |
| 1081 | <td class="left"><a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a> of <a href="#Part4" id="rfc.xref.Part4.5"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
| 1082 | </tr> |
| 1083 | <tr> |
| 1084 | <td class="left">Location</td> |
| 1085 | <td class="left"><a href="#header.location" id="rfc.xref.header.location.1" title="Location">Section 9.5</a></td> |
| 1086 | </tr> |
| 1087 | <tr> |
| 1088 | <td class="left">Proxy-Authenticate</td> |
| 1089 | <td class="left"><a href="p7-auth.html#header.proxy-authenticate" title="Proxy-Authenticate">Section 4.2</a> of <a href="#Part7" id="rfc.xref.Part7.3"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a></td> |
| 1090 | </tr> |
| 1091 | <tr> |
| 1092 | <td class="left">Retry-After</td> |
| 1093 | <td class="left"><a href="#header.retry-after" id="rfc.xref.header.retry-after.1" title="Retry-After">Section 9.8</a></td> |
| 1094 | </tr> |
| 1095 | <tr> |
| 1096 | <td class="left">Server</td> |
| 1097 | <td class="left"><a href="#header.server" id="rfc.xref.header.server.1" title="Server">Section 9.9</a></td> |
| 1098 | </tr> |
| 1099 | <tr> |
| 1100 | <td class="left">Vary</td> |
| 1101 | <td class="left"><a href="p6-cache.html#header.vary" title="Vary">Section 3.5</a> of <a href="#Part6" id="rfc.xref.Part6.4"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a></td> |
| 1102 | </tr> |
| 1103 | <tr> |
| 1104 | <td class="left">WWW-Authenticate</td> |
| 1105 | <td class="left"><a href="p7-auth.html#header.www-authenticate" title="WWW-Authenticate">Section 4.4</a> of <a href="#Part7" id="rfc.xref.Part7.4"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a></td> |
| 1106 | </tr> |
| 1107 | </tbody> |
| 1108 | </table> |
| 1109 | </div> |
| 1110 | </div> |
1086 | | though such understanding is obviously desirable. However, applications <em class="bcp14">MUST</em> understand the class of any status code, as indicated by the first digit, and treat any unrecognized response as being equivalent |
1087 | | to the x00 status code of that class, with the exception that an unrecognized response <em class="bcp14">MUST NOT</em> be cached. For example, if an unrecognized status code of 431 is received by the client, it can safely assume that there was |
1088 | | something wrong with its request and treat the response as if it had received a 400 status code. In such cases, user agents <em class="bcp14">SHOULD</em> present to the user the representation enclosed with the response, since that representation is likely to include human-readable |
1089 | | information which will explain the unusual status. |
1090 | | </p> |
1091 | | <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> <a id="overview.of.status.codes" href="#overview.of.status.codes">Overview of Status Codes</a></h2> |
1092 | | <p id="rfc.section.4.1.p.1">The status codes listed below are defined in <a href="#status.codes" title="Status Code Definitions">Section 7</a> of this specification, <a href="p4-conditional.html#status.code.definitions" title="Status Code Definitions">Section 4</a> of <a href="#Part4" id="rfc.xref.Part4.6"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>, <a href="p5-range.html#status.code.definitions" title="Status Code Definitions">Section 3</a> of <a href="#Part5" id="rfc.xref.Part5.4"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>, and <a href="p7-auth.html#status.code.definitions" title="Status Code Definitions">Section 3</a> of <a href="#Part7" id="rfc.xref.Part7.5"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a>. The reason phrases listed here are only recommendations — they can be replaced by local equivalents without affecting the |
1093 | | protocol. |
1094 | | </p> |
1095 | | <div id="rfc.table.u.4"> |
1096 | | <table class="tt full left" cellpadding="3" cellspacing="0"> |
1097 | | <thead> |
1098 | | <tr> |
1099 | | <th>Status-Code</th> |
1100 | | <th>Reason-Phrase</th> |
1101 | | <th>Defined in...</th> |
1102 | | </tr> |
1103 | | </thead> |
1104 | | <tbody> |
1105 | | <tr> |
1106 | | <td class="left">100</td> |
1107 | | <td class="left">Continue</td> |
1108 | | <td class="left"><a href="#status.100" id="rfc.xref.status.100.1" title="100 Continue">Section 7.1.1</a></td> |
1109 | | </tr> |
1110 | | <tr> |
1111 | | <td class="left">101</td> |
1112 | | <td class="left">Switching Protocols</td> |
1113 | | <td class="left"><a href="#status.101" id="rfc.xref.status.101.1" title="101 Switching Protocols">Section 7.1.2</a></td> |
1114 | | </tr> |
1115 | | <tr> |
1116 | | <td class="left">200</td> |
1117 | | <td class="left">OK</td> |
1118 | | <td class="left"><a href="#status.200" id="rfc.xref.status.200.1" title="200 OK">Section 7.2.1</a></td> |
1119 | | </tr> |
1120 | | <tr> |
1121 | | <td class="left">201</td> |
1122 | | <td class="left">Created</td> |
1123 | | <td class="left"><a href="#status.201" id="rfc.xref.status.201.1" title="201 Created">Section 7.2.2</a></td> |
1124 | | </tr> |
1125 | | <tr> |
1126 | | <td class="left">202</td> |
1127 | | <td class="left">Accepted</td> |
1128 | | <td class="left"><a href="#status.202" id="rfc.xref.status.202.1" title="202 Accepted">Section 7.2.3</a></td> |
1129 | | </tr> |
1130 | | <tr> |
1131 | | <td class="left">203</td> |
1132 | | <td class="left">Non-Authoritative Information</td> |
1133 | | <td class="left"><a href="#status.203" id="rfc.xref.status.203.1" title="203 Non-Authoritative Information">Section 7.2.4</a></td> |
1134 | | </tr> |
1135 | | <tr> |
1136 | | <td class="left">204</td> |
1137 | | <td class="left">No Content</td> |
1138 | | <td class="left"><a href="#status.204" id="rfc.xref.status.204.1" title="204 No Content">Section 7.2.5</a></td> |
1139 | | </tr> |
1140 | | <tr> |
1141 | | <td class="left">205</td> |
1142 | | <td class="left">Reset Content</td> |
1143 | | <td class="left"><a href="#status.205" id="rfc.xref.status.205.1" title="205 Reset Content">Section 7.2.6</a></td> |
1144 | | </tr> |
1145 | | <tr> |
1146 | | <td class="left">206</td> |
1147 | | <td class="left">Partial Content</td> |
1148 | | <td class="left"><a href="p5-range.html#status.206" title="206 Partial Content">Section 3.1</a> of <a href="#Part5" id="rfc.xref.Part5.5"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a></td> |
1149 | | </tr> |
1150 | | <tr> |
1151 | | <td class="left">300</td> |
1152 | | <td class="left">Multiple Choices</td> |
1153 | | <td class="left"><a href="#status.300" id="rfc.xref.status.300.1" title="300 Multiple Choices">Section 7.3.1</a></td> |
1154 | | </tr> |
1155 | | <tr> |
1156 | | <td class="left">301</td> |
1157 | | <td class="left">Moved Permanently</td> |
1158 | | <td class="left"><a href="#status.301" id="rfc.xref.status.301.1" title="301 Moved Permanently">Section 7.3.2</a></td> |
1159 | | </tr> |
1160 | | <tr> |
1161 | | <td class="left">302</td> |
1162 | | <td class="left">Found</td> |
1163 | | <td class="left"><a href="#status.302" id="rfc.xref.status.302.1" title="302 Found">Section 7.3.3</a></td> |
1164 | | </tr> |
1165 | | <tr> |
1166 | | <td class="left">303</td> |
1167 | | <td class="left">See Other</td> |
1168 | | <td class="left"><a href="#status.303" id="rfc.xref.status.303.1" title="303 See Other">Section 7.3.4</a></td> |
1169 | | </tr> |
1170 | | <tr> |
1171 | | <td class="left">304</td> |
1172 | | <td class="left">Not Modified</td> |
1173 | | <td class="left"><a href="p4-conditional.html#status.304" title="304 Not Modified">Section 4.1</a> of <a href="#Part4" id="rfc.xref.Part4.7"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
1174 | | </tr> |
1175 | | <tr> |
1176 | | <td class="left">305</td> |
1177 | | <td class="left">Use Proxy</td> |
1178 | | <td class="left"><a href="#status.305" id="rfc.xref.status.305.1" title="305 Use Proxy">Section 7.3.6</a></td> |
1179 | | </tr> |
1180 | | <tr> |
1181 | | <td class="left">307</td> |
1182 | | <td class="left">Temporary Redirect</td> |
1183 | | <td class="left"><a href="#status.307" id="rfc.xref.status.307.1" title="307 Temporary Redirect">Section 7.3.8</a></td> |
1184 | | </tr> |
1185 | | <tr> |
1186 | | <td class="left">400</td> |
1187 | | <td class="left">Bad Request</td> |
1188 | | <td class="left"><a href="#status.400" id="rfc.xref.status.400.1" title="400 Bad Request">Section 7.4.1</a></td> |
1189 | | </tr> |
1190 | | <tr> |
1191 | | <td class="left">401</td> |
1192 | | <td class="left">Unauthorized</td> |
1193 | | <td class="left"><a href="p7-auth.html#status.401" title="401 Unauthorized">Section 3.1</a> of <a href="#Part7" id="rfc.xref.Part7.6"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a></td> |
1194 | | </tr> |
1195 | | <tr> |
1196 | | <td class="left">402</td> |
1197 | | <td class="left">Payment Required</td> |
1198 | | <td class="left"><a href="#status.402" id="rfc.xref.status.402.1" title="402 Payment Required">Section 7.4.3</a></td> |
1199 | | </tr> |
1200 | | <tr> |
1201 | | <td class="left">403</td> |
1202 | | <td class="left">Forbidden</td> |
1203 | | <td class="left"><a href="#status.403" id="rfc.xref.status.403.1" title="403 Forbidden">Section 7.4.4</a></td> |
1204 | | </tr> |
1205 | | <tr> |
1206 | | <td class="left">404</td> |
1207 | | <td class="left">Not Found</td> |
1208 | | <td class="left"><a href="#status.404" id="rfc.xref.status.404.1" title="404 Not Found">Section 7.4.5</a></td> |
1209 | | </tr> |
1210 | | <tr> |
1211 | | <td class="left">405</td> |
1212 | | <td class="left">Method Not Allowed</td> |
1213 | | <td class="left"><a href="#status.405" id="rfc.xref.status.405.1" title="405 Method Not Allowed">Section 7.4.6</a></td> |
1214 | | </tr> |
1215 | | <tr> |
1216 | | <td class="left">406</td> |
1217 | | <td class="left">Not Acceptable</td> |
1218 | | <td class="left"><a href="#status.406" id="rfc.xref.status.406.1" title="406 Not Acceptable">Section 7.4.7</a></td> |
1219 | | </tr> |
1220 | | <tr> |
1221 | | <td class="left">407</td> |
1222 | | <td class="left">Proxy Authentication Required</td> |
1223 | | <td class="left"><a href="p7-auth.html#status.407" title="407 Proxy Authentication Required">Section 3.2</a> of <a href="#Part7" id="rfc.xref.Part7.7"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a></td> |
1224 | | </tr> |
1225 | | <tr> |
1226 | | <td class="left">408</td> |
1227 | | <td class="left">Request Time-out</td> |
1228 | | <td class="left"><a href="#status.408" id="rfc.xref.status.408.1" title="408 Request Timeout">Section 7.4.9</a></td> |
1229 | | </tr> |
1230 | | <tr> |
1231 | | <td class="left">409</td> |
1232 | | <td class="left">Conflict</td> |
1233 | | <td class="left"><a href="#status.409" id="rfc.xref.status.409.1" title="409 Conflict">Section 7.4.10</a></td> |
1234 | | </tr> |
1235 | | <tr> |
1236 | | <td class="left">410</td> |
1237 | | <td class="left">Gone</td> |
1238 | | <td class="left"><a href="#status.410" id="rfc.xref.status.410.1" title="410 Gone">Section 7.4.11</a></td> |
1239 | | </tr> |
1240 | | <tr> |
1241 | | <td class="left">411</td> |
1242 | | <td class="left">Length Required</td> |
1243 | | <td class="left"><a href="#status.411" id="rfc.xref.status.411.1" title="411 Length Required">Section 7.4.12</a></td> |
1244 | | </tr> |
1245 | | <tr> |
1246 | | <td class="left">412</td> |
1247 | | <td class="left">Precondition Failed</td> |
1248 | | <td class="left"><a href="p4-conditional.html#status.412" title="412 Precondition Failed">Section 4.2</a> of <a href="#Part4" id="rfc.xref.Part4.8"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
1249 | | </tr> |
1250 | | <tr> |
1251 | | <td class="left">413</td> |
1252 | | <td class="left">Request Representation Too Large</td> |
1253 | | <td class="left"><a href="#status.413" id="rfc.xref.status.413.1" title="413 Request Representation Too Large">Section 7.4.14</a></td> |
1254 | | </tr> |
1255 | | <tr> |
1256 | | <td class="left">414</td> |
1257 | | <td class="left">URI Too Long</td> |
1258 | | <td class="left"><a href="#status.414" id="rfc.xref.status.414.1" title="414 URI Too Long">Section 7.4.15</a></td> |
1259 | | </tr> |
1260 | | <tr> |
1261 | | <td class="left">415</td> |
1262 | | <td class="left">Unsupported Media Type</td> |
1263 | | <td class="left"><a href="#status.415" id="rfc.xref.status.415.1" title="415 Unsupported Media Type">Section 7.4.16</a></td> |
1264 | | </tr> |
1265 | | <tr> |
1266 | | <td class="left">416</td> |
1267 | | <td class="left">Requested range not satisfiable</td> |
1268 | | <td class="left"><a href="p5-range.html#status.416" title="416 Requested Range Not Satisfiable">Section 3.2</a> of <a href="#Part5" id="rfc.xref.Part5.6"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a></td> |
1269 | | </tr> |
1270 | | <tr> |
1271 | | <td class="left">417</td> |
1272 | | <td class="left">Expectation Failed</td> |
1273 | | <td class="left"><a href="#status.417" id="rfc.xref.status.417.1" title="417 Expectation Failed">Section 7.4.18</a></td> |
1274 | | </tr> |
1275 | | <tr> |
1276 | | <td class="left">426</td> |
1277 | | <td class="left">Upgrade Required</td> |
1278 | | <td class="left"><a href="#status.426" id="rfc.xref.status.426.1" title="426 Upgrade Required">Section 7.4.19</a></td> |
1279 | | </tr> |
1280 | | <tr> |
1281 | | <td class="left">500</td> |
1282 | | <td class="left">Internal Server Error</td> |
1283 | | <td class="left"><a href="#status.500" id="rfc.xref.status.500.1" title="500 Internal Server Error">Section 7.5.1</a></td> |
1284 | | </tr> |
1285 | | <tr> |
1286 | | <td class="left">501</td> |
1287 | | <td class="left">Not Implemented</td> |
1288 | | <td class="left"><a href="#status.501" id="rfc.xref.status.501.1" title="501 Not Implemented">Section 7.5.2</a></td> |
1289 | | </tr> |
1290 | | <tr> |
1291 | | <td class="left">502</td> |
1292 | | <td class="left">Bad Gateway</td> |
1293 | | <td class="left"><a href="#status.502" id="rfc.xref.status.502.1" title="502 Bad Gateway">Section 7.5.3</a></td> |
1294 | | </tr> |
1295 | | <tr> |
1296 | | <td class="left">503</td> |
1297 | | <td class="left">Service Unavailable</td> |
1298 | | <td class="left"><a href="#status.503" id="rfc.xref.status.503.1" title="503 Service Unavailable">Section 7.5.4</a></td> |
1299 | | </tr> |
1300 | | <tr> |
1301 | | <td class="left">504</td> |
1302 | | <td class="left">Gateway Time-out</td> |
1303 | | <td class="left"><a href="#status.504" id="rfc.xref.status.504.1" title="504 Gateway Timeout">Section 7.5.5</a></td> |
1304 | | </tr> |
1305 | | <tr> |
1306 | | <td class="left">505</td> |
1307 | | <td class="left">HTTP Version not supported</td> |
1308 | | <td class="left"><a href="#status.505" id="rfc.xref.status.505.1" title="505 HTTP Version Not Supported">Section 7.5.6</a></td> |
1309 | | </tr> |
1310 | | </tbody> |
1311 | | </table> |
| 1121 | though such understanding is obviously desirable. However, applications <em class="bcp14">MUST</em> understand the class of any status code, as indicated by the first digit, and treat any unrecognized response as being equivalent |
| 1122 | to the x00 status code of that class, with the exception that an unrecognized response <em class="bcp14">MUST NOT</em> be cached. For example, if an unrecognized status code of 431 is received by the client, it can safely assume that there was |
| 1123 | something wrong with its request and treat the response as if it had received a 400 status code. In such cases, user agents <em class="bcp14">SHOULD</em> present to the user the representation enclosed with the response, since that representation is likely to include human-readable |
| 1124 | information which will explain the unusual status. |
| 1125 | </p> |
| 1126 | <div id="overview.of.status.codes"> |
| 1127 | <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a> <a href="#overview.of.status.codes">Overview of Status Codes</a></h2> |
| 1128 | <p id="rfc.section.4.1.p.1">The status codes listed below are defined in <a href="#status.codes" title="Status Code Definitions">Section 7</a> of this specification, <a href="p4-conditional.html#status.code.definitions" title="Status Code Definitions">Section 4</a> of <a href="#Part4" id="rfc.xref.Part4.6"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>, <a href="p5-range.html#status.code.definitions" title="Status Code Definitions">Section 3</a> of <a href="#Part5" id="rfc.xref.Part5.4"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>, and <a href="p7-auth.html#status.code.definitions" title="Status Code Definitions">Section 3</a> of <a href="#Part7" id="rfc.xref.Part7.5"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a>. The reason phrases listed here are only recommendations — they can be replaced by local equivalents without affecting the |
| 1129 | protocol. |
| 1130 | </p> |
| 1131 | <div id="rfc.table.u.4"> |
| 1132 | <table class="tt full left" cellpadding="3" cellspacing="0"> |
| 1133 | <thead> |
| 1134 | <tr> |
| 1135 | <th>Status-Code</th> |
| 1136 | <th>Reason-Phrase</th> |
| 1137 | <th>Defined in...</th> |
| 1138 | </tr> |
| 1139 | </thead> |
| 1140 | <tbody> |
| 1141 | <tr> |
| 1142 | <td class="left">100</td> |
| 1143 | <td class="left">Continue</td> |
| 1144 | <td class="left"><a href="#status.100" id="rfc.xref.status.100.1" title="100 Continue">Section 7.1.1</a></td> |
| 1145 | </tr> |
| 1146 | <tr> |
| 1147 | <td class="left">101</td> |
| 1148 | <td class="left">Switching Protocols</td> |
| 1149 | <td class="left"><a href="#status.101" id="rfc.xref.status.101.1" title="101 Switching Protocols">Section 7.1.2</a></td> |
| 1150 | </tr> |
| 1151 | <tr> |
| 1152 | <td class="left">200</td> |
| 1153 | <td class="left">OK</td> |
| 1154 | <td class="left"><a href="#status.200" id="rfc.xref.status.200.1" title="200 OK">Section 7.2.1</a></td> |
| 1155 | </tr> |
| 1156 | <tr> |
| 1157 | <td class="left">201</td> |
| 1158 | <td class="left">Created</td> |
| 1159 | <td class="left"><a href="#status.201" id="rfc.xref.status.201.1" title="201 Created">Section 7.2.2</a></td> |
| 1160 | </tr> |
| 1161 | <tr> |
| 1162 | <td class="left">202</td> |
| 1163 | <td class="left">Accepted</td> |
| 1164 | <td class="left"><a href="#status.202" id="rfc.xref.status.202.1" title="202 Accepted">Section 7.2.3</a></td> |
| 1165 | </tr> |
| 1166 | <tr> |
| 1167 | <td class="left">203</td> |
| 1168 | <td class="left">Non-Authoritative Information</td> |
| 1169 | <td class="left"><a href="#status.203" id="rfc.xref.status.203.1" title="203 Non-Authoritative Information">Section 7.2.4</a></td> |
| 1170 | </tr> |
| 1171 | <tr> |
| 1172 | <td class="left">204</td> |
| 1173 | <td class="left">No Content</td> |
| 1174 | <td class="left"><a href="#status.204" id="rfc.xref.status.204.1" title="204 No Content">Section 7.2.5</a></td> |
| 1175 | </tr> |
| 1176 | <tr> |
| 1177 | <td class="left">205</td> |
| 1178 | <td class="left">Reset Content</td> |
| 1179 | <td class="left"><a href="#status.205" id="rfc.xref.status.205.1" title="205 Reset Content">Section 7.2.6</a></td> |
| 1180 | </tr> |
| 1181 | <tr> |
| 1182 | <td class="left">206</td> |
| 1183 | <td class="left">Partial Content</td> |
| 1184 | <td class="left"><a href="p5-range.html#status.206" title="206 Partial Content">Section 3.1</a> of <a href="#Part5" id="rfc.xref.Part5.5"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a></td> |
| 1185 | </tr> |
| 1186 | <tr> |
| 1187 | <td class="left">300</td> |
| 1188 | <td class="left">Multiple Choices</td> |
| 1189 | <td class="left"><a href="#status.300" id="rfc.xref.status.300.1" title="300 Multiple Choices">Section 7.3.1</a></td> |
| 1190 | </tr> |
| 1191 | <tr> |
| 1192 | <td class="left">301</td> |
| 1193 | <td class="left">Moved Permanently</td> |
| 1194 | <td class="left"><a href="#status.301" id="rfc.xref.status.301.1" title="301 Moved Permanently">Section 7.3.2</a></td> |
| 1195 | </tr> |
| 1196 | <tr> |
| 1197 | <td class="left">302</td> |
| 1198 | <td class="left">Found</td> |
| 1199 | <td class="left"><a href="#status.302" id="rfc.xref.status.302.1" title="302 Found">Section 7.3.3</a></td> |
| 1200 | </tr> |
| 1201 | <tr> |
| 1202 | <td class="left">303</td> |
| 1203 | <td class="left">See Other</td> |
| 1204 | <td class="left"><a href="#status.303" id="rfc.xref.status.303.1" title="303 See Other">Section 7.3.4</a></td> |
| 1205 | </tr> |
| 1206 | <tr> |
| 1207 | <td class="left">304</td> |
| 1208 | <td class="left">Not Modified</td> |
| 1209 | <td class="left"><a href="p4-conditional.html#status.304" title="304 Not Modified">Section 4.1</a> of <a href="#Part4" id="rfc.xref.Part4.7"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
| 1210 | </tr> |
| 1211 | <tr> |
| 1212 | <td class="left">305</td> |
| 1213 | <td class="left">Use Proxy</td> |
| 1214 | <td class="left"><a href="#status.305" id="rfc.xref.status.305.1" title="305 Use Proxy">Section 7.3.6</a></td> |
| 1215 | </tr> |
| 1216 | <tr> |
| 1217 | <td class="left">307</td> |
| 1218 | <td class="left">Temporary Redirect</td> |
| 1219 | <td class="left"><a href="#status.307" id="rfc.xref.status.307.1" title="307 Temporary Redirect">Section 7.3.8</a></td> |
| 1220 | </tr> |
| 1221 | <tr> |
| 1222 | <td class="left">400</td> |
| 1223 | <td class="left">Bad Request</td> |
| 1224 | <td class="left"><a href="#status.400" id="rfc.xref.status.400.1" title="400 Bad Request">Section 7.4.1</a></td> |
| 1225 | </tr> |
| 1226 | <tr> |
| 1227 | <td class="left">401</td> |
| 1228 | <td class="left">Unauthorized</td> |
| 1229 | <td class="left"><a href="p7-auth.html#status.401" title="401 Unauthorized">Section 3.1</a> of <a href="#Part7" id="rfc.xref.Part7.6"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a></td> |
| 1230 | </tr> |
| 1231 | <tr> |
| 1232 | <td class="left">402</td> |
| 1233 | <td class="left">Payment Required</td> |
| 1234 | <td class="left"><a href="#status.402" id="rfc.xref.status.402.1" title="402 Payment Required">Section 7.4.3</a></td> |
| 1235 | </tr> |
| 1236 | <tr> |
| 1237 | <td class="left">403</td> |
| 1238 | <td class="left">Forbidden</td> |
| 1239 | <td class="left"><a href="#status.403" id="rfc.xref.status.403.1" title="403 Forbidden">Section 7.4.4</a></td> |
| 1240 | </tr> |
| 1241 | <tr> |
| 1242 | <td class="left">404</td> |
| 1243 | <td class="left">Not Found</td> |
| 1244 | <td class="left"><a href="#status.404" id="rfc.xref.status.404.1" title="404 Not Found">Section 7.4.5</a></td> |
| 1245 | </tr> |
| 1246 | <tr> |
| 1247 | <td class="left">405</td> |
| 1248 | <td class="left">Method Not Allowed</td> |
| 1249 | <td class="left"><a href="#status.405" id="rfc.xref.status.405.1" title="405 Method Not Allowed">Section 7.4.6</a></td> |
| 1250 | </tr> |
| 1251 | <tr> |
| 1252 | <td class="left">406</td> |
| 1253 | <td class="left">Not Acceptable</td> |
| 1254 | <td class="left"><a href="#status.406" id="rfc.xref.status.406.1" title="406 Not Acceptable">Section 7.4.7</a></td> |
| 1255 | </tr> |
| 1256 | <tr> |
| 1257 | <td class="left">407</td> |
| 1258 | <td class="left">Proxy Authentication Required</td> |
| 1259 | <td class="left"><a href="p7-auth.html#status.407" title="407 Proxy Authentication Required">Section 3.2</a> of <a href="#Part7" id="rfc.xref.Part7.7"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a></td> |
| 1260 | </tr> |
| 1261 | <tr> |
| 1262 | <td class="left">408</td> |
| 1263 | <td class="left">Request Time-out</td> |
| 1264 | <td class="left"><a href="#status.408" id="rfc.xref.status.408.1" title="408 Request Timeout">Section 7.4.9</a></td> |
| 1265 | </tr> |
| 1266 | <tr> |
| 1267 | <td class="left">409</td> |
| 1268 | <td class="left">Conflict</td> |
| 1269 | <td class="left"><a href="#status.409" id="rfc.xref.status.409.1" title="409 Conflict">Section 7.4.10</a></td> |
| 1270 | </tr> |
| 1271 | <tr> |
| 1272 | <td class="left">410</td> |
| 1273 | <td class="left">Gone</td> |
| 1274 | <td class="left"><a href="#status.410" id="rfc.xref.status.410.1" title="410 Gone">Section 7.4.11</a></td> |
| 1275 | </tr> |
| 1276 | <tr> |
| 1277 | <td class="left">411</td> |
| 1278 | <td class="left">Length Required</td> |
| 1279 | <td class="left"><a href="#status.411" id="rfc.xref.status.411.1" title="411 Length Required">Section 7.4.12</a></td> |
| 1280 | </tr> |
| 1281 | <tr> |
| 1282 | <td class="left">412</td> |
| 1283 | <td class="left">Precondition Failed</td> |
| 1284 | <td class="left"><a href="p4-conditional.html#status.412" title="412 Precondition Failed">Section 4.2</a> of <a href="#Part4" id="rfc.xref.Part4.8"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a></td> |
| 1285 | </tr> |
| 1286 | <tr> |
| 1287 | <td class="left">413</td> |
| 1288 | <td class="left">Request Representation Too Large</td> |
| 1289 | <td class="left"><a href="#status.413" id="rfc.xref.status.413.1" title="413 Request Representation Too Large">Section 7.4.14</a></td> |
| 1290 | </tr> |
| 1291 | <tr> |
| 1292 | <td class="left">414</td> |
| 1293 | <td class="left">URI Too Long</td> |
| 1294 | <td class="left"><a href="#status.414" id="rfc.xref.status.414.1" title="414 URI Too Long">Section 7.4.15</a></td> |
| 1295 | </tr> |
| 1296 | <tr> |
| 1297 | <td class="left">415</td> |
| 1298 | <td class="left">Unsupported Media Type</td> |
| 1299 | <td class="left"><a href="#status.415" id="rfc.xref.status.415.1" title="415 Unsupported Media Type">Section 7.4.16</a></td> |
| 1300 | </tr> |
| 1301 | <tr> |
| 1302 | <td class="left">416</td> |
| 1303 | <td class="left">Requested range not satisfiable</td> |
| 1304 | <td class="left"><a href="p5-range.html#status.416" title="416 Requested Range Not Satisfiable">Section 3.2</a> of <a href="#Part5" id="rfc.xref.Part5.6"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a></td> |
| 1305 | </tr> |
| 1306 | <tr> |
| 1307 | <td class="left">417</td> |
| 1308 | <td class="left">Expectation Failed</td> |
| 1309 | <td class="left"><a href="#status.417" id="rfc.xref.status.417.1" title="417 Expectation Failed">Section 7.4.18</a></td> |
| 1310 | </tr> |
| 1311 | <tr> |
| 1312 | <td class="left">426</td> |
| 1313 | <td class="left">Upgrade Required</td> |
| 1314 | <td class="left"><a href="#status.426" id="rfc.xref.status.426.1" title="426 Upgrade Required">Section 7.4.19</a></td> |
| 1315 | </tr> |
| 1316 | <tr> |
| 1317 | <td class="left">500</td> |
| 1318 | <td class="left">Internal Server Error</td> |
| 1319 | <td class="left"><a href="#status.500" id="rfc.xref.status.500.1" title="500 Internal Server Error">Section 7.5.1</a></td> |
| 1320 | </tr> |
| 1321 | <tr> |
| 1322 | <td class="left">501</td> |
| 1323 | <td class="left">Not Implemented</td> |
| 1324 | <td class="left"><a href="#status.501" id="rfc.xref.status.501.1" title="501 Not Implemented">Section 7.5.2</a></td> |
| 1325 | </tr> |
| 1326 | <tr> |
| 1327 | <td class="left">502</td> |
| 1328 | <td class="left">Bad Gateway</td> |
| 1329 | <td class="left"><a href="#status.502" id="rfc.xref.status.502.1" title="502 Bad Gateway">Section 7.5.3</a></td> |
| 1330 | </tr> |
| 1331 | <tr> |
| 1332 | <td class="left">503</td> |
| 1333 | <td class="left">Service Unavailable</td> |
| 1334 | <td class="left"><a href="#status.503" id="rfc.xref.status.503.1" title="503 Service Unavailable">Section 7.5.4</a></td> |
| 1335 | </tr> |
| 1336 | <tr> |
| 1337 | <td class="left">504</td> |
| 1338 | <td class="left">Gateway Time-out</td> |
| 1339 | <td class="left"><a href="#status.504" id="rfc.xref.status.504.1" title="504 Gateway Timeout">Section 7.5.5</a></td> |
| 1340 | </tr> |
| 1341 | <tr> |
| 1342 | <td class="left">505</td> |
| 1343 | <td class="left">HTTP Version not supported</td> |
| 1344 | <td class="left"><a href="#status.505" id="rfc.xref.status.505.1" title="505 HTTP Version Not Supported">Section 7.5.6</a></td> |
| 1345 | </tr> |
| 1346 | </tbody> |
| 1347 | </table> |
| 1348 | </div> |
| 1349 | <p id="rfc.section.4.1.p.2">Note that this list is not exhaustive — it does not include extension status codes defined in other specifications.</p> |
| 1350 | </div> |
| 1351 | <div id="status.code.registry"> |
| 1352 | <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a> <a href="#status.code.registry">Status Code Registry</a></h2> |
| 1353 | <p id="rfc.section.4.2.p.1">The HTTP Status Code Registry defines the name space for the Status-Code token in the Status-Line of an HTTP response.</p> |
| 1354 | <p id="rfc.section.4.2.p.2">Values to be added to this name space are subject to IETF review (<a href="#RFC5226" id="rfc.xref.RFC5226.2"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>, <a href="https://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a>). |
| 1355 | </p> |
| 1356 | <p id="rfc.section.4.2.p.3">The registry itself is maintained at <<a href="http://www.iana.org/assignments/http-status-codes">http://www.iana.org/assignments/http-status-codes</a>>. |
| 1357 | </p> |
| 1358 | <div id="considerations.for.new.status.codes"> |
| 1359 | <h3 id="rfc.section.4.2.1"><a href="#rfc.section.4.2.1">4.2.1</a> <a href="#considerations.for.new.status.codes">Considerations for New Status Codes</a></h3> |
| 1360 | <p id="rfc.section.4.2.1.p.1">When it is necessary to express new semantics for a HTTP response that aren't specific to a single application or media type, |
| 1361 | and currently defined status codes are inadequate, a new status code can be registered. |
| 1362 | </p> |
| 1363 | <p id="rfc.section.4.2.1.p.2">HTTP status codes are generic; that is, they are potentially applicable to any resource, not just one particular media type, |
| 1364 | "type" of resource, or application. As such, it is preferred that new HTTP status codes be registered in a document that isn't |
| 1365 | specific to a single application, so that this is clear. |
| 1366 | </p> |
| 1367 | <p id="rfc.section.4.2.1.p.3">Definitions of new HTTP status codes typically explain the request conditions that produce a response containing the status |
| 1368 | code (e.g., combinations of request headers and/or method(s)), along with any interactions with response headers (e.g., those |
| 1369 | that are required, those that modify the semantics of the response). |
| 1370 | </p> |
| 1371 | <p id="rfc.section.4.2.1.p.4">New HTTP status codes are required to fall under one of the categories defined in <a href="#status.codes" title="Status Code Definitions">Section 7</a>. To allow existing parsers to properly handle them, new status codes cannot disallow a response body, although they can mandate |
| 1372 | a zero-length response body. They can require the presence of one or more particular HTTP response header(s). |
| 1373 | </p> |
| 1374 | <p id="rfc.section.4.2.1.p.5">Likewise, their definitions can specify that caches are allowed to use heuristics to determine their freshness (see <a href="#Part6" id="rfc.xref.Part6.5"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>; by default, it is not allowed), and can define how to determine the resource which they carry a representation for (see <a href="#identifying.response.associated.with.representation" title="Identifying the Resource Associated with a Representation">Section 5.1</a>; by default, it is anonymous). |
| 1375 | </p> |
| 1376 | </div> |
| 1377 | </div> |
1313 | | <p id="rfc.section.4.1.p.2">Note that this list is not exhaustive — it does not include extension status codes defined in other specifications.</p> |
1314 | | <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a> <a id="status.code.registry" href="#status.code.registry">Status Code Registry</a></h2> |
1315 | | <p id="rfc.section.4.2.p.1">The HTTP Status Code Registry defines the name space for the Status-Code token in the Status-Line of an HTTP response.</p> |
1316 | | <p id="rfc.section.4.2.p.2">Values to be added to this name space are subject to IETF review (<a href="#RFC5226" id="rfc.xref.RFC5226.2"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[RFC5226]</cite></a>, <a href="http://tools.ietf.org/html/rfc5226#section-4.1">Section 4.1</a>). |
1317 | | </p> |
1318 | | <p id="rfc.section.4.2.p.3">The registry itself is maintained at <<a href="http://www.iana.org/assignments/http-status-codes">http://www.iana.org/assignments/http-status-codes</a>>. |
1319 | | </p> |
1320 | | <h3 id="rfc.section.4.2.1"><a href="#rfc.section.4.2.1">4.2.1</a> <a id="considerations.for.new.status.codes" href="#considerations.for.new.status.codes">Considerations for New Status Codes</a></h3> |
1321 | | <p id="rfc.section.4.2.1.p.1">When it is necessary to express new semantics for a HTTP response that aren't specific to a single application or media type, |
1322 | | and currently defined status codes are inadequate, a new status code can be registered. |
1323 | | </p> |
1324 | | <p id="rfc.section.4.2.1.p.2">HTTP status codes are generic; that is, they are potentially applicable to any resource, not just one particular media type, |
1325 | | "type" of resource, or application. As such, it is preferred that new HTTP status codes be registered in a document that isn't |
1326 | | specific to a single application, so that this is clear. |
1327 | | </p> |
1328 | | <p id="rfc.section.4.2.1.p.3">Definitions of new HTTP status codes typically explain the request conditions that produce a response containing the status |
1329 | | code (e.g., combinations of request headers and/or method(s)), along with any interactions with response headers (e.g., those |
1330 | | that are required, those that modify the semantics of the response). |
1331 | | </p> |
1332 | | <p id="rfc.section.4.2.1.p.4">New HTTP status codes are required to fall under one of the categories defined in <a href="#status.codes" title="Status Code Definitions">Section 7</a>. To allow existing parsers to properly handle them, new status codes cannot disallow a response body, although they can mandate |
1333 | | a zero-length response body. They can require the presence of one or more particular HTTP response header(s). |
1334 | | </p> |
1335 | | <p id="rfc.section.4.2.1.p.5">Likewise, their definitions can specify that caches are allowed to use heuristics to determine their freshness (see <a href="#Part6" id="rfc.xref.Part6.5"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>; by default, it is not allowed), and can define how to determine the resource which they carry a representation for (see <a href="#identifying.response.associated.with.representation" title="Identifying the Resource Associated with a Representation">Section 5.1</a>; by default, it is anonymous). |
1336 | | </p> |
1337 | | <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a id="representation" href="#representation">Representation</a></h1> |
1338 | | <p id="rfc.section.5.p.1">Request and Response messages <em class="bcp14">MAY</em> transfer a representation if not otherwise restricted by the request method or response status code. A representation consists |
1339 | | of metadata (representation header fields) and data (representation body). When a complete or partial representation is enclosed |
1340 | | in an HTTP message, it is referred to as the payload of the message. HTTP representations are defined in <a href="#Part3" id="rfc.xref.Part3.7"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>. |
1341 | | </p> |
1342 | | <p id="rfc.section.5.p.2">A representation body is only present in a message when a message-body is present, as described in <a href="p1-messaging.html#message.body" title="Message Body">Section 3.3</a> of <a href="#Part1" id="rfc.xref.Part1.27"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. The representation body is obtained from the message-body by decoding any Transfer-Encoding that might have been applied |
1343 | | to ensure safe and proper transfer of the message. |
1344 | | </p> |
1345 | | <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a> <a id="identifying.response.associated.with.representation" href="#identifying.response.associated.with.representation">Identifying the Resource Associated with a Representation</a></h2> |
1346 | | <p id="rfc.section.5.1.p.1">It is sometimes necessary to determine an identifier for the resource associated with a representation.</p> |
1347 | | <p id="rfc.section.5.1.p.2">An HTTP request representation, when present, is always associated with an anonymous (i.e., unidentified) resource.</p> |
1348 | | <p id="rfc.section.5.1.p.3">In the common case, an HTTP response is a representation of the target resource (see <a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 4.3</a> of <a href="#Part1" id="rfc.xref.Part1.28"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). However, this is not always the case. To determine the URI of the resource a response is associated with, the following |
1349 | | rules are used (with the first applicable one being selected): |
1350 | | </p> |
1351 | | <ol> |
1352 | | <li>If the response status code is 200 or 203 and the request method was GET, the response payload is a representation of the |
1353 | | target resource. |
1354 | | </li> |
1355 | | <li>If the response status code is 204, 206, or 304 and the request method was GET or HEAD, the response payload is a partial |
1356 | | representation of the target resource. |
1357 | | </li> |
1358 | | <li>If the response has a Content-Location header field, and that URI is the same as the effective request URI, the response payload |
1359 | | is a representation of the target resource. |
1360 | | </li> |
1361 | | <li>If the response has a Content-Location header field, and that URI is not the same as the effective request URI, then the response |
1362 | | asserts that its payload is a representation of the resource identified by the Content-Location URI. However, such an assertion |
1363 | | cannot be trusted unless it can be verified by other means (not defined by HTTP). |
1364 | | </li> |
1365 | | <li>Otherwise, the response is a representation of an anonymous (i.e., unidentified) resource.</li> |
1366 | | </ol> |
1367 | | <p id="rfc.section.5.1.p.5"> <span class="comment" id="TODO-req-uri">[<a href="#TODO-req-uri" class="smpl">TODO-req-uri</a>: The comparison function is going to have to be defined somewhere, because we already need to compare URIs for things like |
1368 | | cache invalidation.]</span> |
1369 | | </p> |
1370 | | <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a id="method.definitions" href="#method.definitions">Method Definitions</a></h1> |
1371 | | <p id="rfc.section.6.p.1">The set of common request methods for HTTP/1.1 is defined below. Although this set can be expanded, additional methods cannot |
1372 | | be assumed to share the same semantics for separately extended clients and servers. |
1373 | | </p> |
1374 | | <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a> <a id="safe.and.idempotent" href="#safe.and.idempotent">Safe and Idempotent Methods</a></h2> |
1375 | | <div id="rfc.iref.s.1"></div> |
1376 | | <h3 id="rfc.section.6.1.1"><a href="#rfc.section.6.1.1">6.1.1</a> <a id="safe.methods" href="#safe.methods">Safe Methods</a></h3> |
1377 | | <p id="rfc.section.6.1.1.p.1">Implementors need to be aware that the software represents the user in their interactions over the Internet, and need to allow |
1378 | | the user to be aware of any actions they take which might have an unexpected significance to themselves or others. |
1379 | | </p> |
1380 | | <p id="rfc.section.6.1.1.p.2">In particular, the convention has been established that the GET, HEAD, OPTIONS, and TRACE request methods <em class="bcp14">SHOULD NOT</em> have the significance of taking an action other than retrieval. These request methods ought to be considered "<dfn id="safe">safe</dfn>". This allows user agents to represent other methods, such as POST, PUT and DELETE, in a special way, so that the user is |
1381 | | made aware of the fact that a possibly unsafe action is being requested. |
1382 | | </p> |
1383 | | <p id="rfc.section.6.1.1.p.3">Naturally, it is not possible to ensure that the server does not generate side-effects as a result of performing a GET request; |
1384 | | in fact, some dynamic resources consider that a feature. The important distinction here is that the user did not request the |
1385 | | side-effects, so therefore cannot be held accountable for them. |
1386 | | </p> |
1387 | | <div id="rfc.iref.i.1"></div> |
1388 | | <h3 id="rfc.section.6.1.2"><a href="#rfc.section.6.1.2">6.1.2</a> <a id="idempotent.methods" href="#idempotent.methods">Idempotent Methods</a></h3> |
1389 | | <p id="rfc.section.6.1.2.p.1">Request methods can also have the property of "idempotence" in that, aside from error or expiration issues, the intended effect |
1390 | | of multiple identical requests is the same as for a single request. PUT, DELETE, and all safe request methods are idempotent. |
1391 | | It is important to note that idempotence refers only to changes requested by the client: a server is free to change its state |
1392 | | due to multiple requests for the purpose of tracking those requests, versioning of results, etc. |
1393 | | </p> |
1394 | | <h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a> <a id="OPTIONS" href="#OPTIONS">OPTIONS</a></h2> |
1395 | | <div id="rfc.iref.o.1"></div> |
1396 | | <div id="rfc.iref.m.1"></div> |
1397 | | <p id="rfc.section.6.2.p.1">The OPTIONS method requests information about the communication options available on the request/response chain identified |
1398 | | by the effective request URI. This method allows a client to determine the options and/or requirements associated with a resource, |
1399 | | or the capabilities of a server, without implying a resource action or initiating a resource retrieval. |
1400 | | </p> |
1401 | | <p id="rfc.section.6.2.p.2">Responses to the OPTIONS method are not cacheable.</p> |
1402 | | <p id="rfc.section.6.2.p.3">If the OPTIONS request includes a message-body (as indicated by the presence of Content-Length or Transfer-Encoding), then |
1403 | | the media type <em class="bcp14">MUST</em> be indicated by a Content-Type field. Although this specification does not define any use for such a body, future extensions |
1404 | | to HTTP might use the OPTIONS body to make more detailed queries on the server. |
1405 | | </p> |
1406 | | <p id="rfc.section.6.2.p.4">If the request-target is an asterisk ("*"), the OPTIONS request is intended to apply to the server in general rather than |
1407 | | to a specific resource. Since a server's communication options typically depend on the resource, the "*" request is only useful |
1408 | | as a "ping" or "no-op" type of method; it does nothing beyond allowing the client to test the capabilities of the server. |
1409 | | For example, this can be used to test a proxy for HTTP/1.1 compliance (or lack thereof). |
1410 | | </p> |
1411 | | <p id="rfc.section.6.2.p.5">If the request-target is not an asterisk, the OPTIONS request applies only to the options that are available when communicating |
1412 | | with that resource. |
1413 | | </p> |
1414 | | <p id="rfc.section.6.2.p.6">A 200 response <em class="bcp14">SHOULD</em> include any header fields that indicate optional features implemented by the server and applicable to that resource (e.g., |
1415 | | Allow), possibly including extensions not defined by this specification. The response body, if any, <em class="bcp14">SHOULD</em> also include information about the communication options. The format for such a body is not defined by this specification, |
1416 | | but might be defined by future extensions to HTTP. Content negotiation <em class="bcp14">MAY</em> be used to select the appropriate response format. If no response body is included, the response <em class="bcp14">MUST</em> include a Content-Length field with a field-value of "0". |
1417 | | </p> |
1418 | | <p id="rfc.section.6.2.p.7">The Max-Forwards header field <em class="bcp14">MAY</em> be used to target a specific proxy in the request chain (see <a href="#header.max-forwards" id="rfc.xref.header.max-forwards.2" title="Max-Forwards">Section 9.6</a>). If no Max-Forwards field is present in the request, then the forwarded request <em class="bcp14">MUST NOT</em> include a Max-Forwards field. |
1419 | | </p> |
1420 | | <h2 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a> <a id="GET" href="#GET">GET</a></h2> |
1421 | | <div id="rfc.iref.g.5"></div> |
1422 | | <div id="rfc.iref.m.2"></div> |
1423 | | <p id="rfc.section.6.3.p.1">The GET method requests transfer of a current representation of the target resource.</p> |
1424 | | <p id="rfc.section.6.3.p.2">If the target resource is a data-producing process, it is the produced data which shall be returned as the representation |
1425 | | in the response and not the source text of the process, unless that text happens to be the output of the process. |
1426 | | </p> |
1427 | | <p id="rfc.section.6.3.p.3">The semantics of the GET method change to a "conditional GET" if the request message includes an If-Modified-Since, If-Unmodified-Since, |
1428 | | If-Match, If-None-Match, or If-Range header field. A conditional GET requests that the representation be transferred only |
1429 | | under the circumstances described by the conditional header field(s). The conditional GET request is intended to reduce unnecessary |
1430 | | network usage by allowing cached representations to be refreshed without requiring multiple requests or transferring data |
1431 | | already held by the client. |
1432 | | </p> |
1433 | | <p id="rfc.section.6.3.p.4">The semantics of the GET method change to a "partial GET" if the request message includes a Range header field. A partial |
1434 | | GET requests that only part of the representation be transferred, as described in <a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5.7"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>. The partial GET request is intended to reduce unnecessary network usage by allowing partially-retrieved representations |
1435 | | to be completed without transferring data already held by the client. |
1436 | | </p> |
1437 | | <p id="rfc.section.6.3.p.5">Bodies on GET requests have no defined semantics. Note that sending a body on a GET request might cause some existing implementations |
1438 | | to reject the request. |
1439 | | </p> |
1440 | | <p id="rfc.section.6.3.p.6">The response to a GET request is cacheable and <em class="bcp14">MAY</em> be used to satisfy subsequent GET and HEAD requests (see <a href="#Part6" id="rfc.xref.Part6.6"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). |
1441 | | </p> |
1442 | | <p id="rfc.section.6.3.p.7">See <a href="#encoding.sensitive.information.in.uris" title="Encoding Sensitive Information in URIs">Section 11.2</a> for security considerations when used for forms. |
1443 | | </p> |
1444 | | <h2 id="rfc.section.6.4"><a href="#rfc.section.6.4">6.4</a> <a id="HEAD" href="#HEAD">HEAD</a></h2> |
1445 | | <div id="rfc.iref.h.1"></div> |
1446 | | <div id="rfc.iref.m.3"></div> |
1447 | | <p id="rfc.section.6.4.p.1">The HEAD method is identical to GET except that the server <em class="bcp14">MUST NOT</em> return a message-body in the response. The metadata contained in the HTTP header fields in response to a HEAD request <em class="bcp14">SHOULD</em> be identical to the information sent in response to a GET request. This method can be used for obtaining metadata about the |
1448 | | representation implied by the request without transferring the representation body. This method is often used for testing |
1449 | | hypertext links for validity, accessibility, and recent modification. |
1450 | | </p> |
1451 | | <p id="rfc.section.6.4.p.2">The response to a HEAD request is cacheable and <em class="bcp14">MAY</em> be used to satisfy a subsequent HEAD request; see <a href="#Part6" id="rfc.xref.Part6.7"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>. It also <em class="bcp14">MAY</em> be used to update a previously cached representation from that resource; if the new field values indicate that the cached |
1452 | | representation differs from the current representation (as would be indicated by a change in Content-Length, ETag or Last-Modified), |
1453 | | then the cache <em class="bcp14">MUST</em> treat the cache entry as stale. |
1454 | | </p> |
1455 | | <p id="rfc.section.6.4.p.3">Bodies on HEAD requests have no defined semantics. Note that sending a body on a HEAD request might cause some existing implementations |
1456 | | to reject the request. |
1457 | | </p> |
1458 | | <div id="rfc.iref.p.1"></div> |
1459 | | <div id="rfc.iref.m.4"></div> |
1460 | | <h2 id="rfc.section.6.5"><a href="#rfc.section.6.5">6.5</a> <a id="POST" href="#POST">POST</a></h2> |
1461 | | <p id="rfc.section.6.5.p.1">The POST method requests that the origin server accept the representation enclosed in the request as data to be processed |
1462 | | by the target resource. POST is designed to allow a uniform method to cover the following functions: |
1463 | | </p> |
1464 | | <ul> |
1465 | | <li>Annotation of existing resources;</li> |
1466 | | <li>Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;</li> |
1467 | | <li>Providing a block of data, such as the result of submitting a form, to a data-handling process;</li> |
1468 | | <li>Extending a database through an append operation.</li> |
1469 | | </ul> |
1470 | | <p id="rfc.section.6.5.p.2">The actual function performed by the POST method is determined by the server and is usually dependent on the effective request |
1471 | | URI. |
1472 | | </p> |
1473 | | <p id="rfc.section.6.5.p.3">The action performed by the POST method might not result in a resource that can be identified by a URI. In this case, either |
1474 | | 200 (OK) or 204 (No Content) is the appropriate response status code, depending on whether or not the response includes a |
1475 | | representation that describes the result. |
1476 | | </p> |
1477 | | <p id="rfc.section.6.5.p.4">If a resource has been created on the origin server, the response <em class="bcp14">SHOULD</em> be 201 (Created) and contain a representation which describes the status of the request and refers to the new resource, and |
1478 | | a Location header field (see <a href="#header.location" id="rfc.xref.header.location.2" title="Location">Section 9.5</a>). |
1479 | | </p> |
1480 | | <p id="rfc.section.6.5.p.5">Responses to POST requests are only cacheable when they include explicit freshness information (see <a href="p6-cache.html#calculating.freshness.lifetime" title="Calculating Freshness Lifetime">Section 2.3.1</a> of <a href="#Part6" id="rfc.xref.Part6.8"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). A cached POST response with a Content-Location header field (see <a href="p3-payload.html#header.content-location" title="Content-Location">Section 6.7</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>) whose value is the effective Request URI <em class="bcp14">MAY</em> be used to satisfy subsequent GET and HEAD requests. |
1481 | | </p> |
1482 | | <p id="rfc.section.6.5.p.6">Note that POST caching is not widely implemented. However, the 303 (See Other) response can be used to direct the user agent |
1483 | | to retrieve a cacheable resource. |
1484 | | </p> |
1485 | | <div id="rfc.iref.p.2"></div> |
1486 | | <div id="rfc.iref.m.5"></div> |
1487 | | <h2 id="rfc.section.6.6"><a href="#rfc.section.6.6">6.6</a> <a id="PUT" href="#PUT">PUT</a></h2> |
1488 | | <p id="rfc.section.6.6.p.1">The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation |
1489 | | enclosed in the request message payload. A successful PUT of a given representation would suggest that a subsequent GET on |
1490 | | that same target resource will result in an equivalent representation being returned in a 200 (OK) response. However, there |
1491 | | is no guarantee that such a state change will be observable, since the target resource might be acted upon by other user agents |
1492 | | in parallel, or might be subject to dynamic processing by the origin server, before any subsequent GET is received. A successful |
1493 | | response only implies that the user agent's intent was achieved at the time of its processing by the origin server. |
1494 | | </p> |
1495 | | <p id="rfc.section.6.6.p.2">If the target resource does not have a current representation and the PUT successfully creates one, then the origin server <em class="bcp14">MUST</em> inform the user agent by sending a 201 (Created) response. If the target resource does have a current representation and that |
1496 | | representation is successfully modified in accordance with the state of the enclosed representation, then either a 200 (OK) |
1497 | | or 204 (No Content) response <em class="bcp14">SHOULD</em> be sent to indicate successful completion of the request. |
1498 | | </p> |
1499 | | <p id="rfc.section.6.6.p.3">Unrecognized header fields <em class="bcp14">SHOULD</em> be ignored (i.e., not saved as part of the resource state). |
1500 | | </p> |
1501 | | <p id="rfc.section.6.6.p.4">An origin server <em class="bcp14">SHOULD</em> verify that the PUT representation is consistent with any constraints which the server has for the target resource that cannot |
1502 | | or will not be changed by the PUT. This is particularly important when the origin server uses internal configuration information |
1503 | | related to the URI in order to set the values for representation metadata on GET responses. When a PUT representation is inconsistent |
1504 | | with the target resource, the origin server <em class="bcp14">SHOULD</em> either make them consistent, by transforming the representation or changing the resource configuration, or respond with an |
1505 | | appropriate error message containing sufficient information to explain why the representation is unsuitable. The 409 (Conflict) |
1506 | | or 415 (Unsupported Media Type) status codes are suggested, with the latter being specific to constraints on Content-Type |
1507 | | values. |
1508 | | </p> |
1509 | | <p id="rfc.section.6.6.p.5">For example, if the target resource is configured to always have a Content-Type of "text/html" and the representation being |
1510 | | PUT has a Content-Type of "image/jpeg", then the origin server <em class="bcp14">SHOULD</em> do one of: (a) reconfigure the target resource to reflect the new media type; (b) transform the PUT representation to a format |
1511 | | consistent with that of the resource before saving it as the new resource state; or, (c) reject the request with a 415 response |
1512 | | indicating that the target resource is limited to "text/html", perhaps including a link to a different resource that would |
1513 | | be a suitable target for the new representation. |
1514 | | </p> |
1515 | | <p id="rfc.section.6.6.p.6">HTTP does not define exactly how a PUT method affects the state of an origin server beyond what can be expressed by the intent |
1516 | | of the user agent request and the semantics of the origin server response. It does not define what a resource might be, in |
1517 | | any sense of that word, beyond the interface provided via HTTP. It does not define how resource state is "stored", nor how |
1518 | | such storage might change as a result of a change in resource state, nor how the origin server translates resource state into |
1519 | | representations. Generally speaking, all implementation details behind the resource interface are intentionally hidden by |
1520 | | the server. |
1521 | | </p> |
1522 | | <p id="rfc.section.6.6.p.7">The fundamental difference between the POST and PUT methods is highlighted by the different intent for the target resource. |
1523 | | The target resource in a POST request is intended to handle the enclosed representation as a data-accepting process, such |
1524 | | as for a gateway to some other protocol or a document that accepts annotations. In contrast, the target resource in a PUT |
1525 | | request is intended to take the enclosed representation as a new or replacement value. Hence, the intent of PUT is idempotent |
1526 | | and visible to intermediaries, even though the exact effect is only known by the origin server. |
1527 | | </p> |
1528 | | <p id="rfc.section.6.6.p.8">Proper interpretation of a PUT request presumes that the user agent knows what target resource is desired. A service that |
1529 | | is intended to select a proper URI on behalf of the client, after receiving a state-changing request, <em class="bcp14">SHOULD</em> be implemented using the POST method rather than PUT. If the origin server will not make the requested PUT state change to |
1530 | | the target resource and instead wishes to have it applied to a different resource, such as when the resource has been moved |
1531 | | to a different URI, then the origin server <em class="bcp14">MUST</em> send a 301 (Moved Permanently) response; the user agent <em class="bcp14">MAY</em> then make its own decision regarding whether or not to redirect the request. |
1532 | | </p> |
1533 | | <p id="rfc.section.6.6.p.9">A PUT request applied to the target resource <em class="bcp14">MAY</em> have side-effects on other resources. For example, an article might have a URI for identifying "the current version" (a resource) |
1534 | | which is separate from the URIs identifying each particular version (different resources that at one point shared the same |
1535 | | state as the current version resource). A successful PUT request on "the current version" URI might therefore create a new |
1536 | | version resource in addition to changing the state of the target resource, and might also cause links to be added between |
1537 | | the related resources. |
1538 | | </p> |
1539 | | <p id="rfc.section.6.6.p.10">An origin server <em class="bcp14">SHOULD</em> reject any PUT request that contains a Content-Range header field, since it might be misinterpreted as partial content (or |
1540 | | might be partial content that is being mistakenly PUT as a full representation). Partial content updates are possible by targeting |
1541 | | a separately identified resource with state that overlaps a portion of the larger resource, or by using a different method |
1542 | | that has been specifically defined for partial updates (for example, the PATCH method defined in <a href="#RFC5789" id="rfc.xref.RFC5789.1"><cite title="PATCH Method for HTTP">[RFC5789]</cite></a>). |
1543 | | </p> |
1544 | | <p id="rfc.section.6.6.p.11">Responses to the PUT method are not cacheable. If a PUT request passes through a cache that has one or more stored responses |
1545 | | for the effective request URI, those stored responses will be invalidated (see <a href="p6-cache.html#invalidation.after.updates.or.deletions" title="Request Methods that Invalidate">Section 2.5</a> of <a href="#Part6" id="rfc.xref.Part6.9"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). |
1546 | | </p> |
1547 | | <div id="rfc.iref.d.1"></div> |
1548 | | <div id="rfc.iref.m.6"></div> |
1549 | | <h2 id="rfc.section.6.7"><a href="#rfc.section.6.7">6.7</a> <a id="DELETE" href="#DELETE">DELETE</a></h2> |
1550 | | <p id="rfc.section.6.7.p.1">The DELETE method requests that the origin server delete the target resource. This method <em class="bcp14">MAY</em> be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation |
1551 | | has been carried out, even if the status code returned from the origin server indicates that the action has been completed |
1552 | | successfully. However, the server <em class="bcp14">SHOULD NOT</em> indicate success unless, at the time the response is given, it intends to delete the resource or move it to an inaccessible |
1553 | | location. |
1554 | | </p> |
1555 | | <p id="rfc.section.6.7.p.2">A successful response <em class="bcp14">SHOULD</em> be 200 (OK) if the response includes an representation describing the status, 202 (Accepted) if the action has not yet been |
1556 | | enacted, or 204 (No Content) if the action has been enacted but the response does not include a representation. |
1557 | | </p> |
1558 | | <p id="rfc.section.6.7.p.3">Bodies on DELETE requests have no defined semantics. Note that sending a body on a DELETE request might cause some existing |
1559 | | implementations to reject the request. |
1560 | | </p> |
1561 | | <p id="rfc.section.6.7.p.4">Responses to the DELETE method are not cacheable. If a DELETE request passes through a cache that has one or more stored responses |
1562 | | for the effective request URI, those stored responses will be invalidated (see <a href="p6-cache.html#invalidation.after.updates.or.deletions" title="Request Methods that Invalidate">Section 2.5</a> of <a href="#Part6" id="rfc.xref.Part6.10"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). |
1563 | | </p> |
1564 | | <h2 id="rfc.section.6.8"><a href="#rfc.section.6.8">6.8</a> <a id="TRACE" href="#TRACE">TRACE</a></h2> |
1565 | | <div id="rfc.iref.t.1"></div> |
1566 | | <div id="rfc.iref.m.7"></div> |
1567 | | <p id="rfc.section.6.8.p.1">The TRACE method requests a remote, application-layer loop-back of the request message. The final recipient of the request <em class="bcp14">SHOULD</em> reflect the message received back to the client as the message-body of a 200 (OK) response. The final recipient is either |
1568 | | the origin server or the first proxy to receive a Max-Forwards value of zero (0) in the request (see <a href="#header.max-forwards" id="rfc.xref.header.max-forwards.3" title="Max-Forwards">Section 9.6</a>). A TRACE request <em class="bcp14">MUST NOT</em> include a message-body. |
1569 | | </p> |
1570 | | <p id="rfc.section.6.8.p.2">TRACE allows the client to see what is being received at the other end of the request chain and use that data for testing |
1571 | | or diagnostic information. The value of the Via header field (<a href="p1-messaging.html#header.via" title="Via">Section 8.8</a> of <a href="#Part1" id="rfc.xref.Part1.29"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) is of particular interest, since it acts as a trace of the request chain. Use of the Max-Forwards header field allows the |
1572 | | client to limit the length of the request chain, which is useful for testing a chain of proxies forwarding messages in an |
1573 | | infinite loop. |
1574 | | </p> |
1575 | | <p id="rfc.section.6.8.p.3">If the request is valid, the response <em class="bcp14">SHOULD</em> have a Content-Type of "message/http" (see <a href="p1-messaging.html#internet.media.type.message.http" title="Internet Media Type message/http">Section 9.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.30"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) and contain a message-body that encloses a copy of the entire request message. Responses to the TRACE method are not cacheable. |
1576 | | </p> |
1577 | | <div id="rfc.iref.c.1"></div> |
1578 | | <div id="rfc.iref.m.8"></div> |
1579 | | <h2 id="rfc.section.6.9"><a href="#rfc.section.6.9">6.9</a> <a id="CONNECT" href="#CONNECT">CONNECT</a></h2> |
1580 | | <p id="rfc.section.6.9.p.1">The CONNECT method requests that the proxy establish a tunnel to the request-target and then restrict its behavior to blind |
1581 | | forwarding of packets until the connection is closed. |
1582 | | </p> |
1583 | | <p id="rfc.section.6.9.p.2">When using CONNECT, the request-target <em class="bcp14">MUST</em> use the authority form (<a href="p1-messaging.html#request-target" title="request-target">Section 3.1.1.2</a> of <a href="#Part1" id="rfc.xref.Part1.31"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>); i.e., the request-target consists of only the host name and port number of the tunnel destination, separated by a colon. |
1584 | | For example, |
1585 | | </p> |
1586 | | <div id="rfc.figure.u.6"></div><pre class="text2">CONNECT server.example.com:80 HTTP/1.1 |
| 1379 | <div id="representation"> |
| 1380 | <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a href="#representation">Representation</a></h1> |
| 1381 | <p id="rfc.section.5.p.1">Request and Response messages <em class="bcp14">MAY</em> transfer a representation if not otherwise restricted by the request method or response status code. A representation consists |
| 1382 | of metadata (representation header fields) and data (representation body). When a complete or partial representation is enclosed |
| 1383 | in an HTTP message, it is referred to as the payload of the message. HTTP representations are defined in <a href="#Part3" id="rfc.xref.Part3.7"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>. |
| 1384 | </p> |
| 1385 | <p id="rfc.section.5.p.2">A representation body is only present in a message when a message-body is present, as described in <a href="p1-messaging.html#message.body" title="Message Body">Section 3.3</a> of <a href="#Part1" id="rfc.xref.Part1.27"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. The representation body is obtained from the message-body by decoding any Transfer-Encoding that might have been applied |
| 1386 | to ensure safe and proper transfer of the message. |
| 1387 | </p> |
| 1388 | <div id="identifying.response.associated.with.representation"> |
| 1389 | <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a> <a href="#identifying.response.associated.with.representation">Identifying the Resource Associated with a Representation</a></h2> |
| 1390 | <p id="rfc.section.5.1.p.1">It is sometimes necessary to determine an identifier for the resource associated with a representation.</p> |
| 1391 | <p id="rfc.section.5.1.p.2">An HTTP request representation, when present, is always associated with an anonymous (i.e., unidentified) resource.</p> |
| 1392 | <p id="rfc.section.5.1.p.3">In the common case, an HTTP response is a representation of the target resource (see <a href="p1-messaging.html#effective.request.uri" title="Effective Request URI">Section 4.3</a> of <a href="#Part1" id="rfc.xref.Part1.28"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). However, this is not always the case. To determine the URI of the resource a response is associated with, the following |
| 1393 | rules are used (with the first applicable one being selected): |
| 1394 | </p> |
| 1395 | <ol> |
| 1396 | <li>If the response status code is 200 or 203 and the request method was GET, the response payload is a representation of the |
| 1397 | target resource. |
| 1398 | </li> |
| 1399 | <li>If the response status code is 204, 206, or 304 and the request method was GET or HEAD, the response payload is a partial |
| 1400 | representation of the target resource. |
| 1401 | </li> |
| 1402 | <li>If the response has a Content-Location header field, and that URI is the same as the effective request URI, the response payload |
| 1403 | is a representation of the target resource. |
| 1404 | </li> |
| 1405 | <li>If the response has a Content-Location header field, and that URI is not the same as the effective request URI, then the response |
| 1406 | asserts that its payload is a representation of the resource identified by the Content-Location URI. However, such an assertion |
| 1407 | cannot be trusted unless it can be verified by other means (not defined by HTTP). |
| 1408 | </li> |
| 1409 | <li>Otherwise, the response is a representation of an anonymous (i.e., unidentified) resource.</li> |
| 1410 | </ol> |
| 1411 | <p id="rfc.section.5.1.p.5"><span class="comment" id="TODO-req-uri">[<a href="#TODO-req-uri" class="smpl">TODO-req-uri</a>: The comparison function is going to have to be defined somewhere, because we already need to compare URIs for things like |
| 1412 | cache invalidation.]</span> |
| 1413 | </p> |
| 1414 | </div> |
| 1415 | </div> |
| 1416 | <div id="method.definitions"> |
| 1417 | <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a href="#method.definitions">Method Definitions</a></h1> |
| 1418 | <p id="rfc.section.6.p.1">The set of common request methods for HTTP/1.1 is defined below. Although this set can be expanded, additional methods cannot |
| 1419 | be assumed to share the same semantics for separately extended clients and servers. |
| 1420 | </p> |
| 1421 | <div id="safe.and.idempotent"> |
| 1422 | <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a> <a href="#safe.and.idempotent">Safe and Idempotent Methods</a></h2> |
| 1423 | <div id="safe.methods"> |
| 1424 | <div id="rfc.iref.s.1"></div> |
| 1425 | <h3 id="rfc.section.6.1.1"><a href="#rfc.section.6.1.1">6.1.1</a> <a href="#safe.methods">Safe Methods</a></h3> |
| 1426 | <p id="rfc.section.6.1.1.p.1">Implementors need to be aware that the software represents the user in their interactions over the Internet, and need to allow |
| 1427 | the user to be aware of any actions they take which might have an unexpected significance to themselves or others. |
| 1428 | </p> |
| 1429 | <p id="rfc.section.6.1.1.p.2">In particular, the convention has been established that the GET, HEAD, OPTIONS, and TRACE request methods <em class="bcp14">SHOULD NOT</em> have the significance of taking an action other than retrieval. These request methods ought to be considered "<dfn id="safe">safe</dfn>". This allows user agents to represent other methods, such as POST, PUT and DELETE, in a special way, so that the user is |
| 1430 | made aware of the fact that a possibly unsafe action is being requested. |
| 1431 | </p> |
| 1432 | <p id="rfc.section.6.1.1.p.3">Naturally, it is not possible to ensure that the server does not generate side-effects as a result of performing a GET request; |
| 1433 | in fact, some dynamic resources consider that a feature. The important distinction here is that the user did not request the |
| 1434 | side-effects, so therefore cannot be held accountable for them. |
| 1435 | </p> |
| 1436 | </div> |
| 1437 | <div id="idempotent.methods"> |
| 1438 | <div id="rfc.iref.i.1"></div> |
| 1439 | <h3 id="rfc.section.6.1.2"><a href="#rfc.section.6.1.2">6.1.2</a> <a href="#idempotent.methods">Idempotent Methods</a></h3> |
| 1440 | <p id="rfc.section.6.1.2.p.1">Request methods can also have the property of "idempotence" in that, aside from error or expiration issues, the intended effect |
| 1441 | of multiple identical requests is the same as for a single request. PUT, DELETE, and all safe request methods are idempotent. |
| 1442 | It is important to note that idempotence refers only to changes requested by the client: a server is free to change its state |
| 1443 | due to multiple requests for the purpose of tracking those requests, versioning of results, etc. |
| 1444 | </p> |
| 1445 | </div> |
| 1446 | </div> |
| 1447 | <div id="OPTIONS"> |
| 1448 | <h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a> <a href="#OPTIONS">OPTIONS</a></h2> |
| 1449 | <div id="rfc.iref.o.1"></div> |
| 1450 | <div id="rfc.iref.m.1"></div> |
| 1451 | <p id="rfc.section.6.2.p.1">The OPTIONS method requests information about the communication options available on the request/response chain identified |
| 1452 | by the effective request URI. This method allows a client to determine the options and/or requirements associated with a resource, |
| 1453 | or the capabilities of a server, without implying a resource action or initiating a resource retrieval. |
| 1454 | </p> |
| 1455 | <p id="rfc.section.6.2.p.2">Responses to the OPTIONS method are not cacheable.</p> |
| 1456 | <p id="rfc.section.6.2.p.3">If the OPTIONS request includes a message-body (as indicated by the presence of Content-Length or Transfer-Encoding), then |
| 1457 | the media type <em class="bcp14">MUST</em> be indicated by a Content-Type field. Although this specification does not define any use for such a body, future extensions |
| 1458 | to HTTP might use the OPTIONS body to make more detailed queries on the server. |
| 1459 | </p> |
| 1460 | <p id="rfc.section.6.2.p.4">If the request-target is an asterisk ("*"), the OPTIONS request is intended to apply to the server in general rather than |
| 1461 | to a specific resource. Since a server's communication options typically depend on the resource, the "*" request is only useful |
| 1462 | as a "ping" or "no-op" type of method; it does nothing beyond allowing the client to test the capabilities of the server. |
| 1463 | For example, this can be used to test a proxy for HTTP/1.1 compliance (or lack thereof). |
| 1464 | </p> |
| 1465 | <p id="rfc.section.6.2.p.5">If the request-target is not an asterisk, the OPTIONS request applies only to the options that are available when communicating |
| 1466 | with that resource. |
| 1467 | </p> |
| 1468 | <p id="rfc.section.6.2.p.6">A 200 response <em class="bcp14">SHOULD</em> include any header fields that indicate optional features implemented by the server and applicable to that resource (e.g., |
| 1469 | Allow), possibly including extensions not defined by this specification. The response body, if any, <em class="bcp14">SHOULD</em> also include information about the communication options. The format for such a body is not defined by this specification, |
| 1470 | but might be defined by future extensions to HTTP. Content negotiation <em class="bcp14">MAY</em> be used to select the appropriate response format. If no response body is included, the response <em class="bcp14">MUST</em> include a Content-Length field with a field-value of "0". |
| 1471 | </p> |
| 1472 | <p id="rfc.section.6.2.p.7">The Max-Forwards header field <em class="bcp14">MAY</em> be used to target a specific proxy in the request chain (see <a href="#header.max-forwards" id="rfc.xref.header.max-forwards.2" title="Max-Forwards">Section 9.6</a>). If no Max-Forwards field is present in the request, then the forwarded request <em class="bcp14">MUST NOT</em> include a Max-Forwards field. |
| 1473 | </p> |
| 1474 | </div> |
| 1475 | <div id="GET"> |
| 1476 | <h2 id="rfc.section.6.3"><a href="#rfc.section.6.3">6.3</a> <a href="#GET">GET</a></h2> |
| 1477 | <div id="rfc.iref.g.5"></div> |
| 1478 | <div id="rfc.iref.m.2"></div> |
| 1479 | <p id="rfc.section.6.3.p.1">The GET method requests transfer of a current representation of the target resource.</p> |
| 1480 | <p id="rfc.section.6.3.p.2">If the target resource is a data-producing process, it is the produced data which shall be returned as the representation |
| 1481 | in the response and not the source text of the process, unless that text happens to be the output of the process. |
| 1482 | </p> |
| 1483 | <p id="rfc.section.6.3.p.3">The semantics of the GET method change to a "conditional GET" if the request message includes an If-Modified-Since, If-Unmodified-Since, |
| 1484 | If-Match, If-None-Match, or If-Range header field. A conditional GET requests that the representation be transferred only |
| 1485 | under the circumstances described by the conditional header field(s). The conditional GET request is intended to reduce unnecessary |
| 1486 | network usage by allowing cached representations to be refreshed without requiring multiple requests or transferring data |
| 1487 | already held by the client. |
| 1488 | </p> |
| 1489 | <p id="rfc.section.6.3.p.4">The semantics of the GET method change to a "partial GET" if the request message includes a Range header field. A partial |
| 1490 | GET requests that only part of the representation be transferred, as described in <a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5.7"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>. The partial GET request is intended to reduce unnecessary network usage by allowing partially-retrieved representations |
| 1491 | to be completed without transferring data already held by the client. |
| 1492 | </p> |
| 1493 | <p id="rfc.section.6.3.p.5">Bodies on GET requests have no defined semantics. Note that sending a body on a GET request might cause some existing implementations |
| 1494 | to reject the request. |
| 1495 | </p> |
| 1496 | <p id="rfc.section.6.3.p.6">The response to a GET request is cacheable and <em class="bcp14">MAY</em> be used to satisfy subsequent GET and HEAD requests (see <a href="#Part6" id="rfc.xref.Part6.6"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). |
| 1497 | </p> |
| 1498 | <p id="rfc.section.6.3.p.7">See <a href="#encoding.sensitive.information.in.uris" title="Encoding Sensitive Information in URIs">Section 11.2</a> for security considerations when used for forms. |
| 1499 | </p> |
| 1500 | </div> |
| 1501 | <div id="HEAD"> |
| 1502 | <h2 id="rfc.section.6.4"><a href="#rfc.section.6.4">6.4</a> <a href="#HEAD">HEAD</a></h2> |
| 1503 | <div id="rfc.iref.h.1"></div> |
| 1504 | <div id="rfc.iref.m.3"></div> |
| 1505 | <p id="rfc.section.6.4.p.1">The HEAD method is identical to GET except that the server <em class="bcp14">MUST NOT</em> return a message-body in the response. The metadata contained in the HTTP header fields in response to a HEAD request <em class="bcp14">SHOULD</em> be identical to the information sent in response to a GET request. This method can be used for obtaining metadata about the |
| 1506 | representation implied by the request without transferring the representation body. This method is often used for testing |
| 1507 | hypertext links for validity, accessibility, and recent modification. |
| 1508 | </p> |
| 1509 | <p id="rfc.section.6.4.p.2">The response to a HEAD request is cacheable and <em class="bcp14">MAY</em> be used to satisfy a subsequent HEAD request; see <a href="#Part6" id="rfc.xref.Part6.7"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>. It also <em class="bcp14">MAY</em> be used to update a previously cached representation from that resource; if the new field values indicate that the cached |
| 1510 | representation differs from the current representation (as would be indicated by a change in Content-Length, ETag or Last-Modified), |
| 1511 | then the cache <em class="bcp14">MUST</em> treat the cache entry as stale. |
| 1512 | </p> |
| 1513 | <p id="rfc.section.6.4.p.3">Bodies on HEAD requests have no defined semantics. Note that sending a body on a HEAD request might cause some existing implementations |
| 1514 | to reject the request. |
| 1515 | </p> |
| 1516 | </div> |
| 1517 | <div id="POST"> |
| 1518 | <div id="rfc.iref.p.1"></div> |
| 1519 | <div id="rfc.iref.m.4"></div> |
| 1520 | <h2 id="rfc.section.6.5"><a href="#rfc.section.6.5">6.5</a> <a href="#POST">POST</a></h2> |
| 1521 | <p id="rfc.section.6.5.p.1">The POST method requests that the origin server accept the representation enclosed in the request as data to be processed |
| 1522 | by the target resource. POST is designed to allow a uniform method to cover the following functions: |
| 1523 | </p> |
| 1524 | <ul> |
| 1525 | <li>Annotation of existing resources;</li> |
| 1526 | <li>Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;</li> |
| 1527 | <li>Providing a block of data, such as the result of submitting a form, to a data-handling process;</li> |
| 1528 | <li>Extending a database through an append operation.</li> |
| 1529 | </ul> |
| 1530 | <p id="rfc.section.6.5.p.2">The actual function performed by the POST method is determined by the server and is usually dependent on the effective request |
| 1531 | URI. |
| 1532 | </p> |
| 1533 | <p id="rfc.section.6.5.p.3">The action performed by the POST method might not result in a resource that can be identified by a URI. In this case, either |
| 1534 | 200 (OK) or 204 (No Content) is the appropriate response status code, depending on whether or not the response includes a |
| 1535 | representation that describes the result. |
| 1536 | </p> |
| 1537 | <p id="rfc.section.6.5.p.4">If a resource has been created on the origin server, the response <em class="bcp14">SHOULD</em> be 201 (Created) and contain a representation which describes the status of the request and refers to the new resource, and |
| 1538 | a Location header field (see <a href="#header.location" id="rfc.xref.header.location.2" title="Location">Section 9.5</a>). |
| 1539 | </p> |
| 1540 | <p id="rfc.section.6.5.p.5">Responses to POST requests are only cacheable when they include explicit freshness information (see <a href="p6-cache.html#calculating.freshness.lifetime" title="Calculating Freshness Lifetime">Section 2.3.1</a> of <a href="#Part6" id="rfc.xref.Part6.8"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). A cached POST response with a Content-Location header field (see <a href="p3-payload.html#header.content-location" title="Content-Location">Section 6.7</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>) whose value is the effective Request URI <em class="bcp14">MAY</em> be used to satisfy subsequent GET and HEAD requests. |
| 1541 | </p> |
| 1542 | <p id="rfc.section.6.5.p.6">Note that POST caching is not widely implemented. However, the 303 (See Other) response can be used to direct the user agent |
| 1543 | to retrieve a cacheable resource. |
| 1544 | </p> |
| 1545 | </div> |
| 1546 | <div id="PUT"> |
| 1547 | <div id="rfc.iref.p.2"></div> |
| 1548 | <div id="rfc.iref.m.5"></div> |
| 1549 | <h2 id="rfc.section.6.6"><a href="#rfc.section.6.6">6.6</a> <a href="#PUT">PUT</a></h2> |
| 1550 | <p id="rfc.section.6.6.p.1">The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation |
| 1551 | enclosed in the request message payload. A successful PUT of a given representation would suggest that a subsequent GET on |
| 1552 | that same target resource will result in an equivalent representation being returned in a 200 (OK) response. However, there |
| 1553 | is no guarantee that such a state change will be observable, since the target resource might be acted upon by other user agents |
| 1554 | in parallel, or might be subject to dynamic processing by the origin server, before any subsequent GET is received. A successful |
| 1555 | response only implies that the user agent's intent was achieved at the time of its processing by the origin server. |
| 1556 | </p> |
| 1557 | <p id="rfc.section.6.6.p.2">If the target resource does not have a current representation and the PUT successfully creates one, then the origin server <em class="bcp14">MUST</em> inform the user agent by sending a 201 (Created) response. If the target resource does have a current representation and that |
| 1558 | representation is successfully modified in accordance with the state of the enclosed representation, then either a 200 (OK) |
| 1559 | or 204 (No Content) response <em class="bcp14">SHOULD</em> be sent to indicate successful completion of the request. |
| 1560 | </p> |
| 1561 | <p id="rfc.section.6.6.p.3">Unrecognized header fields <em class="bcp14">SHOULD</em> be ignored (i.e., not saved as part of the resource state). |
| 1562 | </p> |
| 1563 | <p id="rfc.section.6.6.p.4">An origin server <em class="bcp14">SHOULD</em> verify that the PUT representation is consistent with any constraints which the server has for the target resource that cannot |
| 1564 | or will not be changed by the PUT. This is particularly important when the origin server uses internal configuration information |
| 1565 | related to the URI in order to set the values for representation metadata on GET responses. When a PUT representation is inconsistent |
| 1566 | with the target resource, the origin server <em class="bcp14">SHOULD</em> either make them consistent, by transforming the representation or changing the resource configuration, or respond with an |
| 1567 | appropriate error message containing sufficient information to explain why the representation is unsuitable. The 409 (Conflict) |
| 1568 | or 415 (Unsupported Media Type) status codes are suggested, with the latter being specific to constraints on Content-Type |
| 1569 | values. |
| 1570 | </p> |
| 1571 | <p id="rfc.section.6.6.p.5">For example, if the target resource is configured to always have a Content-Type of "text/html" and the representation being |
| 1572 | PUT has a Content-Type of "image/jpeg", then the origin server <em class="bcp14">SHOULD</em> do one of: (a) reconfigure the target resource to reflect the new media type; (b) transform the PUT representation to a format |
| 1573 | consistent with that of the resource before saving it as the new resource state; or, (c) reject the request with a 415 response |
| 1574 | indicating that the target resource is limited to "text/html", perhaps including a link to a different resource that would |
| 1575 | be a suitable target for the new representation. |
| 1576 | </p> |
| 1577 | <p id="rfc.section.6.6.p.6">HTTP does not define exactly how a PUT method affects the state of an origin server beyond what can be expressed by the intent |
| 1578 | of the user agent request and the semantics of the origin server response. It does not define what a resource might be, in |
| 1579 | any sense of that word, beyond the interface provided via HTTP. It does not define how resource state is "stored", nor how |
| 1580 | such storage might change as a result of a change in resource state, nor how the origin server translates resource state into |
| 1581 | representations. Generally speaking, all implementation details behind the resource interface are intentionally hidden by |
| 1582 | the server. |
| 1583 | </p> |
| 1584 | <p id="rfc.section.6.6.p.7">The fundamental difference between the POST and PUT methods is highlighted by the different intent for the target resource. |
| 1585 | The target resource in a POST request is intended to handle the enclosed representation as a data-accepting process, such |
| 1586 | as for a gateway to some other protocol or a document that accepts annotations. In contrast, the target resource in a PUT |
| 1587 | request is intended to take the enclosed representation as a new or replacement value. Hence, the intent of PUT is idempotent |
| 1588 | and visible to intermediaries, even though the exact effect is only known by the origin server. |
| 1589 | </p> |
| 1590 | <p id="rfc.section.6.6.p.8">Proper interpretation of a PUT request presumes that the user agent knows what target resource is desired. A service that |
| 1591 | is intended to select a proper URI on behalf of the client, after receiving a state-changing request, <em class="bcp14">SHOULD</em> be implemented using the POST method rather than PUT. If the origin server will not make the requested PUT state change to |
| 1592 | the target resource and instead wishes to have it applied to a different resource, such as when the resource has been moved |
| 1593 | to a different URI, then the origin server <em class="bcp14">MUST</em> send a 301 (Moved Permanently) response; the user agent <em class="bcp14">MAY</em> then make its own decision regarding whether or not to redirect the request. |
| 1594 | </p> |
| 1595 | <p id="rfc.section.6.6.p.9">A PUT request applied to the target resource <em class="bcp14">MAY</em> have side-effects on other resources. For example, an article might have a URI for identifying "the current version" (a resource) |
| 1596 | which is separate from the URIs identifying each particular version (different resources that at one point shared the same |
| 1597 | state as the current version resource). A successful PUT request on "the current version" URI might therefore create a new |
| 1598 | version resource in addition to changing the state of the target resource, and might also cause links to be added between |
| 1599 | the related resources. |
| 1600 | </p> |
| 1601 | <p id="rfc.section.6.6.p.10">An origin server <em class="bcp14">SHOULD</em> reject any PUT request that contains a Content-Range header field, since it might be misinterpreted as partial content (or |
| 1602 | might be partial content that is being mistakenly PUT as a full representation). Partial content updates are possible by targeting |
| 1603 | a separately identified resource with state that overlaps a portion of the larger resource, or by using a different method |
| 1604 | that has been specifically defined for partial updates (for example, the PATCH method defined in <a href="#RFC5789" id="rfc.xref.RFC5789.1"><cite title="PATCH Method for HTTP">[RFC5789]</cite></a>). |
| 1605 | </p> |
| 1606 | <p id="rfc.section.6.6.p.11">Responses to the PUT method are not cacheable. If a PUT request passes through a cache that has one or more stored responses |
| 1607 | for the effective request URI, those stored responses will be invalidated (see <a href="p6-cache.html#invalidation.after.updates.or.deletions" title="Request Methods that Invalidate">Section 2.5</a> of <a href="#Part6" id="rfc.xref.Part6.9"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). |
| 1608 | </p> |
| 1609 | </div> |
| 1610 | <div id="DELETE"> |
| 1611 | <div id="rfc.iref.d.1"></div> |
| 1612 | <div id="rfc.iref.m.6"></div> |
| 1613 | <h2 id="rfc.section.6.7"><a href="#rfc.section.6.7">6.7</a> <a href="#DELETE">DELETE</a></h2> |
| 1614 | <p id="rfc.section.6.7.p.1">The DELETE method requests that the origin server delete the target resource. This method <em class="bcp14">MAY</em> be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation |
| 1615 | has been carried out, even if the status code returned from the origin server indicates that the action has been completed |
| 1616 | successfully. However, the server <em class="bcp14">SHOULD NOT</em> indicate success unless, at the time the response is given, it intends to delete the resource or move it to an inaccessible |
| 1617 | location. |
| 1618 | </p> |
| 1619 | <p id="rfc.section.6.7.p.2">A successful response <em class="bcp14">SHOULD</em> be 200 (OK) if the response includes an representation describing the status, 202 (Accepted) if the action has not yet been |
| 1620 | enacted, or 204 (No Content) if the action has been enacted but the response does not include a representation. |
| 1621 | </p> |
| 1622 | <p id="rfc.section.6.7.p.3">Bodies on DELETE requests have no defined semantics. Note that sending a body on a DELETE request might cause some existing |
| 1623 | implementations to reject the request. |
| 1624 | </p> |
| 1625 | <p id="rfc.section.6.7.p.4">Responses to the DELETE method are not cacheable. If a DELETE request passes through a cache that has one or more stored responses |
| 1626 | for the effective request URI, those stored responses will be invalidated (see <a href="p6-cache.html#invalidation.after.updates.or.deletions" title="Request Methods that Invalidate">Section 2.5</a> of <a href="#Part6" id="rfc.xref.Part6.10"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). |
| 1627 | </p> |
| 1628 | </div> |
| 1629 | <div id="TRACE"> |
| 1630 | <h2 id="rfc.section.6.8"><a href="#rfc.section.6.8">6.8</a> <a href="#TRACE">TRACE</a></h2> |
| 1631 | <div id="rfc.iref.t.1"></div> |
| 1632 | <div id="rfc.iref.m.7"></div> |
| 1633 | <p id="rfc.section.6.8.p.1">The TRACE method requests a remote, application-layer loop-back of the request message. The final recipient of the request <em class="bcp14">SHOULD</em> reflect the message received back to the client as the message-body of a 200 (OK) response. The final recipient is either |
| 1634 | the origin server or the first proxy to receive a Max-Forwards value of zero (0) in the request (see <a href="#header.max-forwards" id="rfc.xref.header.max-forwards.3" title="Max-Forwards">Section 9.6</a>). A TRACE request <em class="bcp14">MUST NOT</em> include a message-body. |
| 1635 | </p> |
| 1636 | <p id="rfc.section.6.8.p.2">TRACE allows the client to see what is being received at the other end of the request chain and use that data for testing |
| 1637 | or diagnostic information. The value of the Via header field (<a href="p1-messaging.html#header.via" title="Via">Section 8.8</a> of <a href="#Part1" id="rfc.xref.Part1.29"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) is of particular interest, since it acts as a trace of the request chain. Use of the Max-Forwards header field allows the |
| 1638 | client to limit the length of the request chain, which is useful for testing a chain of proxies forwarding messages in an |
| 1639 | infinite loop. |
| 1640 | </p> |
| 1641 | <p id="rfc.section.6.8.p.3">If the request is valid, the response <em class="bcp14">SHOULD</em> have a Content-Type of "message/http" (see <a href="p1-messaging.html#internet.media.type.message.http" title="Internet Media Type message/http">Section 9.3.1</a> of <a href="#Part1" id="rfc.xref.Part1.30"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) and contain a message-body that encloses a copy of the entire request message. Responses to the TRACE method are not cacheable. |
| 1642 | </p> |
| 1643 | </div> |
| 1644 | <div id="CONNECT"> |
| 1645 | <div id="rfc.iref.c.1"></div> |
| 1646 | <div id="rfc.iref.m.8"></div> |
| 1647 | <h2 id="rfc.section.6.9"><a href="#rfc.section.6.9">6.9</a> <a href="#CONNECT">CONNECT</a></h2> |
| 1648 | <p id="rfc.section.6.9.p.1">The CONNECT method requests that the proxy establish a tunnel to the request-target and then restrict its behavior to blind |
| 1649 | forwarding of packets until the connection is closed. |
| 1650 | </p> |
| 1651 | <p id="rfc.section.6.9.p.2">When using CONNECT, the request-target <em class="bcp14">MUST</em> use the authority form (<a href="p1-messaging.html#request-target" title="request-target">Section 3.1.1.2</a> of <a href="#Part1" id="rfc.xref.Part1.31"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>); i.e., the request-target consists of only the host name and port number of the tunnel destination, separated by a colon. |
| 1652 | For example, |
| 1653 | </p> |
| 1654 | <div id="rfc.figure.u.6"></div><pre class="text2">CONNECT server.example.com:80 HTTP/1.1 |
1598 | | implementations to reject the request. |
1599 | | </p> |
1600 | | <p id="rfc.section.6.9.p.8">Like any other pipelined HTTP/1.1 request, data to be tunnel may be sent immediately after the blank line. The usual caveats |
1601 | | also apply: data may be discarded if the eventual response is negative, and the connection may be reset with no response if |
1602 | | more than one TCP segment is outstanding. |
1603 | | </p> |
1604 | | <h3 id="rfc.section.6.9.1"><a href="#rfc.section.6.9.1">6.9.1</a> Establishing a Tunnel with CONNECT |
1605 | | </h3> |
1606 | | <p id="rfc.section.6.9.1.p.1">Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested |
1607 | | host and port, and has switched to tunneling the current connection to that server connection. |
1608 | | </p> |
1609 | | <p id="rfc.section.6.9.1.p.2">It may be the case that the proxy itself can only reach the requested origin server through another proxy. In this case, the |
1610 | | first proxy <em class="bcp14">SHOULD</em> make a CONNECT request of that next proxy, requesting a tunnel to the authority. A proxy <em class="bcp14">MUST NOT</em> respond with any 2xx status code unless it has either a direct or tunnel connection established to the authority. |
1611 | | </p> |
1612 | | <p id="rfc.section.6.9.1.p.3">An origin server which receives a CONNECT request for itself <em class="bcp14">MAY</em> respond with a 2xx status code to indicate that a connection is established. |
1613 | | </p> |
1614 | | <p id="rfc.section.6.9.1.p.4">If at any point either one of the peers gets disconnected, any outstanding data that came from that peer will be passed to |
1615 | | the other one, and after that also the other connection will be terminated by the proxy. If there is outstanding data to that |
1616 | | peer undelivered, that data will be discarded. |
1617 | | </p> |
1618 | | <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a> <a id="status.codes" href="#status.codes">Status Code Definitions</a></h1> |
1619 | | <p id="rfc.section.7.p.1">The first digit of the Status-Code defines the class of response. The last two digits do not have any categorization role. |
1620 | | There are 5 values for the first digit: |
1621 | | </p> |
1622 | | <ul> |
1623 | | <li>1xx: Informational - Request received, continuing process</li> |
1624 | | <li>2xx: Success - The action was successfully received, understood, and accepted</li> |
1625 | | <li>3xx: Redirection - Further action must be taken in order to complete the request</li> |
1626 | | <li>4xx: Client Error - The request contains bad syntax or cannot be fulfilled</li> |
1627 | | <li>5xx: Server Error - The server failed to fulfill an apparently valid request</li> |
1628 | | </ul> |
1629 | | <p id="rfc.section.7.p.2">Each Status-Code is described below, including any metadata required in the response.</p> |
1630 | | <h2 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1</a> <a id="status.1xx" href="#status.1xx">Informational 1xx</a></h2> |
1631 | | <p id="rfc.section.7.1.p.1">This class of status code indicates a provisional response, consisting only of the Status-Line and optional header fields, |
1632 | | and is terminated by an empty line. There are no required header fields for this class of status code. Since HTTP/1.0 did |
1633 | | not define any 1xx status codes, servers <em class="bcp14">MUST NOT</em> send a 1xx response to an HTTP/1.0 client except under experimental conditions. |
1634 | | </p> |
1635 | | <p id="rfc.section.7.1.p.2">A client <em class="bcp14">MUST</em> be prepared to accept one or more 1xx status responses prior to a regular response, even if the client does not expect a 100 |
1636 | | (Continue) status message. Unexpected 1xx status responses <em class="bcp14">MAY</em> be ignored by a user agent. |
1637 | | </p> |
1638 | | <p id="rfc.section.7.1.p.3">Proxies <em class="bcp14">MUST</em> forward 1xx responses, unless the connection between the proxy and its client has been closed, or unless the proxy itself |
1639 | | requested the generation of the 1xx response. (For example, if a proxy adds a "Expect: 100-continue" field when it forwards |
1640 | | a request, then it need not forward the corresponding 100 (Continue) response(s).) |
1641 | | </p> |
1642 | | <div id="rfc.iref.22"></div> |
1643 | | <div id="rfc.iref.s.2"></div> |
1644 | | <h3 id="rfc.section.7.1.1"><a href="#rfc.section.7.1.1">7.1.1</a> <a id="status.100" href="#status.100">100 Continue</a></h3> |
1645 | | <p id="rfc.section.7.1.1.p.1">The client <em class="bcp14">SHOULD</em> continue with its request. This interim response is used to inform the client that the initial part of the request has been |
1646 | | received and has not yet been rejected by the server. The client <em class="bcp14">SHOULD</em> continue by sending the remainder of the request or, if the request has already been completed, ignore this response. The |
1647 | | server <em class="bcp14">MUST</em> send a final response after the request has been completed. See <a href="p1-messaging.html#use.of.the.100.status" title="Use of the 100 (Continue) Status">Section 6.2.3</a> of <a href="#Part1" id="rfc.xref.Part1.32"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> for detailed discussion of the use and handling of this status code. |
1648 | | </p> |
1649 | | <div id="rfc.iref.23"></div> |
1650 | | <div id="rfc.iref.s.3"></div> |
1651 | | <h3 id="rfc.section.7.1.2"><a href="#rfc.section.7.1.2">7.1.2</a> <a id="status.101" href="#status.101">101 Switching Protocols</a></h3> |
1652 | | <p id="rfc.section.7.1.2.p.1">The server understands and is willing to comply with the client's request, via the Upgrade message header field (<a href="p1-messaging.html#header.upgrade" title="Upgrade">Section 8.7</a> of <a href="#Part1" id="rfc.xref.Part1.33"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>), for a change in the application protocol being used on this connection. The server will switch protocols to those defined |
1653 | | by the response's Upgrade header field immediately after the empty line which terminates the 101 response. |
1654 | | </p> |
1655 | | <p id="rfc.section.7.1.2.p.2">The protocol <em class="bcp14">SHOULD</em> be switched only when it is advantageous to do so. For example, switching to a newer version of HTTP is advantageous over |
1656 | | older versions, and switching to a real-time, synchronous protocol might be advantageous when delivering resources that use |
1657 | | such features. |
1658 | | </p> |
1659 | | <h2 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a> <a id="status.2xx" href="#status.2xx">Successful 2xx</a></h2> |
1660 | | <p id="rfc.section.7.2.p.1">This class of status code indicates that the client's request was successfully received, understood, and accepted.</p> |
1661 | | <div id="rfc.iref.24"></div> |
1662 | | <div id="rfc.iref.s.4"></div> |
1663 | | <h3 id="rfc.section.7.2.1"><a href="#rfc.section.7.2.1">7.2.1</a> <a id="status.200" href="#status.200">200 OK</a></h3> |
1664 | | <p id="rfc.section.7.2.1.p.1">The request has succeeded. The payload returned with the response is dependent on the method used in the request, for example: </p> |
1665 | | <dl> |
1666 | | <dt>GET</dt> |
1667 | | <dd>a representation of the target resource is sent in the response;</dd> |
1668 | | <dt>HEAD</dt> |
1669 | | <dd>the same representation as GET, except without the message-body;</dd> |
1670 | | <dt>POST</dt> |
1671 | | <dd>a representation describing or containing the result of the action;</dd> |
1672 | | <dt>TRACE</dt> |
1673 | | <dd>a representation containing the request message as received by the end server.</dd> |
1674 | | </dl> |
1675 | | <p id="rfc.section.7.2.1.p.2">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.11"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 200 responses. |
1676 | | </p> |
1677 | | <div id="rfc.iref.25"></div> |
1678 | | <div id="rfc.iref.s.5"></div> |
1679 | | <h3 id="rfc.section.7.2.2"><a href="#rfc.section.7.2.2">7.2.2</a> <a id="status.201" href="#status.201">201 Created</a></h3> |
1680 | | <p id="rfc.section.7.2.2.p.1">The request has been fulfilled and has resulted in a new resource being created. The newly created resource can be referenced |
1681 | | by the URI(s) returned in the payload of the response, with the most specific URI for the resource given by a Location header |
1682 | | field. The response <em class="bcp14">SHOULD</em> include a payload containing a list of resource characteristics and location(s) from which the user or user agent can choose |
1683 | | the one most appropriate. The payload format is specified by the media type given in the Content-Type header field. The origin |
1684 | | server <em class="bcp14">MUST</em> create the resource before returning the 201 status code. If the action cannot be carried out immediately, the server <em class="bcp14">SHOULD</em> respond with 202 (Accepted) response instead. |
1685 | | </p> |
1686 | | <p id="rfc.section.7.2.2.p.2">A 201 response <em class="bcp14">MAY</em> contain an ETag response header field indicating the current value of the entity-tag for the representation of the resource |
1687 | | just created (see <a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a> of <a href="#Part4" id="rfc.xref.Part4.9"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>). |
1688 | | </p> |
1689 | | <div id="rfc.iref.26"></div> |
1690 | | <div id="rfc.iref.s.6"></div> |
1691 | | <h3 id="rfc.section.7.2.3"><a href="#rfc.section.7.2.3">7.2.3</a> <a id="status.202" href="#status.202">202 Accepted</a></h3> |
1692 | | <p id="rfc.section.7.2.3.p.1">The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually |
1693 | | be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status |
1694 | | code from an asynchronous operation such as this. |
1695 | | </p> |
1696 | | <p id="rfc.section.7.2.3.p.2">The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process |
1697 | | (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the |
1698 | | server persist until the process is completed. The representation returned with this response <em class="bcp14">SHOULD</em> include an indication of the request's current status and either a pointer to a status monitor or some estimate of when the |
1699 | | user can expect the request to be fulfilled. |
1700 | | </p> |
1701 | | <div id="rfc.iref.27"></div> |
1702 | | <div id="rfc.iref.s.7"></div> |
1703 | | <h3 id="rfc.section.7.2.4"><a href="#rfc.section.7.2.4">7.2.4</a> <a id="status.203" href="#status.203">203 Non-Authoritative Information</a></h3> |
1704 | | <p id="rfc.section.7.2.4.p.1">The representation in the response has been transformed or otherwise modified by a transforming proxy (<a href="p1-messaging.html#intermediaries" title="Intermediaries">Section 2.4</a> of <a href="#Part1" id="rfc.xref.Part1.34"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). Note that the behaviour of transforming intermediaries is controlled by the no-transform Cache-Control directive (<a href="p6-cache.html#header.cache-control" title="Cache-Control">Section 3.2</a> of <a href="#Part6" id="rfc.xref.Part6.12"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). |
1705 | | </p> |
1706 | | <p id="rfc.section.7.2.4.p.2">This status code is only appropriate when the response status code would have been 200 (OK) otherwise. When the status code |
1707 | | before transformation would have been different, the 214 Transformation Applied warn-code (<a href="p6-cache.html#header.warning" title="Warning">Section 3.6</a> of <a href="#Part6" id="rfc.xref.Part6.13"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) is appropriate. |
1708 | | </p> |
1709 | | <p id="rfc.section.7.2.4.p.3">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.14"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 203 responses. |
1710 | | </p> |
1711 | | <div id="rfc.iref.28"></div> |
1712 | | <div id="rfc.iref.s.8"></div> |
1713 | | <h3 id="rfc.section.7.2.5"><a href="#rfc.section.7.2.5">7.2.5</a> <a id="status.204" href="#status.204">204 No Content</a></h3> |
1714 | | <p id="rfc.section.7.2.5.p.1">The 204 (No Content) status code indicates that the server has successfully fulfilled the request and that there is no additional |
1715 | | content to return in the response payload body. Metadata in the response header fields refer to the target resource and its |
1716 | | current representation after the requested action. |
1717 | | </p> |
1718 | | <p id="rfc.section.7.2.5.p.2">For example, if a 204 status code is received in response to a PUT request and the response contains an ETag header field, |
1719 | | then the PUT was successful and the ETag field-value contains the entity-tag for the new representation of that target resource. |
1720 | | </p> |
1721 | | <p id="rfc.section.7.2.5.p.3">The 204 response allows a server to indicate that the action has been successfully applied to the target resource while implying |
1722 | | that the user agent <em class="bcp14">SHOULD NOT</em> traverse away from its current "document view" (if any). The server assumes that the user agent will provide some indication |
1723 | | of the success to its user, in accord with its own interface, and apply any new or updated metadata in the response to the |
1724 | | active representation. |
1725 | | </p> |
1726 | | <p id="rfc.section.7.2.5.p.4">For example, a 204 status code is commonly used with document editing interfaces corresponding to a "save" action, such that |
1727 | | the document being saved remains available to the user for editing. It is also frequently used with interfaces that expect |
1728 | | automated data transfers to be prevalent, such as within distributed version control systems. |
1729 | | </p> |
1730 | | <p id="rfc.section.7.2.5.p.5">The 204 response <em class="bcp14">MUST NOT</em> include a message-body, and thus is always terminated by the first empty line after the header fields. |
1731 | | </p> |
1732 | | <div id="rfc.iref.29"></div> |
1733 | | <div id="rfc.iref.s.9"></div> |
1734 | | <h3 id="rfc.section.7.2.6"><a href="#rfc.section.7.2.6">7.2.6</a> <a id="status.205" href="#status.205">205 Reset Content</a></h3> |
1735 | | <p id="rfc.section.7.2.6.p.1">The server has fulfilled the request and the user agent <em class="bcp14">SHOULD</em> reset the document view which caused the request to be sent. This response is primarily intended to allow input for actions |
1736 | | to take place via user input, followed by a clearing of the form in which the input is given so that the user can easily initiate |
1737 | | another input action. |
1738 | | </p> |
1739 | | <p id="rfc.section.7.2.6.p.2">The message-body included with the response <em class="bcp14">MUST</em> be empty. Note that receivers still need to parse the response according to the algorithm defined in <a href="p1-messaging.html#message.body" title="Message Body">Section 3.3</a> of <a href="#Part1" id="rfc.xref.Part1.35"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. |
1740 | | </p> |
1741 | | <div id="rfc.iref.30"></div> |
1742 | | <div id="rfc.iref.s.10"></div> |
1743 | | <h3 id="rfc.section.7.2.7"><a href="#rfc.section.7.2.7">7.2.7</a> <a id="status.206" href="#status.206">206 Partial Content</a></h3> |
1744 | | <p id="rfc.section.7.2.7.p.1">The server has fulfilled the partial GET request for the resource and the enclosed payload is a partial representation as |
1745 | | defined in <a href="p5-range.html#status.206" title="206 Partial Content">Section 3.1</a> of <a href="#Part5" id="rfc.xref.Part5.8"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>. |
1746 | | </p> |
1747 | | <p id="rfc.section.7.2.7.p.2">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.15"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 206 responses. |
1748 | | </p> |
1749 | | <h2 id="rfc.section.7.3"><a href="#rfc.section.7.3">7.3</a> <a id="status.3xx" href="#status.3xx">Redirection 3xx</a></h2> |
1750 | | <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. |
1751 | | 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 |
1752 | | known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 6.1.1</a>. |
1753 | | </p> |
1754 | | <p id="rfc.section.7.3.p.2">There are several types of redirects: </p> |
1755 | | <ol> |
1756 | | <li> |
1757 | | <p>Redirects of the request to another URI, either temporarily or permanently. The new URI is specified in the Location header |
1758 | | field. In this specification, the status codes 301 (Moved Permanently), 302 (Found), and 307 (Temporary Redirect) fall under |
1759 | | this category. |
1760 | | </p> |
1761 | | </li> |
1762 | | <li> |
1763 | | <p>Redirection to a new location that represents an indirect response to the request, such as the result of a POST operation |
1764 | | to be retrieved with a subsequent GET request. This is status code 303 (See Other). |
1765 | | </p> |
1766 | | </li> |
1767 | | <li> |
1768 | | <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.9"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). This is status code 300 (Multiple Choices). |
1769 | | </p> |
1770 | | </li> |
1771 | | <li> |
1772 | | <p>Other kinds of redirection, such as to a cached result (status code 304 (Not Modified)).</p> |
1773 | | </li> |
1774 | | </ol> |
1775 | | <div class="note" id="rfc.section.7.3.p.3"> |
1776 | | <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 |
1777 | | 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 |
1778 | | retrieval (GET). To address this use case, HTTP/1.1 introduced the second type of redirect with the status code 303 (See Other) |
1779 | | (<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 |
1780 | | 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 |
1781 | | makes that behavior compliant in case the original request was POST. |
1782 | | </p> |
| 1666 | implementations to reject the request. |
| 1667 | </p> |
| 1668 | <p id="rfc.section.6.9.p.8">Like any other pipelined HTTP/1.1 request, data to be tunnel may be sent immediately after the blank line. The usual caveats |
| 1669 | also apply: data may be discarded if the eventual response is negative, and the connection may be reset with no response if |
| 1670 | more than one TCP segment is outstanding. |
| 1671 | </p> |
| 1672 | <div> |
| 1673 | <h3 id="rfc.section.6.9.1"><a href="#rfc.section.6.9.1">6.9.1</a> Establishing a Tunnel with CONNECT |
| 1674 | </h3> |
| 1675 | <p id="rfc.section.6.9.1.p.1">Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested |
| 1676 | host and port, and has switched to tunneling the current connection to that server connection. |
| 1677 | </p> |
| 1678 | <p id="rfc.section.6.9.1.p.2">It may be the case that the proxy itself can only reach the requested origin server through another proxy. In this case, the |
| 1679 | first proxy <em class="bcp14">SHOULD</em> make a CONNECT request of that next proxy, requesting a tunnel to the authority. A proxy <em class="bcp14">MUST NOT</em> respond with any 2xx status code unless it has either a direct or tunnel connection established to the authority. |
| 1680 | </p> |
| 1681 | <p id="rfc.section.6.9.1.p.3">An origin server which receives a CONNECT request for itself <em class="bcp14">MAY</em> respond with a 2xx status code to indicate that a connection is established. |
| 1682 | </p> |
| 1683 | <p id="rfc.section.6.9.1.p.4">If at any point either one of the peers gets disconnected, any outstanding data that came from that peer will be passed to |
| 1684 | the other one, and after that also the other connection will be terminated by the proxy. If there is outstanding data to that |
| 1685 | peer undelivered, that data will be discarded. |
| 1686 | </p> |
| 1687 | </div> |
| 1688 | </div> |
1784 | | <p id="rfc.section.7.3.p.4">A Location header field on a 3xx response indicates that a client <em class="bcp14">MAY</em> automatically redirect to the URI provided; see <a href="#header.location" id="rfc.xref.header.location.3" title="Location">Section 9.5</a>. |
1785 | | </p> |
1786 | | <p id="rfc.section.7.3.p.5">Clients <em class="bcp14">SHOULD</em> detect and intervene in cyclical redirections (i.e., "infinite" redirection loops). |
1787 | | </p> |
1788 | | <div class="note" id="rfc.section.7.3.p.6"> |
1789 | | <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. |
1790 | | </p> |
1791 | | </div> |
1792 | | <div id="rfc.iref.31"></div> |
1793 | | <div id="rfc.iref.s.11"></div> |
1794 | | <h3 id="rfc.section.7.3.1"><a href="#rfc.section.7.3.1">7.3.1</a> <a id="status.300" href="#status.300">300 Multiple Choices</a></h3> |
1795 | | <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 |
1796 | | (<a href="p3-payload.html#content.negotiation" title="Content Negotiation">Section 5</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>) is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to that |
1797 | | location. |
1798 | | </p> |
1799 | | <p id="rfc.section.7.3.1.p.2">Unless it was a HEAD request, the response <em class="bcp14">SHOULD</em> include a representation containing a list of representation metadata and location(s) from which the user or user agent can |
1800 | | choose the one most appropriate. The data format is specified by the media type given in the Content-Type header field. Depending |
1801 | | upon the format and the capabilities of the user agent, selection of the most appropriate choice <em class="bcp14">MAY</em> be performed automatically. However, this specification does not define any standard for such automatic selection. |
1802 | | </p> |
1803 | | <p id="rfc.section.7.3.1.p.3">If the server has a preferred choice of representation, it <em class="bcp14">SHOULD</em> include the specific URI for that representation in the Location field; user agents <em class="bcp14">MAY</em> use the Location field value for automatic redirection. |
1804 | | </p> |
1805 | | <p id="rfc.section.7.3.1.p.4">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.16"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 300 responses. |
1806 | | </p> |
1807 | | <div id="rfc.iref.32"></div> |
1808 | | <div id="rfc.iref.s.12"></div> |
1809 | | <h3 id="rfc.section.7.3.2"><a href="#rfc.section.7.3.2">7.3.2</a> <a id="status.301" href="#status.301">301 Moved Permanently</a></h3> |
1810 | | <p id="rfc.section.7.3.2.p.1">The target resource has been assigned a new permanent URI and any future references to this resource <em class="bcp14">SHOULD</em> use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the effective |
1811 | | request URI to one or more of the new references returned by the server, where possible. |
1812 | | </p> |
1813 | | <p id="rfc.section.7.3.2.p.2">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.17"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 301 responses. |
1814 | | </p> |
1815 | | <p id="rfc.section.7.3.2.p.3">The new permanent URI <em class="bcp14">SHOULD</em> be given by the Location field in the response. Unless the request method was HEAD, the representation of the response <em class="bcp14">SHOULD</em> contain a short hypertext note with a hyperlink to the new URI(s). |
1816 | | </p> |
1817 | | <p id="rfc.section.7.3.2.p.4">If the 301 status code is received in response to a request method that is known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 6.1.1</a>, then the request <em class="bcp14">MAY</em> be automatically redirected by the user agent without confirmation. Otherwise, the user agent <em class="bcp14">MUST NOT</em> automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which |
1818 | | the request was issued. |
1819 | | </p> |
1820 | | <div class="note" id="rfc.section.7.3.2.p.5"> |
1821 | | <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 |
1822 | | Redirect) can be used instead. |
1823 | | </p> |
1824 | | </div> |
1825 | | <div id="rfc.iref.33"></div> |
1826 | | <div id="rfc.iref.s.13"></div> |
1827 | | <h3 id="rfc.section.7.3.3"><a href="#rfc.section.7.3.3">7.3.3</a> <a id="status.302" href="#status.302">302 Found</a></h3> |
1828 | | <p id="rfc.section.7.3.3.p.1">The target resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client <em class="bcp14">SHOULD</em> continue to use the effective request URI for future requests. |
1829 | | </p> |
1830 | | <p id="rfc.section.7.3.3.p.2">The temporary URI <em class="bcp14">SHOULD</em> be given by the Location field in the response. Unless the request method was HEAD, the representation of the response <em class="bcp14">SHOULD</em> contain a short hypertext note with a hyperlink to the new URI(s). |
1831 | | </p> |
1832 | | <p id="rfc.section.7.3.3.p.3">If the 302 status code is received in response to a request method that is known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 6.1.1</a>, then the request <em class="bcp14">MAY</em> be automatically redirected by the user agent without confirmation. Otherwise, the user agent <em class="bcp14">MUST NOT</em> automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which |
1833 | | the request was issued. |
1834 | | </p> |
1835 | | <div class="note" id="rfc.section.7.3.3.p.4"> |
1836 | | <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 |
1837 | | Redirect) can be used instead. <span class="comment" id="issue312">[<a href="#issue312" class="smpl">issue312</a>: but see <<a href="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/312">http://trac.tools.ietf.org/wg/httpbis/trac/ticket/312</a>>]</span> |
1838 | | </p> |
1839 | | </div> |
1840 | | <div id="rfc.iref.34"></div> |
1841 | | <div id="rfc.iref.s.14"></div> |
1842 | | <h3 id="rfc.section.7.3.4"><a href="#rfc.section.7.3.4">7.3.4</a> <a id="status.303" href="#status.303">303 See Other</a></h3> |
1843 | | <p id="rfc.section.7.3.4.p.1">The 303 status code indicates that the server is redirecting the user agent to a different resource, as indicated by a URI |
1844 | | in the Location header field, that is intended to provide an indirect response to the original request. In order to satisfy |
1845 | | the original request, a user agent <em class="bcp14">SHOULD</em> perform a retrieval request using the Location URI (a GET or HEAD request if using HTTP), which may itself be redirected further, |
1846 | | and present the eventual result as an answer to the original request. Note that the new URI in the Location header field is |
1847 | | not considered equivalent to the effective request URI. |
1848 | | </p> |
1849 | | <p id="rfc.section.7.3.4.p.2">This status code is generally applicable to any HTTP method. It is primarily used to allow the output of a POST action to |
1850 | | redirect the user agent to a selected resource, since doing so provides the information corresponding to the POST response |
1851 | | in a form that can be separately identified, bookmarked, and cached independent of the original request. |
1852 | | </p> |
1853 | | <p id="rfc.section.7.3.4.p.3">A 303 response to a GET request indicates that the requested resource does not have a representation of its own that can be |
1854 | | transferred by the server over HTTP. The Location URI indicates a resource that is descriptive of the target resource, such |
1855 | | that the follow-on representation might be useful to recipients without implying that it adequately represents the target |
1856 | | resource. Note that answers to the questions of what can be represented, what representations are adequate, and what might |
1857 | | be a useful description are outside the scope of HTTP and thus entirely determined by the URI owner(s). |
1858 | | </p> |
1859 | | <p id="rfc.section.7.3.4.p.4">Except for responses to a HEAD request, the representation of a 303 response <em class="bcp14">SHOULD</em> contain a short hypertext note with a hyperlink to the Location URI. |
1860 | | </p> |
1861 | | <div id="rfc.iref.35"></div> |
1862 | | <div id="rfc.iref.s.15"></div> |
1863 | | <h3 id="rfc.section.7.3.5"><a href="#rfc.section.7.3.5">7.3.5</a> <a id="status.304" href="#status.304">304 Not Modified</a></h3> |
1864 | | <p id="rfc.section.7.3.5.p.1">The response to the request has not been modified since the conditions indicated by the client's conditional GET request, |
1865 | | as defined in <a href="p4-conditional.html#status.304" title="304 Not Modified">Section 4.1</a> of <a href="#Part4" id="rfc.xref.Part4.10"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>. |
1866 | | </p> |
1867 | | <div id="rfc.iref.36"></div> |
1868 | | <div id="rfc.iref.s.16"></div> |
1869 | | <h3 id="rfc.section.7.3.6"><a href="#rfc.section.7.3.6">7.3.6</a> <a id="status.305" href="#status.305">305 Use Proxy</a></h3> |
1870 | | <p id="rfc.section.7.3.6.p.1">The 305 status code was defined in a previous version of this specification (see <a href="#changes.from.rfc.2616" title="Changes from RFC 2616">Appendix A</a>), and is now deprecated. |
1871 | | </p> |
1872 | | <div id="rfc.iref.37"></div> |
1873 | | <div id="rfc.iref.s.17"></div> |
1874 | | <h3 id="rfc.section.7.3.7"><a href="#rfc.section.7.3.7">7.3.7</a> <a id="status.306" href="#status.306">306 (Unused)</a></h3> |
1875 | | <p id="rfc.section.7.3.7.p.1">The 306 status code was used in a previous version of the specification, is no longer used, and the code is reserved.</p> |
1876 | | <div id="rfc.iref.38"></div> |
1877 | | <div id="rfc.iref.s.18"></div> |
1878 | | <h3 id="rfc.section.7.3.8"><a href="#rfc.section.7.3.8">7.3.8</a> <a id="status.307" href="#status.307">307 Temporary Redirect</a></h3> |
1879 | | <p id="rfc.section.7.3.8.p.1">The target resource resides temporarily under a different URI. Since the redirection can change over time, the client <em class="bcp14">SHOULD</em> continue to use the effective request URI for future requests. |
1880 | | </p> |
1881 | | <p id="rfc.section.7.3.8.p.2">The temporary URI <em class="bcp14">SHOULD</em> be given by the Location field in the response. Unless the request method was HEAD, the representation of the response <em class="bcp14">SHOULD</em> contain a short hypertext note with a hyperlink to the new URI(s), since many pre-HTTP/1.1 user agents do not understand the |
1882 | | 307 status code. Therefore, the note <em class="bcp14">SHOULD</em> contain the information necessary for a user to repeat the original request on the new URI. |
1883 | | </p> |
1884 | | <p id="rfc.section.7.3.8.p.3">If the 307 status code is received in response to a request method that is known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 6.1.1</a>, then the request <em class="bcp14">MAY</em> be automatically redirected by the user agent without confirmation. Otherwise, the user agent <em class="bcp14">MUST NOT</em> automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which |
1885 | | the request was issued. |
1886 | | </p> |
1887 | | <div class="note" id="rfc.section.7.3.8.p.4"> |
1888 | | <p> <b>Note:</b> This status code is similar to 302 Found, except that it does not allow rewriting the request method from POST to GET. This |
1889 | | specification defines no equivalent counterpart for 301 Moved Permanently. |
1890 | | </p> |
1891 | | </div> |
1892 | | <h2 id="rfc.section.7.4"><a href="#rfc.section.7.4">7.4</a> <a id="status.4xx" href="#status.4xx">Client Error 4xx</a></h2> |
1893 | | <p id="rfc.section.7.4.p.1">The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD |
1894 | | request, the server <em class="bcp14">SHOULD</em> include a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. |
1895 | | These status codes are applicable to any request method. User agents <em class="bcp14">SHOULD</em> display any included representation to the user. |
1896 | | </p> |
1897 | | <p id="rfc.section.7.4.p.2">If the client is sending data, a server implementation using TCP <em class="bcp14">SHOULD</em> be careful to ensure that the client acknowledges receipt of the packet(s) containing the response, before the server closes |
1898 | | the input connection. If the client continues sending data to the server after the close, the server's TCP stack will send |
1899 | | a reset packet to the client, which might erase the client's unacknowledged input buffers before they can be read and interpreted |
1900 | | by the HTTP application. |
1901 | | </p> |
1902 | | <div id="rfc.iref.39"></div> |
1903 | | <div id="rfc.iref.s.19"></div> |
1904 | | <h3 id="rfc.section.7.4.1"><a href="#rfc.section.7.4.1">7.4.1</a> <a id="status.400" href="#status.400">400 Bad Request</a></h3> |
1905 | | <p id="rfc.section.7.4.1.p.1">The server cannot or will not process the request, due to a client error (e.g., malformed syntax).</p> |
1906 | | <div id="rfc.iref.40"></div> |
1907 | | <div id="rfc.iref.s.20"></div> |
1908 | | <h3 id="rfc.section.7.4.2"><a href="#rfc.section.7.4.2">7.4.2</a> <a id="status.401" href="#status.401">401 Unauthorized</a></h3> |
1909 | | <p id="rfc.section.7.4.2.p.1">The request requires user authentication (see <a href="p7-auth.html#status.401" title="401 Unauthorized">Section 3.1</a> of <a href="#Part7" id="rfc.xref.Part7.8"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a>). |
1910 | | </p> |
1911 | | <div id="rfc.iref.41"></div> |
1912 | | <div id="rfc.iref.s.21"></div> |
1913 | | <h3 id="rfc.section.7.4.3"><a href="#rfc.section.7.4.3">7.4.3</a> <a id="status.402" href="#status.402">402 Payment Required</a></h3> |
1914 | | <p id="rfc.section.7.4.3.p.1">This code is reserved for future use.</p> |
1915 | | <div id="rfc.iref.42"></div> |
1916 | | <div id="rfc.iref.s.22"></div> |
1917 | | <h3 id="rfc.section.7.4.4"><a href="#rfc.section.7.4.4">7.4.4</a> <a id="status.403" href="#status.403">403 Forbidden</a></h3> |
1918 | | <p id="rfc.section.7.4.4.p.1">The server understood the request, but refuses to authorize it. Providing different user authentication credentials might |
1919 | | be successful, but any credentials that were provided in the request are insufficient. The request <em class="bcp14">SHOULD NOT</em> be repeated with the same credentials. |
1920 | | </p> |
1921 | | <p id="rfc.section.7.4.4.p.2">If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it <em class="bcp14">SHOULD</em> describe the reason for the refusal in the representation. If the server does not wish to make this information available |
1922 | | to the client, the status code 404 (Not Found) <em class="bcp14">MAY</em> be used instead. |
1923 | | </p> |
1924 | | <div id="rfc.iref.43"></div> |
1925 | | <div id="rfc.iref.s.23"></div> |
1926 | | <h3 id="rfc.section.7.4.5"><a href="#rfc.section.7.4.5">7.4.5</a> <a id="status.404" href="#status.404">404 Not Found</a></h3> |
1927 | | <p id="rfc.section.7.4.5.p.1">The server has not found anything matching the effective request URI. No indication is given of whether the condition is temporary |
1928 | | or permanent. The 410 (Gone) status code <em class="bcp14">SHOULD</em> be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable |
1929 | | and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request |
1930 | | has been refused, or when no other response is applicable. |
1931 | | </p> |
1932 | | <div id="rfc.iref.44"></div> |
1933 | | <div id="rfc.iref.s.24"></div> |
1934 | | <h3 id="rfc.section.7.4.6"><a href="#rfc.section.7.4.6">7.4.6</a> <a id="status.405" href="#status.405">405 Method Not Allowed</a></h3> |
1935 | | <p id="rfc.section.7.4.6.p.1">The method specified in the Request-Line is not allowed for the target resource. The response <em class="bcp14">MUST</em> include an Allow header field containing a list of valid methods for the requested resource. |
1936 | | </p> |
1937 | | <div id="rfc.iref.45"></div> |
1938 | | <div id="rfc.iref.s.25"></div> |
1939 | | <h3 id="rfc.section.7.4.7"><a href="#rfc.section.7.4.7">7.4.7</a> <a id="status.406" href="#status.406">406 Not Acceptable</a></h3> |
1940 | | <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 |
1941 | | 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.11"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). |
1942 | | </p> |
1943 | | <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 |
1944 | | or user agent can choose the one most appropriate. The data format is specified by the media type given in the Content-Type |
1945 | | header field. Depending upon the format and the capabilities of the user agent, selection of the most appropriate choice <em class="bcp14">MAY</em> be performed automatically. However, this specification does not define any standard for such automatic selection. |
1946 | | </p> |
1947 | | <div class="note" id="rfc.section.7.4.7.p.3"> |
1948 | | <p> <b>Note:</b> HTTP/1.1 servers are allowed to return responses which are not acceptable according to the accept header fields sent in the |
1949 | | request. In some cases, this might even be preferable to sending a 406 response. User agents are encouraged to inspect the |
1950 | | header fields of an incoming response to determine if it is acceptable. |
1951 | | </p> |
1952 | | </div> |
1953 | | <p id="rfc.section.7.4.7.p.4">If the response could be unacceptable, a user agent <em class="bcp14">SHOULD</em> temporarily stop receipt of more data and query the user for a decision on further actions. |
1954 | | </p> |
1955 | | <div id="rfc.iref.46"></div> |
1956 | | <div id="rfc.iref.s.26"></div> |
1957 | | <h3 id="rfc.section.7.4.8"><a href="#rfc.section.7.4.8">7.4.8</a> <a id="status.407" href="#status.407">407 Proxy Authentication Required</a></h3> |
1958 | | <p id="rfc.section.7.4.8.p.1">This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate itself with the proxy (see <a href="p7-auth.html#status.407" title="407 Proxy Authentication Required">Section 3.2</a> of <a href="#Part7" id="rfc.xref.Part7.9"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a>). |
1959 | | </p> |
1960 | | <div id="rfc.iref.47"></div> |
1961 | | <div id="rfc.iref.s.27"></div> |
1962 | | <h3 id="rfc.section.7.4.9"><a href="#rfc.section.7.4.9">7.4.9</a> <a id="status.408" href="#status.408">408 Request Timeout</a></h3> |
1963 | | <p id="rfc.section.7.4.9.p.1">The client did not produce a request within the time that the server was prepared to wait. The client <em class="bcp14">MAY</em> repeat the request without modifications at any later time. |
1964 | | </p> |
1965 | | <div id="rfc.iref.48"></div> |
1966 | | <div id="rfc.iref.s.28"></div> |
1967 | | <h3 id="rfc.section.7.4.10"><a href="#rfc.section.7.4.10">7.4.10</a> <a id="status.409" href="#status.409">409 Conflict</a></h3> |
1968 | | <p id="rfc.section.7.4.10.p.1">The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in |
1969 | | situations where it is expected that the user might be able to resolve the conflict and resubmit the request. The response |
1970 | | body <em class="bcp14">SHOULD</em> include enough information for the user to recognize the source of the conflict. Ideally, the response representation would |
1971 | | include enough information for the user or user agent to fix the problem; however, that might not be possible and is not required. |
1972 | | </p> |
1973 | | <p id="rfc.section.7.4.10.p.2">Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the representation |
1974 | | being PUT included changes to a resource which conflict with those made by an earlier (third-party) request, the server might |
1975 | | use the 409 response to indicate that it can't complete the request. In this case, the response representation would likely |
1976 | | contain a list of the differences between the two versions in a format defined by the response Content-Type. |
1977 | | </p> |
1978 | | <div id="rfc.iref.49"></div> |
1979 | | <div id="rfc.iref.s.29"></div> |
1980 | | <h3 id="rfc.section.7.4.11"><a href="#rfc.section.7.4.11">7.4.11</a> <a id="status.410" href="#status.410">410 Gone</a></h3> |
1981 | | <p id="rfc.section.7.4.11.p.1">The target resource is no longer available at the server and no forwarding address is known. This condition is expected to |
1982 | | be considered permanent. Clients with link editing capabilities <em class="bcp14">SHOULD</em> delete references to the effective request URI after user approval. If the server does not know, or has no facility to determine, |
1983 | | whether or not the condition is permanent, the status code 404 (Not Found) <em class="bcp14">SHOULD</em> be used instead. |
1984 | | </p> |
1985 | | <p id="rfc.section.7.4.11.p.2">The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource |
1986 | | is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event |
1987 | | is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server's |
1988 | | site. It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time |
1989 | | — that is left to the discretion of the server owner. |
1990 | | </p> |
1991 | | <p id="rfc.section.7.4.11.p.3">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.18"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 410 responses. |
1992 | | </p> |
1993 | | <div id="rfc.iref.50"></div> |
1994 | | <div id="rfc.iref.s.30"></div> |
1995 | | <h3 id="rfc.section.7.4.12"><a href="#rfc.section.7.4.12">7.4.12</a> <a id="status.411" href="#status.411">411 Length Required</a></h3> |
1996 | | <p id="rfc.section.7.4.12.p.1">The server refuses to accept the request without a defined Content-Length. The client <em class="bcp14">MAY</em> repeat the request if it adds a valid Content-Length header field containing the length of the message-body in the request |
1997 | | message. |
1998 | | </p> |
1999 | | <div id="rfc.iref.51"></div> |
2000 | | <div id="rfc.iref.s.31"></div> |
2001 | | <h3 id="rfc.section.7.4.13"><a href="#rfc.section.7.4.13">7.4.13</a> <a id="status.412" href="#status.412">412 Precondition Failed</a></h3> |
2002 | | <p id="rfc.section.7.4.13.p.1">The precondition given in one or more of the header fields evaluated to false when it was tested on the server, as defined |
2003 | | in <a href="p4-conditional.html#status.412" title="412 Precondition Failed">Section 4.2</a> of <a href="#Part4" id="rfc.xref.Part4.11"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>. |
2004 | | </p> |
2005 | | <div id="rfc.iref.52"></div> |
2006 | | <div id="rfc.iref.s.32"></div> |
2007 | | <h3 id="rfc.section.7.4.14"><a href="#rfc.section.7.4.14">7.4.14</a> <a id="status.413" href="#status.413">413 Request Representation Too Large</a></h3> |
2008 | | <p id="rfc.section.7.4.14.p.1">The server is refusing to process a request because the request representation is larger than the server is willing or able |
2009 | | to process. The server <em class="bcp14">MAY</em> close the connection to prevent the client from continuing the request. |
2010 | | </p> |
2011 | | <p id="rfc.section.7.4.14.p.2">If the condition is temporary, the server <em class="bcp14">SHOULD</em> include a Retry-After header field to indicate that it is temporary and after what time the client <em class="bcp14">MAY</em> try again. |
2012 | | </p> |
2013 | | <div id="rfc.iref.53"></div> |
2014 | | <div id="rfc.iref.s.33"></div> |
2015 | | <h3 id="rfc.section.7.4.15"><a href="#rfc.section.7.4.15">7.4.15</a> <a id="status.414" href="#status.414">414 URI Too Long</a></h3> |
2016 | | <p id="rfc.section.7.4.15.p.1">The server is refusing to service the request because the effective request URI is longer than the server is willing to interpret. |
2017 | | This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long |
2018 | | query information, when the client has descended into a URI "black hole" of redirection (e.g., a redirected URI prefix that |
2019 | | points to a suffix of itself), or when the server is under attack by a client attempting to exploit security holes present |
2020 | | in some servers using fixed-length buffers for reading or manipulating the effective request URI. |
2021 | | </p> |
2022 | | <div id="rfc.iref.54"></div> |
2023 | | <div id="rfc.iref.s.34"></div> |
2024 | | <h3 id="rfc.section.7.4.16"><a href="#rfc.section.7.4.16">7.4.16</a> <a id="status.415" href="#status.415">415 Unsupported Media Type</a></h3> |
2025 | | <p id="rfc.section.7.4.16.p.1">The server is refusing to service the request because the request payload is in a format not supported by this request method |
2026 | | on the target resource. |
2027 | | </p> |
2028 | | <div id="rfc.iref.55"></div> |
2029 | | <div id="rfc.iref.s.35"></div> |
2030 | | <h3 id="rfc.section.7.4.17"><a href="#rfc.section.7.4.17">7.4.17</a> <a id="status.416" href="#status.416">416 Requested Range Not Satisfiable</a></h3> |
2031 | | <p id="rfc.section.7.4.17.p.1">The request included a Range header field (<a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5.9"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>) and none of the range-specifier values in this field overlap the current extent of the selected resource. See <a href="p5-range.html#status.416" title="416 Requested Range Not Satisfiable">Section 3.2</a> of <a href="#Part5" id="rfc.xref.Part5.10"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>. |
2032 | | </p> |
2033 | | <div id="rfc.iref.56"></div> |
2034 | | <div id="rfc.iref.s.36"></div> |
2035 | | <h3 id="rfc.section.7.4.18"><a href="#rfc.section.7.4.18">7.4.18</a> <a id="status.417" href="#status.417">417 Expectation Failed</a></h3> |
2036 | | <p id="rfc.section.7.4.18.p.1">The expectation given in an Expect header field (see <a href="#header.expect" id="rfc.xref.header.expect.2" title="Expect">Section 9.3</a>) could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could |
2037 | | not be met by the next-hop server. |
2038 | | </p> |
2039 | | <div id="rfc.iref.57"></div> |
2040 | | <div id="rfc.iref.s.37"></div> |
2041 | | <h3 id="rfc.section.7.4.19"><a href="#rfc.section.7.4.19">7.4.19</a> <a id="status.426" href="#status.426">426 Upgrade Required</a></h3> |
2042 | | <p id="rfc.section.7.4.19.p.1">The request can not be completed without a prior protocol upgrade. This response <em class="bcp14">MUST</em> include an Upgrade header field (<a href="p1-messaging.html#header.upgrade" title="Upgrade">Section 8.7</a> of <a href="#Part1" id="rfc.xref.Part1.36"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) specifying the required protocols. |
2043 | | </p> |
2044 | | <div id="rfc.figure.u.8"></div> |
2045 | | <p>Example:</p> <pre class="text2">HTTP/1.1 426 Upgrade Required |
| 1690 | <div id="status.codes"> |
| 1691 | <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a> <a href="#status.codes">Status Code Definitions</a></h1> |
| 1692 | <p id="rfc.section.7.p.1">The first digit of the Status-Code defines the class of response. The last two digits do not have any categorization role. |
| 1693 | There are 5 values for the first digit: |
| 1694 | </p> |
| 1695 | <ul> |
| 1696 | <li>1xx: Informational - Request received, continuing process</li> |
| 1697 | <li>2xx: Success - The action was successfully received, understood, and accepted</li> |
| 1698 | <li>3xx: Redirection - Further action must be taken in order to complete the request</li> |
| 1699 | <li>4xx: Client Error - The request contains bad syntax or cannot be fulfilled</li> |
| 1700 | <li>5xx: Server Error - The server failed to fulfill an apparently valid request</li> |
| 1701 | </ul> |
| 1702 | <p id="rfc.section.7.p.2">Each Status-Code is described below, including any metadata required in the response.</p> |
| 1703 | <div id="status.1xx"> |
| 1704 | <h2 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1</a> <a href="#status.1xx">Informational 1xx</a></h2> |
| 1705 | <p id="rfc.section.7.1.p.1">This class of status code indicates a provisional response, consisting only of the Status-Line and optional header fields, |
| 1706 | and is terminated by an empty line. There are no required header fields for this class of status code. Since HTTP/1.0 did |
| 1707 | not define any 1xx status codes, servers <em class="bcp14">MUST NOT</em> send a 1xx response to an HTTP/1.0 client except under experimental conditions. |
| 1708 | </p> |
| 1709 | <p id="rfc.section.7.1.p.2">A client <em class="bcp14">MUST</em> be prepared to accept one or more 1xx status responses prior to a regular response, even if the client does not expect a 100 |
| 1710 | (Continue) status message. Unexpected 1xx status responses <em class="bcp14">MAY</em> be ignored by a user agent. |
| 1711 | </p> |
| 1712 | <p id="rfc.section.7.1.p.3">Proxies <em class="bcp14">MUST</em> forward 1xx responses, unless the connection between the proxy and its client has been closed, or unless the proxy itself |
| 1713 | requested the generation of the 1xx response. (For example, if a proxy adds a "Expect: 100-continue" field when it forwards |
| 1714 | a request, then it need not forward the corresponding 100 (Continue) response(s).) |
| 1715 | </p> |
| 1716 | <div id="status.100"> |
| 1717 | <div id="rfc.iref.1.1"></div> |
| 1718 | <div id="rfc.iref.s.2"></div> |
| 1719 | <h3 id="rfc.section.7.1.1"><a href="#rfc.section.7.1.1">7.1.1</a> <a href="#status.100">100 Continue</a></h3> |
| 1720 | <p id="rfc.section.7.1.1.p.1">The client <em class="bcp14">SHOULD</em> continue with its request. This interim response is used to inform the client that the initial part of the request has been |
| 1721 | received and has not yet been rejected by the server. The client <em class="bcp14">SHOULD</em> continue by sending the remainder of the request or, if the request has already been completed, ignore this response. The |
| 1722 | server <em class="bcp14">MUST</em> send a final response after the request has been completed. See <a href="p1-messaging.html#use.of.the.100.status" title="Use of the 100 (Continue) Status">Section 6.2.3</a> of <a href="#Part1" id="rfc.xref.Part1.32"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a> for detailed discussion of the use and handling of this status code. |
| 1723 | </p> |
| 1724 | </div> |
| 1725 | <div id="status.101"> |
| 1726 | <div id="rfc.iref.1.2"></div> |
| 1727 | <div id="rfc.iref.s.3"></div> |
| 1728 | <h3 id="rfc.section.7.1.2"><a href="#rfc.section.7.1.2">7.1.2</a> <a href="#status.101">101 Switching Protocols</a></h3> |
| 1729 | <p id="rfc.section.7.1.2.p.1">The server understands and is willing to comply with the client's request, via the Upgrade message header field (<a href="p1-messaging.html#header.upgrade" title="Upgrade">Section 8.7</a> of <a href="#Part1" id="rfc.xref.Part1.33"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>), for a change in the application protocol being used on this connection. The server will switch protocols to those defined |
| 1730 | by the response's Upgrade header field immediately after the empty line which terminates the 101 response. |
| 1731 | </p> |
| 1732 | <p id="rfc.section.7.1.2.p.2">The protocol <em class="bcp14">SHOULD</em> be switched only when it is advantageous to do so. For example, switching to a newer version of HTTP is advantageous over |
| 1733 | older versions, and switching to a real-time, synchronous protocol might be advantageous when delivering resources that use |
| 1734 | such features. |
| 1735 | </p> |
| 1736 | </div> |
| 1737 | </div> |
| 1738 | <div id="status.2xx"> |
| 1739 | <h2 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a> <a href="#status.2xx">Successful 2xx</a></h2> |
| 1740 | <p id="rfc.section.7.2.p.1">This class of status code indicates that the client's request was successfully received, understood, and accepted.</p> |
| 1741 | <div id="status.200"> |
| 1742 | <div id="rfc.iref.2.1"></div> |
| 1743 | <div id="rfc.iref.s.4"></div> |
| 1744 | <h3 id="rfc.section.7.2.1"><a href="#rfc.section.7.2.1">7.2.1</a> <a href="#status.200">200 OK</a></h3> |
| 1745 | <p id="rfc.section.7.2.1.p.1">The request has succeeded. The payload returned with the response is dependent on the method used in the request, for example: </p> |
| 1746 | <dl> |
| 1747 | <dt>GET</dt> |
| 1748 | <dd>a representation of the target resource is sent in the response;</dd> |
| 1749 | <dt>HEAD</dt> |
| 1750 | <dd>the same representation as GET, except without the message-body;</dd> |
| 1751 | <dt>POST</dt> |
| 1752 | <dd>a representation describing or containing the result of the action;</dd> |
| 1753 | <dt>TRACE</dt> |
| 1754 | <dd>a representation containing the request message as received by the end server.</dd> |
| 1755 | </dl> |
| 1756 | <p id="rfc.section.7.2.1.p.2">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.11"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 200 responses. |
| 1757 | </p> |
| 1758 | </div> |
| 1759 | <div id="status.201"> |
| 1760 | <div id="rfc.iref.2.2"></div> |
| 1761 | <div id="rfc.iref.s.5"></div> |
| 1762 | <h3 id="rfc.section.7.2.2"><a href="#rfc.section.7.2.2">7.2.2</a> <a href="#status.201">201 Created</a></h3> |
| 1763 | <p id="rfc.section.7.2.2.p.1">The request has been fulfilled and has resulted in a new resource being created. The newly created resource can be referenced |
| 1764 | by the URI(s) returned in the payload of the response, with the most specific URI for the resource given by a Location header |
| 1765 | field. The response <em class="bcp14">SHOULD</em> include a payload containing a list of resource characteristics and location(s) from which the user or user agent can choose |
| 1766 | the one most appropriate. The payload format is specified by the media type given in the Content-Type header field. The origin |
| 1767 | server <em class="bcp14">MUST</em> create the resource before returning the 201 status code. If the action cannot be carried out immediately, the server <em class="bcp14">SHOULD</em> respond with 202 (Accepted) response instead. |
| 1768 | </p> |
| 1769 | <p id="rfc.section.7.2.2.p.2">A 201 response <em class="bcp14">MAY</em> contain an ETag response header field indicating the current value of the entity-tag for the representation of the resource |
| 1770 | just created (see <a href="p4-conditional.html#header.etag" title="ETag">Section 2.3</a> of <a href="#Part4" id="rfc.xref.Part4.9"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>). |
| 1771 | </p> |
| 1772 | </div> |
| 1773 | <div id="status.202"> |
| 1774 | <div id="rfc.iref.2.3"></div> |
| 1775 | <div id="rfc.iref.s.6"></div> |
| 1776 | <h3 id="rfc.section.7.2.3"><a href="#rfc.section.7.2.3">7.2.3</a> <a href="#status.202">202 Accepted</a></h3> |
| 1777 | <p id="rfc.section.7.2.3.p.1">The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually |
| 1778 | be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status |
| 1779 | code from an asynchronous operation such as this. |
| 1780 | </p> |
| 1781 | <p id="rfc.section.7.2.3.p.2">The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process |
| 1782 | (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the |
| 1783 | server persist until the process is completed. The representation returned with this response <em class="bcp14">SHOULD</em> include an indication of the request's current status and either a pointer to a status monitor or some estimate of when the |
| 1784 | user can expect the request to be fulfilled. |
| 1785 | </p> |
| 1786 | </div> |
| 1787 | <div id="status.203"> |
| 1788 | <div id="rfc.iref.2.4"></div> |
| 1789 | <div id="rfc.iref.s.7"></div> |
| 1790 | <h3 id="rfc.section.7.2.4"><a href="#rfc.section.7.2.4">7.2.4</a> <a href="#status.203">203 Non-Authoritative Information</a></h3> |
| 1791 | <p id="rfc.section.7.2.4.p.1">The representation in the response has been transformed or otherwise modified by a transforming proxy (<a href="p1-messaging.html#intermediaries" title="Intermediaries">Section 2.4</a> of <a href="#Part1" id="rfc.xref.Part1.34"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>). Note that the behaviour of transforming intermediaries is controlled by the no-transform Cache-Control directive (<a href="p6-cache.html#header.cache-control" title="Cache-Control">Section 3.2</a> of <a href="#Part6" id="rfc.xref.Part6.12"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>). |
| 1792 | </p> |
| 1793 | <p id="rfc.section.7.2.4.p.2">This status code is only appropriate when the response status code would have been 200 (OK) otherwise. When the status code |
| 1794 | before transformation would have been different, the 214 Transformation Applied warn-code (<a href="p6-cache.html#header.warning" title="Warning">Section 3.6</a> of <a href="#Part6" id="rfc.xref.Part6.13"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) is appropriate. |
| 1795 | </p> |
| 1796 | <p id="rfc.section.7.2.4.p.3">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.14"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 203 responses. |
| 1797 | </p> |
| 1798 | </div> |
| 1799 | <div id="status.204"> |
| 1800 | <div id="rfc.iref.2.5"></div> |
| 1801 | <div id="rfc.iref.s.8"></div> |
| 1802 | <h3 id="rfc.section.7.2.5"><a href="#rfc.section.7.2.5">7.2.5</a> <a href="#status.204">204 No Content</a></h3> |
| 1803 | <p id="rfc.section.7.2.5.p.1">The 204 (No Content) status code indicates that the server has successfully fulfilled the request and that there is no additional |
| 1804 | content to return in the response payload body. Metadata in the response header fields refer to the target resource and its |
| 1805 | current representation after the requested action. |
| 1806 | </p> |
| 1807 | <p id="rfc.section.7.2.5.p.2">For example, if a 204 status code is received in response to a PUT request and the response contains an ETag header field, |
| 1808 | then the PUT was successful and the ETag field-value contains the entity-tag for the new representation of that target resource. |
| 1809 | </p> |
| 1810 | <p id="rfc.section.7.2.5.p.3">The 204 response allows a server to indicate that the action has been successfully applied to the target resource while implying |
| 1811 | that the user agent <em class="bcp14">SHOULD NOT</em> traverse away from its current "document view" (if any). The server assumes that the user agent will provide some indication |
| 1812 | of the success to its user, in accord with its own interface, and apply any new or updated metadata in the response to the |
| 1813 | active representation. |
| 1814 | </p> |
| 1815 | <p id="rfc.section.7.2.5.p.4">For example, a 204 status code is commonly used with document editing interfaces corresponding to a "save" action, such that |
| 1816 | the document being saved remains available to the user for editing. It is also frequently used with interfaces that expect |
| 1817 | automated data transfers to be prevalent, such as within distributed version control systems. |
| 1818 | </p> |
| 1819 | <p id="rfc.section.7.2.5.p.5">The 204 response <em class="bcp14">MUST NOT</em> include a message-body, and thus is always terminated by the first empty line after the header fields. |
| 1820 | </p> |
| 1821 | </div> |
| 1822 | <div id="status.205"> |
| 1823 | <div id="rfc.iref.2.6"></div> |
| 1824 | <div id="rfc.iref.s.9"></div> |
| 1825 | <h3 id="rfc.section.7.2.6"><a href="#rfc.section.7.2.6">7.2.6</a> <a href="#status.205">205 Reset Content</a></h3> |
| 1826 | <p id="rfc.section.7.2.6.p.1">The server has fulfilled the request and the user agent <em class="bcp14">SHOULD</em> reset the document view which caused the request to be sent. This response is primarily intended to allow input for actions |
| 1827 | to take place via user input, followed by a clearing of the form in which the input is given so that the user can easily initiate |
| 1828 | another input action. |
| 1829 | </p> |
| 1830 | <p id="rfc.section.7.2.6.p.2">The message-body included with the response <em class="bcp14">MUST</em> be empty. Note that receivers still need to parse the response according to the algorithm defined in <a href="p1-messaging.html#message.body" title="Message Body">Section 3.3</a> of <a href="#Part1" id="rfc.xref.Part1.35"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>. |
| 1831 | </p> |
| 1832 | </div> |
| 1833 | <div id="status.206"> |
| 1834 | <div id="rfc.iref.2.7"></div> |
| 1835 | <div id="rfc.iref.s.10"></div> |
| 1836 | <h3 id="rfc.section.7.2.7"><a href="#rfc.section.7.2.7">7.2.7</a> <a href="#status.206">206 Partial Content</a></h3> |
| 1837 | <p id="rfc.section.7.2.7.p.1">The server has fulfilled the partial GET request for the resource and the enclosed payload is a partial representation as |
| 1838 | defined in <a href="p5-range.html#status.206" title="206 Partial Content">Section 3.1</a> of <a href="#Part5" id="rfc.xref.Part5.8"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>. |
| 1839 | </p> |
| 1840 | <p id="rfc.section.7.2.7.p.2">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.15"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 206 responses. |
| 1841 | </p> |
| 1842 | </div> |
| 1843 | </div> |
| 1844 | <div id="status.3xx"> |
| 1845 | <h2 id="rfc.section.7.3"><a href="#rfc.section.7.3">7.3</a> <a href="#status.3xx">Redirection 3xx</a></h2> |
| 1846 | <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. |
| 1847 | 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 |
| 1848 | known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 6.1.1</a>. |
| 1849 | </p> |
| 1850 | <p id="rfc.section.7.3.p.2">There are several types of redirects: </p> |
| 1851 | <ol> |
| 1852 | <li> |
| 1853 | <p>Redirects of the request to another URI, either temporarily or permanently. The new URI is specified in the Location header |
| 1854 | field. In this specification, the status codes 301 (Moved Permanently), 302 (Found), and 307 (Temporary Redirect) fall under |
| 1855 | this category. |
| 1856 | </p> |
| 1857 | </li> |
| 1858 | <li> |
| 1859 | <p>Redirection to a new location that represents an indirect response to the request, such as the result of a POST operation |
| 1860 | to be retrieved with a subsequent GET request. This is status code 303 (See Other). |
| 1861 | </p> |
| 1862 | </li> |
| 1863 | <li> |
| 1864 | <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.9"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). This is status code 300 (Multiple Choices). |
| 1865 | </p> |
| 1866 | </li> |
| 1867 | <li> |
| 1868 | <p>Other kinds of redirection, such as to a cached result (status code 304 (Not Modified)).</p> |
| 1869 | </li> |
| 1870 | </ol> |
| 1871 | <div class="note" id="rfc.section.7.3.p.3"> |
| 1872 | <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 |
| 1873 | 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="https://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 |
| 1874 | retrieval (GET). To address this use case, HTTP/1.1 introduced the second type of redirect with the status code 303 (See Other) |
| 1875 | (<a href="#RFC2068" id="rfc.xref.RFC2068.1"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2068]</cite></a>, <a href="https://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 |
| 1876 | 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="https://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 |
| 1877 | makes that behavior compliant in case the original request was POST. |
| 1878 | </p> |
| 1879 | </div> |
| 1880 | <p id="rfc.section.7.3.p.4">A Location header field on a 3xx response indicates that a client <em class="bcp14">MAY</em> automatically redirect to the URI provided; see <a href="#header.location" id="rfc.xref.header.location.3" title="Location">Section 9.5</a>. |
| 1881 | </p> |
| 1882 | <p id="rfc.section.7.3.p.5">Clients <em class="bcp14">SHOULD</em> detect and intervene in cyclical redirections (i.e., "infinite" redirection loops). |
| 1883 | </p> |
| 1884 | <div class="note" id="rfc.section.7.3.p.6"> |
| 1885 | <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="https://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. |
| 1886 | </p> |
| 1887 | </div> |
| 1888 | <div id="status.300"> |
| 1889 | <div id="rfc.iref.3.1"></div> |
| 1890 | <div id="rfc.iref.s.11"></div> |
| 1891 | <h3 id="rfc.section.7.3.1"><a href="#rfc.section.7.3.1">7.3.1</a> <a href="#status.300">300 Multiple Choices</a></h3> |
| 1892 | <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 |
| 1893 | (<a href="p3-payload.html#content.negotiation" title="Content Negotiation">Section 5</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>) is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to that |
| 1894 | location. |
| 1895 | </p> |
| 1896 | <p id="rfc.section.7.3.1.p.2">Unless it was a HEAD request, the response <em class="bcp14">SHOULD</em> include a representation containing a list of representation metadata and location(s) from which the user or user agent can |
| 1897 | choose the one most appropriate. The data format is specified by the media type given in the Content-Type header field. Depending |
| 1898 | upon the format and the capabilities of the user agent, selection of the most appropriate choice <em class="bcp14">MAY</em> be performed automatically. However, this specification does not define any standard for such automatic selection. |
| 1899 | </p> |
| 1900 | <p id="rfc.section.7.3.1.p.3">If the server has a preferred choice of representation, it <em class="bcp14">SHOULD</em> include the specific URI for that representation in the Location field; user agents <em class="bcp14">MAY</em> use the Location field value for automatic redirection. |
| 1901 | </p> |
| 1902 | <p id="rfc.section.7.3.1.p.4">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.16"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 300 responses. |
| 1903 | </p> |
| 1904 | </div> |
| 1905 | <div id="status.301"> |
| 1906 | <div id="rfc.iref.3.2"></div> |
| 1907 | <div id="rfc.iref.s.12"></div> |
| 1908 | <h3 id="rfc.section.7.3.2"><a href="#rfc.section.7.3.2">7.3.2</a> <a href="#status.301">301 Moved Permanently</a></h3> |
| 1909 | <p id="rfc.section.7.3.2.p.1">The target resource has been assigned a new permanent URI and any future references to this resource <em class="bcp14">SHOULD</em> use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the effective |
| 1910 | request URI to one or more of the new references returned by the server, where possible. |
| 1911 | </p> |
| 1912 | <p id="rfc.section.7.3.2.p.2">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.17"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 301 responses. |
| 1913 | </p> |
| 1914 | <p id="rfc.section.7.3.2.p.3">The new permanent URI <em class="bcp14">SHOULD</em> be given by the Location field in the response. Unless the request method was HEAD, the representation of the response <em class="bcp14">SHOULD</em> contain a short hypertext note with a hyperlink to the new URI(s). |
| 1915 | </p> |
| 1916 | <p id="rfc.section.7.3.2.p.4">If the 301 status code is received in response to a request method that is known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 6.1.1</a>, then the request <em class="bcp14">MAY</em> be automatically redirected by the user agent without confirmation. Otherwise, the user agent <em class="bcp14">MUST NOT</em> automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which |
| 1917 | the request was issued. |
| 1918 | </p> |
| 1919 | <div class="note" id="rfc.section.7.3.2.p.5"> |
| 1920 | <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 |
| 1921 | Redirect) can be used instead. |
| 1922 | </p> |
| 1923 | </div> |
| 1924 | </div> |
| 1925 | <div id="status.302"> |
| 1926 | <div id="rfc.iref.3.3"></div> |
| 1927 | <div id="rfc.iref.s.13"></div> |
| 1928 | <h3 id="rfc.section.7.3.3"><a href="#rfc.section.7.3.3">7.3.3</a> <a href="#status.302">302 Found</a></h3> |
| 1929 | <p id="rfc.section.7.3.3.p.1">The target resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client <em class="bcp14">SHOULD</em> continue to use the effective request URI for future requests. |
| 1930 | </p> |
| 1931 | <p id="rfc.section.7.3.3.p.2">The temporary URI <em class="bcp14">SHOULD</em> be given by the Location field in the response. Unless the request method was HEAD, the representation of the response <em class="bcp14">SHOULD</em> contain a short hypertext note with a hyperlink to the new URI(s). |
| 1932 | </p> |
| 1933 | <p id="rfc.section.7.3.3.p.3">If the 302 status code is received in response to a request method that is known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 6.1.1</a>, then the request <em class="bcp14">MAY</em> be automatically redirected by the user agent without confirmation. Otherwise, the user agent <em class="bcp14">MUST NOT</em> automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which |
| 1934 | the request was issued. |
| 1935 | </p> |
| 1936 | <div class="note" id="rfc.section.7.3.3.p.4"> |
| 1937 | <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 |
| 1938 | Redirect) can be used instead. <span class="comment" id="issue312">[<a href="#issue312" class="smpl">issue312</a>: but see <<a href="http://trac.tools.ietf.org/wg/httpbis/trac/ticket/312">http://trac.tools.ietf.org/wg/httpbis/trac/ticket/312</a>>]</span> |
| 1939 | </p> |
| 1940 | </div> |
| 1941 | </div> |
| 1942 | <div id="status.303"> |
| 1943 | <div id="rfc.iref.3.4"></div> |
| 1944 | <div id="rfc.iref.s.14"></div> |
| 1945 | <h3 id="rfc.section.7.3.4"><a href="#rfc.section.7.3.4">7.3.4</a> <a href="#status.303">303 See Other</a></h3> |
| 1946 | <p id="rfc.section.7.3.4.p.1">The 303 status code indicates that the server is redirecting the user agent to a different resource, as indicated by a URI |
| 1947 | in the Location header field, that is intended to provide an indirect response to the original request. In order to satisfy |
| 1948 | the original request, a user agent <em class="bcp14">SHOULD</em> perform a retrieval request using the Location URI (a GET or HEAD request if using HTTP), which may itself be redirected further, |
| 1949 | and present the eventual result as an answer to the original request. Note that the new URI in the Location header field is |
| 1950 | not considered equivalent to the effective request URI. |
| 1951 | </p> |
| 1952 | <p id="rfc.section.7.3.4.p.2">This status code is generally applicable to any HTTP method. It is primarily used to allow the output of a POST action to |
| 1953 | redirect the user agent to a selected resource, since doing so provides the information corresponding to the POST response |
| 1954 | in a form that can be separately identified, bookmarked, and cached independent of the original request. |
| 1955 | </p> |
| 1956 | <p id="rfc.section.7.3.4.p.3">A 303 response to a GET request indicates that the requested resource does not have a representation of its own that can be |
| 1957 | transferred by the server over HTTP. The Location URI indicates a resource that is descriptive of the target resource, such |
| 1958 | that the follow-on representation might be useful to recipients without implying that it adequately represents the target |
| 1959 | resource. Note that answers to the questions of what can be represented, what representations are adequate, and what might |
| 1960 | be a useful description are outside the scope of HTTP and thus entirely determined by the URI owner(s). |
| 1961 | </p> |
| 1962 | <p id="rfc.section.7.3.4.p.4">Except for responses to a HEAD request, the representation of a 303 response <em class="bcp14">SHOULD</em> contain a short hypertext note with a hyperlink to the Location URI. |
| 1963 | </p> |
| 1964 | </div> |
| 1965 | <div id="status.304"> |
| 1966 | <div id="rfc.iref.3.5"></div> |
| 1967 | <div id="rfc.iref.s.15"></div> |
| 1968 | <h3 id="rfc.section.7.3.5"><a href="#rfc.section.7.3.5">7.3.5</a> <a href="#status.304">304 Not Modified</a></h3> |
| 1969 | <p id="rfc.section.7.3.5.p.1">The response to the request has not been modified since the conditions indicated by the client's conditional GET request, |
| 1970 | as defined in <a href="p4-conditional.html#status.304" title="304 Not Modified">Section 4.1</a> of <a href="#Part4" id="rfc.xref.Part4.10"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>. |
| 1971 | </p> |
| 1972 | </div> |
| 1973 | <div id="status.305"> |
| 1974 | <div id="rfc.iref.3.6"></div> |
| 1975 | <div id="rfc.iref.s.16"></div> |
| 1976 | <h3 id="rfc.section.7.3.6"><a href="#rfc.section.7.3.6">7.3.6</a> <a href="#status.305">305 Use Proxy</a></h3> |
| 1977 | <p id="rfc.section.7.3.6.p.1">The 305 status code was defined in a previous version of this specification (see <a href="#changes.from.rfc.2616" title="Changes from RFC 2616">Appendix A</a>), and is now deprecated. |
| 1978 | </p> |
| 1979 | </div> |
| 1980 | <div id="status.306"> |
| 1981 | <div id="rfc.iref.3.7"></div> |
| 1982 | <div id="rfc.iref.s.17"></div> |
| 1983 | <h3 id="rfc.section.7.3.7"><a href="#rfc.section.7.3.7">7.3.7</a> <a href="#status.306">306 (Unused)</a></h3> |
| 1984 | <p id="rfc.section.7.3.7.p.1">The 306 status code was used in a previous version of the specification, is no longer used, and the code is reserved.</p> |
| 1985 | </div> |
| 1986 | <div id="status.307"> |
| 1987 | <div id="rfc.iref.3.8"></div> |
| 1988 | <div id="rfc.iref.s.18"></div> |
| 1989 | <h3 id="rfc.section.7.3.8"><a href="#rfc.section.7.3.8">7.3.8</a> <a href="#status.307">307 Temporary Redirect</a></h3> |
| 1990 | <p id="rfc.section.7.3.8.p.1">The target resource resides temporarily under a different URI. Since the redirection can change over time, the client <em class="bcp14">SHOULD</em> continue to use the effective request URI for future requests. |
| 1991 | </p> |
| 1992 | <p id="rfc.section.7.3.8.p.2">The temporary URI <em class="bcp14">SHOULD</em> be given by the Location field in the response. Unless the request method was HEAD, the representation of the response <em class="bcp14">SHOULD</em> contain a short hypertext note with a hyperlink to the new URI(s), since many pre-HTTP/1.1 user agents do not understand the |
| 1993 | 307 status code. Therefore, the note <em class="bcp14">SHOULD</em> contain the information necessary for a user to repeat the original request on the new URI. |
| 1994 | </p> |
| 1995 | <p id="rfc.section.7.3.8.p.3">If the 307 status code is received in response to a request method that is known to be "safe", as defined in <a href="#safe.methods" title="Safe Methods">Section 6.1.1</a>, then the request <em class="bcp14">MAY</em> be automatically redirected by the user agent without confirmation. Otherwise, the user agent <em class="bcp14">MUST NOT</em> automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which |
| 1996 | the request was issued. |
| 1997 | </p> |
| 1998 | <div class="note" id="rfc.section.7.3.8.p.4"> |
| 1999 | <p><b>Note:</b> This status code is similar to 302 Found, except that it does not allow rewriting the request method from POST to GET. This |
| 2000 | specification defines no equivalent counterpart for 301 Moved Permanently. |
| 2001 | </p> |
| 2002 | </div> |
| 2003 | </div> |
| 2004 | </div> |
| 2005 | <div id="status.4xx"> |
| 2006 | <h2 id="rfc.section.7.4"><a href="#rfc.section.7.4">7.4</a> <a href="#status.4xx">Client Error 4xx</a></h2> |
| 2007 | <p id="rfc.section.7.4.p.1">The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD |
| 2008 | request, the server <em class="bcp14">SHOULD</em> include a representation containing an explanation of the error situation, and whether it is a temporary or permanent condition. |
| 2009 | These status codes are applicable to any request method. User agents <em class="bcp14">SHOULD</em> display any included representation to the user. |
| 2010 | </p> |
| 2011 | <p id="rfc.section.7.4.p.2">If the client is sending data, a server implementation using TCP <em class="bcp14">SHOULD</em> be careful to ensure that the client acknowledges receipt of the packet(s) containing the response, before the server closes |
| 2012 | the input connection. If the client continues sending data to the server after the close, the server's TCP stack will send |
| 2013 | a reset packet to the client, which might erase the client's unacknowledged input buffers before they can be read and interpreted |
| 2014 | by the HTTP application. |
| 2015 | </p> |
| 2016 | <div id="status.400"> |
| 2017 | <div id="rfc.iref.4.1"></div> |
| 2018 | <div id="rfc.iref.s.19"></div> |
| 2019 | <h3 id="rfc.section.7.4.1"><a href="#rfc.section.7.4.1">7.4.1</a> <a href="#status.400">400 Bad Request</a></h3> |
| 2020 | <p id="rfc.section.7.4.1.p.1">The server cannot or will not process the request, due to a client error (e.g., malformed syntax).</p> |
| 2021 | </div> |
| 2022 | <div id="status.401"> |
| 2023 | <div id="rfc.iref.4.2"></div> |
| 2024 | <div id="rfc.iref.s.20"></div> |
| 2025 | <h3 id="rfc.section.7.4.2"><a href="#rfc.section.7.4.2">7.4.2</a> <a href="#status.401">401 Unauthorized</a></h3> |
| 2026 | <p id="rfc.section.7.4.2.p.1">The request requires user authentication (see <a href="p7-auth.html#status.401" title="401 Unauthorized">Section 3.1</a> of <a href="#Part7" id="rfc.xref.Part7.8"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a>). |
| 2027 | </p> |
| 2028 | </div> |
| 2029 | <div id="status.402"> |
| 2030 | <div id="rfc.iref.4.3"></div> |
| 2031 | <div id="rfc.iref.s.21"></div> |
| 2032 | <h3 id="rfc.section.7.4.3"><a href="#rfc.section.7.4.3">7.4.3</a> <a href="#status.402">402 Payment Required</a></h3> |
| 2033 | <p id="rfc.section.7.4.3.p.1">This code is reserved for future use.</p> |
| 2034 | </div> |
| 2035 | <div id="status.403"> |
| 2036 | <div id="rfc.iref.4.4"></div> |
| 2037 | <div id="rfc.iref.s.22"></div> |
| 2038 | <h3 id="rfc.section.7.4.4"><a href="#rfc.section.7.4.4">7.4.4</a> <a href="#status.403">403 Forbidden</a></h3> |
| 2039 | <p id="rfc.section.7.4.4.p.1">The server understood the request, but refuses to authorize it. Providing different user authentication credentials might |
| 2040 | be successful, but any credentials that were provided in the request are insufficient. The request <em class="bcp14">SHOULD NOT</em> be repeated with the same credentials. |
| 2041 | </p> |
| 2042 | <p id="rfc.section.7.4.4.p.2">If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it <em class="bcp14">SHOULD</em> describe the reason for the refusal in the representation. If the server does not wish to make this information available |
| 2043 | to the client, the status code 404 (Not Found) <em class="bcp14">MAY</em> be used instead. |
| 2044 | </p> |
| 2045 | </div> |
| 2046 | <div id="status.404"> |
| 2047 | <div id="rfc.iref.4.5"></div> |
| 2048 | <div id="rfc.iref.s.23"></div> |
| 2049 | <h3 id="rfc.section.7.4.5"><a href="#rfc.section.7.4.5">7.4.5</a> <a href="#status.404">404 Not Found</a></h3> |
| 2050 | <p id="rfc.section.7.4.5.p.1">The server has not found anything matching the effective request URI. No indication is given of whether the condition is temporary |
| 2051 | or permanent. The 410 (Gone) status code <em class="bcp14">SHOULD</em> be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable |
| 2052 | and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request |
| 2053 | has been refused, or when no other response is applicable. |
| 2054 | </p> |
| 2055 | </div> |
| 2056 | <div id="status.405"> |
| 2057 | <div id="rfc.iref.4.6"></div> |
| 2058 | <div id="rfc.iref.s.24"></div> |
| 2059 | <h3 id="rfc.section.7.4.6"><a href="#rfc.section.7.4.6">7.4.6</a> <a href="#status.405">405 Method Not Allowed</a></h3> |
| 2060 | <p id="rfc.section.7.4.6.p.1">The method specified in the Request-Line is not allowed for the target resource. The response <em class="bcp14">MUST</em> include an Allow header field containing a list of valid methods for the requested resource. |
| 2061 | </p> |
| 2062 | </div> |
| 2063 | <div id="status.406"> |
| 2064 | <div id="rfc.iref.4.7"></div> |
| 2065 | <div id="rfc.iref.s.25"></div> |
| 2066 | <h3 id="rfc.section.7.4.7"><a href="#rfc.section.7.4.7">7.4.7</a> <a href="#status.406">406 Not Acceptable</a></h3> |
| 2067 | <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 |
| 2068 | 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.11"><cite title="HTTP/1.1, part 3: Message Payload and Content Negotiation">[Part3]</cite></a>). |
| 2069 | </p> |
| 2070 | <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 |
| 2071 | or user agent can choose the one most appropriate. The data format is specified by the media type given in the Content-Type |
| 2072 | header field. Depending upon the format and the capabilities of the user agent, selection of the most appropriate choice <em class="bcp14">MAY</em> be performed automatically. However, this specification does not define any standard for such automatic selection. |
| 2073 | </p> |
| 2074 | <div class="note" id="rfc.section.7.4.7.p.3"> |
| 2075 | <p><b>Note:</b> HTTP/1.1 servers are allowed to return responses which are not acceptable according to the accept header fields sent in the |
| 2076 | request. In some cases, this might even be preferable to sending a 406 response. User agents are encouraged to inspect the |
| 2077 | header fields of an incoming response to determine if it is acceptable. |
| 2078 | </p> |
| 2079 | </div> |
| 2080 | <p id="rfc.section.7.4.7.p.4">If the response could be unacceptable, a user agent <em class="bcp14">SHOULD</em> temporarily stop receipt of more data and query the user for a decision on further actions. |
| 2081 | </p> |
| 2082 | </div> |
| 2083 | <div id="status.407"> |
| 2084 | <div id="rfc.iref.4.8"></div> |
| 2085 | <div id="rfc.iref.s.26"></div> |
| 2086 | <h3 id="rfc.section.7.4.8"><a href="#rfc.section.7.4.8">7.4.8</a> <a href="#status.407">407 Proxy Authentication Required</a></h3> |
| 2087 | <p id="rfc.section.7.4.8.p.1">This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate itself with the proxy (see <a href="p7-auth.html#status.407" title="407 Proxy Authentication Required">Section 3.2</a> of <a href="#Part7" id="rfc.xref.Part7.9"><cite title="HTTP/1.1, part 7: Authentication">[Part7]</cite></a>). |
| 2088 | </p> |
| 2089 | </div> |
| 2090 | <div id="status.408"> |
| 2091 | <div id="rfc.iref.4.9"></div> |
| 2092 | <div id="rfc.iref.s.27"></div> |
| 2093 | <h3 id="rfc.section.7.4.9"><a href="#rfc.section.7.4.9">7.4.9</a> <a href="#status.408">408 Request Timeout</a></h3> |
| 2094 | <p id="rfc.section.7.4.9.p.1">The client did not produce a request within the time that the server was prepared to wait. The client <em class="bcp14">MAY</em> repeat the request without modifications at any later time. |
| 2095 | </p> |
| 2096 | </div> |
| 2097 | <div id="status.409"> |
| 2098 | <div id="rfc.iref.4.10"></div> |
| 2099 | <div id="rfc.iref.s.28"></div> |
| 2100 | <h3 id="rfc.section.7.4.10"><a href="#rfc.section.7.4.10">7.4.10</a> <a href="#status.409">409 Conflict</a></h3> |
| 2101 | <p id="rfc.section.7.4.10.p.1">The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in |
| 2102 | situations where it is expected that the user might be able to resolve the conflict and resubmit the request. The response |
| 2103 | body <em class="bcp14">SHOULD</em> include enough information for the user to recognize the source of the conflict. Ideally, the response representation would |
| 2104 | include enough information for the user or user agent to fix the problem; however, that might not be possible and is not required. |
| 2105 | </p> |
| 2106 | <p id="rfc.section.7.4.10.p.2">Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the representation |
| 2107 | being PUT included changes to a resource which conflict with those made by an earlier (third-party) request, the server might |
| 2108 | use the 409 response to indicate that it can't complete the request. In this case, the response representation would likely |
| 2109 | contain a list of the differences between the two versions in a format defined by the response Content-Type. |
| 2110 | </p> |
| 2111 | </div> |
| 2112 | <div id="status.410"> |
| 2113 | <div id="rfc.iref.4.11"></div> |
| 2114 | <div id="rfc.iref.s.29"></div> |
| 2115 | <h3 id="rfc.section.7.4.11"><a href="#rfc.section.7.4.11">7.4.11</a> <a href="#status.410">410 Gone</a></h3> |
| 2116 | <p id="rfc.section.7.4.11.p.1">The target resource is no longer available at the server and no forwarding address is known. This condition is expected to |
| 2117 | be considered permanent. Clients with link editing capabilities <em class="bcp14">SHOULD</em> delete references to the effective request URI after user approval. If the server does not know, or has no facility to determine, |
| 2118 | whether or not the condition is permanent, the status code 404 (Not Found) <em class="bcp14">SHOULD</em> be used instead. |
| 2119 | </p> |
| 2120 | <p id="rfc.section.7.4.11.p.2">The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource |
| 2121 | is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event |
| 2122 | is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server's |
| 2123 | site. It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time |
| 2124 | — that is left to the discretion of the server owner. |
| 2125 | </p> |
| 2126 | <p id="rfc.section.7.4.11.p.3">Caches <em class="bcp14">MAY</em> use a heuristic (see <a href="p6-cache.html#heuristic.freshness" title="Calculating Heuristic Freshness">Section 2.3.1.1</a> of <a href="#Part6" id="rfc.xref.Part6.18"><cite title="HTTP/1.1, part 6: Caching">[Part6]</cite></a>) to determine freshness for 410 responses. |
| 2127 | </p> |
| 2128 | </div> |
| 2129 | <div id="status.411"> |
| 2130 | <div id="rfc.iref.4.12"></div> |
| 2131 | <div id="rfc.iref.s.30"></div> |
| 2132 | <h3 id="rfc.section.7.4.12"><a href="#rfc.section.7.4.12">7.4.12</a> <a href="#status.411">411 Length Required</a></h3> |
| 2133 | <p id="rfc.section.7.4.12.p.1">The server refuses to accept the request without a defined Content-Length. The client <em class="bcp14">MAY</em> repeat the request if it adds a valid Content-Length header field containing the length of the message-body in the request |
| 2134 | message. |
| 2135 | </p> |
| 2136 | </div> |
| 2137 | <div id="status.412"> |
| 2138 | <div id="rfc.iref.4.13"></div> |
| 2139 | <div id="rfc.iref.s.31"></div> |
| 2140 | <h3 id="rfc.section.7.4.13"><a href="#rfc.section.7.4.13">7.4.13</a> <a href="#status.412">412 Precondition Failed</a></h3> |
| 2141 | <p id="rfc.section.7.4.13.p.1">The precondition given in one or more of the header fields evaluated to false when it was tested on the server, as defined |
| 2142 | in <a href="p4-conditional.html#status.412" title="412 Precondition Failed">Section 4.2</a> of <a href="#Part4" id="rfc.xref.Part4.11"><cite title="HTTP/1.1, part 4: Conditional Requests">[Part4]</cite></a>. |
| 2143 | </p> |
| 2144 | </div> |
| 2145 | <div id="status.413"> |
| 2146 | <div id="rfc.iref.4.14"></div> |
| 2147 | <div id="rfc.iref.s.32"></div> |
| 2148 | <h3 id="rfc.section.7.4.14"><a href="#rfc.section.7.4.14">7.4.14</a> <a href="#status.413">413 Request Representation Too Large</a></h3> |
| 2149 | <p id="rfc.section.7.4.14.p.1">The server is refusing to process a request because the request representation is larger than the server is willing or able |
| 2150 | to process. The server <em class="bcp14">MAY</em> close the connection to prevent the client from continuing the request. |
| 2151 | </p> |
| 2152 | <p id="rfc.section.7.4.14.p.2">If the condition is temporary, the server <em class="bcp14">SHOULD</em> include a Retry-After header field to indicate that it is temporary and after what time the client <em class="bcp14">MAY</em> try again. |
| 2153 | </p> |
| 2154 | </div> |
| 2155 | <div id="status.414"> |
| 2156 | <div id="rfc.iref.4.15"></div> |
| 2157 | <div id="rfc.iref.s.33"></div> |
| 2158 | <h3 id="rfc.section.7.4.15"><a href="#rfc.section.7.4.15">7.4.15</a> <a href="#status.414">414 URI Too Long</a></h3> |
| 2159 | <p id="rfc.section.7.4.15.p.1">The server is refusing to service the request because the effective request URI is longer than the server is willing to interpret. |
| 2160 | This rare condition is only likely to occur when a client has improperly converted a POST request to a GET request with long |
| 2161 | query information, when the client has descended into a URI "black hole" of redirection (e.g., a redirected URI prefix that |
| 2162 | points to a suffix of itself), or when the server is under attack by a client attempting to exploit security holes present |
| 2163 | in some servers using fixed-length buffers for reading or manipulating the effective request URI. |
| 2164 | </p> |
| 2165 | </div> |
| 2166 | <div id="status.415"> |
| 2167 | <div id="rfc.iref.4.16"></div> |
| 2168 | <div id="rfc.iref.s.34"></div> |
| 2169 | <h3 id="rfc.section.7.4.16"><a href="#rfc.section.7.4.16">7.4.16</a> <a href="#status.415">415 Unsupported Media Type</a></h3> |
| 2170 | <p id="rfc.section.7.4.16.p.1">The server is refusing to service the request because the request payload is in a format not supported by this request method |
| 2171 | on the target resource. |
| 2172 | </p> |
| 2173 | </div> |
| 2174 | <div id="status.416"> |
| 2175 | <div id="rfc.iref.4.17"></div> |
| 2176 | <div id="rfc.iref.s.35"></div> |
| 2177 | <h3 id="rfc.section.7.4.17"><a href="#rfc.section.7.4.17">7.4.17</a> <a href="#status.416">416 Requested Range Not Satisfiable</a></h3> |
| 2178 | <p id="rfc.section.7.4.17.p.1">The request included a Range header field (<a href="p5-range.html#header.range" title="Range">Section 5.4</a> of <a href="#Part5" id="rfc.xref.Part5.9"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>) and none of the range-specifier values in this field overlap the current extent of the selected resource. See <a href="p5-range.html#status.416" title="416 Requested Range Not Satisfiable">Section 3.2</a> of <a href="#Part5" id="rfc.xref.Part5.10"><cite title="HTTP/1.1, part 5: Range Requests and Partial Responses">[Part5]</cite></a>. |
| 2179 | </p> |
| 2180 | </div> |
| 2181 | <div id="status.417"> |
| 2182 | <div id="rfc.iref.4.18"></div> |
| 2183 | <div id="rfc.iref.s.36"></div> |
| 2184 | <h3 id="rfc.section.7.4.18"><a href="#rfc.section.7.4.18">7.4.18</a> <a href="#status.417">417 Expectation Failed</a></h3> |
| 2185 | <p id="rfc.section.7.4.18.p.1">The expectation given in an Expect header field (see <a href="#header.expect" id="rfc.xref.header.expect.2" title="Expect">Section 9.3</a>) could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could |
| 2186 | not be met by the next-hop server. |
| 2187 | </p> |
| 2188 | </div> |
| 2189 | <div id="status.426"> |
| 2190 | <div id="rfc.iref.4.19"></div> |
| 2191 | <div id="rfc.iref.s.37"></div> |
| 2192 | <h3 id="rfc.section.7.4.19"><a href="#rfc.section.7.4.19">7.4.19</a> <a href="#status.426">426 Upgrade Required</a></h3> |
| 2193 | <p id="rfc.section.7.4.19.p.1">The request can not be completed without a prior protocol upgrade. This response <em class="bcp14">MUST</em> include an Upgrade header field (<a href="p1-messaging.html#header.upgrade" title="Upgrade">Section 8.7</a> of <a href="#Part1" id="rfc.xref.Part1.36"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>) specifying the required protocols. |
| 2194 | </p> |
| 2195 | <div id="rfc.figure.u.8"></div> |
| 2196 | <p>Example:</p><pre class="text2">HTTP/1.1 426 Upgrade Required |