mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Rename ctx.Form() to ctx.FormString() and move code into own file (#16571)
Followup from #16562 prepare for #16567 * Rename ctx.Form() to ctx.FormString() * Reimplement FormX func to need less code and cpu cycles * Move code into own file
This commit is contained in:
@@ -70,13 +70,13 @@ func httpBase(ctx *context.Context) (h *serviceHandler) {
|
||||
username := ctx.Params(":username")
|
||||
reponame := strings.TrimSuffix(ctx.Params(":reponame"), ".git")
|
||||
|
||||
if ctx.Form("go-get") == "1" {
|
||||
if ctx.FormString("go-get") == "1" {
|
||||
context.EarlyResponseForGoGetMeta(ctx)
|
||||
return
|
||||
}
|
||||
|
||||
var isPull, receivePack bool
|
||||
service := ctx.Form("service")
|
||||
service := ctx.FormString("service")
|
||||
if service == "git-receive-pack" ||
|
||||
strings.HasSuffix(ctx.Req.URL.Path, "git-receive-pack") {
|
||||
isPull = false
|
||||
|
Reference in New Issue
Block a user