File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -388,13 +388,15 @@ struct curlFileTransfer : public FileTransfer
388388 curl_easy_setopt (req, CURLOPT_NOBODY, 1 );
389389
390390 if (request.data ) {
391- if (request.post )
391+ if (request.post ) {
392392 curl_easy_setopt (req, CURLOPT_POST, 1L );
393- else
393+ curl_easy_setopt (req, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t ) request.data ->length ());
394+ } else {
394395 curl_easy_setopt (req, CURLOPT_UPLOAD, 1L );
396+ curl_easy_setopt (req, CURLOPT_INFILESIZE_LARGE, (curl_off_t ) request.data ->length ());
397+ }
395398 curl_easy_setopt (req, CURLOPT_READFUNCTION, readCallbackWrapper);
396399 curl_easy_setopt (req, CURLOPT_READDATA, this );
397- curl_easy_setopt (req, CURLOPT_INFILESIZE_LARGE, (curl_off_t ) request.data ->length ());
398400 curl_easy_setopt (req, CURLOPT_SEEKFUNCTION, seekCallbackWrapper);
399401 curl_easy_setopt (req, CURLOPT_SEEKDATA, this );
400402 }
You can’t perform that action at this time.
0 commit comments