Skip to content

Commit

Permalink
fix (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos authored Sep 26, 2023
1 parent 905eee8 commit 6fa3865
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/cinatra/coro_http_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,12 @@ class coro_http_client {
}
}

add_header("Transfer-Encoding", "chunked");
if (headers.empty()) {
add_header("Transfer-Encoding", "chunked");
}
else {
headers.emplace("Transfer-Encoding", "chunked");
}

std::string header_str =
build_request_header(u, method, ctx, true, std::move(headers));
Expand Down

0 comments on commit 6fa3865

Please sign in to comment.