From 03c22b4576e99abf6385f64f54e3fb85c782cf0f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 11 Nov 2002 08:40:37 +0000 Subject: Now supports "Transfer-Encoding: chunked" for HTTP PUT operations where the size of the uploaded file is unknown. --- lib/url.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/url.c') 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 -- cgit v1.2.3