You've already forked cpp-httplib
Update httplib.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -8458,8 +8458,10 @@ inline bool Server::check_if_not_modified(const Request &req, Response &res,
|
|||||||
// simplified implementation requires exact matches.
|
// simplified implementation requires exact matches.
|
||||||
auto ret = detail::split_find(val.data(), val.data() + val.size(), ',',
|
auto ret = detail::split_find(val.data(), val.data() + val.size(), ',',
|
||||||
[&](const char *b, const char *e) {
|
[&](const char *b, const char *e) {
|
||||||
auto tag = std::string(b, e);
|
auto len = static_cast<size_t>(e - b);
|
||||||
return tag == "*" || tag == etag;
|
if (len == 1 && *b == '*') return true;
|
||||||
|
if (len == etag.size() && std::equal(b, e, etag.begin())) return true;
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|||||||
Reference in New Issue
Block a user