MINOR: http: custom status reason.
The older 'rsprep' directive allows modification of the status reason.
Extend 'http-response set-status' to take an optional string of the new
status reason.
http-response set-status 418 reason "I'm a coffeepot"
Matching updates in Lua code:
- AppletHTTP.set_status
- HTTP.res_set_status
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
diff --git a/include/types/action.h b/include/types/action.h
index 5a70db0..1c17154 100644
--- a/include/types/action.h
+++ b/include/types/action.h
@@ -135,6 +135,7 @@
} cap;
struct {
unsigned int code; /* HTTP status code */
+ const char *reason; /* HTTP status reason */
} status;
struct {
struct sample_expr *expr;