Add support for Content-Type with charset (#561)
This commit is contained in:
parent
6a1fb03fc4
commit
75acf88d5f
|
@ -316,13 +316,11 @@ bool AsyncWebServerRequest::_parseReqHeader(){
|
||||||
if(name.equalsIgnoreCase("Host")){
|
if(name.equalsIgnoreCase("Host")){
|
||||||
_host = value;
|
_host = value;
|
||||||
} else if(name.equalsIgnoreCase("Content-Type")){
|
} else if(name.equalsIgnoreCase("Content-Type")){
|
||||||
|
_contentType = value.substring(0, value.indexOf(';'));
|
||||||
if (value.startsWith("multipart/")){
|
if (value.startsWith("multipart/")){
|
||||||
_boundary = value.substring(value.indexOf('=')+1);
|
_boundary = value.substring(value.indexOf('=')+1);
|
||||||
_boundary.replace("\"","");
|
_boundary.replace("\"","");
|
||||||
_contentType = value.substring(0, value.indexOf(';'));
|
|
||||||
_isMultipart = true;
|
_isMultipart = true;
|
||||||
} else {
|
|
||||||
_contentType = value;
|
|
||||||
}
|
}
|
||||||
} else if(name.equalsIgnoreCase("Content-Length")){
|
} else if(name.equalsIgnoreCase("Content-Length")){
|
||||||
_contentLength = atoi(value.c_str());
|
_contentLength = atoi(value.c_str());
|
||||||
|
|
Loading…
Reference in New Issue