Revision 580558a3 lib/http/__init__.py
b/lib/http/__init__.py | ||
---|---|---|
66 | 66 |
HTTP_AUTHENTICATION_INFO = "Authentication-Info" |
67 | 67 |
HTTP_ALLOW = "Allow" |
68 | 68 |
|
69 |
HTTP_APP_OCTET_STREAM = "application/octet-stream" |
|
70 |
|
|
69 | 71 |
_SSL_UNEXPECTED_EOF = "Unexpected EOF" |
70 | 72 |
|
71 | 73 |
# Socket operations |
... | ... | |
178 | 180 |
code = 405 |
179 | 181 |
|
180 | 182 |
|
183 |
class HttpNotAcceptable(HttpException): |
|
184 |
"""406 Not Acceptable |
|
185 |
|
|
186 |
RFC2616, 10.4.7: The resource identified by the request is only capable of |
|
187 |
generating response entities which have content characteristics not |
|
188 |
acceptable according to the accept headers sent in the request. |
|
189 |
|
|
190 |
""" |
|
191 |
code = 406 |
|
192 |
|
|
193 |
|
|
181 | 194 |
class HttpRequestTimeout(HttpException): |
182 | 195 |
"""408 Request Timeout |
183 | 196 |
|
... | ... | |
235 | 248 |
code = 412 |
236 | 249 |
|
237 | 250 |
|
251 |
class HttpUnsupportedMediaType(HttpException): |
|
252 |
"""415 Unsupported Media Type |
|
253 |
|
|
254 |
RFC2616, 10.4.16: The server is refusing to service the request because the |
|
255 |
entity of the request is in a format not supported by the requested resource |
|
256 |
for the requested method. |
|
257 |
|
|
258 |
""" |
|
259 |
code = 415 |
|
260 |
|
|
261 |
|
|
238 | 262 |
class HttpInternalServerError(HttpException): |
239 | 263 |
"""500 Internal Server Error |
240 | 264 |
|
Also available in: Unified diff