mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-04 18:56:28 +02:00
fix comment
This commit is contained in:
parent
54bace18d0
commit
35873d4b81
@ -473,11 +473,12 @@ func CommonRoutes() *web.Router {
|
||||
g.MatchPath("GET", "/<group:*>/repodata/<filename>", rpm.GetRepositoryFile)
|
||||
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.
|
||||
// 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
|
||||
// ~~Order is important here: the more specific long route (with filename) must come first.~~
|
||||
// ~~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: the MatchPath has been fixed, the order is not important anymore
|
||||
// As long as the CI passes, we can remove the comments and the new test case (not needed anymore)
|
||||
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user