Welcome! Log In Create A New Profile

Advanced

[njs] Skip empty buffers in HTTP response send().

Roman Arutyunyan
February 28, 2018 11:18AM
details: http://hg.nginx.org/njs/rev/c86a0cc40ce5
branches:
changeset: 454:c86a0cc40ce5
user: Roman Arutyunyan <arut@nginx.com>
date: Wed Feb 28 19:16:25 2018 +0300
description:
Skip empty buffers in HTTP response send().

Such buffers lead to send errors and should never be sent.

diffstat:

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

diffs (14 lines):

diff -r ab1f67b69707 -r c86a0cc40ce5 nginx/ngx_http_js_module.c
--- a/nginx/ngx_http_js_module.c Wed Feb 28 16:20:11 2018 +0300
+++ b/nginx/ngx_http_js_module.c Wed Feb 28 19:16:25 2018 +0300
@@ -891,6 +891,10 @@ ngx_http_js_ext_send(njs_vm_t *vm, njs_v
return NJS_ERROR;
}

+ if (s.length == 0) {
+ continue;
+ }
+
/* TODO: njs_value_release(vm, value) in buf completion */

ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Skip empty buffers in HTTP response send().

Roman Arutyunyan 493 February 28, 2018 11:18AM



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

Online Users

Guests: 129
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready