summaryrefslogtreecommitdiffhomepage
path: root/src/nodejs/unit-http
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2020-03-12 18:40:48 +0300
committerAndrei Belov <defan@nginx.com>2020-03-12 18:40:48 +0300
commit4b7ca39903178e20ec7381205694cb01f0dec6bc (patch)
tree51afb9c7003b5927183e7ddecd766eb19e421233 /src/nodejs/unit-http
parent8414897527ed1616ea39a0cae4d1b8ee170d5cb8 (diff)
parentb3c8a7b33a29208e75dfe4f670cf81dac7b99ccc (diff)
downloadunit-4b7ca39903178e20ec7381205694cb01f0dec6bc.tar.gz
unit-4b7ca39903178e20ec7381205694cb01f0dec6bc.tar.bz2
Merged with the default branch.1.16.0-1
Diffstat (limited to 'src/nodejs/unit-http')
-rw-r--r--src/nodejs/unit-http/unit.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nodejs/unit-http/unit.cpp b/src/nodejs/unit-http/unit.cpp
index 64e076c1..975174d4 100644
--- a/src/nodejs/unit-http/unit.cpp
+++ b/src/nodejs/unit-http/unit.cpp
@@ -812,8 +812,7 @@ Unit::response_write(napi_env env, napi_callback_info info)
/* TODO: will work only for utf8 content-type */
if (req->response_buf != NULL
- && (req->response_buf->end - req->response_buf->free)
- >= buf_len)
+ && req->response_buf->end >= req->response_buf->free + buf_len)
{
buf = req->response_buf;