Skip to content

HTTP: fixed buffer_type inheritance in if blocks.#1000

Merged
xeioex merged 1 commit intonginx:masterfrom
xeioex:if_block
Dec 13, 2025
Merged

HTTP: fixed buffer_type inheritance in if blocks.#1000
xeioex merged 1 commit intonginx:masterfrom
xeioex:if_block

Conversation

@xeioex
Copy link
Contributor

@xeioex xeioex commented Dec 12, 2025

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.

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 nginx#999 issue on Github.
Copy link
Contributor

@VadimZhestikov VadimZhestikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@xeioex xeioex merged commit 6b230aa into nginx:master Dec 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected type of js_body_filter data argument

2 participants