Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Fix websocket connection request #1005

Merged
merged 1 commit into from
Mar 10, 2022
Merged

Conversation

th4s
Copy link
Contributor

@th4s th4s commented Mar 10, 2022

In tungstenite 0.17 a change was introduced considering the logic of
IntoClientRequest. Look here

When using this trait on a HttpRequest it just
uses the request without any changes to initiate the websocket
connection. This makes it necessary for the consumer of the api to supply the
correct http headers for initiating a websocket connection when using
IntoClientRequest on HttpRequest.

This commit adapts the logic in connect_with_auth to this new
behavior.

In tungstenite 0.17 a change was introduced considering the logic of
`IntoClientRequest`. When using this trait on a `HttpRequest` it just
uses the request without any changes to inititate the websocket
connection.

This makes it necessary for the consumer of the api to supply the
correct http headers for initiating a websocket connection when using
`IntoClientRequest` on `HttpRequest`.

This commit adapts the logic in `connect_with_auth` to this new
behavior.
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

@gakonst gakonst merged commit b05136e into gakonst:master Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants