10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Sec-WebSocket-Protocol
1 parent 8988faf commit 00be8c7Copy full SHA for 00be8c7
src/WebSocketsClient.cpp
@@ -397,9 +397,12 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
397
"Connection: Upgrade\r\n"
398
"User-Agent: arduino-WebSocket-Client\r\n"
399
"Sec-WebSocket-Version: 13\r\n"
400
- "Sec-WebSocket-Protocol: " + client->cProtocol< 6ACC /span> +"\r\n"
401
"Sec-WebSocket-Key: " + client->cKey + "\r\n";
402
+ if(client->cProtocol.length() > 0) {
403
+ handshake += "Sec-WebSocket-Protocol: " + client->cProtocol + "\r\n";
404
+ }
405
+
406
if(client->cExtensions.length() > 0) {
407
handshake += "Sec-WebSocket-Extensions: " + client->cExtensions + "\r\n";
408
}
0 commit comments