diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-10-01 22:59:30 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-10-02 09:35:37 +0200 |
commit | 3997b3e2a4bcf0023d277a74b6187cdad46533b2 (patch) | |
tree | b6a9dfe3f637e09f2e472f570dbc445c6218c69d /src/tool_operate.c | |
parent | 9a13f7c2a7ca5fca99622a6feeb29abc3b05d713 (diff) | |
download | curl-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.c | 4 |
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; |