diff --git a/include/ylt/standalone/cinatra/coro_http_client.hpp b/include/ylt/standalone/cinatra/coro_http_client.hpp index 7dcb41579..3474c7c9a 100644 --- a/include/ylt/standalone/cinatra/coro_http_client.hpp +++ b/include/ylt/standalone/cinatra/coro_http_client.hpp @@ -2125,7 +2125,7 @@ class coro_http_client : public std::enable_shared_from_this { std::chrono::seconds(8); std::chrono::steady_clock::duration req_timeout_duration_ = std::chrono::seconds(60); - bool enable_tcp_no_delay_ = false; + bool enable_tcp_no_delay_ = true; std::string resp_chunk_str_; std::span out_buf_; diff --git a/include/ylt/standalone/cinatra/coro_http_response.hpp b/include/ylt/standalone/cinatra/coro_http_response.hpp index af9e8c6c9..0da9eba52 100644 --- a/include/ylt/standalone/cinatra/coro_http_response.hpp +++ b/include/ylt/standalone/cinatra/coro_http_response.hpp @@ -173,8 +173,11 @@ class coro_http_response { : resp_str.append(CONN_CLOSE_SV); } - if (!content_type_.empty()) { - resp_str.append(content_type_); + if (content_view_.empty()) { + resp_str.append(content_); + } + else { + resp_str.append(content_view_); } append_header_str(resp_str, resp_headers_); diff --git a/include/ylt/standalone/cinatra/coro_http_server.hpp b/include/ylt/standalone/cinatra/coro_http_server.hpp index b9f0cb6f0..55c11bab5 100644 --- a/include/ylt/standalone/cinatra/coro_http_server.hpp +++ b/include/ylt/standalone/cinatra/coro_http_server.hpp @@ -863,8 +863,8 @@ class coro_http_server { } void init_address(std::string address) { - CINATRA_LOG_ERROR << "init log"; // init easylog singleton to make sure - // server destruct before easylog. + easylog::logger<>::instance(); // init easylog singleton to make sure + // server destruct before easylog. if (size_t pos = address.find(':'); pos != std::string::npos) { auto port_sv = std::string_view(address).substr(pos + 1);