From a54b4c8419483d8776730feac9e634adbade88fd Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Sun, 28 Oct 2018 16:26:48 +0100 Subject: [PATCH] Make sure to writeStatus before writeHeader --- src/HttpResponse.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/HttpResponse.h b/src/HttpResponse.h index afd07ac..fb23ad4 100644 --- a/src/HttpResponse.h +++ b/src/HttpResponse.h @@ -141,6 +141,8 @@ public: /* Write an HTTP header with string value */ HttpResponse *writeHeader(std::string_view key, std::string_view value) { + writeStatus(HTTP_200_OK); + Super::write(key.data(), key.length()); Super::write(": ", 2); Super::write(value.data(), value.length());