summaryrefslogtreecommitdiffstats
path: root/routers/repo/http.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-11 11:56:52 -0500
committerUnknwon <u@gogs.io>2016-03-11 11:56:52 -0500
commit514382e2ebfe6869268aeb919c1fa4d224687e13 (patch)
tree1aa8c4b3b1e771a5dc6f0bdd74567961570efcaa /routers/repo/http.go
parentcb1eadc2768ea5ffb2967eb4262e96730c3f9ba5 (diff)
downloadgitea-514382e2ebfe6869268aeb919c1fa4d224687e13.tar.gz
gitea-514382e2ebfe6869268aeb919c1fa4d224687e13.zip
Rename module: middleware -> context
Diffstat (limited to 'routers/repo/http.go')
-rw-r--r--routers/repo/http.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go
index f9600c94de..b273b2334e 100644
--- a/routers/repo/http.go
+++ b/routers/repo/http.go
@@ -23,18 +23,18 @@ import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/base"
+ "github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/modules/log"
- "github.com/gogits/gogs/modules/middleware"
"github.com/gogits/gogs/modules/setting"
)
-func authRequired(ctx *middleware.Context) {
+func authRequired(ctx *context.Context) {
ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=\".\"")
ctx.Data["ErrorMsg"] = "no basic auth and digit auth"
ctx.Error(401)
}
-func HTTP(ctx *middleware.Context) {
+func HTTP(ctx *context.Context) {
username := ctx.Params(":username")
reponame := strings.TrimSuffix(ctx.Params(":reponame"), ".git")
@@ -293,7 +293,7 @@ func getGitDir(config *Config, fPath string) (string, error) {
}
// Request handling function
-func HTTPBackend(ctx *middleware.Context, config *Config) http.HandlerFunc {
+func HTTPBackend(ctx *context.Context, config *Config) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
for _, route := range routes {
r.URL.Path = strings.ToLower(r.URL.Path) // blue: In case some repo name has upper case name