0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-15 17:11:10 +02:00

fix comment

This commit is contained in:
wxiaoguang 2026-04-03 09:52:14 +08:00
parent 7d9a13241c
commit 94af7e2adc

View File

@ -474,8 +474,10 @@ func CommonRoutes() *web.Router {
g.MatchPath("PUT", "/<group:*>/upload", reqPackageAccess(perm.AccessModeWrite), rpm.UploadPackageFile)
// this URL pattern is only used internally in the RPM index, it is generated by us, the filename part is not really used (can be anything)
// Order is important here: the more specific long route (with filename) must come first.
// If the short route is first, it can greedily match the filename as part of the architecture
// when the package name itself contains the string "package".
// Otherwise, when a package name contains "package",
// * request path: ".../rpm/package/gitea-package/1.0.2-1/x86_64/any-file-name"
// * it also matches "/rpm/<group:*>/package/<name>/<version>/<architecture>",
// * TODO: because the generated regexp `^/(.*?)/?package/([^/]+)/([^/]+)/([^/]+)$` is not right for this case
g.MatchPath("HEAD,GET", "/<group:*>/package/<name>/<version>/<architecture>/<filename>", rpm.DownloadPackageFile)
g.MatchPath("HEAD,GET", "/<group:*>/package/<name>/<version>/<architecture>", rpm.DownloadPackageFile)
g.MatchPath("DELETE", "/<group:*>/package/<name>/<version>/<architecture>", reqPackageAccess(perm.AccessModeWrite), rpm.DeletePackageFile)