Make threading and networking optional

This commit is contained in:
2025-02-27 04:17:12 -06:00
parent 29c53b171d
commit 02767f8710
39 changed files with 2054 additions and 99 deletions

View File

@ -2,6 +2,7 @@
#include "TessesFramework/Filesystem/VFS.hpp"
using VFSPath = Tesses::Framework::Filesystem::VFSPath;
namespace Tesses::Framework::Http {
bool Uri::Relative(std::string url, Uri& uri)
{
auto index = url.find_first_of("//");
@ -727,6 +728,24 @@ namespace Tesses::Framework::Http {
}
return true;
}
bool CaseInsensitiveLess::operator() (const std::string& s1, const std::string& s2) const {
return HttpUtils::ToLower(s1) < HttpUtils::ToLower(s2);
}
std::string HttpUtils::ToLower(std::string str)
{
std::string str1(str.length(),' ');
std::transform(str.begin(), str.end(), str1.begin(), tolower);
return str1;
}
std::string HttpUtils::ToUpper(std::string str)
{
std::string str1(str.length(),' ');
std::transform(str.begin(), str.end(), str1.begin(), toupper);
return str1;
}
bool HttpDictionary::GetFirstBoolean(std::string key)
{