fix(yew-router): use path instead of basename in strip_basename fallback#4030
Merged
Madoshakalaka merged 1 commit intomasterfrom Mar 2, 2026
Merged
Conversation
It affects users who set a basename via the `basename` prop on `<BrowserRouter>`/`<HashRouter>`, or implicitly via a `<base href>` element. When the browser URL exactly equals the basename without a trailing slash (e.g. `/base` instead of `/base/`), strip_basename produced `//base` instead of `/`, which round-tripped through prefix_basename to corrupt the URL to `/base//base` and cause a 404. This is triggered by direct URL access, external links, bookmarks, and server redirects to the bare basename path. Internal navigation via `<Link>`, `navigator.push()`, etc. was unaffected.
|
Visit the preview URL for this PR (updated for commit 3527297): https://yew-rs-api--pr4030-fix-strip-basename-p-g96shxpl.web.app (expires Mon, 09 Mar 2026 06:14:23 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Size ComparisonDetails
✅ None of the examples has changed their size significantly. |
Benchmark - SSRYew MasterDetails
Pull RequestDetails
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4028