diff options
author | Igor Sysoev <igor@sysoev.ru> | 2019-11-14 16:40:02 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2019-11-14 16:40:02 +0300 |
commit | 02e197e9782ca19bd668c37c11f529f802823868 (patch) | |
tree | 90a2ca9205e55075648f885396b7c08a34b4672c /src/nxt_buf.c | |
parent | ddde9c23cf302309d85ccc24b35075ce94da89a0 (diff) | |
download | unit-02e197e9782ca19bd668c37c11f529f802823868.tar.gz unit-02e197e9782ca19bd668c37c11f529f802823868.tar.bz2 |
Processing inconsistent proxied response length.
Keepalive connection is disabled if upstream response length
differs from specified in the "Content-Length" field value.
Diffstat (limited to 'src/nxt_buf.c')
-rw-r--r-- | src/nxt_buf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nxt_buf.c b/src/nxt_buf.c index af3f1243..83be0fac 100644 --- a/src/nxt_buf.c +++ b/src/nxt_buf.c @@ -183,7 +183,10 @@ nxt_buf_chain_length(nxt_buf_t *b) length = 0; while (b != NULL) { - length += b->mem.free - b->mem.pos; + if (!nxt_buf_is_sync(b)) { + length += b->mem.free - b->mem.pos; + } + b = b->next; } |