]> git.ipfire.org Git - thirdparty/curl.git/commit
http: with chunked POST forced, disable length check on read callback
authorStefan Eissing <stefan@eissing.org>
Mon, 1 Apr 2024 13:41:18 +0000 (15:41 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 2 Apr 2024 06:41:44 +0000 (08:41 +0200)
commit721941aadf4adf4f6aeb3f4c0ab489bb89610c36
treeedfd877f769100df3fba7a695cad89ae0f1933c9
parentd36c1a769164e509fed08de6910ac395ecaa4a50
http: with chunked POST forced, disable length check on read callback

- when an application forces HTTP/1.1 chunked transfer encoding
  by setting the corresponding header and instructs curl to use
  the CURLOPT_READFUNCTION, disregard any POST length information.
- this establishes backward compatibility with previous curl versions

Applications are encouraged to not force "chunked", but rather
set length information for a POST. By setting -1, curl will
auto-select chunked on HTTP/1.1 and work properly on other HTTP
versions.

Reported-by: Jeff King
Fixes #13229
Closes #13257
lib/http.c