Skip to content

Conversation

darkestpigeon
Copy link

When WebSocket.connect is called with an Uri object, the query part in completely ignored. Fixing this.

if uri.port.len <= 0:
uri.port = if secure: "443" else: "80"

let pathQuery =
Copy link
Member

Choose a reason for hiding this comment

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

would $uri work here? It should reconstruct the whole uri (including logins etc)

Copy link
Author

Choose a reason for hiding this comment

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

I don't think so. This string will eventually get passed to HttpClient.request and used in generateHeaders, which only uses the path and query parts of the Uri.

Copy link
Author

Choose a reason for hiding this comment

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

Actually, I misunderstood the question. It should work, it just would be equivalent to {path}?{query} with the current implementation of all the other stuff. But {path}?{query} is a smaller deviation IMO.

Copy link
Contributor

Choose a reason for hiding this comment

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

please rebase and add a test case.

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.

3 participants