1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/src-openeuler-iSulad

В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
0135-followlocation-only-not-with-head.patch 1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
武积超 Отправлено 21.10.2024 15:19 44b8685
From f526268e2b78330dfe6b63eb5f6ece7417f4c06e Mon Sep 17 00:00:00 2001
From: jikai <jikai11@huawei.com>
Date: Sat, 27 Apr 2024 14:38:58 +0800
Subject: [PATCH 144/149] followlocation only not with head
Signed-off-by: jikai <jikai11@huawei.com>
---
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

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/src-openeuler-iSulad.git
git@api.gitlife.ru:oschina-mirror/src-openeuler-iSulad.git
oschina-mirror
src-openeuler-iSulad
src-openeuler-iSulad
master