aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-11-11 08:40:37 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-11-11 08:40:37 +0000
commit03c22b4576e99abf6385f64f54e3fb85c782cf0f (patch)
tree67bbfddc9db864878812c8fd08be00b478a71678 /lib/url.c
parentef749fa9ce93830f9835c9951a223dea4f5782ff (diff)
Now supports "Transfer-Encoding: chunked" for HTTP PUT operations where the
size of the uploaded file is unknown.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 92c4dd926..0274cb0f9 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1769,6 +1769,16 @@ static CURLcode CreateConnection(struct SessionHandle *data,
is later set "for real" using Curl_pgrsStartNow(). */
conn->data->progress.start = conn->created;
+ conn->upload_chunky =
+ ((conn->protocol&PROT_HTTP) &&
+ data->set.upload &&
+ (data->set.infilesize == -1) &&
+ (data->set.httpversion != CURL_HTTP_VERSION_1_0))?
+ /* HTTP, upload, unknown file size and not HTTP 1.0 */
+ TRUE:
+ /* else, no chunky upload */
+ FALSE;
+
/***********************************************************
* We need to allocate memory to store the path in. We get the size of the
* full URL to be sure, and we need to make it at least 256 bytes since