aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-08-18 16:17:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-09-06 10:53:39 +0200
commit2825f46d950ca9b0e269ed8dc6a97c5238a17c30 (patch)
tree1869f93855474b2fe4469351b0dd5ef890bb1fb1 /lib/transfer.c
parent87fefe5ebfa152386396b8e232c7b5b0609f6f35 (diff)
CURLOPT_UPLOAD_BUFFERSIZE: set upload buffer size
This is step 3 of #2888. Fixes #2888 Closes #2896
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 7159d5c82..63d01efd9 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -959,7 +959,8 @@ static CURLcode readwrite_upload(struct Curl_easy *data,
sending_http_headers = FALSE;
}
- result = Curl_fillreadbuffer(conn, UPLOAD_BUFSIZE, &fillcount);
+ result = Curl_fillreadbuffer(conn, data->set.upload_buffer_size,
+ &fillcount);
if(result)
return result;
@@ -991,7 +992,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data,
(data->set.crlf))) {
/* Do we need to allocate a scratch buffer? */
if(!data->state.scratch) {
- data->state.scratch = malloc(2 * UPLOAD_BUFSIZE);
+ data->state.scratch = malloc(2 * data->set.upload_buffer_size);
if(!data->state.scratch) {
failf(data, "Failed to alloc scratch buffer!");