-
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.href has an extraneous slash #30914
Comments
Interesting, the examples on MDN include:
|
I think that the
But other than that, we should not be appending
Today, it seems like we are always appending |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
As per the WHATWG URL standard, the below assertion should pass:
But instead of
http://example.com/foo
, the result ishttp://example.com/foo/
(on Android and iOS). The issue is not reproducible on Web, since modern browsers follow the standard appropriately.See the official test data from WHATWG here: https://github.com/web-platform-tests/wpt/blob/8959b13684b68186781340c044d9c1b62a388358/url/resources/urltestdata.json#L1976
React Native version:
System:
OS: Linux 5.9 Manjaro Linux
CPU: (8) x64 Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz
Memory: 344.38 MB / 31.28 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.15.4 - /usr/bin/node
Yarn: 2.4.0 - ~/.node_modules/bin/yarn
npm: 6.14.11 - /usr/bin/npm
Watchman: 4.9.0 - /usr/bin/watchman
SDKs:
Android SDK:
API Levels: 28, 29, 30
Build Tools: 28.0.3, 29.0.0, 29.0.2, 29.0.3, 30.0.0, 30.0.1, 30.0.3
System Images: android-22 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Languages:
Java: 1.8.0_275 - /usr/bin/javac
Python: 3.9.1 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: ^0.63.4 => 0.63.4
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
Execute the below code in Android or iOS:
You'll notice an extraneous slash character at the end of the string.
Snack, code example, screenshot, or link to a repository:
See https://snack.expo.io/@jsamr/react-native-url-bug
The text was updated successfully, but these errors were encountered: