From a9d8093eaf572da37e03441554bb5a55be3b5c10 Mon Sep 17 00:00:00 2001 From: TheoTechnicguy <19630890+TheoTechnicguy@users.noreply.github.com> Date: Tue, 29 Apr 2025 03:55:43 +0200 Subject: [PATCH] http3: fix documentation for Hijacker and HTTPStreamer (#5089) * http3: update documentation for `Hijacker` The documentation for `Hijacker` seems to be legacy from [v0.43.0](https://github.com/quic-go/quic-go/releases/tag/v0.43.0). This commit updates the documentation to reflect the current API use. * http3: update documentation for `HTTPStreamer` The documentation for `HTTPStreamer` seems to be legacy from [v0.43.0](https://github.com/quic-go/quic-go/releases/tag/v0.43.0). This commit updates the documentation to reflect the current API use. --- http3/body.go | 2 +- http3/response_writer.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/http3/body.go b/http3/body.go index 5edde707e..8f17bbebe 100644 --- a/http3/body.go +++ b/http3/body.go @@ -9,7 +9,7 @@ import ( "github.com/quic-go/quic-go" ) -// A Hijacker allows hijacking of the stream creating part of a quic.Connection from a http.Response.Body. +// A Hijacker allows hijacking of the stream creating part of a quic.Connection from a http.ResponseWriter. // It is used by WebTransport to create WebTransport streams after a session has been established. type Hijacker interface { Connection() Connection diff --git a/http3/response_writer.go b/http3/response_writer.go index ab0282e41..bcfc85c2f 100644 --- a/http3/response_writer.go +++ b/http3/response_writer.go @@ -14,8 +14,7 @@ import ( "golang.org/x/net/http/httpguts" ) -// The HTTPStreamer allows taking over a HTTP/3 stream. The interface is implemented the http.Response.Body. -// On the client side, the stream will be closed for writing, unless the DontCloseRequestStream RoundTripOpt was set. +// The HTTPStreamer allows taking over a HTTP/3 stream. The interface is implemented by the http.ResponseWriter. // When a stream is taken over, it's the caller's responsibility to close the stream. type HTTPStreamer interface { HTTPStream() Stream