summary refs log tree commit diff
path: root/hittpd.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2021-06-03 16:51:43 +0200
committerLeah Neukirchen <leah@vuxu.org>2021-06-03 16:51:43 +0200
commit77f381ae96a3b9c78bfc504552335f68e5756fa1 (patch)
tree01b721d1f3c700de48a5b054b9f32aa60f9614a8 /hittpd.c
parent43680c08d56dea76ae33977c46c0ff6822b5b7a4 (diff)
downloadhittpd-77f381ae96a3b9c78bfc504552335f68e5756fa1.tar.gz
hittpd-77f381ae96a3b9c78bfc504552335f68e5756fa1.tar.xz
hittpd-77f381ae96a3b9c78bfc504552335f68e5756fa1.zip
reset stream state in finish_response
This fixes wrong partial content answers on keep-alive requests,
detected with mobile Chrome 89.
Diffstat (limited to 'hittpd.c')
-rw-r--r--hittpd.c5
1 files changed, 5 insertions, 0 deletions
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)