Skip to content

Commit 87bca11

Browse files
committed
implement required interfaces for webtransport in log middleware
1 parent 8d3b489 commit 87bca11

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

internal/middleware/log.go

+10-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/http"
88
"time"
99

10+
"github.com/quic-go/quic-go/http3"
1011
"github.com/rs/zerolog/log"
1112
)
1213

@@ -61,10 +62,15 @@ func (lrw *logResponseWriter) Flush() {
6162
lrw.ResponseWriter.(http.Flusher).Flush()
6263
}
6364

64-
// // StreamCreator for WebTransport.
65-
// func (lrw *logResponseWriter) StreamCreator() http3.StreamCreator {
66-
// return lrw.ResponseWriter.(http3.Hijacker).StreamCreator()
67-
// }
65+
// Connection for WebTransport.
66+
func (lrw *logResponseWriter) Connection() http3.Connection {
67+
return lrw.ResponseWriter.(http3.Hijacker).Connection()
68+
}
69+
70+
// HTTPStream for WebTransport.
71+
func (lrw *logResponseWriter) HTTPStream() http3.Stream {
72+
return lrw.ResponseWriter.(http3.HTTPStreamer).HTTPStream()
73+
}
6874

6975
// CloseNotify as SockJS uses http.CloseNotifier.
7076
//

0 commit comments

Comments
 (0)