From b0d304ee8c05662b54a33a59091191c6fa9c7211 Mon Sep 17 00:00:00 2001 From: qicosmos Date: Fri, 26 Jan 2024 12:09:18 +0800 Subject: [PATCH 1/2] add headers --- include/cinatra/session_manager.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/cinatra/session_manager.hpp b/include/cinatra/session_manager.hpp index 0a3ba82d..2178ed92 100644 --- a/include/cinatra/session_manager.hpp +++ b/include/cinatra/session_manager.hpp @@ -1,10 +1,12 @@ #pragma once +#include #include #include #include #include "session.hpp" +#include "ylt/coro_io/coro_io.hpp" namespace cinatra { From ee67e183b8b73adf4b5698e27abf65cb69dfe3ed Mon Sep 17 00:00:00 2001 From: qicosmos Date: Fri, 26 Jan 2024 12:13:09 +0800 Subject: [PATCH 2/2] format --- include/cinatra/coro_http_connection.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cinatra/coro_http_connection.hpp b/include/cinatra/coro_http_connection.hpp index 6826a10a..2b1160a0 100644 --- a/include/cinatra/coro_http_connection.hpp +++ b/include/cinatra/coro_http_connection.hpp @@ -220,7 +220,7 @@ class coro_http_connection if (is_coro_exist) { if (coro_handler) { - co_await (coro_handler)(request_, response_); + co_await coro_handler(request_, response_); } else { response_.set_status(status_type::not_found); @@ -238,7 +238,7 @@ class coro_http_connection std::get<0>(pair))) { auto coro_handler = std::get<1>(pair); if (coro_handler) { - co_await (coro_handler)(request_, response_); + co_await coro_handler(request_, response_); is_matched_regex_router = true; } }