Fix Content-Type bug

This commit is contained in:
antao 2018-08-10 17:16:37 +08:00
parent 739dabe7b4
commit dea4829786
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@ using namespace drogon;
void HttpRequestImpl::parsePremeter()
{
const std::string &type=getHeader("Content-Type");
std::string type=getHeader("Content-Type");
if(type.empty())
{
type=getHeader("content-type");
}
const std::string &input=query();
if(_method==kGet||(_method==kPost&&(type==""||type.find("application/x-www-form-urlencoded")!=std::string::npos)))
{