]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: clarify Handler panic behavior across HTTP versions
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 14 Jul 2017 15:52:41 +0000 (15:52 +0000)
committerTom Bergan <tombergan@google.com>
Fri, 14 Jul 2017 23:04:10 +0000 (23:04 +0000)
Updates #18997

Change-Id: Ib1961a4c26b42f99b98b255beb7e2a74b632e0c1
Reviewed-on: https://go-review.googlesource.com/48551
Reviewed-by: Joe Shaw <joe@joeshaw.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
src/net/http/server.go

index 5447e5f89afc3d1495c00f08b0703bfdbbbdbc59..736c9b83a46a52b07fccab9952045ad79584e5c0 100644 (file)
@@ -75,9 +75,10 @@ var (
 // 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. To abort a handler so the client sees
-// an interrupted response but the server doesn't log an error, panic
-// with the value ErrAbortHandler.
+// and either closes the network connection or sends an HTTP/2
+// RST_STREAM, depending on the HTTP protocol. To abort a handler so
+// the client sees an interrupted response but the server doesn't log
+// an error, panic with the value ErrAbortHandler.
 type Handler interface {
        ServeHTTP(ResponseWriter, *Request)
 }