Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(websocket): Explicitly force the use of ws/wss protocol #383

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Conversation

0x676e67
Copy link
Owner

No description provided.

@0x676e67 0x676e67 merged commit 4fd10a9 into main Jan 28, 2025
4 checks passed
@0x676e67 0x676e67 deleted the feat branch January 28, 2025 10:13
@0x676e67
Copy link
Owner Author

This pull request includes a significant refactor of the WebSocket request scheme handling in the src/client/websocket/mod.rs file. The main change simplifies the logic for updating the URL scheme based on the WebSocket scheme.

Refactoring WebSocket scheme handling:

  • Simplified the logic for setting the new scheme by using a match statement directly to determine the new scheme for "ws" and "wss" URLs.
  • Removed the redundant match arms for "http" and "https" schemes, as they do not require any changes.
  • Consolidated the scheme update logic to ensure that the URL scheme is set in one place, reducing potential errors and making the code easier to maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant