Return reason with HTTP error response

This commit is contained in:
kulti 2017-02-27 14:57:36 +03:00 committed by GitHub
parent 3f3e394da2
commit 0174e94f99
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ func (u *Upgrader) returnError(w http.ResponseWriter, r *http.Request, status in
u.Error(w, r, status, err)
} else {
w.Header().Set("Sec-Websocket-Version", "13")
http.Error(w, http.StatusText(status), status)
http.Error(w, reason, status)
}
return nil, err
}