Skip to content

Commit

Permalink
fix request bug (qicosmos#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos authored Jul 18, 2023
1 parent 0ccff53 commit 1e1cdb9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions include/cinatra/coro_http_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,9 @@ class coro_http_client {
if (!socket_->impl_.is_open()) {
socket_->impl_.open(asio::ip::tcp::v4());
}
#ifdef CINATRA_ENABLE_SSL
sni_hostname_ = "";
#endif
#ifdef BENCHMARK_TEST
req_str_.clear();
total_len_ = 0;
Expand Down Expand Up @@ -876,7 +879,11 @@ class coro_http_client {
if (!ok) {
break;
}

}
else {
u.path = uri;
}
if (socket_->has_closed_) {
auto conn_future = start_timer(conn_timeout_duration_, "connect timer");
std::string host = proxy_host_.empty() ? u.get_host() : proxy_host_;
std::string port = proxy_port_.empty() ? u.get_port() : proxy_port_;
Expand All @@ -898,9 +905,6 @@ class coro_http_client {
break;
}
}
else {
u.path = uri;
}

std::vector<asio::const_buffer> vec;
std::string req_head_str =
Expand Down

0 comments on commit 1e1cdb9

Please sign in to comment.