1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-27 21:16:50 +03:00

Rollback setContentLength removal (#6715) (#6719)

Apparently I messed up testing #6715 and something broke. This rolls back that PR.
That means #2132 remains closed with no action.
This commit is contained in:
Develo 2019-11-06 16:08:28 -03:00 committed by GitHub
parent ffa9e3c7c2
commit 98785f7cdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -533,7 +533,7 @@ template <typename ServerType>
void ESP8266WebServerTemplate<ServerType>::_streamFileCore(const size_t fileSize, const String &fileName, const String &contentType)
{
using namespace mime;
(void)fileSize;
setContentLength(fileSize);
if (fileName.endsWith(String(FPSTR(mimeTable[gz].endsWith))) &&
contentType != String(FPSTR(mimeTable[gz].mimeType)) &&
contentType != String(FPSTR(mimeTable[none].mimeType))) {