From 606f5c0d43f357a99ca36225f9d07e33d15a2953 Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Mon, 11 Sep 2023 20:34:48 -0700 Subject: [PATCH] HTTP: avoid calling body filter when input chain is NULL. This solves the problem of erroneous exception thrown in r.internalRedirect() after 05c7f0b31856 (0.8.0). --- nginx/ngx_http_js_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index f8811617..6ba500e7 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -1129,7 +1129,7 @@ ngx_http_js_body_filter(ngx_http_request_t *r, ngx_chain_t *in) jlcf = ngx_http_get_module_loc_conf(r, ngx_http_js_module); - if (jlcf->body_filter.len == 0) { + if (jlcf->body_filter.len == 0 || in == NULL) { return ngx_http_next_body_filter(r, in); } -- 2.47.3