-
Notifications
You must be signed in to change notification settings - Fork 13.3k
WebServer upload is stuck with latest git but ok in 2.7.4 and previous #7803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Issue start with this commit #7728 |
Can you please make a MCVE to repro your failure? The FSBrowser upload command is working AFAICT, with me and the user who found the issue both seeing good results so there's something different going on here. Since HTTP multipart is kind of bogus and depends on in-stream data signaling, it may be related to the actual file contents, so please include a sample file we can curl upload, too. That way it's nice and reproducible. |
|
webserver.zip may be the curl version under windows is different ?
|
I have updated curl and behavior is same but curl output is just different, anyway still stuck
the upload still does not end
|
Thanks, I can repro it with your sketch and file. Curl on Windows isn't any different, but your EOL chars are, and I think that's where the issue lies. Having |
one interresting thing is: like you, under linux it is working
EDIT : may be because not same gpl.txt |
When a file upload ends in \r\n (i.e. a Windows formatted text file) the sequence of bytes on the wire is `\r\n\r\n----...boundary-marker...`. When the FSM in Webserver was evaluating the stream, that 2nd `\r` would be written as valid data and the FSM parser would be reset and see `\n` as the 1st character, which wouldn't match. This would a) add an extra `\r` to uploaded files, and b) cause uploads to hang. Fix by checking on a header FSM mismatch if the next character input could possibly match our marker, and if so handle it properly. Fixes esp8266#7803
When a file upload ends in \r\n (i.e. a Windows formatted text file) the sequence of bytes on the wire is `\r\n\r\n----...boundary-marker...`. When the FSM in Webserver was evaluating the stream, that 2nd `\r` would be written as valid data and the FSM parser would be reset and see `\n` as the 1st character, which wouldn't match. This would a) add an extra `\r` to uploaded files, and b) cause uploads to hang. Fix by checking on a header FSM mismatch if the next character input could possibly match our marker, and if so handle it properly. Fixes #7803
Platform
Settings in IDE
Problem Description
when using latest git esp core, uploading file to webserver the upload is stuck because curl is waiting an ack that the webserver do not send
same code using espcore 2.7.4 and older also are working fine and were working as I used it
MCVE Sketch
I use standard API
So FSBrowser.ino should do same
That was the last issue from me for 2020 🎆 🎉
Happy new year 2021 🥳 - a big thank you for this year to the dev team and continue your great job ^_^ 🎈
The text was updated successfully, but these errors were encountered: