]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.13] net/http: change TimeoutHandler's docs to match its new inter...
authorJeff Hodges <jeff@somethingsimilar.com>
Thu, 22 Aug 2019 06:51:44 +0000 (06:51 +0000)
committerAndrew Bonventre <andybons@golang.org>
Thu, 22 Aug 2019 17:40:45 +0000 (17:40 +0000)
As of Go 1.13rc1, TimeoutHandler supports the Flusher and Pusher interfaces and
this change corrects its documentation to say that.

Fixes #33769
Updates #29193

Change-Id: Ia0523f7f2e3dc1f8f0b68950b85a7bf81c4abe60
GitHub-Last-Rev: 5310d2c9608a1af2d3030a9573e920906c76744e
GitHub-Pull-Request: golang/go#33770
Reviewed-on: https://go-review.googlesource.com/c/go/+/191237
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit f3e3b71a50d7a247d07cc4e4295ec2dc44b04b6a)
Reviewed-on: https://go-review.googlesource.com/c/go/+/191169
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/net/http/server.go

index bcc283b66cea53bf257a14665012df238d3a7cdd..2eb16ff632c7346e84c9526697262a899b7d70ca 100644 (file)
@@ -3177,8 +3177,8 @@ func (srv *Server) onceSetNextProtoDefaults() {
 // After such a timeout, writes by h to its ResponseWriter will return
 // ErrHandlerTimeout.
 //
-// TimeoutHandler buffers all Handler writes to memory and does not
-// support the Hijacker or Flusher interfaces.
+// TimeoutHandler supports the Flusher and Pusher interfaces but does not
+// support the Hijacker interface.
 func TimeoutHandler(h Handler, dt time.Duration, msg string) Handler {
        return &timeoutHandler{
                handler: h,