mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-17 09:12:05 +02:00
fix #146 HTTP Header handler
This commit is contained in:
@ -729,7 +729,12 @@ void WebSocketsServer::handleHeader(WSclient_t * client, String * headerLine) {
|
||||
|
||||
} else if(headerLine->indexOf(':')) {
|
||||
String headerName = headerLine->substring(0, headerLine->indexOf(':'));
|
||||
String headerValue = headerLine->substring(headerLine->indexOf(':') + 2);
|
||||
String headerValue = headerLine->substring(headerLine->indexOf(':') + 1);
|
||||
|
||||
// remove space in the beginning (RFC2616)
|
||||
if(headerValue[0] == ' ') {
|
||||
headerValue.remove(0, 1);
|
||||
}
|
||||
|
||||
if(headerName.equalsIgnoreCase(WEBSOCKETS_STRING("Connection"))) {
|
||||
headerValue.toLowerCase();
|
||||
|
Reference in New Issue
Block a user