aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/http.go')
-rw-r--r--routers/repo/http.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go
index 214cc9ba39..7bc5f1aff6 100644
--- a/routers/repo/http.go
+++ b/routers/repo/http.go
@@ -84,13 +84,13 @@ func HTTP(ctx *middleware.Context) {
// check access
if askAuth {
- baHead := ctx.Req.Header.Get("Authorization")
- if baHead == "" {
+ authHead := ctx.Req.Header.Get("Authorization")
+ if len(authHead) == 0 {
authRequired(ctx)
return
}
- auths := strings.Fields(baHead)
+ auths := strings.Fields(authHead)
// currently check basic auth
// TODO: support digit auth
// FIXME: middlewares/context.go did basic auth check already,