mirror of
https://github.com/openbsd/src.git
synced 2026-06-17 23:03:29 +02:00
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@
This commit is contained in:
@@ -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 <nils_fisher@hotmail.com>
|
||||
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user