From 4cc25f26f94859bf4dbc2d036d9d23e5a5a7a2de Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 11 Jan 2024 12:06:49 +0100 Subject: [PATCH] MEDIUM: http: add the ability to redefine http-err-codes and http-fail-codes The new global keywords "http-err-codes" and "http-fail-codes" allow to redefine which HTTP status codes indicate a client-induced error or a server error, as tracked by stick-table counters. This is only done globally, though everything was done so that it could easily be extended to a per-proxy mechanism if there was a real need for this (but it would eat quite more RAM then). A simple reg-test was added (http-err-fail.vtc). --- doc/configuration.txt | 34 +++++++++ reg-tests/http-rules/http-err-fail.vtc | 84 ++++++++++++++++++++++ src/http.c | 98 ++++++++++++++++++++++++++ 3 files changed, 216 insertions(+) create mode 100644 reg-tests/http-rules/http-err-fail.vtc diff --git a/doc/configuration.txt b/doc/configuration.txt index ece3919f0..18da6a52b 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -1919,6 +1919,40 @@ hard-stop-after