Custom HTTP response writer
This commit is contained in:
parent
7fb6f794e5
commit
db1a1fec0c
2 changed files with 58 additions and 0 deletions
|
@ -291,6 +291,7 @@ func (s *Server) closeDatabases() {
|
|||
|
||||
// handle is the main entry point for all HTTP requests
|
||||
func (s *Server) handle(w http.ResponseWriter, r *http.Request) {
|
||||
w = newHTTPResponseWriter(w) // Avoid logging "superfluous response.WriteHeader call" warning
|
||||
v, err := s.maybeAuthenticate(r) // Note: Always returns v, even when error is returned
|
||||
if err != nil {
|
||||
s.handleError(w, r, v, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue