8000 roll back the while loop in _parseForm · Curclamas/arduino-esp32@7d2560c · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

libraries/WebServer/src/Parsing.cpp

Lines changed: 4 additions & 4 deletions
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)
0