From 61893a00a42d0f5ac00c9422d63bd82ccdc56531 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sat, 3 May 2025 22:50:47 +0900 Subject: [PATCH] Fix #2135 --- httplib.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index 0aa4e62..766819d 100644 --- a/httplib.h +++ b/httplib.h @@ -2066,7 +2066,9 @@ template inline constexpr size_t str_len(const char (&)[N]) { } inline bool is_numeric(const std::string &str) { - return !str.empty() && std::all_of(str.begin(), str.end(), ::isdigit); + return !str.empty() && + std::all_of(str.cbegin(), str.cend(), + [](unsigned char c) { return std::isdigit(c); }); } inline uint64_t get_header_value_u64(const Headers &headers,