Skip to content

server: handle If-None-Match weak ETags#23916

Merged
aldehir merged 1 commit into
ggml-org:masterfrom
EZForever:server-weak-etag
May 31, 2026
Merged

server: handle If-None-Match weak ETags#23916
aldehir merged 1 commit into
ggml-org:masterfrom
EZForever:server-weak-etag

Conversation

@EZForever
Copy link
Copy Markdown
Contributor

@EZForever EZForever commented May 30, 2026

Overview

See #23849 for details. In short, current logic of comparing ETags in If-None-Match HTTP header does not consider "weak" ETags (prepended with W/) to be the same as "strong" ones, while HTTP specs requires this. This causes reverse proxies which compress HTTP responses (and "weakens" the ETag in the process) to break browser cache validation.

This PR provides a "quick" fix, which assumes llama-server never generate weak ETags by itself. While HTTP specs requires handling more cases (e.g. * wildcard, or multiple ETags), I don't think they are worth to implement here.

Fixes #23849.

Requirements

@EZForever EZForever requested a review from a team as a code owner May 30, 2026 17:15
@aldehir aldehir merged commit 6f165c1 into ggml-org:master May 31, 2026
25 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: server: Insufficient handling of If-None-Match header fails browser cache validation

3 participants