Score:0

Why does Apache2 not respect Last-Modified headers?

ru flag

On a I have:

ProxyPass           /public !

in order to have content under this path served as static files directly from the file system.

But it seems that the If-Modified-Since and If-None-Match aren't used.

Request headers are always:

If-Modified-Since: Mon, 02 May 2022 15:18:45 GMT
If-None-Match: "1762a-5de08e8890e5e-gzip"

Response is always 200 with payload, and these headers:

Last-Modified: Mon, 02 May 2022 15:18:45 GMT
ETag: "1762a-5de08e8890e5e-gzip"

In this case I would expect a "304 Not Modified" response?

Surely it can not still be this 14 years old issue? https://bz.apache.org/bugzilla/show_bug.cgi?id=45023

Score:0
ru flag

Turns out that it was the above linked issue. And since Apache 2.4 mod_deflate does not support configuring the Etag behaviour, the best solution I could find was removing -gzip from the Etag:

RequestHeader edit "If-None-Match" '^"((.*)-gzip)"$' '"$1", "$2"'
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.