File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -402,8 +402,11 @@ void WebSocketsServer::handleHeader(WSclient_t * client) {
402402 if (headerLine.startsWith (" GET " )) {
403403 // cut URL out
404404 client->cUrl = headerLine.substring (4 , headerLine.indexOf (' ' , 4 ));
405- } else if (headerLine == " Connection: Upgrade" ) {
406- client->cIsUpgrade = true ;
405+ } else if (headerLine.startsWith (" Connection: " )) {
406+ // 12 = lenght of "Connection: "
407+ if (headerLine.indexOf (" Upgrade" , 12 )) {
408+ client->cIsUpgrade = true ;
409+ }
407410 } else if (headerLine.startsWith (" Upgrade: " )) {
408411 // 9 = lenght of "Upgrade: "
409412 String low = headerLine.substring (9 );
Original file line number Diff line number Diff line change 22< head >
33
44< script >
5- var connection = new WebSocket ( 'ws://10.11.2.1 :81/test' , [ 'arduino' ] ) ;
5+ var connection = new WebSocket ( 'ws://10.11.2.2 :81/test' , [ 'arduino' ] ) ;
66
77connection . onopen = function ( ) {
88 connection . send ( 'Message from Browser to ESP8266 yay its Working!! ' + new Date ( ) ) ;
You can’t perform that action at this time.
0 commit comments