mirror of
https://gitlab.com/gnuwget/wget2.git
synced 2026-02-01 14:41:08 +00:00
src/wget.c (_get_header): Do not store metalink files
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
10
src/wget.c
10
src/wget.c
@ -2229,7 +2229,15 @@ static int _get_header(void *context, wget_http_response_t *resp)
|
||||
struct _body_callback_context *ctx = (struct _body_callback_context *)context;
|
||||
|
||||
const char *dest = NULL;
|
||||
if (ctx->head)
|
||||
bool metalink = false;
|
||||
|
||||
if (resp->content_type
|
||||
&& (!wget_strcasecmp_ascii(resp->content_type, "application/metalink4+xml") ||
|
||||
!wget_strcasecmp_ascii(resp->content_type, "application/metalink+xml"))) {
|
||||
metalink = true;
|
||||
}
|
||||
|
||||
if (ctx->head || metalink)
|
||||
dest = NULL;
|
||||
else if (ctx->part) {
|
||||
ctx->outfd = open(ctx->downloader->job->metalink->name, O_WRONLY | O_CREAT, 0644);
|
||||
|
||||
Reference in New Issue
Block a user