-
Notifications
You must be signed in to change notification settings - Fork 24.8k
android websocket: include cookies with request #6851
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
Conversation
By analyzing the blame information on this pull request, we identified @aprock, @satya164 and @christopherdro to be potential reviewers. |
@@ -38,6 +39,7 @@ | |||
import java.net.URI; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
import java.util.List; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Alphabetize
Build is failing from /cc @mkonicek Thoughts? |
@srikanthkh, Buck build is failing. |
47763c8
to
0a0d5c4
Compare
@srikanthkh updated the pull request. |
0a0d5c4
to
6db13ec
Compare
@srikanthkh updated the pull request. |
@christopherdro & @bestander I have made the suggested changes. Please let me know if anymore changes are required. Thank you. |
@srikanthkh updated the pull request. |
5b3b997
to
b5e3937
Compare
@srikanthkh updated the pull request. |
6e270f7
to
015b002
Compare
@srikanthkh updated the pull request. |
015b002
to
2220e7f
Compare
@srikanthkh updated the pull request. |
code was failing one of my tests when cookie was null, So just fixed it and re-pushed the code. Thank you |
@srikanthkh updated the pull request. |
@satya164 would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. |
@christopherdro fine with shipping this? |
@satya164 👍 LGTM! |
@facebook-github-bot shipit |
@srikanthkh The fix itself to include cookies in WebSocket requests is good, if you can send a new pull request we should get this in. |
Note that the |
@mkonicek Yea thats my bad for not looking it over properly. 😞 |
No worries @christopherdro! I totally understand there are a lot of pull requests to look at and the motivation to get this fix in quickly. |
@srikanthkh Is there a method similar to |
Re: |
👍 Thanks @christopherdro. |
Really needing this |
Any updates on this getting shipped soon? |
It appears this PR was reverted but I am not sure why. /cc @mkonicek |
Cookies were being sent along in WebSockets with react-native 0.26 (OkHttp2) but not anymore with react-native 0.27 (OkHttp3). @mkonicek: "I'll revert this now and let's do it again and properly." => Any ETA? I wish I could help but I know nothing about Android dev 😓 |
I think @mkonicek means:
Basically, the author should fulfill conditions above.
I can help the forking stuff and fix coding conventions, but I am not using this functionality, so don't know what is a proper test plan. |
@zxcpoiu well I'm not really good at tests and I'm not sure how to write a plan for this feature... I suppose it would be like sending a first HTTP request which response includes a test cookie, and then connecting through a WebSocket at the same address than the HTTP request, and check on the server side if the test cookie is present... at least that's how I use it (my users are authenticated using an HttpOnly cookie set through an HTTPS request, and this auth must also be readable by the server when receiving WebSocket connections). The test plan is described as:
|
@antoinerousseau has created a follow up PR #7989 |
Summary: Previously cookie headers weren't sending on websocket connection requests for android. This commit fixes the issue. Closes facebook#6851 Differential Revision: D3257466 fb-gh-sync-id: 4225d11c8c6efd09493ef938a65f024dcbaff749 fbshipit-source-id: 4225d11c8c6efd09493ef938a65f024dcbaff749
Summary: This reverts the commit facebook@bf8b549 Pull request: facebook#6851 Internal Phabricator revision: D3257466 See the pull request for discussion. Reviewed By: bestander Differential Revision: D3277433 fbshipit-source-id: 623f93e1bce47ac156ffab154c57495b85ffa936
Summary: Previously cookie headers weren't sending on websocket connection requests for android. This commit fixes the issue. Closes facebook#6851 Differential Revision: D3257466 fb-gh-sync-id: 4225d11c8c6efd09493ef938a65f024dcbaff749 fbshipit-source-id: 4225d11c8c6efd09493ef938a65f024dcbaff749
Summary: This reverts the commit facebook@bf8b549 Pull request: facebook#6851 Internal Phabricator revision: D3257466 See the pull request for discussion. Reviewed By: bestander Differential Revision: D3277433 fbshipit-source-id: 623f93e1bce47ac156ffab154c57495b85ffa936
Summary: This reverts the commit facebook@bf8b549 Pull request: facebook#6851 Internal Phabricator revision: D3257466 See the pull request for discussion. Reviewed By: bestander Differential Revision: D3277433 fbshipit-source-id: 623f93e1bce47ac156ffab154c57495b85ffa936
Summary: This PR updates #6851 from srikanthkh, fixing coding conventions and javadoc, and adding a test plan. Added testing functions into the WebSocketExample page of the UIExplorer, including a tiny http server to set a cookie on demand. Instructions included in the UIExplorer app. Closes #9114 Differential Revision: D4140534 Pulled By: lacker fbshipit-source-id: e020ad0c6d1d3ea09c0c3564c1795b4e1bc4517d
Summary: This PR updates facebook#6851 from srikanthkh, fixing coding conventions and javadoc, and adding a test plan. Added testing functions into the WebSocketExample page of the UIExplorer, including a tiny http server to set a cookie on demand. Instructions included in the UIExplorer app. Closes facebook#9114 Differential Revision: D4140534 Pulled By: lacker fbshipit-source-id: e020ad0c6d1d3ea09c0c3564c1795b4e1bc4517d
Summary: This PR updates facebook#6851 from srikanthkh, fixing coding conventions and javadoc, and adding a test plan. Added testing functions into the WebSocketExample page of the UIExplorer, including a tiny http server to set a cookie on demand. Instructions included in the UIExplorer app. Closes facebook#9114 Differential Revision: D4140534 Pulled By: lacker fbshipit-source-id: e020ad0c6d1d3ea09c0c3564c1795b4e1bc4517d
Previously cookie headers weren't sending on websocket connection requests for android.
This commit fixes the issue.