diff options
author | Roman Arutyunyan <arut@nginx.com> | 2018-02-28 19:16:25 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2018-02-28 19:16:25 +0300 |
commit | 2c6c2bbabcaddbeff7b6516c5cdd2e05e5f7590a (patch) | |
tree | 3d49104da01698ec9e4387039025e7ba9978ec20 /nginx/ngx_http_js_module.c | |
parent | bd21362fa0473b053514dd6e0518c3f87a0ed42e (diff) | |
download | njs-2c6c2bbabcaddbeff7b6516c5cdd2e05e5f7590a.tar.gz njs-2c6c2bbabcaddbeff7b6516c5cdd2e05e5f7590a.zip |
Skip empty buffers in HTTP response send().
Such buffers lead to send errors and should never be sent.
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r-- | nginx/ngx_http_js_module.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index d6d0f5b4..2a71c51b 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -891,6 +891,10 @@ ngx_http_js_ext_send(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, 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, |