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 00:29:11 -05:00
committed by GitHub
parent 1c30c629a5
commit 593199caa4

View File

@@ -2976,7 +2976,8 @@ inline std::string from_i_to_hex(size_t n) {
inline std::string compute_etag(const FileStat &fs) {
if (!fs.is_file()) { return std::string(); }
auto mtime = static_cast<size_t>(fs.mtime());
time_t mtime_raw = fs.mtime();
size_t mtime = mtime_raw < 0 ? 0 : static_cast<size_t>(mtime_raw);
auto size = fs.size();
return std::string("W/\"") + from_i_to_hex(mtime) + "-" +