]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: http-rules: Add more return codes to let custom actions act as normal ones
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 16 Dec 2019 11:25:43 +0000 (12:25 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 20 Jan 2020 14:18:45 +0000 (15:18 +0100)
When HTTP/TCP rules are evaluated, especially HTTP ones, some results are
possible for normal actions and not for custom ones. So missing return codes
(ACT_RET_) have been added to let custom actions act as normal ones. Concretely
following codes have been added:

 * ACT_RET_DENY : deny the request/response. It must be handled by the caller
 * ACT_RET_ABRT : abort the request/response, handled by action itsleft.
 * ACT_RET_INV  : invalid request/response

include/types/action.h

index 516ffddd03e5f693e4c9f0a9f7313d27e4208756..33dcd517d3185e8255788188cca439f016b92988 100644 (file)
@@ -37,11 +37,14 @@ enum act_from {
 };
 
 enum act_return {
-       ACT_RET_CONT,  /* continue processing. */
-       ACT_RET_STOP,  /* stop processing. */
-       ACT_RET_YIELD, /* call me again. */
-       ACT_RET_ERR,   /* processing error. */
-       ACT_RET_DONE,  /* processing done, stop processing */
+       ACT_RET_CONT,   /* continue processing. */
+       ACT_RET_STOP,   /* stop processing. */
+       ACT_RET_YIELD,  /* call me again. */
+       ACT_RET_ERR,    /* internal processing error. */
+       ACT_RET_DONE,   /* processing done, stop processing */
+       ACT_RET_DENY,   /* deny, must be handled by the caller */
+       ACT_RET_ABRT,   /* abort, handled by action itsleft. */
+       ACT_RET_INV,    /* invalid request/response */
 };
 
 enum act_parse_ret {