mirror of
https://github.com/esphome/esphome.git
synced 2026-07-11 09:25:34 +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
Multiple Licenses
529 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
