From: Oleg Jukovec Date: Sun, 11 Jun 2023 20:25:44 +0000 (+0300) Subject: docs: update CURLOPT_UPLOAD.3 X-Git-Tag: curl-8_2_0~111 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aaba783d3380c5383f9d0eef8cd6e3ddbcff1778;p=thirdparty%2Fcurl.git docs: update CURLOPT_UPLOAD.3 The behavior of CURLOPT_UPLOAD differs from what is described in the documentation. The option automatically adds the 'Transfer-Encoding: chunked' header if the upload size is unknown. Closes #11300 --- diff --git a/docs/libcurl/opts/CURLOPT_UPLOAD.3 b/docs/libcurl/opts/CURLOPT_UPLOAD.3 index fa768d598d..190e6ae332 100644 --- a/docs/libcurl/opts/CURLOPT_UPLOAD.3 +++ b/docs/libcurl/opts/CURLOPT_UPLOAD.3 @@ -42,10 +42,10 @@ Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual. If you use PUT to an HTTP 1.1 server, you can upload data without knowing the -size before starting the transfer if you use chunked encoding. You enable this -by adding a header like "Transfer-Encoding: chunked" with -\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you -must specify the size. +size before starting the transfer. The library enables this by adding a header +"Transfer-Encoding: chunked". With HTTP 1.0 or if you prefer not to use chunked +transfer, you must specify the size of the data with +\fICURLOPT_INFILESIZE(3)\fP or \fICURLOPT_INFILESIZE_LARGE(3)\fP. .SH DEFAULT 0, default is download .SH PROTOCOLS