Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle paginated registry metadata responses (swiftlang#8219)
In [4.1 List Package Releases](https://github.com/swiftlang/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#41-list-package-releases) it is stated that a server may respond with a `Link` header that contains a pointer to a subsequent page of results. SwiftPM is not checking for the `next` link in the `Link` header and so if a registry returns paginated results, only the first page of versions is searched when resolving. This would result in a "version not found" error when in reality the version is present in a subsequent page of results. Respect the `next` link in the `Link` header by loading the next page of results and building up a list of versions, continuing until there is no `next` link present in the `Link` header of the last result. Registry servers that serve paginated results now have all their results read. Issue: swiftlang#8215
- Loading branch information