Skip to content

Commit

Permalink
request_builder.go: fetcher: Force try HTTP/2
Browse files Browse the repository at this point in the history
  • Loading branch information
Darwinnn authored and fguillot committed Dec 16, 2023
1 parent 7990edd commit d906677
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/reader/fetcher/request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d906677

Please # to comment.