Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* |
michael@0 | 2 | * ==================================================================== |
michael@0 | 3 | * Licensed to the Apache Software Foundation (ASF) under one |
michael@0 | 4 | * or more contributor license agreements. See the NOTICE file |
michael@0 | 5 | * distributed with this work for additional information |
michael@0 | 6 | * regarding copyright ownership. The ASF licenses this file |
michael@0 | 7 | * to you under the Apache License, Version 2.0 (the |
michael@0 | 8 | * "License"); you may not use this file except in compliance |
michael@0 | 9 | * with the License. You may obtain a copy of the License at |
michael@0 | 10 | * |
michael@0 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
michael@0 | 12 | * |
michael@0 | 13 | * Unless required by applicable law or agreed to in writing, |
michael@0 | 14 | * software distributed under the License is distributed on an |
michael@0 | 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
michael@0 | 16 | * KIND, either express or implied. See the License for the |
michael@0 | 17 | * specific language governing permissions and limitations |
michael@0 | 18 | * under the License. |
michael@0 | 19 | * ==================================================================== |
michael@0 | 20 | * |
michael@0 | 21 | * This software consists of voluntary contributions made by many |
michael@0 | 22 | * individuals on behalf of the Apache Software Foundation. For more |
michael@0 | 23 | * information on the Apache Software Foundation, please see |
michael@0 | 24 | * <http://www.apache.org/>. |
michael@0 | 25 | * |
michael@0 | 26 | */ |
michael@0 | 27 | |
michael@0 | 28 | package ch.boye.httpclientandroidlib; |
michael@0 | 29 | |
michael@0 | 30 | /** |
michael@0 | 31 | * Constants enumerating the HTTP status codes. |
michael@0 | 32 | * All status codes defined in RFC1945 (HTTP/1.0), RFC2616 (HTTP/1.1), and |
michael@0 | 33 | * RFC2518 (WebDAV) are listed. |
michael@0 | 34 | * |
michael@0 | 35 | * @see StatusLine |
michael@0 | 36 | * |
michael@0 | 37 | * @since 4.0 |
michael@0 | 38 | */ |
michael@0 | 39 | public interface HttpStatus { |
michael@0 | 40 | |
michael@0 | 41 | // --- 1xx Informational --- |
michael@0 | 42 | |
michael@0 | 43 | /** <tt>100 Continue</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 44 | public static final int SC_CONTINUE = 100; |
michael@0 | 45 | /** <tt>101 Switching Protocols</tt> (HTTP/1.1 - RFC 2616)*/ |
michael@0 | 46 | public static final int SC_SWITCHING_PROTOCOLS = 101; |
michael@0 | 47 | /** <tt>102 Processing</tt> (WebDAV - RFC 2518) */ |
michael@0 | 48 | public static final int SC_PROCESSING = 102; |
michael@0 | 49 | |
michael@0 | 50 | // --- 2xx Success --- |
michael@0 | 51 | |
michael@0 | 52 | /** <tt>200 OK</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 53 | public static final int SC_OK = 200; |
michael@0 | 54 | /** <tt>201 Created</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 55 | public static final int SC_CREATED = 201; |
michael@0 | 56 | /** <tt>202 Accepted</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 57 | public static final int SC_ACCEPTED = 202; |
michael@0 | 58 | /** <tt>203 Non Authoritative Information</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 59 | public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203; |
michael@0 | 60 | /** <tt>204 No Content</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 61 | public static final int SC_NO_CONTENT = 204; |
michael@0 | 62 | /** <tt>205 Reset Content</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 63 | public static final int SC_RESET_CONTENT = 205; |
michael@0 | 64 | /** <tt>206 Partial Content</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 65 | public static final int SC_PARTIAL_CONTENT = 206; |
michael@0 | 66 | /** |
michael@0 | 67 | * <tt>207 Multi-Status</tt> (WebDAV - RFC 2518) or <tt>207 Partial Update |
michael@0 | 68 | * OK</tt> (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?) |
michael@0 | 69 | */ |
michael@0 | 70 | public static final int SC_MULTI_STATUS = 207; |
michael@0 | 71 | |
michael@0 | 72 | // --- 3xx Redirection --- |
michael@0 | 73 | |
michael@0 | 74 | /** <tt>300 Mutliple Choices</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 75 | public static final int SC_MULTIPLE_CHOICES = 300; |
michael@0 | 76 | /** <tt>301 Moved Permanently</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 77 | public static final int SC_MOVED_PERMANENTLY = 301; |
michael@0 | 78 | /** <tt>302 Moved Temporarily</tt> (Sometimes <tt>Found</tt>) (HTTP/1.0 - RFC 1945) */ |
michael@0 | 79 | public static final int SC_MOVED_TEMPORARILY = 302; |
michael@0 | 80 | /** <tt>303 See Other</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 81 | public static final int SC_SEE_OTHER = 303; |
michael@0 | 82 | /** <tt>304 Not Modified</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 83 | public static final int SC_NOT_MODIFIED = 304; |
michael@0 | 84 | /** <tt>305 Use Proxy</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 85 | public static final int SC_USE_PROXY = 305; |
michael@0 | 86 | /** <tt>307 Temporary Redirect</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 87 | public static final int SC_TEMPORARY_REDIRECT = 307; |
michael@0 | 88 | |
michael@0 | 89 | // --- 4xx Client Error --- |
michael@0 | 90 | |
michael@0 | 91 | /** <tt>400 Bad Request</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 92 | public static final int SC_BAD_REQUEST = 400; |
michael@0 | 93 | /** <tt>401 Unauthorized</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 94 | public static final int SC_UNAUTHORIZED = 401; |
michael@0 | 95 | /** <tt>402 Payment Required</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 96 | public static final int SC_PAYMENT_REQUIRED = 402; |
michael@0 | 97 | /** <tt>403 Forbidden</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 98 | public static final int SC_FORBIDDEN = 403; |
michael@0 | 99 | /** <tt>404 Not Found</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 100 | public static final int SC_NOT_FOUND = 404; |
michael@0 | 101 | /** <tt>405 Method Not Allowed</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 102 | public static final int SC_METHOD_NOT_ALLOWED = 405; |
michael@0 | 103 | /** <tt>406 Not Acceptable</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 104 | public static final int SC_NOT_ACCEPTABLE = 406; |
michael@0 | 105 | /** <tt>407 Proxy Authentication Required</tt> (HTTP/1.1 - RFC 2616)*/ |
michael@0 | 106 | public static final int SC_PROXY_AUTHENTICATION_REQUIRED = 407; |
michael@0 | 107 | /** <tt>408 Request Timeout</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 108 | public static final int SC_REQUEST_TIMEOUT = 408; |
michael@0 | 109 | /** <tt>409 Conflict</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 110 | public static final int SC_CONFLICT = 409; |
michael@0 | 111 | /** <tt>410 Gone</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 112 | public static final int SC_GONE = 410; |
michael@0 | 113 | /** <tt>411 Length Required</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 114 | public static final int SC_LENGTH_REQUIRED = 411; |
michael@0 | 115 | /** <tt>412 Precondition Failed</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 116 | public static final int SC_PRECONDITION_FAILED = 412; |
michael@0 | 117 | /** <tt>413 Request Entity Too Large</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 118 | public static final int SC_REQUEST_TOO_LONG = 413; |
michael@0 | 119 | /** <tt>414 Request-URI Too Long</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 120 | public static final int SC_REQUEST_URI_TOO_LONG = 414; |
michael@0 | 121 | /** <tt>415 Unsupported Media Type</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 122 | public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415; |
michael@0 | 123 | /** <tt>416 Requested Range Not Satisfiable</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 124 | public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416; |
michael@0 | 125 | /** <tt>417 Expectation Failed</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 126 | public static final int SC_EXPECTATION_FAILED = 417; |
michael@0 | 127 | |
michael@0 | 128 | /** |
michael@0 | 129 | * Static constant for a 418 error. |
michael@0 | 130 | * <tt>418 Unprocessable Entity</tt> (WebDAV drafts?) |
michael@0 | 131 | * or <tt>418 Reauthentication Required</tt> (HTTP/1.1 drafts?) |
michael@0 | 132 | */ |
michael@0 | 133 | // not used |
michael@0 | 134 | // public static final int SC_UNPROCESSABLE_ENTITY = 418; |
michael@0 | 135 | |
michael@0 | 136 | /** |
michael@0 | 137 | * Static constant for a 419 error. |
michael@0 | 138 | * <tt>419 Insufficient Space on Resource</tt> |
michael@0 | 139 | * (WebDAV - draft-ietf-webdav-protocol-05?) |
michael@0 | 140 | * or <tt>419 Proxy Reauthentication Required</tt> |
michael@0 | 141 | * (HTTP/1.1 drafts?) |
michael@0 | 142 | */ |
michael@0 | 143 | public static final int SC_INSUFFICIENT_SPACE_ON_RESOURCE = 419; |
michael@0 | 144 | /** |
michael@0 | 145 | * Static constant for a 420 error. |
michael@0 | 146 | * <tt>420 Method Failure</tt> |
michael@0 | 147 | * (WebDAV - draft-ietf-webdav-protocol-05?) |
michael@0 | 148 | */ |
michael@0 | 149 | public static final int SC_METHOD_FAILURE = 420; |
michael@0 | 150 | /** <tt>422 Unprocessable Entity</tt> (WebDAV - RFC 2518) */ |
michael@0 | 151 | public static final int SC_UNPROCESSABLE_ENTITY = 422; |
michael@0 | 152 | /** <tt>423 Locked</tt> (WebDAV - RFC 2518) */ |
michael@0 | 153 | public static final int SC_LOCKED = 423; |
michael@0 | 154 | /** <tt>424 Failed Dependency</tt> (WebDAV - RFC 2518) */ |
michael@0 | 155 | public static final int SC_FAILED_DEPENDENCY = 424; |
michael@0 | 156 | |
michael@0 | 157 | // --- 5xx Server Error --- |
michael@0 | 158 | |
michael@0 | 159 | /** <tt>500 Server Error</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 160 | public static final int SC_INTERNAL_SERVER_ERROR = 500; |
michael@0 | 161 | /** <tt>501 Not Implemented</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 162 | public static final int SC_NOT_IMPLEMENTED = 501; |
michael@0 | 163 | /** <tt>502 Bad Gateway</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 164 | public static final int SC_BAD_GATEWAY = 502; |
michael@0 | 165 | /** <tt>503 Service Unavailable</tt> (HTTP/1.0 - RFC 1945) */ |
michael@0 | 166 | public static final int SC_SERVICE_UNAVAILABLE = 503; |
michael@0 | 167 | /** <tt>504 Gateway Timeout</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 168 | public static final int SC_GATEWAY_TIMEOUT = 504; |
michael@0 | 169 | /** <tt>505 HTTP Version Not Supported</tt> (HTTP/1.1 - RFC 2616) */ |
michael@0 | 170 | public static final int SC_HTTP_VERSION_NOT_SUPPORTED = 505; |
michael@0 | 171 | |
michael@0 | 172 | /** <tt>507 Insufficient Storage</tt> (WebDAV - RFC 2518) */ |
michael@0 | 173 | public static final int SC_INSUFFICIENT_STORAGE = 507; |
michael@0 | 174 | |
michael@0 | 175 | } |