]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_cb_hdr: allow etag and content-disposition for 3xx reply
authorJay Satiro <raysatiro@yahoo.com>
Fri, 26 Apr 2024 06:29:20 +0000 (02:29 -0400)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 14 Jun 2024 07:28:42 +0000 (09:28 +0200)
commit85efbb92b8e6679705e122cee45ce76c56414a3e
treed193e059e33efcd427b5199d155d1e4b44dc3ba4
parentcb5c7039e89fa3184f4f9396d8d9b967ee4f6256
tool_cb_hdr: allow etag and content-disposition for 3xx reply

- Parse etag and content-disposition headers for 3xx replies.

For example, a server may send a content-disposition filename header
with a redirect reply (3xx) but not with the final response (2xx).
Without this change curl would ignore the server's specified filename
and continue to use the filename extracted from the user-specified URL.

Prior to this change, 75d79a4 had limited etag and content-disposition
to 2xx replies only.

Tests-by: Daniel Stenberg
Reported-by: Morgan Willcock
Fixes https://github.com/curl/curl/issues/13302
Closes #13484
src/tool_cb_hdr.c
tests/data/Makefile.inc
tests/data/test1487 [new file with mode: 0644]
tests/data/test473 [new file with mode: 0644]