Welcome! Log In Create A New Profile

Advanced

[njs] HTTP: avoid calling body filter when input chain is NULL.

Dmitry Volyntsev
September 11, 2023 11:36PM
details: https://hg.nginx.org/njs/rev/6b3176692593
branches:
changeset: 2198:6b3176692593
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Mon Sep 11 20:34:48 2023 -0700
description:
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).

diffstat:

nginx/ngx_http_js_module.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 1ac5ae749ae1 -r 6b3176692593 nginx/ngx_http_js_module.c
--- a/nginx/ngx_http_js_module.c Fri Sep 08 17:13:19 2023 -0700
+++ b/nginx/ngx_http_js_module.c Mon Sep 11 20:34:48 2023 -0700
@@ -1129,7 +1129,7 @@ ngx_http_js_body_filter(ngx_http_request

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);
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] HTTP: avoid calling body filter when input chain is NULL.

Dmitry Volyntsev 380 September 11, 2023 11:36PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 118
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready