Commit 17c32ad7 authored by Russ Cox's avatar Russ Cox

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

Fixes #671.

R=adg, cw
CC=golang-dev
https://golang.org/cl/2431042
parent 5e4963d9
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment