Skip to content

Commit 7d2560c

Browse files
committed
roll back the while loop in _parseForm
1 parent 17065df commit 7d2560c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: libraries/WebServer/src/Parsing.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -477,14 +477,14 @@ bool WebServer::_parseForm(WiFiClient& client, String boundary, uint32_t len){
477477
if(_currentHandler && _currentHandler->canUpload(_currentUri))
478478
_currentHandler->upload(*this, _currentUri, *_currentUpload);
479479
_currentUpload->status = UPLOAD_FILE_WRITE;
480-
int argByte;
480+
int argByte = _uploadReadByte(client);
481481
readfile:
482482

483-
do{
484-
argByte = _uploadReadByte(client);
483+
while(argByte != 0x0D){
485484
if(argByte < 0) return _parseFormUploadAborted();
486485
_uploadWriteByte(argByte);
487-
}while(argByte != 0x0D);
486+
argByte = _uploadReadByte(client);
487+
}
488488

489489
argByte = _uploadReadByte(client);
490490
if(argByte < 0) return _parseFormUploadAborted();

0 commit comments

Comments
 (0)