001: /*
002: * $HeadURL: https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0-beta1/module-main/src/main/java/org/apache/http/HttpStatus.java $
003: * $Revision: 503381 $
004: * $Date: 2007-02-04 11:59:10 +0100 (Sun, 04 Feb 2007) $
005: *
006: * ====================================================================
007: * Licensed to the Apache Software Foundation (ASF) under one
008: * or more contributor license agreements. See the NOTICE file
009: * distributed with this work for additional information
010: * regarding copyright ownership. The ASF licenses this file
011: * to you under the Apache License, Version 2.0 (the
012: * "License"); you may not use this file except in compliance
013: * with the License. You may obtain a copy of the License at
014: *
015: * http://www.apache.org/licenses/LICENSE-2.0
016: *
017: * Unless required by applicable law or agreed to in writing,
018: * software distributed under the License is distributed on an
019: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
020: * KIND, either express or implied. See the License for the
021: * specific language governing permissions and limitations
022: * under the License.
023: * ====================================================================
024: *
025: * This software consists of voluntary contributions made by many
026: * individuals on behalf of the Apache Software Foundation. For more
027: * information on the Apache Software Foundation, please see
028: * <http://www.apache.org/>.
029: *
030: */
031:
032: package org.apache.http;
033:
034: /**
035: * Constants enumerating the HTTP status codes.
036: * All status codes defined in RFC1945 (HTTP/1.0), RFC2616 (HTTP/1.1), and
037: * RFC2518 (WebDAV) are listed.
038: *
039: * @see StatusLine
040: * @author Unascribed
041: * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
042: * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
043: *
044: * @version $Revision: 503381 $
045: */
046: public interface HttpStatus {
047:
048: // --- 1xx Informational ---
049:
050: /** <tt>100 Continue</tt> (HTTP/1.1 - RFC 2616) */
051: public static final int SC_CONTINUE = 100;
052: /** <tt>101 Switching Protocols</tt> (HTTP/1.1 - RFC 2616)*/
053: public static final int SC_SWITCHING_PROTOCOLS = 101;
054: /** <tt>102 Processing</tt> (WebDAV - RFC 2518) */
055: public static final int SC_PROCESSING = 102;
056:
057: // --- 2xx Success ---
058:
059: /** <tt>200 OK</tt> (HTTP/1.0 - RFC 1945) */
060: public static final int SC_OK = 200;
061: /** <tt>201 Created</tt> (HTTP/1.0 - RFC 1945) */
062: public static final int SC_CREATED = 201;
063: /** <tt>202 Accepted</tt> (HTTP/1.0 - RFC 1945) */
064: public static final int SC_ACCEPTED = 202;
065: /** <tt>203 Non Authoritative Information</tt> (HTTP/1.1 - RFC 2616) */
066: public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203;
067: /** <tt>204 No Content</tt> (HTTP/1.0 - RFC 1945) */
068: public static final int SC_NO_CONTENT = 204;
069: /** <tt>205 Reset Content</tt> (HTTP/1.1 - RFC 2616) */
070: public static final int SC_RESET_CONTENT = 205;
071: /** <tt>206 Partial Content</tt> (HTTP/1.1 - RFC 2616) */
072: public static final int SC_PARTIAL_CONTENT = 206;
073: /**
074: * <tt>207 Multi-Status</tt> (WebDAV - RFC 2518) or <tt>207 Partial Update
075: * OK</tt> (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)
076: */
077: public static final int SC_MULTI_STATUS = 207;
078:
079: // --- 3xx Redirection ---
080:
081: /** <tt>300 Mutliple Choices</tt> (HTTP/1.1 - RFC 2616) */
082: public static final int SC_MULTIPLE_CHOICES = 300;
083: /** <tt>301 Moved Permanently</tt> (HTTP/1.0 - RFC 1945) */
084: public static final int SC_MOVED_PERMANENTLY = 301;
085: /** <tt>302 Moved Temporarily</tt> (Sometimes <tt>Found</tt>) (HTTP/1.0 - RFC 1945) */
086: public static final int SC_MOVED_TEMPORARILY = 302;
087: /** <tt>303 See Other</tt> (HTTP/1.1 - RFC 2616) */
088: public static final int SC_SEE_OTHER = 303;
089: /** <tt>304 Not Modified</tt> (HTTP/1.0 - RFC 1945) */
090: public static final int SC_NOT_MODIFIED = 304;
091: /** <tt>305 Use Proxy</tt> (HTTP/1.1 - RFC 2616) */
092: public static final int SC_USE_PROXY = 305;
093: /** <tt>307 Temporary Redirect</tt> (HTTP/1.1 - RFC 2616) */
094: public static final int SC_TEMPORARY_REDIRECT = 307;
095:
096: // --- 4xx Client Error ---
097:
098: /** <tt>400 Bad Request</tt> (HTTP/1.1 - RFC 2616) */
099: public static final int SC_BAD_REQUEST = 400;
100: /** <tt>401 Unauthorized</tt> (HTTP/1.0 - RFC 1945) */
101: public static final int SC_UNAUTHORIZED = 401;
102: /** <tt>402 Payment Required</tt> (HTTP/1.1 - RFC 2616) */
103: public static final int SC_PAYMENT_REQUIRED = 402;
104: /** <tt>403 Forbidden</tt> (HTTP/1.0 - RFC 1945) */
105: public static final int SC_FORBIDDEN = 403;
106: /** <tt>404 Not Found</tt> (HTTP/1.0 - RFC 1945) */
107: public static final int SC_NOT_FOUND = 404;
108: /** <tt>405 Method Not Allowed</tt> (HTTP/1.1 - RFC 2616) */
109: public static final int SC_METHOD_NOT_ALLOWED = 405;
110: /** <tt>406 Not Acceptable</tt> (HTTP/1.1 - RFC 2616) */
111: public static final int SC_NOT_ACCEPTABLE = 406;
112: /** <tt>407 Proxy Authentication Required</tt> (HTTP/1.1 - RFC 2616)*/
113: public static final int SC_PROXY_AUTHENTICATION_REQUIRED = 407;
114: /** <tt>408 Request Timeout</tt> (HTTP/1.1 - RFC 2616) */
115: public static final int SC_REQUEST_TIMEOUT = 408;
116: /** <tt>409 Conflict</tt> (HTTP/1.1 - RFC 2616) */
117: public static final int SC_CONFLICT = 409;
118: /** <tt>410 Gone</tt> (HTTP/1.1 - RFC 2616) */
119: public static final int SC_GONE = 410;
120: /** <tt>411 Length Required</tt> (HTTP/1.1 - RFC 2616) */
121: public static final int SC_LENGTH_REQUIRED = 411;
122: /** <tt>412 Precondition Failed</tt> (HTTP/1.1 - RFC 2616) */
123: public static final int SC_PRECONDITION_FAILED = 412;
124: /** <tt>413 Request Entity Too Large</tt> (HTTP/1.1 - RFC 2616) */
125: public static final int SC_REQUEST_TOO_LONG = 413;
126: /** <tt>414 Request-URI Too Long</tt> (HTTP/1.1 - RFC 2616) */
127: public static final int SC_REQUEST_URI_TOO_LONG = 414;
128: /** <tt>415 Unsupported Media Type</tt> (HTTP/1.1 - RFC 2616) */
129: public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415;
130: /** <tt>416 Requested Range Not Satisfiable</tt> (HTTP/1.1 - RFC 2616) */
131: public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
132: /** <tt>417 Expectation Failed</tt> (HTTP/1.1 - RFC 2616) */
133: public static final int SC_EXPECTATION_FAILED = 417;
134:
135: /**
136: * Static constant for a 418 error.
137: * <tt>418 Unprocessable Entity</tt> (WebDAV drafts?)
138: * or <tt>418 Reauthentication Required</tt> (HTTP/1.1 drafts?)
139: */
140: // not used
141: // public static final int SC_UNPROCESSABLE_ENTITY = 418;
142: /**
143: * Static constant for a 419 error.
144: * <tt>419 Insufficient Space on Resource</tt>
145: * (WebDAV - draft-ietf-webdav-protocol-05?)
146: * or <tt>419 Proxy Reauthentication Required</tt>
147: * (HTTP/1.1 drafts?)
148: */
149: public static final int SC_INSUFFICIENT_SPACE_ON_RESOURCE = 419;
150: /**
151: * Static constant for a 420 error.
152: * <tt>420 Method Failure</tt>
153: * (WebDAV - draft-ietf-webdav-protocol-05?)
154: */
155: public static final int SC_METHOD_FAILURE = 420;
156: /** <tt>422 Unprocessable Entity</tt> (WebDAV - RFC 2518) */
157: public static final int SC_UNPROCESSABLE_ENTITY = 422;
158: /** <tt>423 Locked</tt> (WebDAV - RFC 2518) */
159: public static final int SC_LOCKED = 423;
160: /** <tt>424 Failed Dependency</tt> (WebDAV - RFC 2518) */
161: public static final int SC_FAILED_DEPENDENCY = 424;
162:
163: // --- 5xx Server Error ---
164:
165: /** <tt>500 Server Error</tt> (HTTP/1.0 - RFC 1945) */
166: public static final int SC_INTERNAL_SERVER_ERROR = 500;
167: /** <tt>501 Not Implemented</tt> (HTTP/1.0 - RFC 1945) */
168: public static final int SC_NOT_IMPLEMENTED = 501;
169: /** <tt>502 Bad Gateway</tt> (HTTP/1.0 - RFC 1945) */
170: public static final int SC_BAD_GATEWAY = 502;
171: /** <tt>503 Service Unavailable</tt> (HTTP/1.0 - RFC 1945) */
172: public static final int SC_SERVICE_UNAVAILABLE = 503;
173: /** <tt>504 Gateway Timeout</tt> (HTTP/1.1 - RFC 2616) */
174: public static final int SC_GATEWAY_TIMEOUT = 504;
175: /** <tt>505 HTTP Version Not Supported</tt> (HTTP/1.1 - RFC 2616) */
176: public static final int SC_HTTP_VERSION_NOT_SUPPORTED = 505;
177:
178: /** <tt>507 Insufficient Storage</tt> (WebDAV - RFC 2518) */
179: public static final int SC_INSUFFICIENT_STORAGE = 507;
180:
181: }
|