Welcome! Log In Create A New Profile

Advanced

[njs] HTTP: adding a warning for ignored outgoing header assignments.

Dmitry Volyntsev
September 22, 2022 10:20PM
details: https://hg.nginx.org/njs/rev/ef0e05668f39
branches:
changeset: 1961:ef0e05668f39
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Thu Sep 22 19:05:36 2022 -0700
description:
HTTP: adding a warning for ignored outgoing header assignments.

diffstat:

nginx/ngx_http_js_module.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 74d30c2d70f3 -r ef0e05668f39 nginx/ngx_http_js_module.c
--- a/nginx/ngx_http_js_module.c Tue Sep 20 17:44:25 2022 -0700
+++ b/nginx/ngx_http_js_module.c Thu Sep 22 19:05:36 2022 -0700
@@ -1565,6 +1565,11 @@ ngx_http_js_ext_header_out(njs_vm_t *vm,
return NJS_DECLINED;
}

+ if (r->header_sent && setval != NULL) {
+ njs_vm_warn(vm, "ignored setting of response header \"%V\" because"
+ " headers were already sent", &name);
+ }
+
for (h = headers_out; h->name.length > 0; h++) {
if (h->name.length == name.length
&& ngx_strncasecmp(h->name.start, name.start, name.length) == 0)
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[njs] HTTP: adding a warning for ignored outgoing header assignments.

Dmitry Volyntsev 326 September 22, 2022 10:20PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 82
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready