From 27b962644855cd1c699498e1abbbb0cb07debb55 Mon Sep 17 00:00:00 2001 From: Ana Alexandru-Gabriel <75039938+kickhead13@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:18:46 +0300 Subject: [PATCH 1/2] updated ngx_http_proxy_module.c to support http_501 in proxy_next_upstream --- src/http/modules/ngx_http_proxy_module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 8d5385c1d..2c57e7898 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -260,6 +260,7 @@ static ngx_conf_bitmask_t ngx_http_proxy_next_upstream_masks[] = { { ngx_string("invalid_header"), NGX_HTTP_UPSTREAM_FT_INVALID_HEADER }, { ngx_string("non_idempotent"), NGX_HTTP_UPSTREAM_FT_NON_IDEMPOTENT }, { ngx_string("http_500"), NGX_HTTP_UPSTREAM_FT_HTTP_500 }, + { ngx_string("http_501"), NGX_HTTP_UPSTREAM_FT_HTTP_501 }, { ngx_string("http_502"), NGX_HTTP_UPSTREAM_FT_HTTP_502 }, { ngx_string("http_503"), NGX_HTTP_UPSTREAM_FT_HTTP_503 }, { ngx_string("http_504"), NGX_HTTP_UPSTREAM_FT_HTTP_504 }, From 7dddc4d68347a960ff95c690383d59b3919b9a57 Mon Sep 17 00:00:00 2001 From: Ana Alexandru-Gabriel <75039938+kickhead13@users.noreply.github.com> Date: Tue, 22 Jul 2025 15:22:10 +0300 Subject: [PATCH 2/2] added NGX_HTTP_UPSTEAM_FT_501 in a way to not overlap other constants, for ongoing proxy_next_upstream 501 support --- src/http/ngx_http_upstream.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h index f3e9f7979..5e14666ad 100644 --- a/src/http/ngx_http_upstream.h +++ b/src/http/ngx_http_upstream.h @@ -21,6 +21,7 @@ #define NGX_HTTP_UPSTREAM_FT_TIMEOUT 0x00000004 #define NGX_HTTP_UPSTREAM_FT_INVALID_HEADER 0x00000008 #define NGX_HTTP_UPSTREAM_FT_HTTP_500 0x00000010 +#define NGX_HTTP_UPSTREAM_FT_HTTP_501 0x00008000 #define NGX_HTTP_UPSTREAM_FT_HTTP_502 0x00000020 #define NGX_HTTP_UPSTREAM_FT_HTTP_503 0x00000040 #define NGX_HTTP_UPSTREAM_FT_HTTP_504 0x00000080 @@ -35,6 +36,7 @@ #define NGX_HTTP_UPSTREAM_FT_OFF 0x80000000 #define NGX_HTTP_UPSTREAM_FT_STATUS (NGX_HTTP_UPSTREAM_FT_HTTP_500 \ + |NGX_HTTP_UPSTREAM_FT_HTTP_501 \ |NGX_HTTP_UPSTREAM_FT_HTTP_502 \ |NGX_HTTP_UPSTREAM_FT_HTTP_503 \ |NGX_HTTP_UPSTREAM_FT_HTTP_504 \