mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net/http: document server recovering panics
Fixes #8594. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/145760043
This commit is contained in:
parent
5c795632d6
commit
2c15d45131
1 changed files with 6 additions and 0 deletions
|
|
@ -42,6 +42,12 @@ var (
|
|||
// and then return. Returning signals that the request is finished
|
||||
// and that the HTTP server can move on to the next request on
|
||||
// the connection.
|
||||
//
|
||||
// If ServeHTTP panics, the server (the caller of ServeHTTP) assumes
|
||||
// that the effect of the panic was isolated to the active request.
|
||||
// It recovers the panic, logs a stack trace to the server error log,
|
||||
// and hangs up the connection.
|
||||
//
|
||||
type Handler interface {
|
||||
ServeHTTP(ResponseWriter, *Request)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue