diff options
author | Unknwon <u@gogs.io> | 2015-11-23 22:32:07 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-23 22:32:07 -0500 |
commit | 0128036514ed40b2c878053e633762a8cffed74d (patch) | |
tree | b268fd74611c9307bf0cd946ca7d804b6b265386 /routers/repo | |
parent | ec8d41765d507e1f0b04ccf94dc934a0026498f2 (diff) | |
download | gitea-0128036514ed40b2c878053e633762a8cffed74d.tar.gz gitea-0128036514ed40b2c878053e633762a8cffed74d.zip |
#1681 some fixes for builtin SSH server on Windows
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/http.go | 6 |
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, |