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

View File

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