8000 Merge pull request #74 from wnemay/master · robokoding/arduinoWebSockets@6972f7a · GitHub
[go: up one dir, main page]

Skip to content

Commit 6972f7a

Browse files
committed
Merge pull request Links2004#74 from wnemay/master
Adjustments to headers during client handshake.
2 parents 93b0b9e + 10a8d3c commit 6972f7a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/WebSocketsClient.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,10 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
394394
#endif
395395

396396
String handshake = "GET " + client->cUrl + " HTTP/1.1\r\n"
397-
"Host: " + _host + "\r\n"
398-
"Upgrade: websocket\r\n"
397+
"Host: " + _host + ":" + _port + "\r\n"
399398
"Connection: Upgrade\r\n"
399+
"Upgrade: websocket\r\n"
400+
"Origin: file://\r\n"
400401
"User-Agent: arduino-WebSocket-Client\r\n"
401402
"Sec-WebSocket-Version: 13\r\n"
402403
"Sec-WebSocket-Key: " + client->cKey + "\r\n";
@@ -626,6 +627,3 @@ void WebSocketsClient::asyncConnect() {
626627
}
627628

628629
#endif
629-
630-
631-

0 commit comments

Comments
 (0)
0