diff options
-rw-r--r-- | common/http.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/http.c b/common/http.c index 88e15cd..0a87b6a 100644 --- a/common/http.c +++ b/common/http.c @@ -109,8 +109,10 @@ const char * http_post(const char* path, const char* postfields) curl_easy_reset(curl); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &writeCallback); - if (postfields == NULL) - curl_easy_setopt(curl, CURLOPT_POST, 1); + if (postfields == NULL) { + curl_easy_setopt(curl, CURLOPT_POST, 1L); + curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0L); + } return http_perform(path, postfields); } |