Checkpoint

This commit is contained in:
Robin E.R. Davies
2026-02-05 11:51:43 -05:00
parent e5beb97466
commit aec88fa9f1
24 changed files with 949 additions and 306 deletions
+20
View File
@@ -21,6 +21,8 @@
#include <sstream>
#include <string>
#include <cstring>
#include "ss.hpp"
#include <map>
using namespace pipedal;
@@ -388,3 +390,21 @@ std::string HtmlHelper::generateEtag(const std::filesystem::path &path)
crc = crc64((uint8_t*)&fTime, sizeof(fTime));
return std::to_string(crc);
}
static std::map<int,std::string> httpErrorStrings =
{
{200,"OK"},
};
std::string HtmlHelper::httpErrorString(int errorCode)
{
auto ff = httpErrorStrings.find(errorCode);
if (ff != httpErrorStrings.end())
{
return SS(errorCode << " " << ff->second);
}
return SS(errorCode);
}
+2
View File
@@ -63,6 +63,8 @@ public:
static std::string generateEtag(const std::filesystem::path &path);
static std::string httpErrorString(int errorCode);
};
} // namespace.