-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
fix(rsc): normalize double slashes in manifest URLs #14586
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
base: main
Are you sure you want to change the base?
fix(rsc): normalize double slashes in manifest URLs #14586
Conversation
Fixes remix-run#14583 by using joinPaths utility to normalize double slashes in getManifestUrl function, preventing ERR_NAME_NOT_RESOLVED errors
🦋 Changeset detectedLatest commit: 61c961f The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hi @swarnim02, Welcome, and thank you for contributing to React Router! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
|
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
|
Can you fill in the changeset you created? It will be what shows up in the changelog. |
|
@timdorr Thanks! The changeset description has been updated. |
|
@timdorr |
|
Those tests that are failing need to be fixed as well. |
|
Can you remove that Markdown file? That should be in the PR description, not in the repo. Also, can you remove the package-lock.json file? This project uses pnpm. |
|
@timdorr Done! I've removed both the DOUBLE_SLASHES_FIX.md file and package-lock.json file as requested. The project now only uses pnpm for package management. I've also fixed the failing tests by updating the |
|
@timdorr |
Fixes #14583 by using joinPaths utility to normalize double slashes in getManifestUrl function, preventing ERR_NAME_NOT_RESOLVED errors
Summary
Fixes #14583 - RSC routing issue with double slashes causing ERR_NAME_NOT_RESOLVED errors.
Problem
URLs with double slashes (e.g.,
//en//test2/test) caused malformed manifest URLs likehttps://en//test/test.manifest, leading to network errors in RSC applications.Solution
joinPathsutility inbrowser.tsxgetManifestUrlfunction for:Changes
joinPathsimport and normalized paths ingetManifestUrlTesting
✅ Single path normalization:
//en//test2/test→/en/test2/test.manifest✅ Multiple paths normalization in query params
✅ Basename normalization
✅ Backward compatibility with normal URLs
Type of Change
Closes #14583