details: https://hg.nginx.org/njs/rev/95f57822bdaa branches: changeset: 2072:95f57822bdaa user: Dmitry Volyntsev <xei...@nginx.com> date: Fri Mar 10 14:15:29 2023 -0800 description: Fetch: fixed Headers() constructor.
Previously, the 'guard' field of ngx_js_headers_t structure was uninitialized, that caused spurious exception "Error: cannot append to immutable object". This issue was introduced on 0.7.10. diffstat: nginx/ngx_js_fetch.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diffs (12 lines): diff -r acacd5d3a276 -r 95f57822bdaa nginx/ngx_js_fetch.c --- a/nginx/ngx_js_fetch.c Fri Mar 10 13:28:21 2023 -0800 +++ b/nginx/ngx_js_fetch.c Fri Mar 10 14:15:29 2023 -0800 @@ -860,6 +860,8 @@ ngx_js_ext_headers_constructor(njs_vm_t return NJS_ERROR; } + headers->guard = GUARD_NONE; + rc = ngx_list_init(&headers->header_list, pool, 4, sizeof(ngx_js_tb_elt_t)); if (rc != NGX_OK) { njs_vm_memory_error(vm); _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel