[issue2551356] Add etag header when If-Modified-Since GET request returns not-modified (304)

John Rouillard <[email protected]> Mon, 03 Jun 2024 02:10:43 +0000
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
New submission from John Rouillard:

You can do conditional requests in HTTP using an ETag with the If-None-Match header or a date 
with the If-Modified-Since header. This is supported for static files (/@@file/).

if-modified-since (ims) has been supported for a while, but redbot.org reports that it
is not supplying the ETag header when returning a 304 not modified response.
I tried to fix this, but it's turning into a hairball so I am deferring the
fix/reorg until after 2.4.0 is released.

One issue I have is that the etag is different for different Content-Encodings. In
the REST flow, I just append the content-encoding (gzip, zstd, br) to the base etag
(inode-length-modifiedtime).

When I implemented support for If-None-Match, I was able to return the right
encoding sensitive etag because the encoding sensitive etag is sent by the browser.

With IMS, I don't have any hint about the encoding originally used to deliver the file.
I might have to make a best guess by treating it as a non-conditional get. Doing all
the work to figure out what headers and encoding I would send.

----------
components: Web interface
messages: 8087
nosy: rouilj
severity: normal
status: new
title: Add etag header when If-Modified-Since GET request returns not-modified (304)
type: behavior

_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551356>
_________________________________________________