Renaming Context.Req to Context.Request

This commit is contained in:
Manu Mtz-Almeida
2014-07-08 16:57:04 +02:00
parent 6b6ec5be77
commit 2078ecd8e1
4 changed files with 15 additions and 15 deletions

View File

@ -74,7 +74,7 @@ func BasicAuth(accounts Accounts) HandlerFunc {
}
return func(c *Context) {
// Search user in the slice of allowed credentials
user := searchCredential(pairs, c.Req.Header.Get("Authorization"))
user := searchCredential(pairs, c.Request.Header.Get("Authorization"))
if len(user) == 0 {
// Credentials doesn't match, we return 401 Unauthorized and abort request.
c.Writer.Header().Set("WWW-Authenticate", "Basic realm=\"Authorization Required\"")