http3: expose an OpenStream method on the RoundTripper (#4409)

The stream exposes two methods required for doing an HTTP request:
SendRequestHeader and ReadResponse. This can be used by applications
that wish to use the stream for non-HTTP content afterwards. This will
lead to a simplification in the API we need to expose for WebTransport,
and will make it easier to send HTTP Datagrams associated with this
stream.
This commit is contained in:
Marten Seemann
2024-04-09 16:14:14 -04:00
committed by GitHub
parent e310b80cf3
commit eb310a6db8
12 changed files with 434 additions and 239 deletions

View File

@@ -171,9 +171,9 @@ func requestFromHeaders(headerFields []qpack.HeaderField) (*http.Request, error)
}, nil
}
func hostnameFromRequest(req *http.Request) string {
if req.URL != nil {
return req.URL.Host
func hostnameFromURL(url *url.URL) string {
if url != nil {
return url.Host
}
return ""
}