mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
wpiutil: WebSocket: Fix Sec-Websocket-Accept computation
It needs to use the raw SHA1 bytes, not the hex-decoded text.
This commit is contained in:
@@ -40,7 +40,7 @@ class WebSocketClientTest : public WebSocketTest {
|
||||
SmallString<64> hashBuf;
|
||||
SmallString<64> acceptBuf;
|
||||
os << "Sec-WebSocket-Accept: "
|
||||
<< Base64Encode(hash.Final(hashBuf), acceptBuf) << "\r\n";
|
||||
<< Base64Encode(hash.RawFinal(hashBuf), acceptBuf) << "\r\n";
|
||||
|
||||
if (!mockProtocol.empty())
|
||||
os << "Sec-WebSocket-Protocol: " << mockProtocol << "\r\n";
|
||||
|
||||
Reference in New Issue
Block a user