Skip to content

Commit

Permalink
fix CurlHttpClient.cpp
Browse files Browse the repository at this point in the history
fix: `makeRequest` didn't add `url.query` to `u` when it is sending a GET request
  • Loading branch information
AtomAlpaca authored Oct 7, 2024
1 parent faafa5e commit d2f1a78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/net/CurlHttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ std::string CurlHttpClient::makeRequest(const Url& url, const std::vector<HttpRe
auto curl = curl_easy_duphandle(curlSettings);

std::string u = url.protocol + "://" + url.host + url.path;
if (args.empty()) {
u += "?" + url.query;
}
curl_easy_setopt(curl, CURLOPT_URL, u.c_str());

// disable keep-alive
Expand Down

0 comments on commit d2f1a78

Please sign in to comment.