Welcome! Log In Create A New Profile

Advanced

[njs] Stream: throwing an exception when s.done() is used while filtering.

Dmitry Volyntsev
June 23, 2022 02:42AM
details: https://hg.nginx.org/njs/rev/9f544b8e28c5
branches:
changeset: 1896:9f544b8e28c5
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Wed Jun 22 23:37:15 2022 -0700
description:
Stream: throwing an exception when s.done() is used while filtering.

diffstat:

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

diffs (15 lines):

diff -r f7fec5be38a0 -r 9f544b8e28c5 nginx/ngx_stream_js_module.c
--- a/nginx/ngx_stream_js_module.c Tue Jun 21 21:54:14 2022 -0700
+++ b/nginx/ngx_stream_js_module.c Wed Jun 22 23:37:15 2022 -0700
@@ -1114,6 +1114,11 @@ ngx_stream_js_ext_done(njs_vm_t *vm, njs

ctx = ngx_stream_get_module_ctx(s, ngx_stream_js_module);

+ if (ctx->filter) {
+ njs_vm_error(vm, "should not be called while filtering");
+ return NJS_ERROR;
+ }
+
ngx_log_debug1(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
"stream js set status: %i", status);

_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[njs] Stream: throwing an exception when s.done() is used while filtering.

Dmitry Volyntsev 291 June 23, 2022 02:42AM



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

Online Users

Guests: 95
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