| 957 | vector<Future<Nothing>> futures; |
| 958 | |
| 959 | foreach (const string& digest, digests) { |
| 960 | URI blob = uri::docker::blob( |
| 961 | uri.path(), // The 'repository'. |
| 962 | digest, // The 'digest'. |
| 963 | uri.host(), // The 'registry'. |
| 964 | (uri.has_fragment() // The 'scheme'. |
| 965 | ? Option<string>(uri.fragment()) |
| 966 | : None()), |
| 967 | (uri.has_port() // The 'port'. |
| 968 | ? Option<int>(uri.port()) |
| 969 | : None())); |
| 970 | |
| 971 | futures.push_back(fetchBlob(blob, directory, authHeaders)); |
| 972 | } |
| 973 | |
| 974 | return collect(futures) |
| 975 | .then([]() -> Future<Nothing> { return Nothing(); }); |