set empty tls.ConnectionState in HTTP request

fixes #342
This commit is contained in:
Marten Seemann
2016-11-02 16:48:17 +07:00
parent a2362f8575
commit 9fba032637
2 changed files with 3 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
package h2quic
import (
"crypto/tls"
"errors"
"net/http"
"net/url"
@@ -64,5 +65,6 @@ func requestFromHeaders(headers []hpack.HeaderField) (*http.Request, error) {
ContentLength: contentLength,
Host: authority,
RequestURI: path,
TLS: &tls.ConnectionState{},
}, nil
}

View File

@@ -29,6 +29,7 @@ var _ = Describe("Request", func() {
Expect(req.Body).To(BeNil())
Expect(req.Host).To(Equal("quic.clemente.io"))
Expect(req.RequestURI).To(Equal("/foo"))
Expect(req.TLS).ToNot(BeNil())
})
It("concatenates the cookie headers", func() {