Fix for Newline in Headers when extraHeaders is Empty [577] (#578)

Closes https://github.com/Links2004/arduinoWebSockets/issues/577
This commit is contained in:
James Stubbington
2020-11-14 11:17:10 -06:00
committed by GitHub
parent 4db14451fb
commit 7fea0b8bdf

View File

@ -636,7 +636,7 @@ void WebSocketsClient::sendHeader(WSclient_t * client) {
}
// add extra headers; by default this includes "Origin: file://"
if(client->extraHeaders) {
if(client->extraHeaders.length() > 0) {
handshake += client->extraHeaders + NEW_LINE;
}