-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
URL incorrectly adds trailing slash #24428
Comments
Hi @leethree ! Thanks for taking the time to report an issue and give a reproduction case. I'll submit a PR that fixes this issue along with a test in the next day or two. With regard to #23922 , the URLSearchParams wasn't even more barebones and the polyfill wouldn't interact with React Native's custom URL that supports blobs in a performant way. Before #22901, using something like apollo-server would crap out much earlier with a different error. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
hey bot, the issue is not resolved. leave us alone |
I'll second this issue, having to add a goofy workaround const url = new URL(baseURL);
// NOTE: RN adds a trailing slash
// https://github.com/facebook/react-native/issues/24428
url._url = url.toString().endsWith('/')
? url.toString().slice(0, -1)
: url.toString(); |
👋 You should check this out: https://github.com/charpeni/react-native-url-polyfill. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Still here |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Hi bot, I don't think it's fixed. |
This issue will probably never be fixed, and if it does, it will be with a goofy workaround which is probably adding more issues behind it. See: #25719 (comment). In a near future, I plan to deprecated RN's URL in favor of https://github.com/charpeni/react-native-url-polyfill, so I would suggest doing the jump right away. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
🐛 Bug Report
URL
polyfill inReact Native
0.59 is broken because it's not compliant to WHATWG URL Standard. And it's broken even for the simplest use cases.To Reproduce
Expected Behavior
Actual Behavior
Note the trailing slash causes the URL points to a 404 page.
Environment
Possible Cause
react-native/Libraries/Blob/URL.js
Lines 146 to 149 in 65033d7
This code was introduced in #22901 .
The text was updated successfully, but these errors were encountered: