• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpStatus.java $
3  * $Revision: 503381 $
4  * $Date: 2007-02-04 02:59:10 -0800 (Sun, 04 Feb 2007) $
5  *
6  * ====================================================================
7  * Licensed to the Apache Software Foundation (ASF) under one
8  * or more contributor license agreements.  See the NOTICE file
9  * distributed with this work for additional information
10  * regarding copyright ownership.  The ASF licenses this file
11  * to you under the Apache License, Version 2.0 (the
12  * "License"); you may not use this file except in compliance
13  * with the License.  You may obtain a copy of the License at
14  *
15  *   http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing,
18  * software distributed under the License is distributed on an
19  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20  * KIND, either express or implied.  See the License for the
21  * specific language governing permissions and limitations
22  * under the License.
23  * ====================================================================
24  *
25  * This software consists of voluntary contributions made by many
26  * individuals on behalf of the Apache Software Foundation.  For more
27  * information on the Apache Software Foundation, please see
28  * <http://www.apache.org/>.
29  *
30  */
31 
32 package org.apache.http;
33 
34 /**
35  * Constants enumerating the HTTP status codes.
36  * All status codes defined in RFC1945 (HTTP/1.0), RFC2616 (HTTP/1.1), and
37  * RFC2518 (WebDAV) are listed.
38  *
39  * @see StatusLine
40  * @author Unascribed
41  * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
42  * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a>
43  *
44  * @version $Revision: 503381 $
45  */
46 public interface HttpStatus {
47 
48     // --- 1xx Informational ---
49 
50     /** <tt>100 Continue</tt> (HTTP/1.1 - RFC 2616) */
51     public static final int SC_CONTINUE = 100;
52     /** <tt>101 Switching Protocols</tt> (HTTP/1.1 - RFC 2616)*/
53     public static final int SC_SWITCHING_PROTOCOLS = 101;
54     /** <tt>102 Processing</tt> (WebDAV - RFC 2518) */
55     public static final int SC_PROCESSING = 102;
56 
57     // --- 2xx Success ---
58 
59     /** <tt>200 OK</tt> (HTTP/1.0 - RFC 1945) */
60     public static final int SC_OK = 200;
61     /** <tt>201 Created</tt> (HTTP/1.0 - RFC 1945) */
62     public static final int SC_CREATED = 201;
63     /** <tt>202 Accepted</tt> (HTTP/1.0 - RFC 1945) */
64     public static final int SC_ACCEPTED = 202;
65     /** <tt>203 Non Authoritative Information</tt> (HTTP/1.1 - RFC 2616) */
66     public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203;
67     /** <tt>204 No Content</tt> (HTTP/1.0 - RFC 1945) */
68     public static final int SC_NO_CONTENT = 204;
69     /** <tt>205 Reset Content</tt> (HTTP/1.1 - RFC 2616) */
70     public static final int SC_RESET_CONTENT = 205;
71     /** <tt>206 Partial Content</tt> (HTTP/1.1 - RFC 2616) */
72     public static final int SC_PARTIAL_CONTENT = 206;
73     /**
74      * <tt>207 Multi-Status</tt> (WebDAV - RFC 2518) or <tt>207 Partial Update
75      * OK</tt> (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)
76      */
77     public static final int SC_MULTI_STATUS = 207;
78 
79     // --- 3xx Redirection ---
80 
81     /** <tt>300 Mutliple Choices</tt> (HTTP/1.1 - RFC 2616) */
82     public static final int SC_MULTIPLE_CHOICES = 300;
83     /** <tt>301 Moved Permanently</tt> (HTTP/1.0 - RFC 1945) */
84     public static final int SC_MOVED_PERMANENTLY = 301;
85     /** <tt>302 Moved Temporarily</tt> (Sometimes <tt>Found</tt>) (HTTP/1.0 - RFC 1945) */
86     public static final int SC_MOVED_TEMPORARILY = 302;
87     /** <tt>303 See Other</tt> (HTTP/1.1 - RFC 2616) */
88     public static final int SC_SEE_OTHER = 303;
89     /** <tt>304 Not Modified</tt> (HTTP/1.0 - RFC 1945) */
90     public static final int SC_NOT_MODIFIED = 304;
91     /** <tt>305 Use Proxy</tt> (HTTP/1.1 - RFC 2616) */
92     public static final int SC_USE_PROXY = 305;
93     /** <tt>307 Temporary Redirect</tt> (HTTP/1.1 - RFC 2616) */
94     public static final int SC_TEMPORARY_REDIRECT = 307;
95 
96     // --- 4xx Client Error ---
97 
98     /** <tt>400 Bad Request</tt> (HTTP/1.1 - RFC 2616) */
99     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     /**
144      * Static constant for a 419 error.
145      * <tt>419 Insufficient Space on Resource</tt>
146      * (WebDAV - draft-ietf-webdav-protocol-05?)
147      * or <tt>419 Proxy Reauthentication Required</tt>
148      * (HTTP/1.1 drafts?)
149      */
150     public static final int SC_INSUFFICIENT_SPACE_ON_RESOURCE = 419;
151     /**
152      * Static constant for a 420 error.
153      * <tt>420 Method Failure</tt>
154      * (WebDAV - draft-ietf-webdav-protocol-05?)
155      */
156     public static final int SC_METHOD_FAILURE = 420;
157     /** <tt>422 Unprocessable Entity</tt> (WebDAV - RFC 2518) */
158     public static final int SC_UNPROCESSABLE_ENTITY = 422;
159     /** <tt>423 Locked</tt> (WebDAV - RFC 2518) */
160     public static final int SC_LOCKED = 423;
161     /** <tt>424 Failed Dependency</tt> (WebDAV - RFC 2518) */
162     public static final int SC_FAILED_DEPENDENCY = 424;
163 
164     // --- 5xx Server Error ---
165 
166     /** <tt>500 Server Error</tt> (HTTP/1.0 - RFC 1945) */
167     public static final int SC_INTERNAL_SERVER_ERROR = 500;
168     /** <tt>501 Not Implemented</tt> (HTTP/1.0 - RFC 1945) */
169     public static final int SC_NOT_IMPLEMENTED = 501;
170     /** <tt>502 Bad Gateway</tt> (HTTP/1.0 - RFC 1945) */
171     public static final int SC_BAD_GATEWAY = 502;
172     /** <tt>503 Service Unavailable</tt> (HTTP/1.0 - RFC 1945) */
173     public static final int SC_SERVICE_UNAVAILABLE = 503;
174     /** <tt>504 Gateway Timeout</tt> (HTTP/1.1 - RFC 2616) */
175     public static final int SC_GATEWAY_TIMEOUT = 504;
176     /** <tt>505 HTTP Version Not Supported</tt> (HTTP/1.1 - RFC 2616) */
177     public static final int SC_HTTP_VERSION_NOT_SUPPORTED = 505;
178 
179     /** <tt>507 Insufficient Storage</tt> (WebDAV - RFC 2518) */
180     public static final int SC_INSUFFICIENT_STORAGE = 507;
181 
182 }
183