summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_h1proto.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2019-11-14 16:40:02 +0300
committerIgor Sysoev <igor@sysoev.ru>2019-11-14 16:40:02 +0300
commit02e197e9782ca19bd668c37c11f529f802823868 (patch)
tree90a2ca9205e55075648f885396b7c08a34b4672c /src/nxt_h1proto.c
parentddde9c23cf302309d85ccc24b35075ce94da89a0 (diff)
downloadunit-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_h1proto.c')
-rw-r--r--src/nxt_h1proto.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index 064b8f38..b07eaf84 100644
--- a/src/nxt_h1proto.c
+++ b/src/nxt_h1proto.c
@@ -1549,6 +1549,7 @@ nxt_h1p_request_close(nxt_task_t *task, nxt_http_proto_t proto,
nxt_debug(task, "h1p request close");
h1p = proto.h1;
+ h1p->keepalive &= !h1p->request->inconsistent;
h1p->request = NULL;
nxt_router_conf_release(task, joint);