]> Cypherpunks repositories - gostls13.git/commit
net/http: Transport should return an error when response body ends early
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 24 Jun 2013 20:27:56 +0000 (13:27 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 24 Jun 2013 20:27:56 +0000 (13:27 -0700)
commita054028471d08b5344d5cdb2781259fed84b6f7b
tree9fdf2a88222c590ee331a9a15becbdd9f3e0aaba
parent3eaaed5030a531d11a228353b3f964e4b0227ba7
net/http: Transport should return an error when response body ends early

If a server response contains a Content-Length and the body is short,
the Transport should end in io.ErrUnexpectedEOF, not io.EOF.

Fixes #5738

R=golang-dev, kevlar, r
CC=golang-dev
https://golang.org/cl/10237050
src/pkg/net/http/response_test.go
src/pkg/net/http/transfer.go