Skip to content

Commit 61893a0

Browse files
committed
Fix #2135
1 parent 3af7f2c commit 61893a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

httplib.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -2066,7 +2066,9 @@ template <size_t N> inline constexpr size_t str_len(const char (&)[N]) {
20662066
}
20672067

20682068
inline bool is_numeric(const std::string &str) {
2069-
return !str.empty() && std::all_of(str.begin(), str.end(), ::isdigit);
2069+
return !str.empty() &&
2070+
std::all_of(str.cbegin(), str.cend(),
2071+
[](unsigned char c) { return std::isdigit(c); });
20702072
}
20712073

20722074
inline uint64_t get_header_value_u64(const Headers &headers,

0 commit comments

Comments
 (0)