diff options
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/OSHttpStatusCodes.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/OSHttpStatusCodes.cs | 170 |
1 files changed, 170 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpStatusCodes.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpStatusCodes.cs new file mode 100644 index 0000000..2f1ca0f --- /dev/null +++ b/OpenSim/Framework/Servers/HttpServer/OSHttpStatusCodes.cs | |||
@@ -0,0 +1,170 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | namespace OpenSim.Framework.Servers.HttpServer | ||
29 | { | ||
30 | /// <summary> | ||
31 | /// HTTP status codes (almost) as defined by W3C in | ||
32 | /// http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html | ||
33 | /// </summary> | ||
34 | public enum OSHttpStatusCode: int | ||
35 | { | ||
36 | // 1xx Informational status codes providing a provisional | ||
37 | // response. | ||
38 | // 100 Tells client that to keep on going sending its request | ||
39 | InfoContinue = 100, | ||
40 | // 101 Server understands request, proposes to switch to different | ||
41 | // application level protocol | ||
42 | InfoSwitchingProtocols = 101, | ||
43 | |||
44 | |||
45 | // 2xx Success codes | ||
46 | // 200 Request successful | ||
47 | SuccessOk = 200, | ||
48 | // 201 Request successful, new resource created | ||
49 | SuccessOkCreated = 201, | ||
50 | // 202 Request accepted, processing still on-going | ||
51 | SuccessOkAccepted = 202, | ||
52 | // 203 Request successful, meta information not authoritative | ||
53 | SuccessOkNonAuthoritativeInformation = 203, | ||
54 | // 204 Request successful, nothing to return in the body | ||
55 | SuccessOkNoContent = 204, | ||
56 | // 205 Request successful, reset displayed content | ||
57 | SuccessOkResetContent = 205, | ||
58 | // 206 Request successful, partial content returned | ||
59 | SuccessOkPartialContent = 206, | ||
60 | |||
61 | // 3xx Redirect code: user agent needs to go somewhere else | ||
62 | // 300 Redirect: different presentation forms available, take | ||
63 | // a pick | ||
64 | RedirectMultipleChoices = 300, | ||
65 | // 301 Redirect: requested resource has moved and now lives | ||
66 | // somewhere else | ||
67 | RedirectMovedPermanently = 301, | ||
68 | // 302 Redirect: Resource temporarily somewhere else, location | ||
69 | // might change | ||
70 | RedirectFound = 302, | ||
71 | // 303 Redirect: See other as result of a POST | ||
72 | RedirectSeeOther = 303, | ||
73 | // 304 Redirect: Resource still the same as before | ||
74 | RedirectNotModified = 304, | ||
75 | // 305 Redirect: Resource must be accessed via proxy provided | ||
76 | // in location field | ||
77 | RedirectUseProxy = 305, | ||
78 | // 307 Redirect: Resource temporarily somewhere else, location | ||
79 | // might change | ||
80 | RedirectMovedTemporarily = 307, | ||
81 | |||
82 | // 4xx Client error: the client borked the request | ||
83 | // 400 Client error: bad request, server does not grok what | ||
84 | // the client wants | ||
85 | ClientErrorBadRequest = 400, | ||
86 | // 401 Client error: the client is not authorized, response | ||
87 | // provides WWW-Authenticate header field with a challenge | ||
88 | ClientErrorUnauthorized = 401, | ||
89 | // 402 Client error: Payment required (reserved for future use) | ||
90 | ClientErrorPaymentRequired = 402, | ||
91 | // 403 Client error: Server understood request, will not | ||
92 | // deliver, do not try again. | ||
93 | ClientErrorForbidden = 403, | ||
94 | // 404 Client error: Server cannot find anything matching the | ||
95 | // client request. | ||
96 | ClientErrorNotFound = 404, | ||
97 | // 405 Client error: The method specified by the client in the | ||
98 | // request is not allowed for the resource requested | ||
99 | ClientErrorMethodNotAllowed = 405, | ||
100 | // 406 Client error: Server cannot generate suitable response | ||
101 | // for the resource and content characteristics requested by | ||
102 | // the client | ||
103 | ClientErrorNotAcceptable = 406, | ||
104 | // 407 Client error: Similar to 401, Server requests that | ||
105 | // client authenticate itself with the proxy first | ||
106 | ClientErrorProxyAuthRequired = 407, | ||
107 | // 408 Client error: Server got impatient with client and | ||
108 | // decided to give up waiting for the client's request to | ||
109 | // arrive | ||
110 | ClientErrorRequestTimeout = 408, | ||
111 | // 409 Client error: Server could not fulfill the request for | ||
112 | // a resource as there is a conflict with the current state of | ||
113 | // the resource but thinks client can do something about this | ||
114 | ClientErrorConflict = 409, | ||
115 | // 410 Client error: The resource has moved somewhere else, | ||
116 | // but server has no clue where. | ||
117 | ClientErrorGone = 410, | ||
118 | // 411 Client error: The server is picky again and insists on | ||
119 | // having a content-length header field in the request | ||
120 | ClientErrorLengthRequired = 411, | ||
121 | // 412 Client error: one or more preconditions supplied in the | ||
122 | // client's request is false | ||
123 | ClientErrorPreconditionFailed = 412, | ||
124 | // 413 Client error: For fear of reflux, the server refuses to | ||
125 | // swallow that much data. | ||
126 | ClientErrorRequestEntityToLarge = 413, | ||
127 | // 414 Client error: The server considers the Request-URI to | ||
128 | // be indecently long and refuses to even look at it. | ||
129 | ClientErrorRequestURITooLong = 414, | ||
130 | // 415 Client error: The server has no clue about the media | ||
131 | // type requested by the client (contrary to popular belief it | ||
132 | // is not a warez server) | ||
133 | ClientErrorUnsupportedMediaType = 415, | ||
134 | // 416 Client error: The requested range cannot be delivered | ||
135 | // by the server. | ||
136 | ClientErrorRequestRangeNotSatisfiable = 416, | ||
137 | // 417 Client error: The expectations of the client as | ||
138 | // expressed in one or more Expect header fields cannot be met | ||
139 | // by the server, the server is awfully sorry about this. | ||
140 | ClientErrorExpectationFailed = 417, | ||
141 | // 499 Client error: Wildcard error. | ||
142 | ClientErrorJoker = 499, | ||
143 | |||
144 | // 5xx Server errors (rare) | ||
145 | // 500 Server error: something really strange and unexpected | ||
146 | // happened | ||
147 | ServerErrorInternalError = 500, | ||
148 | // 501 Server error: The server does not do the functionality | ||
149 | // required to carry out the client request. not at | ||
150 | // all. certainly not before breakfast. but also not after | ||
151 | // breakfast. | ||
152 | ServerErrorNotImplemented = 501, | ||
153 | // 502 Server error: While acting as a proxy or a gateway, the | ||
154 | // server got ditched by the upstream server and as a | ||
155 | // consequence regretfully cannot fulfill the client's request | ||
156 | ServerErrorBadGateway = 502, | ||
157 | // 503 Server error: Due to unforseen circumstances the server | ||
158 | // cannot currently deliver the service requested. Retry-After | ||
159 | // header might indicate when to try again. | ||
160 | ServerErrorServiceUnavailable = 503, | ||
161 | // 504 Server error: The server blames the upstream server | ||
162 | // for not being able to deliver the service requested and | ||
163 | // claims that the upstream server is too slow delivering the | ||
164 | // goods. | ||
165 | ServerErrorGatewayTimeout = 504, | ||
166 | // 505 Server error: The server does not support the HTTP | ||
167 | // version conveyed in the client's request. | ||
168 | ServerErrorHttpVersionNotSupported = 505, | ||
169 | } | ||
170 | } | ||