ithewei 6 年之前
父节点
当前提交
e53dc00fd4
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      http/client/http_client.cpp

+ 1 - 0
http/client/http_client.cpp

@@ -125,6 +125,7 @@ int http_client_send(HttpRequest* req, HttpResponse* res, int timeout) {
     }
     if (req->body.size() != 0) {
         curl_easy_setopt(handle, CURLOPT_POSTFIELDS, req->body.c_str());
+        curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE, req->body.size());
     }
 
     if (timeout > 0) {