From 8b0bd9e321f9f47a494c87e9802641f95fdd89df Mon Sep 17 00:00:00 2001 From: Timo Schrader Date: Thu, 23 Sep 2021 00:24:14 +0200 Subject: [PATCH] fix(parser): Fixed rouge newline after header. --- CMakeLists.txt | 2 +- source/httpParser/httpParser.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62de49d..750add2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) # set the project name -PROJECT(kleinsHTTP VERSION 0.3.0) +PROJECT(kleinsHTTP VERSION 0.3.1) option (FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." FALSE) diff --git a/source/httpParser/httpParser.cpp b/source/httpParser/httpParser.cpp index 525497d..14db415 100644 --- a/source/httpParser/httpParser.cpp +++ b/source/httpParser/httpParser.cpp @@ -118,10 +118,10 @@ void kleins::httpParser::respond( << "Server: kleinsHTTP\r\n"; if (sessionKey) { - response << "Set-Cookie: KLEINSHTTP-SESSION=" << *sessionKey << "; SameSite=Strict; HttpOnly"; + response << "Set-Cookie: KLEINSHTTP-SESSION=" << *sessionKey << "; SameSite=Strict; HttpOnly\r\n"; }; - response << "\r\n\r\n" << body << "\r\n"; + response << "\r\n" << body << "\r\n"; std::string finalTarget; finalTarget = response.str();