Skip to content

Commit

Permalink
fix(parser): Fixed rouge newline after header.
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinschrader committed Sep 22, 2021
1 parent b52124d commit 8b0bd9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
4 changes: 2 additions & 2 deletions source/httpParser/httpParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8b0bd9e

Please sign in to comment.