fix: `Content-Length` on esp32 for chunked response

This commit is contained in:
Yurii
2024-12-18 20:53:33 +03:00
parent 2e3b38e14f
commit 4c32ccc450

View File

@@ -20,8 +20,7 @@ public:
this->webServer->setContentLength(measureJson(content));
#else
this->webServer->setContentLength(CONTENT_LENGTH_UNKNOWN);
this->webServer->sendHeader(F("Content-Length"), String(measureJson(content)));
this->webServer->setContentLength(measureJson(content));
this->webServer->send(code, contentType, emptyString);
#endif