Always use http1 for teams websocket connection (#2119)

This commit is contained in:
Jonatan Kłosko 2023-07-28 19:15:13 +02:00 committed by GitHub
parent 3c8f3357b9
commit bba743a258
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ defmodule Livebook.Teams.WebSocket do
{http_scheme, ws_scheme} = parse_scheme(uri)
state = %{status: nil, headers: [], body: []}
with {:ok, conn} <- Mint.HTTP.connect(http_scheme, uri.host, uri.port),
with {:ok, conn} <- Mint.HTTP.connect(http_scheme, uri.host, uri.port, protocols: [:http1]),
{:ok, conn, ref} <- Mint.WebSocket.upgrade(ws_scheme, conn, @ws_path, headers) do
receive_upgrade(conn, ref, state)
else