Skip to content

Commit

Permalink
Update coro_http_client.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
helintongh committed Mar 3, 2023
1 parent 5d9193c commit 0836c59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/cinatra/coro_http_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ class coro_http_client {
#endif
}
// construct proxy request uri
construct_proxy_uri(u);

return {true, u};
}

void construct_proxy_uri(uri_t &u) {
if (!proxy_host_.empty() && !proxy_port_.empty()) {
if (!proxy_request_uri_.empty())
proxy_request_uri_.clear();
Expand All @@ -342,8 +348,6 @@ class coro_http_client {
proxy_request_uri_ += u.get_path();
u.path = std::string_view(proxy_request_uri_);
}

return {true, u};
}

std::string prepare_request_str(const uri_t &u, http_method method,
Expand Down

0 comments on commit 0836c59

Please sign in to comment.