esp8266 / esp8266/Arduino

'Reallocating large String(... -> ...)' warning when using WebServer

Open
#8,872 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

Hi,

since PR #8821 I get this output from ESP8266WebServer:
```
[String] 'Content-Ty ... ires: -1
': Reallocating large String(140 -> 162 bytes)
```
It's from this line
https://github.com/esp8266/Arduino/blob/be02af0504869e2bf119a013fe8fd6cf5ed8e411/libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h#L433
if `sendHeader()` is used more than once. Like here:
https://github.com/khoih-prog/ESP_WiFiManager_Lite/blob/085afdbd7ccfb7e46b1ed9f1cf5c50be29cc3223/src/ESP_WiFiManager_Lite.h#L2771

Is there something we can do against it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.