Subject: [E-devel] [ecore_con] Bug fix when data is NULL.
If data is NULL, curl makes length field as -1 .
length filed should be set by 0.
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@65006
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDS, data);
curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDSIZE, length);
}
- else if (mode == MODE_POST)
- {
- curl_easy_setopt(url_con->curl_easy, CURLOPT_POST, 1);
- }
+ else curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDSIZE, 0);
+ if (mode == MODE_POST)
+ curl_easy_setopt(url_con->curl_easy, CURLOPT_POST, 1);
}
switch (url_con->time_condition)