SlyMarbo / spdy

[deprecated] A full-featured SPDY library for the Go language.
BSD 2-Clause "Simplified" License
116 stars 13 forks source link

Handle v3.1 in transport #39

Closed rnapier closed 10 years ago

rnapier commented 10 years ago

Not sure if this is the correct solution. Here's the symptom it addresses:

ssl := &tls.Config{
    InsecureSkipVerify: true, // FIXME: check cert
}

client := new(http.Client)
client.Transport = new(spdy.Transport)
client.Transport.(*spdy.Transport).TLSClientConfig = ssl

I start the server with ListenAndServeSPDY. When I try to connect, it crashes.

req, err := http.NewRequest("GET", "https://localhost:12345/konea/agent/123", nil)
resp, err := client.Do(req)

This logs:

   (spdy debug) 2014/03/25 12:04:55 Requesting "https://localhost:12345/konea/agent/123" over SPDY.

and then crashes at transport.go:299

stream, err := conn.Request(req, res, priority)

conn is nil here.

SlyMarbo commented 10 years ago

I just found the bug and have given a slightly different fix, so that's why I'll refuse the request, but thanks anyway =)