]> Cypherpunks repositories - gostls13.git/commit
http: add Flusher type; remove Flush from ResponseWriter
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 9 Mar 2011 18:24:50 +0000 (10:24 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 9 Mar 2011 18:24:50 +0000 (10:24 -0800)
commitec5c4759190006261014c08aceccb6f99aa53d50
tree1bd8a2d655e7b78a11a8f18fe276bb4740ce1aa0
parent2ac4d5270f65464c136cf978ad61f293e393f0d3
http: add Flusher type; remove Flush from ResponseWriter

The Flush functionality wasn't removed, but now you have
to test if your ResponseWriter is also a Flusher:

func ServeHTTP(rw http.ResponseWriter, req *http.Request) {
   if f, ok := rw.(http.Flusher); ok {
       f.Flush()
   }
}

R=rsc, bradfitzwork
CC=gburd, golang-dev
https://golang.org/cl/4239077
src/pkg/http/server.go