From 75acf88d5f387691c5c364eba4efc03b6f5c7486 Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 6 Oct 2019 10:11:51 +0200 Subject: [PATCH] Add support for Content-Type with charset (#561) --- src/WebRequest.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/WebRequest.cpp b/src/WebRequest.cpp index 45a0a39..fa06be6 100644 --- a/src/WebRequest.cpp +++ b/src/WebRequest.cpp @@ -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());