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

[clients]: inconsitent behaviour w.r.t to default port number in URL #554

Closed
niklasad1 opened this issue Nov 9, 2021 · 4 comments
Closed

Comments

@niklasad1
Copy link
Member

niklasad1 commented Nov 9, 2021

The clients act different when parsing the URL/URI whereas:

The reason why we use http::Uri in the WsClient is because it supports relative URIs that is needed to handle redirections.

@dvdplm
Copy link
Contributor

dvdplm commented Nov 9, 2021

So this issue implies switching to http::Uri for http clients as well then?

@niklasad1
Copy link
Member Author

niklasad1 commented Nov 9, 2021

Ideally jsonrpsee would provide the default port number if missing but that requires hyperium/http#509 to be fixed.

Thus, I don't know but we could use url and use https://docs.rs/url/2.2.2/url/struct.Url.html#method.port instead of https://docs.rs/url/2.2.2/url/struct.Url.html#method.port_or_known_default for consistent behavior

@dvdplm
Copy link
Contributor

dvdplm commented Nov 10, 2021

Imo consistency trumps the usefulness of providing a default port.

@niklasad1
Copy link
Member Author

Closed by #545

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

No branches or pull requests

2 participants