net/http: fix early side effects in the ResponseWriter's ReadFrom
The ResponseWriter's ReadFrom method was causing side effects on the output before any data was read. Now, bail out early and do a normal copy (which does a read before writing) when our input and output are known to not to be the pair of types we need for sendfile. Fixes #5660 R=golang-dev, rsc, nightlyone CC=golang-dev https://golang.org/cl/12632043
Showing
Please register or sign in to comment