Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #36 +/- ##
==========================================
+ Coverage 92.12% 92.33% +0.21%
==========================================
Files 9 9
Lines 495 496 +1
==========================================
+ Hits 456 458 +2
+ Misses 39 38 -1
Continue to review full report at Codecov.
|
ianpartridge
requested changes
Apr 16, 2018
| case 1011: return .serverError | ||
| default: | ||
| return .userDefined(reasonCode) | ||
| if(reasonCode < 3000) { |
| } else if frame.payload.length == 0 { | ||
| reasonCode = .normal | ||
| } else { | ||
| connectionClosed(reason: .protocolError, description: "Close frames, which contain a payload, must be between 2 an 125 octets inclusive") |
| let expectedPayload = NSMutableData() | ||
| var part = self.payload(closeReasonCode: .protocolError) | ||
| expectedPayload.append(part.bytes, length: part.length) | ||
| part = self.payload(text: "Close frames, which contain a payload, must be between 2 an 125 octets inclusive") |
ianpartridge
approved these changes
Apr 16, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request to make our web sockets pass autobahn tests 7.* regarding close codes.
reserved user close codes (1005, 1006) and undefined codes < 3000 will now return a protocol error.
Close payloads can now not be longer than 125 bytes or equal to 1 byte as defined by the protocol
The close code provided by the server is now used to be sent back instead of just calculating it and then sending back .normal regardless.
Two Tests have been added and an existing test ha been change to check for the desired behavior.