40 #define HTTP_CONTINUE 100
41 #define HTTP_SWITCHING_PROTOCOLS 101
43 #define HTTP_CREATED 201
44 #define HTTP_ACCEPTED 202
45 #define HTTP_NON_AUTHORITATIVE_INFORMATION 203
46 #define HTTP_NO_CONTENT 204
47 #define HTTP_RESET_CONTENT 205
48 #define HTTP_PARTIAL_CONTENT 206
49 #define HTTP_MULTIPLE_CHOICES 300
50 #define HTTP_MOVED_PERMANENTLY 301
51 #define HTTP_FOUND 302
52 #define HTTP_SEE_OTHER 303
53 #define HTTP_NOT_MODIFIED 304
54 #define HTTP_USE_PROXY 305
55 #define HTTP_TEMPORARY_REDIRECT 307
56 #define HTTP_BAD_REQUEST 400
57 #define HTTP_UNAUTHORIZED 401
58 #define HTTP_PAYMENT_REQUIRED 402
59 #define HTTP_FORBIDDEN 403
60 #define HTTP_NOT_FOUND 404
61 #define HTTP_METHOD_NOT_ALLOWED 405
62 #define HTTP_NOT_ACCEPTABLE 406
63 #define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
64 #define HTTP_REQUEST_TIMEOUT 408
65 #define HTTP_CONFLICT 409
67 #define HTTP_LENGTH_REQUIRED 411
68 #define HTTP_PRECONDITION_FAILED 412
69 #define HTTP_REQUEST_ENTITY_TOO_LARGE 413
70 #define HTTP_REQUEST_URI_TOO_LONG 414
71 #define HTTP_UNSUPPORTED_MEDIA_TYPE 415
72 #define HTTP_REQUESTED_RANGE_NOT_SATISFAIABLE 416
73 #define HTTP_EXPECTATION_FAILED 417
74 #define HTTP_INTERNAL_SERVER_ERROR 500
75 #define HTTP_NOT_IMPLEMENTED 501
76 #define HTTP_BAD_GATEWAY 502
77 #define HTTP_SERVICE_UNAVAILABLE 503
78 #define HTTP_GATEWAY_TIMEOUT 504
79 #define HTTP_HTTP_VERSION_NOT_SUPPORTED 505
83 #define HTTPS_PORT 443
85 static inline int is1xx(
int status)
87 return ((status >= 100) && (status < 200));
90 static inline int is2xx(
int status)
92 return ((status >= 200) && (status < 300));
95 static inline int is3xx(
int status)
97 return ((status >= 300) && (status < 400));
100 static inline int is4xx(
int status)
102 return ((status >= 400) && (status < 500));
105 static inline int is5xx(
int status)
107 return ((status >= 500) && (status < 600));