roll back the while loop in _parseForm

This commit is contained in:
me-no-dev 2018-07-25 20:59:56 +02:00
parent 17065dfd3a
commit 7d2560cbbf

View File

@ -477,14 +477,14 @@ bool WebServer::_parseForm(WiFiClient& client, String boundary, uint32_t len){
if(_currentHandler && _currentHandler->canUpload(_currentUri)) if(_currentHandler && _currentHandler->canUpload(_currentUri))
_currentHandler->upload(*this, _currentUri, *_currentUpload); _currentHandler->upload(*this, _currentUri, *_currentUpload);
_currentUpload->status = UPLOAD_FILE_WRITE; _currentUpload->status = UPLOAD_FILE_WRITE;
int argByte; int argByte = _uploadReadByte(client);
readfile: readfile:
do{ while(argByte != 0x0D){
argByte = _uploadReadByte(client);
if(argByte < 0) return _parseFormUploadAborted(); if(argByte < 0) return _parseFormUploadAborted();
_uploadWriteByte(argByte); _uploadWriteByte(argByte);
}while(argByte != 0x0D); argByte = _uploadReadByte(client);
}
argByte = _uploadReadByte(client); argByte = _uploadReadByte(client);
if(argByte < 0) return _parseFormUploadAborted(); if(argByte < 0) return _parseFormUploadAborted();