Sec-WebSocket-Protocol is aggregated wrong
Closed this issue · 1 comments
dietert commented
Hello,
Sec-WebSocket-Protocol is aggregated wrong
See:
E.g: following line
List subprotocols = new List {"soap", "json"};
Will insert into the headers (wrong)
Sec-WebSocket-Protocol: , soap, json
Instead of (correct)
Sec-WebSocket-Protocol: soap, json
Possible solution:
var subprotocol =
$"Sec-WebSocket-Protocol: {subprotocols.Aggregate((current, protocol) => $ "{current}, {protocol}")}";
1iveowl commented
Good catch. It's been fixed. in version 4.14.