Skip to content
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

Support bare hosts. Add missing / between url #26050

Closed

Conversation

jeswinsimon
Copy link
Contributor

@jeswinsimon jeswinsimon commented Aug 13, 2019

Summary

Fix for #26019 URL cannot handle "localhost" domain for base url. Also noticed another issue where / is not added between base URL and path if it is missing. Added fix for that too.

Changelog

[Javascript] [Fixed] - URL: Bare Hosts are now supported.

Test Plan

  • new URL('home', 'http://localhost') now returns http://localhost/home instead of throwing an error.
  • new URL('en-US/docs', 'https://developer.mozilla.org') now returns https://developer.mozilla.org/en-US/docs and not https://developer.mozilla.orgen-US/docs.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 13, 2019
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @jeswinsimon in 20ab946.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Sep 11, 2019
@jeswinsimon jeswinsimon deleted the url_bare_host_support branch October 22, 2019 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants