-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix failed websocket handshake leaving connection hanging #3971
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3971 +/- ##
==========================================
- Coverage 97.77% 97.71% -0.06%
==========================================
Files 43 43
Lines 8763 8771 +8
Branches 1375 1377 +2
==========================================
+ Hits 8568 8571 +3
- Misses 83 86 +3
- Partials 112 114 +2
Continue to review full report at Codecov.
|
I see the bug described here and agree that protocol should not set Let me describe how things work now.
This is a rudiment of added-but-removed-later HTTP pipelining support: the parser should stop handling incoming messages on protocol upgrade request. Your change postpones setting A possible solution is splitting In Sounds complicated a little :( |
I think I understand the problem. Unlikely as it may be, I'm glad you caught it. OK, I will work on this some more. |
Travis CI taking forever, but, assuming build passes (it passes on my devbox), what I did was start with the suggested _upgrading + _upgraded flags. But then I realised I never used _upgraded flag. In the end made significant simplifications and the PR is much smaller, while still fixing the original bug. If you're happy with, I would just like to squash the commits before allowing you to merge. |
Rebased / squashed commits. |
I think this is ready to merge, if you have no more feedback. |
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.
Thanks!
What do these changes do?
It fixes the bug described in #3380, caused by this sequence of events:
The fix involves: if we detect a normal HTTP response instead of a websocket response, in web_protocol, then we:
This way, if websocket request results in a non-websocket response, we go back to normal HTTP mode, for that socket.
Are there changes in behavior for the user?
Related issue number
#3380
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.