From 4f41a6a8be0c916ecb1109639faae91bd69fa136 Mon Sep 17 00:00:00 2001 From: mordred Date: Fri, 26 Oct 2018 10:51:02 +0200 Subject: [PATCH] boost::iequal removed --- src/servers/sapphire_api/server_http.hpp | 14 +++----------- src/servers/sapphire_lobby/client_http.hpp | 5 ++--- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/servers/sapphire_api/server_http.hpp b/src/servers/sapphire_api/server_http.hpp index fbc25d43..fcd9cf41 100644 --- a/src/servers/sapphire_api/server_http.hpp +++ b/src/servers/sapphire_api/server_http.hpp @@ -10,6 +10,7 @@ #include #include #include +#include #ifndef CASE_INSENSITIVE_EQUALS_AND_HASH #define CASE_INSENSITIVE_EQUALS_AND_HASH @@ -17,7 +18,7 @@ class case_insensitive_equals { public: bool operator()(const std::string &key1, const std::string &key2) const { - return boost::algorithm::iequals(key1, key2); + return Core::Util::toLowerCopy( key1 ) == Core::Util::toLowerCopy( key2 ); } }; class case_insensitive_hash { @@ -32,15 +33,6 @@ public: }; #endif -// Late 2017 TODO: remove the following checks and always use std::regex -#ifdef USE_BOOST_REGEX -#include -#define REGEX_NS boost -#else -#include -#define REGEX_NS std -#endif - // TODO when switching to c++14, use [[deprecated]] instead #ifndef DEPRECATED #ifdef __GNUC__ @@ -396,7 +388,7 @@ namespace SimpleWeb { auto range=request->header.equal_range("Connection"); for(auto it=range.first;it!=range.second;it++) { - if(boost::iequals(it->second, "close")) + if( Core::Util::toLoweCopy( it->second ) == "close" ) return; } if(http_version>1.05) diff --git a/src/servers/sapphire_lobby/client_http.hpp b/src/servers/sapphire_lobby/client_http.hpp index 034bab97..16cdd4c1 100644 --- a/src/servers/sapphire_lobby/client_http.hpp +++ b/src/servers/sapphire_lobby/client_http.hpp @@ -1,10 +1,9 @@ #ifndef CLIENT_HTTP_HPP #define CLIENT_HTTP_HPP -#include - #include +#include #include #include #include @@ -15,7 +14,7 @@ class case_insensitive_equals { public: bool operator()( const std::string &key1, const std::string &key2 ) const { - return boost::algorithm::iequals( key1, key2 ); + return Core::Util::toLowerCopy( key1 ) == Core::Util::toLowerCopy( key2 ); } }; class case_insensitive_hash {