mirror of
https://github.com/curl/curl.git
synced 2026-07-24 19:17:20 +03:00
http: limit the initial send amount to used upload buffer size
Previously this logic would cap the send to CURL_MAX_WRITE_SIZE bytes, but for the situations where a larger upload buffer has been set, this function can benefit from sending more bytes. With default size used, this does the same as before. Also changed the storage of the size to an 'unsigned int' as it is not allowed to be set larger than 2M. Also added cautions to the man pages about changing buffer sizes in run-time. Closes #7022
This commit is contained in:
parent
817c01dacc
commit
1763aceb0c
7 changed files with 22 additions and 17 deletions
|
|
@ -5,7 +5,7 @@
|
|||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2017, 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
|
|
@ -39,6 +39,9 @@ actually get the given size.
|
|||
This buffer size is by default \fICURL_MAX_WRITE_SIZE\fP (16kB). The maximum
|
||||
buffer size allowed to be set is \fICURL_MAX_READ_SIZE\fP (512kB). The minimum
|
||||
buffer size allowed to be set is 1024.
|
||||
|
||||
DO NOT set this option on a handle that is currently used for an active
|
||||
transfer as that may lead to unintended consequences.
|
||||
.SH DEFAULT
|
||||
CURL_MAX_WRITE_SIZE (16kB)
|
||||
.SH PROTOCOLS
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2018, 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
|
|
@ -43,6 +43,9 @@ allowed to be set is 2 megabytes. The minimum buffer size allowed to be set is
|
|||
|
||||
Since curl 7.61.1 the upload buffer is allocated on-demand - so if the handle
|
||||
isn't used for upload, this buffer will not be allocated at all.
|
||||
|
||||
DO NOT set this option on a handle that is currently used for an active
|
||||
transfer as that may lead to unintended consequences.
|
||||
.SH DEFAULT
|
||||
64 kB
|
||||
.SH PROTOCOLS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue