]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server : handle If-None-Match weak ETags (#23916)
authorEric Zhang <redacted>
Sun, 31 May 2026 21:21:08 +0000 (05:21 +0800)
committerGitHub <redacted>
Sun, 31 May 2026 21:21:08 +0000 (16:21 -0500)
tools/server/server-http.cpp

index 3616b3b4d014c30641d887b33d044797b0290426..34a20c9d22de25b2f21b0293d9d5573e34f7890e 100644 (file)
@@ -325,7 +325,7 @@ bool server_http_context::init(const common_params & params) {
                     res.set_header("ETag", a->etag);
                     // Check If-None-Match for conditional GET (304 Not Modified)
                     if (const std::string & inm = req.get_header_value("If-None-Match");
-                        !inm.empty() && inm == a->etag) {
+                        !inm.empty() && (inm == a->etag || inm == std::string("W/") + a->etag)) {
                         res.status = 304;
                         return false;
                     }