Skip to content

Commit

Permalink
api: revert to defaulting to http/1
Browse files Browse the repository at this point in the history
PR #10778 incidentally changed the api http client to connect with
HTTP/2 first. However, the websocket libraries used in `alloc exec`
features don't handle http/2 well, and don't downgrade to http/1
gracefully.

Given that the switch is incidental, and not requested by users.
Furthermore, api consumers can opt-in to forcing http/2 by setting
custom http clients.
  • Loading branch information
Mahmood Ali committed Jul 28, 2021
1 parent 79cd4f8 commit e7015bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ func defaultHttpClient() *http.Client {
transport.TLSClientConfig = &tls.Config{
MinVersion: tls.VersionTLS12,
}
transport.ForceAttemptHTTP2 = false

return httpClient
}
Expand Down

0 comments on commit e7015bc

Please sign in to comment.