Skip to content

Commit

Permalink
Add more HTTP_ response codes
Browse files Browse the repository at this point in the history
  • Loading branch information
widgetii authored and azat committed Aug 7, 2022
1 parent 3e7a738 commit 05a03d4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion include/event2/http.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 05a03d4

Please sign in to comment.