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:
Daniel Stenberg 2018-08-17 00:49:37 +02:00
parent 4939f36524
commit e6e9b006f7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 59 additions and 24 deletions

View file

@ -54,6 +54,7 @@ CURLcode Curl_readrewind(struct connectdata *conn);
CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp);
CURLcode Curl_retry_request(struct connectdata *conn, char **url);
bool Curl_meets_timecondition(struct Curl_easy *data, time_t timeofdoc);
CURLcode Curl_get_upload_buffer(struct Curl_easy *data);
/* This sets up a forthcoming transfer */
void