[njs] Modules: fixed Respose.headers getter in fetch API.
Dmitry Volyntsev
xeioex at nginx.com
Thu Oct 14 17:16:54 UTC 2021
details: https://hg.nginx.org/njs/rev/6545769f30bf
branches:
changeset: 1725:6545769f30bf
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Thu Oct 14 17:16:10 2021 +0000
description:
Modules: fixed Respose.headers getter in fetch API.
The issue manifested itself when Response object is dumped using
JSON.stringify() or njs.dump(). The Response headers were dumped
as "null" values.
diffstat:
nginx/ngx_js_fetch.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diffs (13 lines):
diff -r 9502fed1bd6b -r 6545769f30bf nginx/ngx_js_fetch.c
--- a/nginx/ngx_js_fetch.c Thu Oct 14 15:18:47 2021 +0000
+++ b/nginx/ngx_js_fetch.c Thu Oct 14 17:16:10 2021 +0000
@@ -2207,8 +2207,7 @@ ngx_response_js_ext_header(njs_vm_t *vm,
return NJS_ERROR;
}
- return ngx_response_js_ext_header_get(vm, value, &name, njs_vm_retval(vm),
- 0);
+ return ngx_response_js_ext_header_get(vm, value, &name, retval, 0);
}
More information about the nginx-devel
mailing list