-
Notifications
You must be signed in to change notification settings - Fork 764
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
Avoid double slash in url when client hostname has tailing slash #738
Conversation
I am so sorry. I keep looking at this and thought, how would this compile? I will have to look up what this Thanks for the contribution. But tests failed. I believe there's a missing comma after Sorry about the delay. |
Good catch! Fixed, please take another look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and thanks for the contribution!
@stanley-cheung @hanabi1224 this PR drop support uri like: See examples: |
@Fl0pZz sorry I am a bit unclear on this - do you mean that you are passing the hostname parameter with the 3 dots at the end? |
Nope :) And in browser dev tools i see request: |
@Fl0pZz and what's wrong with the above? |
From mdn: https://developer.mozilla.org/en-US/docs/Web/API/URL/URL const hostname = 'https://example.com/api/grpc/v1';
const uri = new URL('/MyProject.listEntities', hostname);
console.log(uri.toString()) // -> https://example.com/MyProject.listEntities however i expected |
When GRPC client hostname has tailing '/', the final request url contains '//' which cannot be processed properly by some servers, e.g. grpc-dotnet-web