mirror of https://github.com/lumapu/ahoy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
984 B
26 lines
984 B
diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp
|
|
index 12be5f8..cffeed7 100644
|
|
--- a/src/AsyncWebSocket.cpp
|
|
+++ b/src/AsyncWebSocket.cpp
|
|
@@ -737,7 +737,7 @@ void AsyncWebSocketClient::binary(const __FlashStringHelper *data, size_t len)
|
|
IPAddress AsyncWebSocketClient::remoteIP() const
|
|
{
|
|
if (!_client)
|
|
- return IPAddress(0U);
|
|
+ return IPAddress();
|
|
|
|
return _client->remoteIP();
|
|
}
|
|
diff --git a/src/WebResponses.cpp b/src/WebResponses.cpp
|
|
index 22a549f..e0b36b3 100644
|
|
--- a/src/WebResponses.cpp
|
|
+++ b/src/WebResponses.cpp
|
|
@@ -318,7 +318,7 @@ size_t AsyncAbstractResponse::_ack(AsyncWebServerRequest *request, size_t len, u
|
|
free(buf);
|
|
return 0;
|
|
}
|
|
- outLen = sprintf_P((char*)buf+headLen, PSTR("%x"), readLen) + headLen;
|
|
+ outLen = sprintf_P((char*)buf+headLen, PSTR("%04x"), readLen) + headLen;
|
|
while(outLen < headLen + 4) buf[outLen++] = ' ';
|
|
buf[outLen++] = '\r';
|
|
buf[outLen++] = '\n';
|
|
|