From 0128036514ed40b2c878053e633762a8cffed74d Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 23 Nov 2015 22:32:07 -0500 Subject: #1681 some fixes for builtin SSH server on Windows --- routers/repo/http.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routers/repo') 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, -- cgit v1.2.3