10000 Merge pull request #143 from quantumlicht/master · PorterK/arduinoWebSockets@9203228 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9203228

Browse files
authored
Merge pull request Links2004#143 from quantumlicht/master
Remove duplicate handshake headers
2 parents ddaeea0 + 5cd68c5 commit 9203228

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/WebSocketsClient.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,8 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
426426
transport = "&transport=websocket&sid=" + client->cSessionId;
427427
}
428428
handshake = "GET " + client->cUrl + transport + " HTTP/1.1\r\n"
429-
"Host: " + _host + ":" + _port + "\r\n"
430429
"Connection: Upgrade\r\n"
431430
"Upgrade: websocket\r\n"
432-
"Origin: file://\r\n"
433-
"User-Agent: arduino-WebSocket-Client\r\n"
434431
"Sec-WebSocket-Version: 13\r\n"
435432
"Sec-WebSocket-Key: " + client->cKey + "\r\n";
436433

@@ -460,7 +457,7 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
460457
}
461458

462459
handshake += "\r\n";
463-
460+
DEBUG_WEBSOCKETS("[WS-Client][sendHeader] handshake %s", handshake.c_str());
464461
client->tcp->write(handshake.c_str(), handshake.length());
465462

466463
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266_ASYNC)

0 commit comments

Comments
 (0)
0