]> git.ipfire.org Git - thirdparty/curl.git/commit
http: write last header line late
authorStefan Eissing <stefan@eissing.org>
Thu, 23 May 2024 10:21:46 +0000 (12:21 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 25 May 2024 21:42:53 +0000 (23:42 +0200)
commit17af2bca58bd8af2eee85d7b4d562e63a9d22110
tree0726fb7133e23a16b61195d15d21fa393e7a3d3a
parent548d169c9c1eda3e7f788468b685a040110bbe31
http: write last header line late

- HEADERFUNCTIONS might inspect response properties like
  CURLINFO_CONTENT_LENGTH_DOWNLOAD_T on seeing the last header line. If
  the line is being written before this is initialized, values are not
  available.

- write the last header line late when analyzing a HTTP response so that
  all information is available at the time of the writing.

- add test1485 to verify that CURLINFO_CONTENT_LENGTH_DOWNLOAD_T works
  on seeing the last header.

Fixes #13752
Reported-by: Harry Sintonen
Closes #13757
lib/http.c
tests/data/Makefile.inc
tests/data/test1485 [new file with mode: 0644]
tests/libtest/Makefile.inc
tests/libtest/lib1485.c [new file with mode: 0644]