move Connection header so it is applied to failed authentication
attempts as well. ok @davecgh
This commit is contained in:
parent
476000193f
commit
642c834ada
1 changed files with 1 additions and 1 deletions
|
@ -166,11 +166,11 @@ func (s *rpcServer) Start() {
|
|||
ReadTimeout: time.Second * rpcAuthTimeoutSeconds,
|
||||
}
|
||||
rpcServeMux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Connection", "close")
|
||||
if _, err := s.checkAuth(r, true); err != nil {
|
||||
jsonAuthFail(w, r, s)
|
||||
return
|
||||
}
|
||||
w.Header().Set("Connection", "close")
|
||||
jsonRPCRead(w, r, s)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue