diff options
Diffstat (limited to 'src/types.cpp')
-rw-r--r-- | src/types.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/types.cpp b/src/types.cpp index 8c4575c..66f9acb 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -14,9 +14,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "log.hpp" #include "types.hpp" +#include "log.hpp" + #include <algorithm> #include <cctype> @@ -36,7 +37,7 @@ answer_type::operator string_view() const return body; } -std::ostream &operator <<(std::ostream &out, const answer_type &answer) +std::ostream &operator<<(std::ostream &out, const answer_type &answer) { out << answer.body; return out; @@ -45,10 +46,11 @@ std::ostream &operator <<(std::ostream &out, const answer_type &answer) string_view answer_type::get_header(const string_view field) const { const string_view searchstring{string(field) += ':'}; - auto it{search(headers.begin(), headers.end(), - searchstring.begin(), searchstring.end(), - [](unsigned char a, unsigned char b) + // clang-format off + auto it{search(headers.begin(), headers.end(), searchstring.begin(), + searchstring.end(), [](unsigned char a, unsigned char b) { return tolower(a) == tolower(b); })}; + // clang-format on if (it != headers.end()) { |