aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-08-17 00:49:37 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-08-18 15:48:08 +0200
commite6e9b006f770ef104fbcdef32dd6e7f42eb114b7 (patch)
tree6540dd5559e06f6ae7052c743dd0359cad960bcd /lib/urldata.h
parent4939f3652473c1519d2b604068efb87ef7531874 (diff)
upload: allocate upload buffer on-demand
Saves 16KB on the easy handle for operations that don't need that buffer. Part 1 of #2888
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 6119136d4..502cff362 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1220,7 +1220,7 @@ struct UrlState {
size_t headersize; /* size of the allocation */
char *buffer; /* download buffer */
- char uploadbuffer[UPLOAD_BUFSIZE + 1]; /* upload buffer */
+ char *ulbuf; /* alloced upload buffer or NULL */
curl_off_t current_speed; /* the ProgressShow() function sets this,
bytes / second */
bool this_is_a_follow; /* this is a followed Location: request */
@@ -1557,6 +1557,8 @@ struct UserDefined {
curl_proxytype proxytype; /* what kind of proxy that is in use */
long dns_cache_timeout; /* DNS cache timeout */
long buffer_size; /* size of receive buffer to use */
+ long upload_buffer_size; /* size of upload buffer to use,
+ keep it >= CURL_MAX_WRITE_SIZE */
void *private_data; /* application-private data */
struct curl_slist *http200aliases; /* linked list of aliases for http200 */