From 9a9f3a3e1875fb6b0ade93d7a337d1f72248309d Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 31 Dec 2024 00:53:24 +0100 Subject: [PATCH] Minor fix --- code/seafire/server/transaction.cxx | 9 +++++---- code/seafire/server/transaction.hxx | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/seafire/server/transaction.cxx b/code/seafire/server/transaction.cxx index c1f5bb9..881d8a4 100644 --- a/code/seafire/server/transaction.cxx +++ b/code/seafire/server/transaction.cxx @@ -10,8 +10,6 @@ #include #include -#include - namespace code::seafire::server { @@ -196,17 +194,22 @@ namespace code::seafire::server auto c = get(get_request()); if (c && c->close()) { + trace() << "close requested by request!"; return false; } if (get_request().version() == protocol::http_1_0 && c) { + trace() << "close requested by protocol version"; return c->keep_alive(); } if (get_request().version() == protocol::http_1_1) { + trace() << "keep-live requested by protocol version"; return true; } + trace() << "defaulting to close"; + return false; } @@ -289,8 +292,6 @@ namespace code::seafire::server return; } - // handle Expect: 100-continue - if (auto expect = request_.headers().get_one("expect"); expect) { if (request_.version() == protocol::http_1_1 && *expect == "100-continue") { static std::string const response{ diff --git a/code/seafire/server/transaction.hxx b/code/seafire/server/transaction.hxx index db9bb46..22c8def 100644 --- a/code/seafire/server/transaction.hxx +++ b/code/seafire/server/transaction.hxx @@ -16,6 +16,7 @@ #include +#include #include #include #include