mirror of
https://github.com/curl/curl.git
synced 2026-08-02 09:30:29 +03:00
upload: allocate upload buffer on-demand
Saves 16KB on the easy handle for operations that don't need that buffer. Part 1 of #2888
This commit is contained in:
parent
4939f36524
commit
e6e9b006f7
7 changed files with 59 additions and 24 deletions
|
|
@ -367,11 +367,9 @@ CURLcode Curl_close(struct Curl_easy *data)
|
|||
|
||||
Curl_safefree(data->state.buffer);
|
||||
Curl_safefree(data->state.headerbuff);
|
||||
|
||||
Curl_safefree(data->state.ulbuf);
|
||||
Curl_flush_cookies(data, 1);
|
||||
|
||||
Curl_digest_cleanup(data);
|
||||
|
||||
Curl_safefree(data->info.contenttype);
|
||||
Curl_safefree(data->info.wouldredirect);
|
||||
|
||||
|
|
@ -534,6 +532,7 @@ CURLcode Curl_init_userdefined(struct Curl_easy *data)
|
|||
set->expect_100_timeout = 1000L; /* Wait for a second by default. */
|
||||
set->sep_headers = TRUE; /* separated header lists by default */
|
||||
set->buffer_size = READBUFFER_SIZE;
|
||||
set->upload_buffer_size = UPLOAD_BUFSIZE;
|
||||
set->happy_eyeballs_timeout = CURL_HET_DEFAULT;
|
||||
|
||||
Curl_http2_init_userset(set);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue