Skip to content

Commit

Permalink
Up quic/webtransport to the latest versions (#804)
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed May 2, 2024
1 parent 231ebe7 commit f3405dc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/nats-io/nats.go v1.34.1
github.com/prometheus/client_golang v1.19.0
github.com/quic-go/quic-go v0.42.0
github.com/quic-go/webtransport-go v0.7.0
github.com/quic-go/quic-go v0.43.0
github.com/quic-go/webtransport-go v0.8.0
github.com/rakutentech/jwk-go v1.1.3
github.com/rs/zerolog v1.32.0
github.com/spf13/cobra v1.8.0
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@ 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.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM=
github.com/quic-go/quic-go v0.42.0/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/quic-go/webtransport-go v0.7.0 h1:dv9wDD9Rd0cuSRLRHPrOX9fSY8QBpdXW4Ls85WXMKqE=
github.com/quic-go/webtransport-go v0.7.0/go.mod h1:MX3nFXrcXkdzblIfOXFZ5lVCZhn+VbMMspOweP1HoXE=
github.com/quic-go/webtransport-go v0.8.0 h1:HxSrwun11U+LlmwpgM1kEqIqH90IT4N8auv/cD7QFJg=
github.com/quic-go/webtransport-go v0.8.0/go.mod h1:N99tjprW432Ut5ONql/aUhSLT0YVSlwHohQsuac9WaM=
github.com/rakutentech/jwk-go v1.1.3 h1:PiLwepKyUaW+QFG3ki78DIO2+b4IVK3nMhlxM70zrQ4=
github.com/rakutentech/jwk-go v1.1.3/go.mod h1:LtzSv4/+Iti1nnNeVQiP6l5cI74GBStbhyXCYvgPZFk=
github.com/redis/rueidis v1.0.35 h1:S1q50VYRl8Hg/ekcF5UPZsRXD4GYDLLU2b+oEogycnI=
Expand Down
11 changes: 8 additions & 3 deletions internal/middleware/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,14 @@ func (lrw *logResponseWriter) Flush() {
lrw.ResponseWriter.(http.Flusher).Flush()
}

// StreamCreator for WebTransport.
func (lrw *logResponseWriter) StreamCreator() http3.StreamCreator {
return lrw.ResponseWriter.(http3.Hijacker).StreamCreator()
// Connection for WebTransport.
func (lrw *logResponseWriter) Connection() http3.Connection {
return lrw.ResponseWriter.(http3.Hijacker).Connection()
}

// HTTPStream for WebTransport.
func (lrw *logResponseWriter) HTTPStream() http3.Stream {
return lrw.ResponseWriter.(http3.HTTPStreamer).HTTPStream()
}

// CloseNotify as SockJS uses http.CloseNotifier.
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ func runHTTPServers(n *centrifuge.Node, ruleContainer *rule.Container, apiExecut

if useHTTP3 {
server.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
_ = wtServer.H3.SetQuicHeaders(w.Header())
_ = wtServer.H3.SetQUICHeaders(w.Header())
mux.ServeHTTP(w, r)
})
}
Expand Down

0 comments on commit f3405dc

Please sign in to comment.