From 2295e96f69a8c13751ba69ea9176b0599c0909a8 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sat, 11 Jan 2025 14:20:43 +0000 Subject: automatic import of iSulad --- 0135-followlocation-only-not-with-head.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 0135-followlocation-only-not-with-head.patch (limited to '0135-followlocation-only-not-with-head.patch') diff --git a/0135-followlocation-only-not-with-head.patch b/0135-followlocation-only-not-with-head.patch new file mode 100644 index 0000000..2fd2bb0 --- /dev/null +++ b/0135-followlocation-only-not-with-head.patch @@ -0,0 +1,28 @@ +From f526268e2b78330dfe6b63eb5f6ece7417f4c06e Mon Sep 17 00:00:00 2001 +From: jikai +Date: Sat, 27 Apr 2024 14:38:58 +0800 +Subject: [PATCH 144/149] followlocation only not with head + +Signed-off-by: jikai +--- + src/utils/http/http.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/utils/http/http.c b/src/utils/http/http.c +index 8b74f773..c9bb5959 100644 +--- a/src/utils/http/http.c ++++ b/src/utils/http/http.c +@@ -495,7 +495,9 @@ int http_request(const char *url, struct http_get_options *options, long *respon + if (options->resume) { + curl_easy_setopt(curl_handle, CURLOPT_RESUME_FROM_LARGE, (curl_off_t)fsize); + } +- curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L); ++ if (options->with_head == 0) { ++ curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L); ++ } + curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pagefile); + curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, fwrite_file); + } else { +-- +2.25.1 + -- cgit v1.2.3