]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Fix HTTPFetchRequest performing a GET request if post_data is supplied
authorJeija <norrepli@gmail.com>
Wed, 17 Feb 2016 19:36:51 +0000 (20:36 +0100)
committerest31 <MTest31@outlook.com>
Mon, 22 Feb 2016 14:39:19 +0000 (15:39 +0100)
Instead, perform a POST request with post_data.

src/httpfetch.cpp

index f10351a01a30d159ec994cb4e66412e1c0236939..1a19dd082a463aafbbe75981617261b78cffb15f 100644 (file)
@@ -262,7 +262,7 @@ HTTPFetchOngoing::HTTPFetchOngoing(HTTPFetchRequest request_, CurlHandlePool *po
        }
 
        // 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);
        } else if (request.multipart) {
                curl_httppost *last = NULL;