File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Edge
4
4
5
+ - include invalid status code when raising handshake error
6
+
5
7
## 1.2.11
6
8
7
9
- remove unused base64 require that would cause issues in Ruby 3.4
Original file line number Diff line number Diff line change @@ -108,6 +108,12 @@ def message
108
108
end
109
109
110
110
class InvalidStatusCode < ::WebSocket ::Error ::Handshake
111
+ attr_reader :invalid_status_code
112
+
113
+ def initialize ( invalid_status_code )
114
+ @invalid_status_code = invalid_status_code
115
+ end
116
+
111
117
def message
112
118
:invalid_status_code
113
119
end
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ def parse_first_line(line)
123
123
line_parts = line . match ( FIRST_LINE )
124
124
raise WebSocket ::Error ::Handshake ::InvalidHeader unless line_parts
125
125
status = line_parts [ 1 ]
126
- raise WebSocket ::Error ::Handshake ::InvalidStatusCode unless status == '101'
126
+ raise WebSocket ::Error ::Handshake ::InvalidStatusCode . new ( status ) unless status == '101'
127
127
end
128
128
end
129
129
end
You can’t perform that action at this time.
0 commit comments