1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

Metalink: ignore --include if --metalink is used.

Including headers in response body will break Metalink XML parser.
If it is included in the file described in Metalink XML, hash check
will fail. Therefore, --include should be ignored if --metalink is
used.
This commit is contained in:
Tatsuhiro Tsujikawa 2012-06-22 23:20:16 +09:00 committed by Yang Tse
parent b193ba8a02
commit 7f59577fdd

View File

@ -879,7 +879,10 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
my_setopt(curl, CURLOPT_NOBODY, 1);
my_setopt(curl, CURLOPT_HEADER, 1);
}
else
/* If --metalink is used, we ignore --include (headers in
output) option because mixing headers to the body will
confuse XML parser and/or hash check will fail. */
else if(!config->use_metalink)
my_setopt(curl, CURLOPT_HEADER, config->include_headers);
#if !defined(CURL_DISABLE_PROXY)