[njs] Skip empty buffers in HTTP response send().
Roman Arutyunyan
arut at nginx.com
Wed Feb 28 16:16:53 UTC 2018
details: http://hg.nginx.org/njs/rev/c86a0cc40ce5
branches:
changeset: 454:c86a0cc40ce5
user: Roman Arutyunyan <arut at 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,
More information about the nginx-devel
mailing list