Now supports "Transfer-Encoding: chunked" for HTTP PUT operations where the

size of the uploaded file is unknown.
This commit is contained in:
Daniel Stenberg
2002-11-11 08:40:37 +00:00
parent ef749fa9ce
commit 03c22b4576
4 changed files with 71 additions and 4 deletions

View File

@@ -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