From 0c3c559cc5f679b0ae381d830e02b05282c041c1 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Tue, 27 Jul 2021 16:45:23 -0400 Subject: [PATCH 1/2] api: revert to defaulting to http/1 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. --- api/api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/api.go b/api/api.go index d1f985dbefe..140089e4c79 100644 --- a/api/api.go +++ b/api/api.go @@ -249,6 +249,10 @@ func defaultHttpClient() *http.Client { MinVersion: tls.VersionTLS12, } + // Default to http/1: alloc exec/websocket aren't supported in http/2 + // well yet: https://github.com/gorilla/websocket/issues/417 + transport.ForceAttemptHTTP2 = false + return httpClient } From 00a1413fc49ffd12b91695eee2a1c828c9ab6c63 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Wed, 28 Jul 2021 10:15:34 -0400 Subject: [PATCH 2/2] changelog --- .changelog/10958.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .changelog/10958.txt diff --git a/.changelog/10958.txt b/.changelog/10958.txt new file mode 100644 index 00000000000..2f85b2a6d58 --- /dev/null +++ b/.changelog/10958.txt @@ -0,0 +1,4 @@ + +```release-note:bug +api: Reverted to using http/1 to fix a 1.1.2 regression in `alloc exec` sessions +```