From 12e217d9e37a4cd340b26e6f657eb609d97c0fa3 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Tue, 1 Nov 2022 06:05:42 +0100 Subject: [PATCH] Fix whitespace trimming test failure --- tests/HttpParser.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/HttpParser.cpp b/tests/HttpParser.cpp index cd8e254..06f0c83 100644 --- a/tests/HttpParser.cpp +++ b/tests/HttpParser.cpp @@ -16,8 +16,12 @@ int main() { std::cout << httpRequest->getMethod() << std::endl; - // This fails on anything other than Linux? - assert(httpRequest->getHeader("utf8").length()); + for (auto [key, value] : *httpRequest) { + std::cout << key << ": " << value << std::endl; + } + + /* Since we did proper whitespace trimming this thing is there, but empty */ + assert(httpRequest->getHeader("utf8").data()); /* Return ok */ return s;