-
Notifications
You must be signed in to change notification settings - Fork 45
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
Trailing slash is not preserved #10
Comments
I think the problem with this one is that (imho) there currently is no easy way to add options to url-join and I think |
I think situation is easier.
|
Another approach would be to disallow any queries in url at all and pass them via option, so that library would never have issues with trying to parse everything we feed to it. I think it's quite viable approach, since it works in React Router quite well, see https://github.com/ReactTraining/react-router/blob/master/docs/API.md#link |
Any news on this? This caught us out and feels like very unexpected behaviour. I see that adding an options param to the main It would also be good to have something in the README explaining that the trailing slash will get removed, as this behaviour is currently undocumented? (as far as I can see) |
This problem still occurs and requires us to do workarounds. |
@ArmorDarks has the right of it. Both RFC 3986 and the WhatHG URL standard allow trailing slashes here. The correct behavior is to preserve it if it exists. I'm gonna have to fork since this has gone unfixed for 6years. |
@limeandcoconut instead of forking this repo perhaps you can submit a PR to fix this? I'd be more than willing to review it for you and get it merged. |
@jonkoops I can fix it if it’s still needed |
Sure, feel free to submit a PR and ping me there for a review. |
Expected output:
'www.example.com/test/?hello=true'
Actual output:
'www.example.com/test?hello=true'
This causes issues for SEO where having 2 different URLs leads to fragmentation in search results.
The text was updated successfully, but these errors were encountered: