Debian Codegraph @

src/http_codes.h

raw
1 /*
2 * DIRB
3 *
4 * http_codes.h - http defines
5 *
6 */
7
8 #include "global.h"
9
10
11 // HTTP Code
12
13 #define HTTP_CONTINUE 100
14 #define HTTP_SWITCHING_PROTOCOLS 101
15 #define HTTP_OK 200
16 #define HTTP_CREATED 201
17 #define HTTP_ACCEPTED 202
18 #define HTTP_NON_AUTHORITATIVE 203
19 #define HTTP_NO_CONTENT 204
20 #define HTTP_RESET_CONTENT 205
21 #define HTTP_PARTIAL_CONTENT 206
22 #define HTTP_MULTIPLE_CHOICES 300
23 #define HTTP_MOVED_PERMANENTLY 301
24 #define HTTP_MOVED_TEMPORARILY 302
25 #define HTTP_SEE_OTHER 303
26 #define HTTP_NOT_MODIFIED 304
27 #define HTTP_USE_PROXY 305
28 #define HTTP_BAD_REQUEST 400
29 #define HTTP_UNAUTHORIZED 401
30 #define HTTP_PAYMENT_REQUIRED 402
31 #define HTTP_FORBIDDEN 403
32 #define HTTP_NOT_FOUND 404
33 #define HTTP_METHOD_NOT_ALLOWED 405
34 #define HTTP_NOT_ACCEPTABLE 406
35 #define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
36 #define HTTP_REQUEST_TIME_OUT 408
37 #define HTTP_CONFLICT 409
38 #define HTTP_GONE 410
39 #define HTTP_LENGTH_REQUIRED 411
40 #define HTTP_PRECONDITION_FAILED 412
41 #define HTTP_REQUEST_ENTITY_TOO_LARGE 413
42 #define HTTP_REQUEST_URI_TOO_LARGE 414
43 #define HTTP_UNSUPPORTED_MEDIA_TYPE 415
44 #define HTTP_INTERNAL_SERVER_ERROR 500
45 #define HTTP_NOT_IMPLEMENTED 501
46 #define HTTP_BAD_GATEWAY 502
47 #define HTTP_SERVICE_UNAVAILABLE 503
48 #define HTTP_GATEWAY_TIME_OUT 504
49 #define HTTP_VERSION_NOT_SUPPORTED 505
50 #define HTTP_VARIANT_ALSO_VARIES 506
51
52
53 // HTTP Code Strings
54
55 static struct code code2message[] = {
56 { HTTP_OK, "Ok" },
57 { HTTP_MOVED_PERMANENTLY, "Moved Permanently" },
58 { HTTP_MOVED_TEMPORARILY, "Moved Temporarily" },
59 { HTTP_BAD_REQUEST, "Bad Request"},
60 { HTTP_UNAUTHORIZED, "Auth Required" },
61 { HTTP_FORBIDDEN, "Forbidden" },
62 { HTTP_NOT_FOUND, "Not Found" },
63 { HTTP_UNSUPPORTED_MEDIA_TYPE, "Unsupported Media Type" },
64 { HTTP_METHOD_NOT_ALLOWED, "Method Not Allowed" },
65 { HTTP_INTERNAL_SERVER_ERROR, "Internal Server Error" },
66 { HTTP_SERVICE_UNAVAILABLE, "Service Temporarily Unavailable" },
67 { 0xff, "Unknown"},
68 };
69