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

Remove trailing slash from origin header if no port is specified #22290

Conversation

leabaertschi
Copy link

@leabaertschi leabaertschi commented Nov 15, 2018

Fixes #16304

The standard format for origin HTTP headers does not allow a trailing slash. In order to not get warnings when connecting a websocket, I removed the trailing slash when generating the default origin HTTP header for the websocket connect request.

Release Notes:

[Android] [Fixed] - Fixed default origin header for websocket connections to match the standard format (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin) in WebSocketModule

@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 Nov 15, 2018
@pull-bot
Copy link

Warnings
⚠️

📋 Test Plan - This PR appears to be missing a Test Plan.

⚠️

📋 Release Notes - This PR appears to be missing Release Notes.

Generated by 🚫 dangerJS

@cpojer
Copy link
Contributor

cpojer commented Dec 7, 2018

Thank you for the PR. This looks like the correct fix to me.

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Dec 7, 2018
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

Lea Bärtschi merged commit cbe7d41 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Dec 7, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 7, 2018
kelset pushed a commit that referenced this pull request Dec 12, 2018
)

Summary:
Fixes #16304

The standard format for origin HTTP headers does not allow a trailing slash. In order to not get warnings when connecting a websocket, I removed the trailing slash when generating the default origin HTTP header for the websocket connect request.

Release Notes:
----------
[Android] [Fixed] - Fixed default origin header for websocket connections to match the standard format (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin) in WebSocketModule
Pull Request resolved: #22290

Differential Revision: D13374345

Pulled By: cpojer

fbshipit-source-id: 1173241f2b6912fd6df5e196053a950bb42ff01b
grabbou pushed a commit that referenced this pull request Dec 17, 2018
)

Summary:
Fixes #16304

The standard format for origin HTTP headers does not allow a trailing slash. In order to not get warnings when connecting a websocket, I removed the trailing slash when generating the default origin HTTP header for the websocket connect request.

Release Notes:
----------
[Android] [Fixed] - Fixed default origin header for websocket connections to match the standard format (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin) in WebSocketModule
Pull Request resolved: #22290

Differential Revision: D13374345

Pulled By: cpojer

fbshipit-source-id: 1173241f2b6912fd6df5e196053a950bb42ff01b
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
…ebook#22290)

Summary:
Fixes facebook#16304

The standard format for origin HTTP headers does not allow a trailing slash. In order to not get warnings when connecting a websocket, I removed the trailing slash when generating the default origin HTTP header for the websocket connect request.

Release Notes:
----------
[Android] [Fixed] - Fixed default origin header for websocket connections to match the standard format (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin) in WebSocketModule
Pull Request resolved: facebook#22290

Differential Revision: D13374345

Pulled By: cpojer

fbshipit-source-id: 1173241f2b6912fd6df5e196053a950bb42ff01b
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

6 participants