Skip to content

Commit

Permalink
reserve the String Length in urlDecode to avoid String Reallocations
Browse files Browse the repository at this point in the history
  • Loading branch information
Lan-Hekary authored Oct 16, 2023
1 parent 1662248 commit 1743c12
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/ESP8266WebServer/src/Parsing-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ String ESP8266WebServerTemplate<ServerType>::urlDecode(const String& text)
char temp[] = "0x00";
unsigned int len = text.length();
unsigned int i = 0;
decoded.reserve(len);
while (i < len)
{
char decodedChar;
Expand Down

0 comments on commit 1743c12

Please sign in to comment.