diff options
author | Dmitry Volyntsev <xeioex@nginx.com> | 2023-09-11 20:34:48 -0700 |
---|---|---|
committer | Dmitry Volyntsev <xeioex@nginx.com> | 2023-09-11 20:34:48 -0700 |
commit | 606f5c0d43f357a99ca36225f9d07e33d15a2953 (patch) | |
tree | 6dbe16e7557291045dc4d4244064ff063395d128 /nginx/ngx_http_js_module.c | |
parent | 036c785984d12745f468bc307d374446b4cb6415 (diff) | |
download | njs-606f5c0d43f357a99ca36225f9d07e33d15a2953.tar.gz njs-606f5c0d43f357a99ca36225f9d07e33d15a2953.zip |
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 (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r-- | nginx/ngx_http_js_module.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |