mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:23:31 +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
|
|
@ -2198,7 +2198,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
else if(arg < UPLOADBUFFER_MIN)
|
||||
arg = UPLOADBUFFER_MIN;
|
||||
|
||||
data->set.upload_buffer_size = arg;
|
||||
data->set.upload_buffer_size = (unsigned int)arg;
|
||||
Curl_safefree(data->state.ulbuf); /* force a realloc next opportunity */
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue