Skip to content

Commit

Permalink
Change "HTTP/3" to "HTTP/3.0". (quic-go#3439)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronriekenberg authored and nmldiegues committed Jun 6, 2022
1 parent f34c669 commit daf4246
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion http3/client.go
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion http3/client_test.go
Expand Up @@ -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))
})
Expand Down
2 changes: 1 addition & 1 deletion http3/request.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion http3/request_test.go
Expand Up @@ -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)))
Expand Down

0 comments on commit daf4246

Please sign in to comment.