aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-04-25 14:38:34 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-05-01 22:55:29 +0200
commite40e9d7f0decc799e3ccfe2c418632f8bb52031a (patch)
tree9099a157e632bd258e64af5373fac96298bce77e /lib/transfer.c
parentc79f4908d461cecaa9976099dcbb8a63b351f19e (diff)
buffer: use data->set.buffer_size instead of BUFSIZE
... to properly use the dynamically set buffer size!
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index bafb6e9c8..0bba3f529 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -680,8 +680,6 @@ static CURLcode readwrite_data(struct Curl_easy *data,
excess = (size_t)(k->bytecount + nread - k->maxdownload);
if(excess > 0 && !k->ignorebody) {
if(Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1)) {
- /* The 'excess' amount below can't be more than BUFSIZE which
- always will fit in a size_t */
infof(data,
"Rewinding stream by : %zu"
" bytes on url %s (size = %" CURL_FORMAT_CURL_OFF_T
@@ -936,7 +934,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 * BUFSIZE);
+ data->state.scratch = malloc(2 * data->set.buffer_size);
if(!data->state.scratch) {
failf(data, "Failed to alloc scratch buffer!");