From 1b97919d03ab55d4e0be05f4700b5b80ece4e5cc Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 24 Oct 2026 12:33:04 +0200 Subject: Initialise workstruct for each read, so that stale entries will not linger in http error cases --- opentracker.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opentracker.c b/opentracker.c index bcc075c..0ae98e6 100644 --- a/opentracker.c +++ b/opentracker.c @@ -183,6 +183,11 @@ static void handle_read(const int64 sock, struct ot_workstruct *ws) { if (byte_count == -1) return; + ws->request = NULL; + ws->request_size = 0; + ws->header_size = 0; + ws->keep_alive = 0; + /* If we get the whole request in one packet, handle it without copying */ if (!array_start(&cookie->request)) { if ((ws->header_size = header_complete(ws->inbuf, byte_count))) { -- cgit v1.3