File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 12
12
13
13
module Async
14
14
module WebSocket
15
- # This is required for HTTP/1.x to upgrade the connection to the WebSocket protocol.
15
+ # This is required for HTTP/2 to establish a connection using the WebSocket protocol.
16
16
# See https://tools.ietf.org/html/rfc8441 for more details.
17
17
class ConnectRequest < ::Protocol ::HTTP ::Request
18
18
include ::Protocol ::WebSocket ::Headers
Original file line number Diff line number Diff line change @@ -185,5 +185,15 @@ def valid_headers(request)
185
185
with 'http/2' do
186
186
let ( :protocol ) { Async ::HTTP ::Protocol ::HTTP2 }
187
187
it_behaves_like ClientExamples
188
+
189
+ with 'invalid status' do
190
+ let ( :app ) do
191
+ Protocol ::HTTP ::Middleware . for do |request |
192
+ Protocol ::HTTP ::Response [ 403 , { } , [ ] ]
193
+ end
194
+ end
195
+
196
+ it_behaves_like FailedToNegotiate
197
+ end
188
198
end
189
199
end
You can’t perform that action at this time.
0 commit comments