8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08d7df1 commit 40ffb03Copy full SHA for 40ffb03
examples/REST-API/REST-API.ino
@@ -76,6 +76,7 @@ char contentTypes[][2][32] = {
76
#include <SSLCert.hpp>
77
#include <HTTPRequest.hpp>
78
#include <HTTPResponse.hpp>
79
+#include <util.hpp>
80
81
// We use the following struct to store GPIO events:
82
#define MAX_EVENTS 20
@@ -316,7 +317,7 @@ void handleSPIFFS(HTTPRequest * req, HTTPResponse * res) {
316
317
File file = SPIFFS.open(filename.c_str());
318
319
// Set length
- res->setHeader("Content-Length", "" + file.size());
320
+ res->setHeader("Content-Length", httpsserver::intToString(file.size()));
321
322
// Content-Type is guessed using the definition of the contentTypes-table defined above
323
int cTypeIdx = 0;
0 commit comments