Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
Add support for Content-Type with charset (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bmooij authored and me-no-dev committed Oct 6, 2019
1 parent 6a1fb03 commit 75acf88
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/WebRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 75acf88

Please sign in to comment.