Skip to content

Commit

Permalink
Update coro_http_response.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos authored Jan 23, 2024
1 parent 849f767 commit c9bec30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/cinatra/coro_http_response.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class coro_http_response {
: resp_str.append(CONN_CLOSE_SV);
}

if (content_type_.empty()) {
if (!content_type_.empty()) {
resp_str.append(content_type_);
}

Expand Down Expand Up @@ -210,7 +210,7 @@ class coro_http_response {
: buffers.emplace_back(asio::buffer(CONN_CLOSE_SV));
}

if (content_type_.empty()) {
if (!content_type_.empty()) {
buffers.emplace_back(asio::buffer(content_type_));
}

Expand Down Expand Up @@ -264,4 +264,4 @@ class coro_http_response {
std::unordered_map<std::string, cookie> cookies_;
std::string_view content_type_;
};
} // namespace cinatra
} // namespace cinatra

0 comments on commit c9bec30

Please sign in to comment.