Skip to content

Commit d2f1a78

Browse files
authored
fix CurlHttpClient.cpp
fix: `makeRequest` didn't add `url.query` to `u` when it is sending a GET request
1 parent faafa5e commit d2f1a78

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/net/CurlHttpClient.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ std::string CurlHttpClient::makeRequest(const Url& url, const std::vector<HttpRe
2929
auto curl = curl_easy_duphandle(curlSettings);
3030

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

3437
// disable keep-alive

0 commit comments

Comments
 (0)