]> git.kaiwu.me - njs.git/commit
HTTP: fixed buffer_type inheritance in if blocks.
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 12 Dec 2025 05:57:18 +0000 (21:57 -0800)
committerDmitry Volyntsev <xeioexception@gmail.com>
Sat, 13 Dec 2025 04:45:54 +0000 (20:45 -0800)
commit6b230aab765f7d6f2e9107bf2ca7164eac590039
treeab6f08d4974ebb5d863c46ab82e7749a655527a8
parent81e4a3eaa4b9d8a88a46646da9a76e8309f956e7
HTTP: fixed buffer_type inheritance in if blocks.

Previously, when js_body_filter was used inside an if block that
evaluated to true, the data parameter received Buffer type instead
of the expected String type. This happened because buffer_type field
in ngx_http_js_loc_conf_t was not properly initialized, causing the
configuration merge to fail when nginx created a new location context
for if blocks.

This fixes #999 issue on Github.
nginx/ngx_http_js_module.c
nginx/t/js_body_filter_if.t