Skip to content

Commit 6f165c1

Browse files
authored
server : handle If-None-Match weak ETags (ggml-org#23916)
1 parent 399739d commit 6f165c1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/server/server-http.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ bool server_http_context::init(const common_params & params) {
325325
res.set_header("ETag", a->etag);
326326
// Check If-None-Match for conditional GET (304 Not Modified)
327327
if (const std::string & inm = req.get_header_value("If-None-Match");
328-
!inm.empty() && inm == a->etag) {
328+
!inm.empty() && (inm == a->etag || inm == std::string("W/") + a->etag)) {
329329
res.status = 304;
330330
return false;
331331
}

0 commit comments

Comments
 (0)