forked from me-no-dev/ESPAsyncWebServer
fix broken uploads
This commit is contained in:
@@ -388,10 +388,10 @@ void AsyncWebServerRequest::_parseMultipartPostByte(uint8_t data, bool last){
|
|||||||
_temp += (char)data;
|
_temp += (char)data;
|
||||||
if((char)data == '\n'){
|
if((char)data == '\n'){
|
||||||
if(_temp.length()){
|
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);
|
_itemType = _temp.substring(14);
|
||||||
_itemIsFile = true;
|
_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);
|
_temp = _temp.substring(_temp.indexOf(';') + 2);
|
||||||
while(_temp.indexOf(';') > 0){
|
while(_temp.indexOf(';') > 0){
|
||||||
String name = _temp.substring(0, _temp.indexOf('='));
|
String name = _temp.substring(0, _temp.indexOf('='));
|
||||||
|
Reference in New Issue
Block a user