aboutsummaryrefslogtreecommitdiff
path: root/backends/networking
diff options
context:
space:
mode:
Diffstat (limited to 'backends/networking')
-rw-r--r--backends/networking/curl/networkreadstream.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/networking/curl/networkreadstream.cpp b/backends/networking/curl/networkreadstream.cpp
index 0cf7118a8a..9a196b92d2 100644
--- a/backends/networking/curl/networkreadstream.cpp
+++ b/backends/networking/curl/networkreadstream.cpp
@@ -46,8 +46,10 @@ NetworkReadStream::NetworkReadStream(const char *url, curl_slist *headersList, C
curl_easy_setopt(_easy, CURLOPT_URL, url);
curl_easy_setopt(_easy, CURLOPT_VERBOSE, 0L);
curl_easy_setopt(_easy, CURLOPT_HTTPHEADER, headersList);
- curl_easy_setopt(_easy, CURLOPT_POSTFIELDSIZE, postFields.size());
- curl_easy_setopt(_easy, CURLOPT_COPYPOSTFIELDS, postFields.c_str());
+ if (postFields.size() != 0) {
+ curl_easy_setopt(_easy, CURLOPT_POSTFIELDSIZE, postFields.size());
+ curl_easy_setopt(_easy, CURLOPT_COPYPOSTFIELDS, postFields.c_str());
+ }
ConnMan.registerEasyHandle(_easy);
}