summaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-10-01 22:59:30 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-10-02 09:35:37 +0200
commit3997b3e2a4bcf0023d277a74b6187cdad46533b2 (patch)
treeb6a9dfe3f637e09f2e472f570dbc445c6218c69d /src/tool_operate.c
parent9a13f7c2a7ca5fca99622a6feeb29abc3b05d713 (diff)
downloadcurl-3997b3e2a4bcf0023d277a74b6187cdad46533b2.tar.gz
curl: make --libcurl show binary posts correctly
Reported-by: Stephan Mühlstrasser Fixes #6031 Closes #6032
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index e03bbedb8..54c99e3bc 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -320,8 +320,10 @@ static CURLcode pre_transfer(struct GlobalConfig *global,
if(S_ISREG(fileinfo.st_mode))
uploadfilesize = fileinfo.st_size;
- if(uploadfilesize != -1)
+ if(uploadfilesize != -1) {
+ struct OperationConfig *config = per->config; /* for the macro below */
my_setopt(per->curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
+ }
per->input.fd = per->infd;
}
return result;