1
0
mirror of https://github.com/golang/go synced 2024-11-24 22:57:57 -07:00

http: do not close connection after sending HTTP/1.0 request

Fixes #671.

R=adg, cw
CC=golang-dev
https://golang.org/cl/2431042
This commit is contained in:
Russ Cox 2010-10-19 23:29:25 -04:00
parent 5e4963d9e8
commit 17c32ad712

View File

@ -184,6 +184,7 @@ func readTransfer(msg interface{}, r *bufio.Reader) (err os.Error) {
t.RequestMethod = rr.RequestMethod
t.ProtoMajor = rr.ProtoMajor
t.ProtoMinor = rr.ProtoMinor
t.Close = shouldClose(t.ProtoMajor, t.ProtoMinor, t.Header)
case *Request:
t.Header = rr.Header
t.ProtoMajor = rr.ProtoMajor
@ -210,9 +211,6 @@ func readTransfer(msg interface{}, r *bufio.Reader) (err os.Error) {
return err
}
// Closing
t.Close = shouldClose(t.ProtoMajor, t.ProtoMinor, t.Header)
// Trailer
t.Trailer, err = fixTrailer(t.Header, t.TransferEncoding)
if err != nil {