From b0c62fcab30cfb599ac183d22d0384582de5fc4d Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Tue, 6 Jun 2017 00:56:28 +0100 Subject: [PATCH] Add HTTP/1.1 to Status in cgi responses. --- src/tawashi/http_header.cpp | 2 +- test/simulation/test_submit_pastie.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tawashi/http_header.cpp b/src/tawashi/http_header.cpp index d1e6f42..ad7710b 100644 --- a/src/tawashi/http_header.cpp +++ b/src/tawashi/http_header.cpp @@ -88,7 +88,7 @@ namespace tawashi { const HttpStatusCodes code_none = HttpStatusCodes::CodeNone; if (parHeader.status_code() != code_none) { parStream << - "Status: " << + "Status: HTTP/1.1 " << parHeader.status_code()._to_integral() << ' ' << g_status_code_descriptions[parHeader.status_code()] << diff --git a/test/simulation/test_submit_pastie.cpp b/test/simulation/test_submit_pastie.cpp index 1386f62..636f0a9 100644 --- a/test/simulation/test_submit_pastie.cpp +++ b/test/simulation/test_submit_pastie.cpp @@ -146,7 +146,7 @@ TEST_CASE ("Submit paste response", "[submitpaste][response]") { { std::string output = oss.str(); - const char expected[] = "Status: 303 See Other\n" + const char expected[] = "Status: HTTP/1.1 303 See Other\n" "Location: http://192.168.0.10/kamokan/b?colourless\n\n" ; CHECK(output == expected);