mirror of
https://github.com/esphome/esphome.git
synced 2026-11-02 03:16:40 +00:00
ba2558edf64e82fcbd667ba31c04677c6a189693
The previous fix tracked the AsyncWebServerRequest pointer to distinguish web_server_idf's double index==0 callbacks (Start marker with data==nullptr, then the first real data chunk) from a retry after an interrupted upload. That is unreliable: AsyncWebServerRequest is a stack-allocated object in the httpd task, so a new request that happens to reuse the same stack address as an interrupted one compares equal and silently skips the abort. Closing a browser tab mid-upload and starting a fresh upload from another window could then concatenate partial data from the first upload with the new image. Gate the init block on 'index == 0 && len > 0' instead. This uniquely identifies the first real byte of an upload on both IDF (start-marker has len==0) and Arduino, no identity tracking needed.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
GPL-3.0, MIT
667 MiB
0 Stars
2 Watchers
0 Forks
Languages
C++
55.1%
Python
44.1%
C
0.3%
Shell
0.3%
JavaScript
0.2%
