diff options
author | Sebastian T. T. <109338575+Sebastian-T-T@users.noreply.github.com> | 2024-12-11 17:20:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-11 16:20:04 +0000 |
commit | 874b8484aa9f7e10172fd1a8a7c768e70b36c475 (patch) | |
tree | 7a62b0044f1705c422b1bff8cd3f0e6c080e68fb /routers/api | |
parent | 4814f43af778d636f1a920e4fa45d7b173ef4582 (diff) | |
download | gitea-874b8484aa9f7e10172fd1a8a7c768e70b36c475.tar.gz gitea-874b8484aa9f7e10172fd1a8a7c768e70b36c475.zip |
Add standard-compliant route to serve outdated R packages (#32783)
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.
I am a member of a group that loves using Gitea and this bug has been
annoying us for a long time. Hope it can be merged in time for Gitea
1.23.0.
Any feedback much appreciated.
Fixes #32782
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/packages/api.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/api/packages/api.go b/routers/api/packages/api.go index 4e194f65fa..47ea7137b8 100644 --- a/routers/api/packages/api.go +++ b/routers/api/packages/api.go @@ -358,6 +358,7 @@ func CommonRoutes() *web.Router { 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) }) |