From 77f381ae96a3b9c78bfc504552335f68e5756fa1 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 3 Jun 2021 16:51:43 +0200 Subject: reset stream state in finish_response This fixes wrong partial content answers on keep-alive requests, detected with mobile Chrome 89. --- hittpd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hittpd.c') diff --git a/hittpd.c b/hittpd.c index 2ce162e..bbf9b21 100644 --- a/hittpd.c +++ b/hittpd.c @@ -781,6 +781,11 @@ finish_response(int i) datas[i].ims = 0; datas[i].host = 0; + datas[i].off = 0; + datas[i].first = 0; + datas[i].last = -1; + datas[i].state = NONE; + client[i].events = POLLRDNORM; if (parsers[i].flags & F_CONNECTION_CLOSE) -- cgit 1.4.1