aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
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!");