Repository navigation
Clean up websocket closing code - #9358
Conversation
|
☔ The latest upstream changes (presumably #9368) made this pull request unmergeable. Please resolve the merge conflicts. |
|
This is so much more readable! 💃 These changes look good to me, but I'll want to wait until upstream agrees with the server change. |
|
@jdm: Will do! |
|
@jdm: I just submitted web-platform-tests/wpt#2498 with this change. |
Set code to None if it is STATUS_NO_STATUS_RECEIVED, which should not be sent across the wire.
6b5dbd0 to
482d23b
Compare
|
@bors-servo: r+ |
|
📌 Commit 482d23b has been approved by |
Clean up websocket closing code Fixes #7860. This also changes quite a bit about how close codes are implemented, I believe bringing them closer in line with the spec. Instead of saving off the close code sent by the client, it uses the code from the server's closing handshake. It also handles `NO_STATUS` in what I believe is the correct manner. Making this work required a change to the test harness to make the `/echo` websocket handler echo the code sent by the client and handle `NO_STATUS` properly, rather than always replying with `NORMAL`. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9358) <!-- Reviewable:end -->
|
💔 Test failed - linux-rel |
|
⚡ Previous build results for android, gonk, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt are reusable. Rebuilding only linux-rel... |
|
@jdm: Should I go ahead and squash this now? |
|
No, I think it's fine the way it is. The merging process is already on its way. |
|
👍 Thanks! |
|
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt |
Fixes #7860.
This also changes quite a bit about how close codes are implemented, I believe bringing them closer in line with the spec. Instead of saving off the close code sent by the client, it uses the code from the server's closing handshake. It also handles
NO_STATUSin what I believe is the correct manner. Making this work required a change to the test harness to make the/echowebsocket handler echo the code sent by the client and handleNO_STATUSproperly, rather than always replying withNORMAL.