Skip to content

Commit ed7e2ee

Browse files
committed
linting fix
1 parent b71f31e commit ed7e2ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simplehttpserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ func basicauthlayer(handler http.Handler) http.HandlerFunc {
6363
user, pass, ok := r.BasicAuth()
6464
if !ok || user != opts.Username || pass != opts.Password {
6565
w.Header().Set("WWW-Authenticate", fmt.Sprintf("Basic realm=\"%s\"", opts.Realm))
66-
w.WriteHeader(401)
67-
w.Write([]byte("Unauthorized.\n"))
66+
w.WriteHeader(http.StatusUnauthorized)
67+
w.Write([]byte("Unauthorized.\n")) //nolint
6868
return
6969
}
7070
handler.ServeHTTP(w, r)

0 commit comments

Comments
 (0)