Add standard-compliant route to serve outdated R packages (#32783) (#32789)

Backport #32783 by Sebastian-T-T

The R package repository currently does not have support for older
versions of packages which should be stored in a separate /Archive
router. This PR remedies that by adding a new path router.

Fixes #32782

Co-authored-by: Sebastian T. T. <109338575+Sebastian-T-T@users.noreply.github.com>
This commit is contained in:
GiteabotandSebastian T. T. authored and GitHub committed 2024-12-11 16:49:06 +00:00
1 parent 0c7e44fcf7
commit ef9d1e9002
2 files changed
+9

No files matched your search

+1
View File
@@ -314,6 +314,7 @@ func CommonRoutes() *web.Route {
r.Get("/PACKAGES", cran.EnumerateSourcePackages)
r.Get("/PACKAGES{format}", cran.EnumerateSourcePackages)
r.Get("/{filename}", cran.DownloadSourcePackageFile)
r.Get("/Archive/{packagename}/{filename}", cran.DownloadSourcePackageFile)
})
r.Put("", reqPackageAccess(perm.AccessModeWrite), cran.UploadSourcePackageFile)
})