Skip to content

Commit

Permalink
do not try HTTP/3 when plain HTTP is requested
Browse files Browse the repository at this point in the history
  • Loading branch information
rbarazzutti committed Aug 20, 2023
1 parent 2f7e7e1 commit f0773c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/webclientimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (webClient *webClientImpl) DoMeasure(followRedirect bool) *HTTPMeasure {

altSvcH3 := checkAltSvcH3Header(res.Header)

if altSvcH3 != nil && !strings.HasPrefix(res.Proto, "HTTP/3") && !webClient.config.Http1 && !webClient.config.Http2 {
if !strings.HasPrefix(req.RequestURI, "http://") && altSvcH3 != nil && !strings.HasPrefix(res.Proto, "HTTP/3") && !webClient.config.Http1 && !webClient.config.Http2 {
_, _ = fmt.Printf(" ─→ server advertised HTTP/3 endpoint, using HTTP/3\n")

return webClient.moveToHttp3(*altSvcH3, measureContext.timerRegistry, followRedirect)
Expand Down

0 comments on commit f0773c3

Please sign in to comment.