mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix HTTPFetchRequest performing a GET request if post_data is supplied
Instead, perform a POST request with post_data.
This commit is contained in:
parent
b2aabdfe07
commit
a3892f5a66
1 changed files with 1 additions and 1 deletions
|
@ -262,7 +262,7 @@ HTTPFetchOngoing::HTTPFetchOngoing(HTTPFetchRequest request_, CurlHandlePool *po
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set POST (or GET) data
|
// Set POST (or GET) data
|
||||||
if (request.post_fields.empty()) {
|
if (request.post_fields.empty() && request.post_data.empty()) {
|
||||||
curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);
|
curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);
|
||||||
} else if (request.multipart) {
|
} else if (request.multipart) {
|
||||||
curl_httppost *last = NULL;
|
curl_httppost *last = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue