Skip to content

Commit 502c45c

Browse files
author
gpepe
committed
Update Parsing.cpp
1 parent 3a95fb5 commit 502c45c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/ESP8266WebServer/src/Parsing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ bool ESP8266WebServer::_parseRequest(WiFiClient& client) {
140140
if (searchStr != "") searchStr += '&';
141141
char *plainBuf = nullptr;
142142
size_t plainLen = 0;
143-
while ( (plainLen == 0) || (plainLen < contentLength))
143+
do
144144
{
145145
//some clients send headers first and data after (like we do)
146146
//give them a chance
@@ -152,7 +152,7 @@ bool ESP8266WebServer::_parseRequest(WiFiClient& client) {
152152
client.readBytes(&plainBuf[plainLen], newLen);
153153
plainLen += newLen;
154154
plainBuf[plainLen] = '\0';
155-
}
155+
} while (plainLen < contentLength);
156156
#ifdef DEBUG_ESP_HTTP_SERVER
157157
DEBUG_OUTPUT.print("Plain: ");
158158
DEBUG_OUTPUT.println(plainBuf);

0 commit comments

Comments
 (0)