From 4f55c36c80d21a1fb855c6e0161c4ed4a3b6fbe7 Mon Sep 17 00:00:00 2001 From: Wayne May Date: Sat, 30 Apr 2016 15:46:19 -0700 Subject: [PATCH] RFC requires a port for Host when it is non default. https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 --- src/WebSocketsClient.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/WebSocketsClient.cpp b/src/WebSocketsClient.cpp index 6995272..2261f2c 100644 --- a/src/WebSocketsClient.cpp +++ b/src/WebSocketsClient.cpp @@ -392,7 +392,7 @@ void WebSocketsClient::sendHeader(WSclient_t * client) { #endif String handshake = "GET " + client->cUrl + " HTTP/1.1\r\n" - "Host: " + _host + "\r\n" + "Host: " + _host + ":" + _port + "\r\n" "Upgrade: websocket\r\n" "Connection: Upgrade\r\n" "User-Agent: arduino-WebSocket-Client\r\n" @@ -620,6 +620,3 @@ void WebSocketsClient::asyncConnect() { } #endif - - -