-
Notifications
You must be signed in to change notification settings - Fork 6
"Connection: close" header from server causes ESP32 to crash #5
Comments
Hi @ugluguglug Thanks for your interest in the library and the bug report. To help duplicate, isolate then fix the issue, please post the MRE. |
Hello @khoih-prog, thank you so much for creating this library! Run a web server (on Ubuntu):
Code for ESP32 (Modified from AsyncHTTPSRequest_ESP.ino)
A few things to change:
Main.cpp
Connection: keep-alive
Connection: close
If Nginx does not return "Connection: close" header after doing the above
|
Hi @ugluguglug That's the perfect Certainly with your experience and knowledge, you can help isolate the issue and spot the possible bug by turning on the debug option and looking in the library code.
Thanks a lot, |
HI @ugluguglug I'm currently have no time to spend on this issue yet. Can you try by
then post your test result here. |
More to try and digest
|
I'm sorry I don't have time to install the It's better that you set-up the SSL server, then email me / post here the I'm closing the issue now, won't reopen until you can help with the SSL test server. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
ESP32 crashes with either "CORRUPT HEAP" or "Exception was unhandled" after receiving "Connection: close" header from target server following a POST request.
Similar issues did not happen when using the library AsyncHTTPRequest_Generic.
Steps to Reproduce
Expected behavior
Start a new TCP connection after closing the previous one.
Actual behavior
Crashes with either CORRUPT HEAP or "Exception was unhandled" as error message.
Debug and AT-command log (if applicable)
Logs are generated using esp32_exception_decoder with
#define _ASYNC_HTTPS_LOGLEVEL_ 4
, domain name of the server is removedWhen Connection header of response is "keep-alive"
When Connection header of response is "close" (Unhandled exception)
When Connection header of response is "close" (Corrupt heap)
Information
Platform.io version: Core 5.2.4, Home 3.4.0
ESP32 IDF version: v3.3.5-1-g85c43024c
ESP32 module: DEVKITV1
OS: Ubuntu 20.04 LTS
Linux focal 5.13.0-27-generic #29~20.04.1-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
Context:
Trying to make a POST request to a server through HTTPS.
The text was updated successfully, but these errors were encountered: