ESP32 crashes after HTTP request

wrybread
Posts: 12
Joined: Tue Sep 24, 2019 12:53 am

Re: ESP32 crashes after HTTP request

Postby wrybread » Tue Oct 06, 2020 10:13 pm

Aha, I found a workaround. It's ugly, but it seems to work.

I had to modify HTTPClient.cpp, which on my Windows system is in C:\Users\USERNAME\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\HTTPClient\src.

Comment out these lines, or change the conditional or comment out "_canReuse = false;":

Code: Select all

                if(_canReuse && headerName.equalsIgnoreCase("Connection")) {
                    if(headerValue.indexOf("close") >= 0 && headerValue.indexOf("keep-alive") < 0) {
                        _canReuse = false;
                    }
                }

Who is online

Users browsing this forum: No registered users and 36 guests