You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ X] I have read the documentation at readthedocs and the issue is not addressed there.
[X ] I have tested that the issue is present in current master branch (aka latest git).
[X ] I have searched the issue tracker for a similar issue.
If there is a stack dump, I have decoded it. N/A
[ X] I have filled out all fields below.
Platform
Hardware: [ESP-12]
Core Version: [latest git 25/11/2020]
Development Env: [Arduino IDE]
Operating System: [Windows]
Settings in IDE
Module: [Nodemcu]
Flash Mode: [dio]
Flash Size: [4MB/FS2MB]
lwip Variant: [v2 Lower Memory]
Reset Method: [nodemcu]
Flash Frequency: [40Mhz]
CPU Frequency: [160MHz]
Upload Using: [SERIAL]
Upload Speed: [115200r] (serial upload only)
Problem Description
Since this commit #7543, binary upload like index.html.gz is corrupted
so the result is when web access to corrupted file the encodding is not recognized
Need to upload file - then try to access it using webserver
with commit the page cannot be displayed
without commit everything is fine
No issue with text file as there is not need for browser to expand the file, even corrupted it is loaded
good file index.html(2).gz
corrupted file index.html(1).gz
For what I can see the 0D 0A code is modified in uploaded file - corrupting it
Thanks for the clear repro steps. I was able to duplicate locally. Basically, once a 0x0d comes in the following byte is garbled on writing to flash, so the change listed has an issue. I'll look into it.
Use a simpler, cleaner implementation of multipart form detection as
defined in https://tools.ietf.org/html/rfc7578 .
Implements a simple state machine that detects the \r\n--<boundary>
stream in input a character at a time, instead of buffering and
comparing in chunks which can miss things due to alignment issues and
which also had a problem with replacing characters in a binary stream.
Fixesesp8266#7723
Use a simpler, cleaner implementation of multipart form detection as
defined in https://tools.ietf.org/html/rfc7578 .
Implements a simple state machine that detects the `\r\n--<boundary>`
stream in input a character at a time, instead of buffering and
comparing in chunks which can miss things due to alignment issues and
which also had a problem with replacing characters in a binary stream.
Adjust the private _uploadReadByte function to return -1 on error (like
a read()), and the main file upload handler to use that return value
instead of duplicating logic.
Fixes#7723
Basic Infos
Platform
Settings in IDE
Problem Description
Since this commit #7543, binary upload like index.html.gz is corrupted
so the result is when web access to corrupted file the encodding is not recognized
Need to upload file - then try to access it using webserver
with commit the page cannot be displayed
without commit everything is fine
No issue with text file as there is not need for browser to expand the file, even corrupted it is loaded
good file index.html(2).gz
corrupted file index.html(1).gz
For what I can see the 0D 0A code is modified in uploaded file - corrupting it
MCVE Sketch
I used FSBrowser sample to check
The text was updated successfully, but these errors were encountered: