This PR tightens up the check in stream? for HTTP/1.1 requests by ensuring the sec-websocket-accept header was verified in addition to status == 101.
Before
Status not 101 : `stream?` => false
101 w/missing header : `stream?` => true
Bad header : raises exception
After
Status not 101 : `stream?` => false
101 w/missing header : `stream?` => false
Bad header : raises exception
Reference
RFC 6455, near the end of section 4.1, says that a WS connection must be failed if the header is missing or invalid (in point (4), at the bottom of page 19).
This PR tightens up the check in
stream?
for HTTP/1.1 requests by ensuring thesec-websocket-accept
header was verified in addition tostatus == 101
.Before
After
Reference
RFC 6455, near the end of section 4.1, says that a WS connection must be failed if the header is missing or invalid (in point (4), at the bottom of page 19).
Types of Changes
Contribution