Change "HTTP/3" to "HTTP/3.0". (#3439)

This commit is contained in:
Aaron Riekenberg 2022-06-02 12:33:06 -05:00 committed by GitHub
parent b5ef99a32c
commit 990b1fed38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -330,7 +330,7 @@ func (c *client) doRequest(req *http.Request, str quic.Stream, opt RoundTripOpt,
connState := qtls.ToTLSConnectionState(c.conn.ConnectionState().TLS)
res := &http.Response{
Proto: "HTTP/3",
Proto: "HTTP/3.0",
ProtoMajor: 3,
Header: http.Header{},
TLS: &connState,

View file

@ -742,7 +742,7 @@ var _ = Describe("Client", func() {
str.EXPECT().Read(gomock.Any()).DoAndReturn(rspBuf.Read).AnyTimes()
rsp, err := client.RoundTripOpt(req, RoundTripOpt{})
Expect(err).ToNot(HaveOccurred())
Expect(rsp.Proto).To(Equal("HTTP/3"))
Expect(rsp.Proto).To(Equal("HTTP/3.0"))
Expect(rsp.ProtoMajor).To(Equal(3))
Expect(rsp.StatusCode).To(Equal(418))
})

View file

@ -74,7 +74,7 @@ func requestFromHeaders(headers []qpack.HeaderField) (*http.Request, error) {
u.Host = authority
requestURI = authority
} else {
protocol = "HTTP/3"
protocol = "HTTP/3.0"
u, err = url.ParseRequestURI(path)
if err != nil {
return nil, err

View file

@ -22,7 +22,7 @@ var _ = Describe("Request", func() {
Expect(req.Method).To(Equal("GET"))
Expect(req.URL.Path).To(Equal("/foo"))
Expect(req.URL.Host).To(BeEmpty())
Expect(req.Proto).To(Equal("HTTP/3"))
Expect(req.Proto).To(Equal("HTTP/3.0"))
Expect(req.ProtoMajor).To(Equal(3))
Expect(req.ProtoMinor).To(BeZero())
Expect(req.ContentLength).To(Equal(int64(42)))