gravatarSource = setting.GravatarSource
if strings.HasPrefix(gravatarSource, "//") {
gravatarSource = "http:" + gravatarSource
- } else if !strings.HasPrefix(gravatarSource, "http://") ||
+ } else if !strings.HasPrefix(gravatarSource, "http://") &&
!strings.HasPrefix(gravatarSource, "https://") {
gravatarSource = "http://" + gravatarSource
}
func ApiReqToken() macaron.Handler {
return func(ctx *Context) {
if !ctx.IsSigned {
- ctx.Error(403)
+ ctx.Error(401)
return
}
}
func ApiReqBasicAuth() macaron.Handler {
return func(ctx *Context) {
if !ctx.IsBasicAuth {
- ctx.Error(403)
+ ctx.Error(401)
return
}
}