Index | Thread | Search

From:
Job Snijders <job@bsd.nl>
Subject:
Re: httpd: add cache controls for static files
To:
tech@openbsd.org
Date:
Mon, 11 May 2026 08:52:05 +0000

Download raw body.

Thread
On Sun, May 10, 2026 at 01:39:20PM +0200, Kirill A. Korinsky wrote:
> On Tue, 05 May 2026 21:58:01 +0200,
> Kirill A. Korinsky <kirill@korins.ky> wrote:
> > 
> > I'd like to teach httpd to advertise static file revalidation by default
> > with Cache-Control: no-cache, preserving the existing Last-Modified and
> > If-Modified-Since flow; add a [no] cache directive for opting out, and
> > advertise Vary: Accept-Encoding whenever gzip-static is enabled.
> > 
> 
> This is new version which is rebased upon inherit gzip-static in locations
> fix. It widen server flags to 64-bit integers because the 32-bit flag space
> has no room for the cache/no-cache pair.
> 
> Ok?

I'd like to use the functionality, but I found this somewhat counter-intuitive:

   "cache" config directive results in sending "Cache-Control: no-cache" header
"no cache" config directive results in sending "" header

Can we come up with something better on the httpd.conf side?