moving host header

try to fix #159
This commit is contained in:
Markus
2017-01-08 09:55:28 +01:00
committed by GitHub
parent 60903a2fa5
commit dac71c4c23

View File

@ -427,6 +427,7 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
transport = "&transport=websocket&sid=" + client->cSessionId;
}
handshake = "GET " + client->cUrl + transport + " HTTP/1.1\r\n"
"Host: " + _host + ":" + _port + "\r\n"
"Connection: Upgrade\r\n"
"Upgrade: websocket\r\n"
"Sec-WebSocket-Version: 13\r\n"
@ -442,11 +443,11 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
} else {
handshake = "GET " + client->cUrl + "&transport=polling HTTP/1.1\r\n"
"Host: " + _host + ":" + _port + "\r\n"
"Connection: keep-alive\r\n";
}
handshake += "Host: " + _host + ":" + _port + "\r\n"
"Origin: file://\r\n"
handshake += "Origin: file://\r\n"
"User-Agent: arduino-WebSocket-Client\r\n";
if(client->base64Authorization.length() > 0) {