http: fix non-sense `NotFound` call (#7003)

pull/7004/head
Joe Chen 2022-06-04 10:44:54 +08:00 committed by GitHub
parent 5f0999243a
commit 75e10445ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ All notable changes to Gogs are documented in this file.
- Unable to use LDAP authentication on ARM machines. [#6761](https://github.com/gogs/gogs/issues/6761)
- Unable to init repository during creation on Windows. [#6967](https://github.com/gogs/gogs/issues/6967)
- Mysterious panic on `Value not found for type *repo.HTTPContext`. [#6963](https://github.com/gogs/gogs/issues/6963)
### Removed

View File

@ -100,7 +100,7 @@ func HTTPContexter() macaron.Handler {
!strings.Contains(action, "info/") &&
!strings.Contains(action, "HEAD") &&
!strings.Contains(action, "objects/") {
c.NotFound()
c.Error(http.StatusBadRequest, fmt.Sprintf("Unrecognized action %q", action))
return
}