8000 RFC requires a port for Host when it is non default. https://www.w3.… · robokoding/arduinoWebSockets@4f55c36 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f55c36

Browse files
committed
RFC requires a port for Host when it is non default. https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23
1 parent b3efb31 commit 4f55c36

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
@@ -392,7 +392,7 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
392392
#endif
393393

394394
String handshake = "GET " + client->cUrl + " HTTP/1.1\r\n"
395-
"Host: " + _host + "\r\n"
395+
"Host: " + _host + ":" + _port + "\r\n"
396396
"Upgrade: websocket\r\n"
397397
"Connection: Upgrade\r\n"
398398
"User-Agent: arduino-WebSocket-Client\r\n"
@@ -620,6 +620,3 @@ void WebSocketsClient::asyncConnect() {
620620
}
621621

622622
#endif
623-
624-
625-

0 commit comments

Comments
 (0)
0