MXS-1220: Compare headers case-insensitively

The header names are not case sensitive.
This commit is contained in:
Markus Mäkelä 2017-05-03 11:26:43 +03:00
parent 49b45acd13
commit 624434a6d4
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ int kv_iter(void *cls,
{
size_t* rval = (size_t*)cls;
if (strcmp(key, "Content-Length") == 0)
if (strcasecmp(key, "Content-Length") == 0)
{
*rval = atoi(value);
return MHD_NO;

View File

@ -36,7 +36,7 @@ static int value_iterator(void *cls,
{
std::pair<std::string, std::string>* cmp = (std::pair<std::string, std::string>*)cls;
if (cmp->first == key)
if (strcasecmp(cmp->first.c_str(), key) == 0)
{
cmp->second = value;
return MHD_NO;