mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-13 07:16:31 +02:00
@ -402,8 +402,11 @@ void WebSocketsServer::handleHeader(WSclient_t * client) {
|
||||
if(headerLine.startsWith("GET ")) {
|
||||
// cut URL out
|
||||
client->cUrl = headerLine.substring(4, headerLine.indexOf(' ', 4));
|
||||
} else if(headerLine == "Connection: Upgrade") {
|
||||
client->cIsUpgrade = true;
|
||||
} else if(headerLine.startsWith("Connection: ")) {
|
||||
// 12 = lenght of "Connection: "
|
||||
if(headerLine.indexOf("Upgrade", 12)) {
|
||||
client->cIsUpgrade = true;
|
||||
}
|
||||
} else if(headerLine.startsWith("Upgrade: ")) {
|
||||
// 9 = lenght of "Upgrade: "
|
||||
String low = headerLine.substring(9);
|
||||
|
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
|
||||
<script>
|
||||
var connection = new WebSocket('ws://10.11.2.1:81/test', ['arduino']);
|
||||
var connection = new WebSocket('ws://10.11.2.2:81/test', ['arduino']);
|
||||
|
||||
connection.onopen = function () {
|
||||
connection.send('Message from Browser to ESP8266 yay its Working!! ' + new Date());
|
||||
|
Reference in New Issue
Block a user