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

Error: failed to register user when URL of server ends with "/" #389

Open
tfriedel opened this issue May 5, 2022 · 2 comments
Open

Error: failed to register user when URL of server ends with "/" #389

tfriedel opened this issue May 5, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@tfriedel
Copy link

tfriedel commented May 5, 2022

I setup a custom server, but when trying to register I got the error:
"Error: failed to register user"

It was not obvious that the reason I got this error was because the URL
looked like http://myserver.com:8888/ , i.e. ended with a slash.
After I changed it to http://myserver.com:8888 registering worked.

This should be easily fixable, for example by stripping the trailing slash.

see also #190

@conradludgate
Copy link
Collaborator

conradludgate commented May 5, 2022

Thanks, this is probably due to us using string formatting for our URLs... I've been meaning to use proper URL parsing and building but never got the motivation to do it. I'll try to get around to it now

@conradludgate
Copy link
Collaborator

If anyone wants to take a shot at this in the meantime, looks like we can use reqwest::Url::join

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants