From 05a03d4a15eb149cb70b3767638f8523ecae1e2d Mon Sep 17 00:00:00 2001 From: Dmitry Ilyin Date: Sat, 6 Aug 2022 14:23:53 +0300 Subject: [PATCH] Add more HTTP_ response codes --- include/event2/http.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/event2/http.h b/include/event2/http.h index 89175fb79e..27cbd35ede 100644 --- a/include/event2/http.h +++ b/include/event2/http.h @@ -53,18 +53,29 @@ struct evhttp_connection; */ /* Response codes */ +#define HTTP_CONTINUE 100 /**< client should proceed to send */ +#define HTTP_SWITCH_PROTOCOLS 101 /**< switching to another protocol */ +#define HTTP_PROCESSING 102 /**< processing the request, but no response is available yet */ +#define HTTP_EARLYHINTS 103 /**< return some response headers */ #define HTTP_OK 200 /**< request completed ok */ +#define HTTP_CREATED 201 /**< new resource is created */ +#define HTTP_ACCEPTED 202 /**< accepted for processing */ +#define HTTP_NONAUTHORITATIVE 203 /**< returning a modified version of the origin's response */ #define HTTP_NOCONTENT 204 /**< request does not have content */ #define HTTP_MOVEPERM 301 /**< the uri moved permanently */ #define HTTP_MOVETEMP 302 /**< the uri moved temporarily */ #define HTTP_NOTMODIFIED 304 /**< page was not modified from last */ #define HTTP_BADREQUEST 400 /**< invalid http request was made */ +#define HTTP_UNAUTHORIZED 401 /**< authentication is required */ +#define HTTP_PAYMENTREQUIRED 402 /**< user exceeded limit on requests */ +#define HTTP_FORBIDDEN 403 /**< user not having the necessary permissions */ #define HTTP_NOTFOUND 404 /**< could not find content for uri */ #define HTTP_BADMETHOD 405 /**< method not allowed for this uri */ -#define HTTP_ENTITYTOOLARGE 413 /**< */ +#define HTTP_ENTITYTOOLARGE 413 /**< request is larger than the server is able to process */ #define HTTP_EXPECTATIONFAILED 417 /**< we can't handle this expectation */ #define HTTP_INTERNAL 500 /**< internal error */ #define HTTP_NOTIMPLEMENTED 501 /**< not implemented */ +#define HTTP_BADGATEWAY 502 /**< received an invalid response from the upstream */ #define HTTP_SERVUNAVAIL 503 /**< the server is not available */ struct evhttp;