From 7d2560cbbf068d2581dde657f5b3fa57c1c3a8e3 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Wed, 25 Jul 2018 20:59:56 +0200 Subject: [PATCH] roll back the while loop in _parseForm --- libraries/WebServer/src/Parsing.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/WebServer/src/Parsing.cpp b/libraries/WebServer/src/Parsing.cpp index 897b5b4a..40300aea 100644 --- a/libraries/WebServer/src/Parsing.cpp +++ b/libraries/WebServer/src/Parsing.cpp @@ -477,14 +477,14 @@ bool WebServer::_parseForm(WiFiClient& client, String boundary, uint32_t len){ if(_currentHandler && _currentHandler->canUpload(_currentUri)) _currentHandler->upload(*this, _currentUri, *_currentUpload); _currentUpload->status = UPLOAD_FILE_WRITE; - int argByte; + int argByte = _uploadReadByte(client); readfile: - do{ - argByte = _uploadReadByte(client); + while(argByte != 0x0D){ if(argByte < 0) return _parseFormUploadAborted(); _uploadWriteByte(argByte); - }while(argByte != 0x0D); + argByte = _uploadReadByte(client); + } argByte = _uploadReadByte(client); if(argByte < 0) return _parseFormUploadAborted();