mirror of
https://github.com/caddyserver/caddy.git
synced 2026-10-06 13:47:07 +00:00
Detailed godoc; better error handling convention
This commit is contained in:
parent
0a9a19305c
commit
29fec4742e
3 changed files with 27 additions and 10 deletions
|
|
@ -69,6 +69,7 @@ func (h ErrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, er
|
|||
|
||||
if status >= 400 {
|
||||
h.errorPage(w, status)
|
||||
return 0, err // status < 400 signals that a response has been written
|
||||
}
|
||||
|
||||
return status, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue