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
This commit is contained in:
Oleg Jukovec 2023-06-11 23:25:44 +03:00 committed by Daniel Stenberg
parent 2738927bb7
commit aaba783d33
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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. 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 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 size before starting the transfer. The library enables this by adding a header
by adding a header like "Transfer-Encoding: chunked" with "Transfer-Encoding: chunked". With HTTP 1.0 or if you prefer not to use chunked
\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you transfer, you must specify the size of the data with
must specify the size. \fICURLOPT_INFILESIZE(3)\fP or \fICURLOPT_INFILESIZE_LARGE(3)\fP.
.SH DEFAULT .SH DEFAULT
0, default is download 0, default is download
.SH PROTOCOLS .SH PROTOCOLS