fix broken uploads

This commit is contained in:
me-no-dev 2016-09-03 23:30:14 +03:00
parent b6c9ebd9e6
commit c2de999f03
1 changed files with 2 additions and 2 deletions

View File

@ -388,10 +388,10 @@ void AsyncWebServerRequest::_parseMultipartPostByte(uint8_t data, bool last){
_temp += (char)data;
if((char)data == '\n'){
if(_temp.length()){
if(_temp.length() > 12 && _temp.substring(0, 12).equalsIgnoreCase("Content-Type:")){
if(_temp.length() > 12 && _temp.substring(0, 12).equalsIgnoreCase("Content-Type")){
_itemType = _temp.substring(14);
_itemIsFile = true;
} else if(_temp.length() > 19 && _temp.substring(0, 19).equalsIgnoreCase("Content-Disposition:")){
} else if(_temp.length() > 19 && _temp.substring(0, 19).equalsIgnoreCase("Content-Disposition")){
_temp = _temp.substring(_temp.indexOf(';') + 2);
while(_temp.indexOf(';') > 0){
String name = _temp.substring(0, _temp.indexOf('='));