1
0
mirror of synced 2025-12-18 16:34:09 +03:00

Update httplib.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
yhirose
2025-12-05 15:12:37 -05:00
committed by GitHub
parent 27e19a084d
commit 08e237bfb3

View File

@@ -8458,8 +8458,10 @@ inline bool Server::check_if_not_modified(const Request &req, Response &res,
// simplified implementation requires exact matches.
auto ret = detail::split_find(val.data(), val.data() + val.size(), ',',
[&](const char *b, const char *e) {
auto tag = std::string(b, e);
return tag == "*" || tag == etag;
auto len = static_cast<size_t>(e - b);
if (len == 1 && *b == '*') return true;
if (len == etag.size() && std::equal(b, e, etag.begin())) return true;
return false;
});
if (ret) {