Browse Source

transport: set Response.TLS/Request

Blake Mizerany 11 years ago
parent
commit
8e4032f957
2 changed files with 4 additions and 2 deletions
  1. 4 1
      transport.go
  2. 0 1
      transport_test.go

+ 4 - 1
transport.go

@@ -194,7 +194,10 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
 		return nil, cc.werr
 	}
 
-	return <-cs.resc, nil
+	resp := <-cs.resc
+	resp.Request = req
+	resp.TLS = &state
+	return resp, nil
 }
 
 func (cc *clientConn) encodeHeaders(req *http.Request) []byte {

+ 0 - 1
transport_test.go

@@ -37,7 +37,6 @@ func TestTransportExternal(t *testing.T) {
 }
 
 func TestTransport(t *testing.T) {
-	condSkipFailingTest(t)
 	const body = "sup"
 	st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
 		io.WriteString(w, body)