From 8cca3b6c87eae608b61f339eec300d4bf5cf2d60 Mon Sep 17 00:00:00 2001 From: Emil Mikulic Date: Sun, 17 Jan 2021 23:00:32 +1100 Subject: [PATCH] Fix a bug when a range is requested and the request is too large. --- darkhttpd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/darkhttpd.c b/darkhttpd.c index 4d0a9f9..d806b85 100644 --- a/darkhttpd.c +++ b/darkhttpd.c @@ -1529,6 +1529,9 @@ static void default_reply(struct connection *conn, conn->reply_type = REPLY_GENERATED; conn->http_code = errcode; + + /* Reset reply_start in case the request set a range. */ + conn->reply_start = 0; } static void redirect(struct connection *conn, const char *format, ...)