func (s *SpdyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
	r := *req
	req = &r
	req.Header.Add(httpstream.HeaderConnection, httpstream.HeaderUpgrade)
	req.Header.Add(httpstream.HeaderUpgrade, HeaderSpdy31)
	conn, err := s.dial(req)
	if err != nil {
		return nil, err
	}
	err = req.Write(conn)
	if err != nil {
		return nil, err
	}
	resp, err := http.ReadResponse(bufio.NewReader(conn), req)
	if err != nil {
		return nil, err
	}
	s.conn = conn
	return resp, nil
}
RoundTrip executes the Request and upgrades it. After a successful upgrade,
clients may call SpdyRoundTripper.Connection() to retrieve the upgraded
connection.
package spdy
import (
	"bufio"
	"crypto/tls"
	"fmt"
	"io/ioutil"
	"net"
	"net/http"
	"strings"
	"github.com/GoogleCloudPlatform/kubernetes/pkg/util/httpstream"
	"github.com/GoogleCloudPlatform/kubernetes/third_party/golang/netutil"
)
type SpdyRoundTripper struct {
	tlsConfig *tls.Config
	conn net.Conn
}
func NewRoundTripper(tlsConfig *tls.Config) httpstream.UpgradeRoundTripper {
	return &SpdyRoundTripper{tlsConfig: tlsConfig}
}
func (s *SpdyRoundTripper) dial(req *http.Request) (net.Conn, error) {
	dialAddr := netutil.CanonicalAddr(req.URL)
	if req.URL.Scheme == "http" {
		return net.Dial("tcp", dialAddr)
	}
	conn, err := tls.Dial("tcp", dialAddr, s.tlsConfig)
	if err != nil {
		return nil, err
	}
	host, _, err := net.SplitHostPort(dialAddr)
	if err != nil {
		return nil, err
	}
	err = conn.VerifyHostname(host)
	if err != nil {
		return nil, err
	}
	return conn, nil
}