]> granicus.if.org Git - libevent/commitdiff
Add more HTTP_ response codes
authorDmitry Ilyin <dima@doty.ru>
Sat, 6 Aug 2022 11:23:53 +0000 (14:23 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Sun, 7 Aug 2022 09:13:48 +0000 (11:13 +0200)
include/event2/http.h

index 89175fb79e64b25a073671ab76561c1a0b03a8d2..27cbd35edeb958dda4399d711125249c271dad7c 100644 (file)
@@ -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;