rpki-client: on persistent HTTP connections clear last_modified for next request

Job Snijders <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
On persistent connections, make sure an earlier "Last-Modified" header
field instance is cleared, in case a later response doesn't contain its
own "Last-Modified" header field.

Based on a question from Ties de Kock from RIPE NCC

OK?

Index: http.c
===================================================================
RCS file: /cvs/src/usr.sbin/rpki-client/http.c,v
diff -u -p -r1.103 http.c
--- http.c	21 May 2026 21:12:04 -0000	1.103
+++ http.c	13 Jun 2026 04:49:47 -0000
@@ -941,11 +941,13 @@ http_done(struct http_connection *conn, 
 	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;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.