mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2026-01-27 01:02:19 +01:00
replace String::clear() with copy contructor for PRI
This commit is contained in:
committed by
Mathieu Carbou
parent
5a6556317c
commit
4240b337d5
@@ -321,7 +321,12 @@ bool AsyncWebServerRequest::_parseReqHeader() {
|
||||
}
|
||||
_headers.emplace_back(name, value);
|
||||
}
|
||||
#ifndef TARGET_RP2040
|
||||
_temp.clear();
|
||||
#else
|
||||
// Ancient PRI core does not have String::clear() method 8-()
|
||||
_temp = String();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -336,7 +341,13 @@ void AsyncWebServerRequest::_parsePlainPostChar(uint8_t data) {
|
||||
value = _temp.substring(_temp.indexOf('=') + 1);
|
||||
}
|
||||
_params.emplace_back(urlDecode(name), urlDecode(value), true);
|
||||
_temp = String();
|
||||
|
||||
#ifndef TARGET_RP2040
|
||||
_temp.clear();
|
||||
#else
|
||||
// Ancient PRI core does not have String::clear() method 8-()
|
||||
_temp = String();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user