From 9237c791bbcda9a0a5cfcdb6c6e522068d094882 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 26 Jan 2023 12:48:48 +0100 Subject: [PATCH] Set chunks_transferred to 0 --- src/worker/request_handler.c | 1 + src/worker/tcp_acceptor.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/worker/request_handler.c b/src/worker/request_handler.c index 68e9721..9a531c9 100644 --- a/src/worker/request_handler.c +++ b/src/worker/request_handler.c @@ -48,6 +48,7 @@ static void init_ctx(client_ctx_t *ctx) { ctx->file = NULL; ctx->proxy = NULL; ctx->use_fastcgi = 0; + ctx->chunks_transferred = 0; ctx->use_proxy = 0; ctx->ws_close = 0; ctx->proxy = NULL; diff --git a/src/worker/tcp_acceptor.c b/src/worker/tcp_acceptor.c index 2c94393..8356b09 100644 --- a/src/worker/tcp_acceptor.c +++ b/src/worker/tcp_acceptor.c @@ -17,7 +17,6 @@ #include #include #include -#include static int tcp_acceptor(client_ctx_t *ctx); @@ -115,6 +114,7 @@ static int tcp_acceptor(client_ctx_t *ctx) { ctx->req_num = 0; ctx->s_keep_alive = 1; ctx->c_keep_alive = 1; + ctx->chunks_transferred = 0; return 0; }