Incorrect deletion of an item from LinkedList
In the method "_removeNotInterestingHeaders()" from "WebRequest.cpp " when deleting an element during the execution of the range base loop after a subsequent iteration, the pointer to _node in the nested class "Iterator" becomes incorrect, thus, after executing the overloaded operator "++" and subsequent calls to the element _node leads to undefined behavior.
I have come across a similar problem using the port for the Teensy 4.1. I had the same problem as the OP which I got around by requesting that all headers are interesting by adding the following code to canHandle.
request->addInterestingHeader("ANY");
I then also came across the problem again which I am still investigating which uses the same StringArray library for buffers for websockets. In the call to AsyncWebSocket::_cleanBuffers(), once one buffer is removed using _remove, the iterator class becomes corrupted and goes past the end of the linked list and presents invalid objects. This is where I think the problem is.