Aplikace opravy odstraneni headeru z 139a97a721
This commit is contained in:
parent
35eafc624a
commit
b25b62ceb9
@ -180,11 +180,16 @@ void AsyncWebServerRequest::_onData(void *buf, size_t len){
|
|||||||
|
|
||||||
void AsyncWebServerRequest::_removeNotInterestingHeaders(){
|
void AsyncWebServerRequest::_removeNotInterestingHeaders(){
|
||||||
if (_interestingHeaders.containsIgnoreCase("ANY")) return; // nothing to do
|
if (_interestingHeaders.containsIgnoreCase("ANY")) return; // nothing to do
|
||||||
for(const auto& header: _headers){
|
|
||||||
if(!_interestingHeaders.containsIgnoreCase(header->name().c_str())){
|
auto itr = _headers.begin();
|
||||||
|
while (itr != _headers.end())
|
||||||
|
{
|
||||||
|
const auto header = *itr;
|
||||||
|
++itr; // ++operator before remove(), otherwise itr becomes invalid
|
||||||
|
|
||||||
|
if (!_interestingHeaders.containsIgnoreCase(header->name().c_str()))
|
||||||
_headers.remove(header);
|
_headers.remove(header);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsyncWebServerRequest::_onPoll(){
|
void AsyncWebServerRequest::_onPoll(){
|
||||||
|
Loading…
Reference in New Issue
Block a user