MEDIUM: http: add the "set-nice" action to http-request and http-response
This new action changes the nice factor of the task processing the current
request.
diff --git a/include/types/proto_http.h b/include/types/proto_http.h
index 6190e6c..b50375f 100644
--- a/include/types/proto_http.h
+++ b/include/types/proto_http.h
@@ -246,6 +246,7 @@
HTTP_REQ_ACT_ADD_HDR,
HTTP_REQ_ACT_SET_HDR,
HTTP_REQ_ACT_REDIR,
+ HTTP_REQ_ACT_SET_NICE,
HTTP_REQ_ACT_MAX /* must always be last */
};
@@ -256,6 +257,7 @@
HTTP_RES_ACT_DENY,
HTTP_RES_ACT_ADD_HDR,
HTTP_RES_ACT_SET_HDR,
+ HTTP_RES_ACT_SET_NICE,
HTTP_RES_ACT_MAX /* must always be last */
};
@@ -368,6 +370,7 @@
struct list fmt; /* log-format compatible expression */
} hdr_add; /* args used by "add-header" and "set-header" */
struct redirect_rule *redir; /* redirect rule or "http-request redirect" */
+ int nice; /* nice value for HTTP_REQ_ACT_SET_NICE */
} arg; /* arguments used by some actions */
};
@@ -381,6 +384,7 @@
int name_len; /* header name's length */
struct list fmt; /* log-format compatible expression */
} hdr_add; /* args used by "add-header" and "set-header" */
+ int nice; /* nice value for HTTP_RES_ACT_SET_NICE */
} arg; /* arguments used by some actions */
};