diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2013-08-08 14:02:54 -0700 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2013-08-08 14:02:54 -0700 |
commit | 849a8c5a1f626bfe0ada1a2165741e47a9f986a3 (patch) | |
tree | 9734a2a4e726b624c51825f77359c345e957fa45 /api | |
parent | ccdd461c2aae07a0c4739a56eea3e115654d4971 (diff) | |
download | go-849a8c5a1f626bfe0ada1a2165741e47a9f986a3.tar.gz |
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 issue 5660
R=golang-dev, rsc, nightlyone
CC=golang-dev
https://codereview.appspot.com/12632043
Diffstat (limited to 'api')
0 files changed, 0 insertions, 0 deletions