Add support for Content-Type with charset (#561)

This commit is contained in:
Bob 2019-10-06 10:11:51 +02:00 committed by Me No Dev
parent 6a1fb03fc4
commit 75acf88d5f
1 changed files with 1 additions and 3 deletions

View File

@ -316,13 +316,11 @@ bool AsyncWebServerRequest::_parseReqHeader(){
if(name.equalsIgnoreCase("Host")){
_host = value;
} else if(name.equalsIgnoreCase("Content-Type")){
_contentType = value.substring(0, value.indexOf(';'));
if (value.startsWith("multipart/")){
_boundary = value.substring(value.indexOf('=')+1);
_boundary.replace("\"","");
_contentType = value.substring(0, value.indexOf(';'));
_isMultipart = true;
} else {
_contentType = value;
}
} else if(name.equalsIgnoreCase("Content-Length")){
_contentLength = atoi(value.c_str());