Skip to content

Commit

Permalink
update quic-go to v0.43.0 (#150)
Browse files Browse the repository at this point in the history
* update quic-go to v0.43.0

* run go generate
  • Loading branch information
marten-seemann authored Apr 27, 2024
1 parent 36bc4d6 commit 0b9ae93
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 73 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (d *Dialer) Dial(ctx context.Context, urlStr string, reqHdr http.Header) (*
if !settings.EnableExtendedConnect {
return nil, nil, errors.New("server didn't enable Extended CONNECT")
}
if !settings.EnableDatagram {
if !settings.EnableDatagrams {
return nil, nil, errors.New("server didn't enable HTTP/3 datagram support")
}
if settings.Other == nil {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/quic-go/webtransport-go
go 1.21

require (
github.com/quic-go/quic-go v0.42.1-0.20240411165505-da410a7b5935
github.com/quic-go/quic-go v0.43.0
github.com/stretchr/testify v1.8.0
go.uber.org/mock v0.4.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7q
github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
github.com/quic-go/quic-go v0.42.1-0.20240411165505-da410a7b5935 h1:gKMPe5jl70yeWH2AW2eHZ4Mva+rmxKIfOG2MKv6tmaU=
github.com/quic-go/quic-go v0.42.1-0.20240411165505-da410a7b5935/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M=
github.com/quic-go/quic-go v0.43.0 h1:sjtsTKWX0dsHpuMJvLxGqoQdtgJnbAPWY+W+5vjYW/g=
github.com/quic-go/quic-go v0.43.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
Expand Down
59 changes: 0 additions & 59 deletions mock_connection_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,23 +185,17 @@ func (s *Server) Upgrade(w http.ResponseWriter, r *http.Request) (*Session, erro
return nil, errors.New("webtransport: didn't receive the client's SETTINGS on time")
}
settings := conn.Settings()
if !settings.EnableDatagram {
if !settings.EnableDatagrams {
return nil, errors.New("webtransport: missing datagram support")
}

w.Header().Add(webTransportDraftHeaderKey, webTransportDraftHeaderValue)
w.WriteHeader(http.StatusOK)
w.(http.Flusher).Flush()

httpStreamer := r.Body.(http3.HTTPStreamer)
str := httpStreamer.HTTPStream()
sID := sessionID(str.StreamID())

return s.conns.AddSession(
conn,
sID,
httpStreamer.HTTPStream(),
), nil
str := w.(http3.HTTPStreamer).HTTPStream()
sessID := sessionID(str.StreamID())
return s.conns.AddSession(conn, sessID, str), nil
}

// copied from https://github.com/gorilla/websocket
Expand Down

0 comments on commit 0b9ae93

Please sign in to comment.