From 320aa6b0a9919a2f7ae657b04108f2c2a1d62eaa Mon Sep 17 00:00:00 2001 From: job Date: Mon, 15 Jun 2026 09:20:21 +0000 Subject: [PATCH] Clear last_modified after each response on a persistent HTTP connection (In case a later response doesn't contain its own "Last-Modified" header field.) Reported by Ties de Kock. OK tb@ claudio@ --- usr.sbin/rpki-client/http.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rpki-client/http.c b/usr.sbin/rpki-client/http.c index 468e0a1cdae..457d1c8f505 100644 --- a/usr.sbin/rpki-client/http.c +++ b/usr.sbin/rpki-client/http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: http.c,v 1.103 2026/05/21 21:12:04 claudio Exp $ */ +/* $OpenBSD: http.c,v 1.104 2026/06/15 09:20:21 job Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2020 Claudio Jeker @@ -941,11 +941,13 @@ http_done(struct http_connection *conn, enum http_result res) LIST_REMOVE(conn, entry); LIST_INSERT_HEAD(&idle, conn, entry); - /* reset totalsz, status and keep-alive for good measure */ + /* reset connection parameters in preparation for a next request */ conn->totalsz = 0; conn->was_gzipped = 0; conn->status = 0; conn->keep_alive = 0; + free(conn->last_modified); + conn->last_modified = NULL; return WANT_POLLIN; }