~ubuntu-branches/ubuntu/trusty/httpcomponents-core/trusty

« back to all changes in this revision

Viewing changes to httpcore/src/main/java/org/apache/http/HttpStatus.java

  • Committer: Bazaar Package Importer
  • Author(s): David Paleino
  • Date: 2010-06-12 08:37:34 UTC
  • Revision ID: james.westby@ubuntu.com-20100612083734-1y8kp6qm4sjk60az
Tags: upstream-4.0.1
ImportĀ upstreamĀ versionĀ 4.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $HeadURL: https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0.1/httpcore/src/main/java/org/apache/http/HttpStatus.java $
 
3
 * $Revision: 744522 $
 
4
 * $Date: 2009-02-14 17:56:03 +0100 (Sat, 14 Feb 2009) $
 
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
 * 
 
41
 * @version $Revision: 744522 $
 
42
 *
 
43
 * @since 4.0
 
44
 */
 
45
public interface HttpStatus {
 
46
 
 
47
    // --- 1xx Informational ---
 
48
 
 
49
    /** <tt>100 Continue</tt> (HTTP/1.1 - RFC 2616) */
 
50
    public static final int SC_CONTINUE = 100;
 
51
    /** <tt>101 Switching Protocols</tt> (HTTP/1.1 - RFC 2616)*/
 
52
    public static final int SC_SWITCHING_PROTOCOLS = 101;
 
53
    /** <tt>102 Processing</tt> (WebDAV - RFC 2518) */
 
54
    public static final int SC_PROCESSING = 102;
 
55
 
 
56
    // --- 2xx Success ---
 
57
 
 
58
    /** <tt>200 OK</tt> (HTTP/1.0 - RFC 1945) */
 
59
    public static final int SC_OK = 200;
 
60
    /** <tt>201 Created</tt> (HTTP/1.0 - RFC 1945) */
 
61
    public static final int SC_CREATED = 201;
 
62
    /** <tt>202 Accepted</tt> (HTTP/1.0 - RFC 1945) */
 
63
    public static final int SC_ACCEPTED = 202;
 
64
    /** <tt>203 Non Authoritative Information</tt> (HTTP/1.1 - RFC 2616) */
 
65
    public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203;
 
66
    /** <tt>204 No Content</tt> (HTTP/1.0 - RFC 1945) */
 
67
    public static final int SC_NO_CONTENT = 204;
 
68
    /** <tt>205 Reset Content</tt> (HTTP/1.1 - RFC 2616) */
 
69
    public static final int SC_RESET_CONTENT = 205;
 
70
    /** <tt>206 Partial Content</tt> (HTTP/1.1 - RFC 2616) */
 
71
    public static final int SC_PARTIAL_CONTENT = 206;
 
72
    /** 
 
73
     * <tt>207 Multi-Status</tt> (WebDAV - RFC 2518) or <tt>207 Partial Update
 
74
     * OK</tt> (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)
 
75
     */
 
76
    public static final int SC_MULTI_STATUS = 207;
 
77
 
 
78
    // --- 3xx Redirection ---
 
79
 
 
80
    /** <tt>300 Mutliple Choices</tt> (HTTP/1.1 - RFC 2616) */
 
81
    public static final int SC_MULTIPLE_CHOICES = 300;
 
82
    /** <tt>301 Moved Permanently</tt> (HTTP/1.0 - RFC 1945) */
 
83
    public static final int SC_MOVED_PERMANENTLY = 301;
 
84
    /** <tt>302 Moved Temporarily</tt> (Sometimes <tt>Found</tt>) (HTTP/1.0 - RFC 1945) */
 
85
    public static final int SC_MOVED_TEMPORARILY = 302;
 
86
    /** <tt>303 See Other</tt> (HTTP/1.1 - RFC 2616) */
 
87
    public static final int SC_SEE_OTHER = 303;
 
88
    /** <tt>304 Not Modified</tt> (HTTP/1.0 - RFC 1945) */
 
89
    public static final int SC_NOT_MODIFIED = 304;
 
90
    /** <tt>305 Use Proxy</tt> (HTTP/1.1 - RFC 2616) */
 
91
    public static final int SC_USE_PROXY = 305;
 
92
    /** <tt>307 Temporary Redirect</tt> (HTTP/1.1 - RFC 2616) */
 
93
    public static final int SC_TEMPORARY_REDIRECT = 307;
 
94
 
 
95
    // --- 4xx Client Error ---
 
96
 
 
97
    /** <tt>400 Bad Request</tt> (HTTP/1.1 - RFC 2616) */
 
98
    public static final int SC_BAD_REQUEST = 400;
 
99
    /** <tt>401 Unauthorized</tt> (HTTP/1.0 - RFC 1945) */
 
100
    public static final int SC_UNAUTHORIZED = 401;
 
101
    /** <tt>402 Payment Required</tt> (HTTP/1.1 - RFC 2616) */
 
102
    public static final int SC_PAYMENT_REQUIRED = 402;
 
103
    /** <tt>403 Forbidden</tt> (HTTP/1.0 - RFC 1945) */
 
104
    public static final int SC_FORBIDDEN = 403;
 
105
    /** <tt>404 Not Found</tt> (HTTP/1.0 - RFC 1945) */
 
106
    public static final int SC_NOT_FOUND = 404;
 
107
    /** <tt>405 Method Not Allowed</tt> (HTTP/1.1 - RFC 2616) */
 
108
    public static final int SC_METHOD_NOT_ALLOWED = 405;
 
109
    /** <tt>406 Not Acceptable</tt> (HTTP/1.1 - RFC 2616) */
 
110
    public static final int SC_NOT_ACCEPTABLE = 406;
 
111
    /** <tt>407 Proxy Authentication Required</tt> (HTTP/1.1 - RFC 2616)*/
 
112
    public static final int SC_PROXY_AUTHENTICATION_REQUIRED = 407;
 
113
    /** <tt>408 Request Timeout</tt> (HTTP/1.1 - RFC 2616) */
 
114
    public static final int SC_REQUEST_TIMEOUT = 408;
 
115
    /** <tt>409 Conflict</tt> (HTTP/1.1 - RFC 2616) */
 
116
    public static final int SC_CONFLICT = 409;
 
117
    /** <tt>410 Gone</tt> (HTTP/1.1 - RFC 2616) */
 
118
    public static final int SC_GONE = 410;
 
119
    /** <tt>411 Length Required</tt> (HTTP/1.1 - RFC 2616) */
 
120
    public static final int SC_LENGTH_REQUIRED = 411;
 
121
    /** <tt>412 Precondition Failed</tt> (HTTP/1.1 - RFC 2616) */
 
122
    public static final int SC_PRECONDITION_FAILED = 412;
 
123
    /** <tt>413 Request Entity Too Large</tt> (HTTP/1.1 - RFC 2616) */
 
124
    public static final int SC_REQUEST_TOO_LONG = 413;
 
125
    /** <tt>414 Request-URI Too Long</tt> (HTTP/1.1 - RFC 2616) */
 
126
    public static final int SC_REQUEST_URI_TOO_LONG = 414;
 
127
    /** <tt>415 Unsupported Media Type</tt> (HTTP/1.1 - RFC 2616) */
 
128
    public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415;
 
129
    /** <tt>416 Requested Range Not Satisfiable</tt> (HTTP/1.1 - RFC 2616) */
 
130
    public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
 
131
    /** <tt>417 Expectation Failed</tt> (HTTP/1.1 - RFC 2616) */
 
132
    public static final int SC_EXPECTATION_FAILED = 417;
 
133
 
 
134
    /**
 
135
     * Static constant for a 418 error.
 
136
     * <tt>418 Unprocessable Entity</tt> (WebDAV drafts?)
 
137
     * or <tt>418 Reauthentication Required</tt> (HTTP/1.1 drafts?)
 
138
     */
 
139
    // not used
 
140
    // public static final int SC_UNPROCESSABLE_ENTITY = 418;
 
141
 
 
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
}