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

Commit 75acf88

Browse files
Bmooijme-no-dev
authored andcommitted
Add support for Content-Type with charset (#561)
1 parent 6a1fb03 commit 75acf88

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/WebRequest.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,11 @@ bool AsyncWebServerRequest::_parseReqHeader(){
316316
if(name.equalsIgnoreCase("Host")){
317317
_host = value;
318318
} else if(name.equalsIgnoreCase("Content-Type")){
319+
_contentType = value.substring(0, value.indexOf(';'));
319320
if (value.startsWith("multipart/")){
320321
_boundary = value.substring(value.indexOf('=')+1);
321322
_boundary.replace("\"","");
322-
_contentType = value.substring(0, value.indexOf(';'));
323323
_isMultipart = true;
324-
} else {
325-
_contentType = value;
326324
}
327325
} else if(name.equalsIgnoreCase("Content-Length")){
328326
_contentLength = atoi(value.c_str());

0 commit comments

Comments
 (0)