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
971 B
26 lines
971 B
diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp
|
|
index 6e88da9..09359c3 100644
|
|
--- a/src/AsyncWebSocket.cpp
|
|
+++ b/src/AsyncWebSocket.cpp
|
|
@@ -827,7 +827,7 @@ void AsyncWebSocketClient::binary(AsyncWebSocketMessageBuffer * buffer)
|
|
|
|
IPAddress AsyncWebSocketClient::remoteIP() {
|
|
if(!_client) {
|
|
- return IPAddress((uint32_t)0);
|
|
+ return IPAddress();
|
|
}
|
|
return _client->remoteIP();
|
|
}
|
|
diff --git a/src/WebResponses.cpp b/src/WebResponses.cpp
|
|
index a22e991..babef18 100644
|
|
--- a/src/WebResponses.cpp
|
|
+++ b/src/WebResponses.cpp
|
|
@@ -317,7 +317,7 @@ size_t AsyncAbstractResponse::_ack(AsyncWebServerRequest *request, size_t len, u
|
|
free(buf);
|
|
return 0;
|
|
}
|
|
- outLen = sprintf((char*)buf+headLen, "%x", readLen) + headLen;
|
|
+ outLen = sprintf((char*)buf+headLen, "%04x", readLen) + headLen;
|
|
while(outLen < headLen + 4) buf[outLen++] = ' ';
|
|
buf[outLen++] = '\r';
|
|
buf[outLen++] = '\n';
|
|
|