From c7ffd6ce7899b3ce992b54553348562731834056 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Tue, 13 Aug 2024 12:42:47 +0000 Subject: [PATCH] curl: fix webdav issue - https://github.com/curl/curl/commit/b8c003832d730bb2f4b9de4204675ca5d9f7a903 - https://github.com/curl/curl/issues 13170 --- .../patches/curl-0001-fix-webdav-issue.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 packages/web/curl/patches/curl-0001-fix-webdav-issue.patch diff --git a/packages/web/curl/patches/curl-0001-fix-webdav-issue.patch b/packages/web/curl/patches/curl-0001-fix-webdav-issue.patch new file mode 100644 index 0000000000..a6c28222a0 --- /dev/null +++ b/packages/web/curl/patches/curl-0001-fix-webdav-issue.patch @@ -0,0 +1,32 @@ +From b8c003832d730bb2f4b9de4204675ca5d9f7a903 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Thu, 1 Feb 2024 13:23:12 +0100 +Subject: [PATCH] sendf: ignore response body to HEAD + +and mark the stream for close, but return OK since the response this far +was ok - if headers were received. Partly because this is what curl has +done traditionally. + +Test 499 verifies. Updates test 689. + +Reported-by: Sergey Bronnikov +Bug: https://curl.se/mail/lib-2024-02/0000.html +Closes #12842 +--- + lib/sendf.c | 3 ++ + 1 files changed, 3 insertions(+) + +diff --git a/lib/sendf.c b/lib/sendf.c +index db3189a29807f9..60ac0742cccdc5 100644 +--- a/lib/sendf.c ++++ b/lib/sendf.c +@@ -575,6 +575,9 @@ static CURLcode cw_download_write(struct Curl_easy *data, + DEBUGF(infof(data, "did not want a BODY, but seeing %zu bytes", + nbytes)); + data->req.download_done = TRUE; ++ if(data->info.header_size) ++ /* if headers have been received, this is fine */ ++ return CURLE_OK; + return CURLE_WEIRD_SERVER_REPLY; + } +