diff options
author | Balazs Kovacsics <balazs.kovacsics@ericsson.com> | 2019-07-22 14:37:37 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-07-29 13:18:53 +0200 |
commit | 802aa5ae27ce755b94477976397502dc056227c4 (patch) | |
tree | a9c9b24c4dbe2ae89d9ce609ce1a2602c47a336d /docs/libcurl/opts | |
parent | 9736ac03ab3c9b352437dc1cb6cb4568bbf1a711 (diff) |
HTTP: use chunked Transfer-Encoding for HTTP_POST if size unknown
If using the read callback for HTTP_POST, and POSTFIELDSIZE is not set,
automatically add a Transfer-Encoding: chunked header, same as it is
already done for HTTP_PUT, HTTP_POST_FORM and HTTP_POST_MIME. Update
test 1514 according to the new behaviour.
Closes #4138
Diffstat (limited to 'docs/libcurl/opts')
-rw-r--r-- | docs/libcurl/opts/CURLOPT_POST.3 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/libcurl/opts/CURLOPT_POST.3 b/docs/libcurl/opts/CURLOPT_POST.3 index 66e5c6ac7..2f3d43d67 100644 --- a/docs/libcurl/opts/CURLOPT_POST.3 +++ b/docs/libcurl/opts/CURLOPT_POST.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -55,7 +55,8 @@ If you use POST to an HTTP 1.1 server, you can send data without knowing the size before starting the POST 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 in the request. +must specify the size in the request. (Since 7.66.0, libcurl will +automatically use chunked encoding for POSTs if the size is unknown.) When setting \fICURLOPT_POST(3)\fP to 1, libcurl will automatically set \fICURLOPT_NOBODY(3)\fP and \fICURLOPT_HTTPGET(3)\fP to 0. |