Merge pull request #6 from kesselborn/basic-auth-fix

Tell clients to authenticate with basic auth
This commit is contained in:
Matt T. Proud 2013-01-09 05:02:42 -08:00
commit e9b12f3921
1 changed files with 2 additions and 1 deletions

View File

@ -139,7 +139,8 @@ func (register *Registry) YieldBasicAuthExporter(username, password string) http
if authenticated {
exporter.ServeHTTP(w, r)
} else {
http.Error(w, "access forbidden", 403)
w.Header().Add("WWW-Authenticate", "Basic")
http.Error(w, "access forbidden", 401)
}
})
}