mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
server: return www-authenticate again on incorrect password
This commit is contained in:
parent
f252323b04
commit
ad224073fe
1 changed files with 2 additions and 1 deletions
|
@ -166,7 +166,8 @@ func (gmx *Gomuks) Authenticate(w http.ResponseWriter, r *http.Request) {
|
||||||
gmx.writeTokenCookie(w)
|
gmx.writeTokenCookie(w)
|
||||||
w.WriteHeader(http.StatusCreated)
|
w.WriteHeader(http.StatusCreated)
|
||||||
} else {
|
} else {
|
||||||
w.WriteHeader(http.StatusForbidden)
|
w.Header().Set("WWW-Authenticate", `Basic realm="gomuks web" charset="UTF-8"`)
|
||||||
|
w.WriteHeader(http.StatusUnauthorized)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue