From d90667777f2f60cb1a2ea21299b38bca87220100 Mon Sep 17 00:00:00 2001 From: Darwin Date: Fri, 15 Dec 2023 16:40:04 +0100 Subject: [PATCH] request_builder.go: fetcher: Force try HTTP/2 --- internal/reader/fetcher/request_builder.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/reader/fetcher/request_builder.go b/internal/reader/fetcher/request_builder.go index 6cda8465..efe31395 100644 --- a/internal/reader/fetcher/request_builder.go +++ b/internal/reader/fetcher/request_builder.go @@ -104,6 +104,8 @@ func (r *RequestBuilder) IgnoreTLSErrors(value bool) *RequestBuilder { func (r *RequestBuilder) ExecuteRequest(requestURL string) (*http.Response, error) { transport := &http.Transport{ Proxy: http.ProxyFromEnvironment, + // Setting `DialContext` disables HTTP/2, this option forces the transport to try HTTP/2 regardless. + ForceAttemptHTTP2: true, DialContext: (&net.Dialer{ // Default is 30s. Timeout: 10 * time.Second,