blob: 8047e9f513a5a10ba6a101a4c0e9904010ffbd3e [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001Long: metalink
2Help: Process given URLs as metalink XML file
3Added: 7.27.0
4Requires: metalink
5---
6This option can tell curl to parse and process a given URI as Metalink file
7(both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors
8listed within for failover if there are errors (such as the file or server not
9being available). It will also verify the hash of the file after the download
10completes. The Metalink file itself is downloaded and processed in memory and
11not stored in the local file system.
12
13Example to use a remote Metalink file:
14
15 curl --metalink http://www.example.com/example.metalink
16
17To use a Metalink file in the local file system, use FILE protocol (file://):
18
19 curl --metalink file://example.metalink
20
21Please note that if FILE protocol is disabled, there is no way to use a local
22Metalink file at the time of this writing. Also note that if --metalink and
23--include are used together, --include will be ignored. This is because
24including headers in the response will break Metalink parser and if the
25headers are included in the file described in Metalink file, hash check will
26fail.
27