MXS-1220: Compare headers case-insensitively
The header names are not case sensitive.
This commit is contained in:
@ -55,7 +55,7 @@ int kv_iter(void *cls,
|
|||||||
{
|
{
|
||||||
size_t* rval = (size_t*)cls;
|
size_t* rval = (size_t*)cls;
|
||||||
|
|
||||||
if (strcmp(key, "Content-Length") == 0)
|
if (strcasecmp(key, "Content-Length") == 0)
|
||||||
{
|
{
|
||||||
*rval = atoi(value);
|
*rval = atoi(value);
|
||||||
return MHD_NO;
|
return MHD_NO;
|
||||||
|
|||||||
@ -36,7 +36,7 @@ static int value_iterator(void *cls,
|
|||||||
{
|
{
|
||||||
std::pair<std::string, std::string>* cmp = (std::pair<std::string, std::string>*)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;
|
cmp->second = value;
|
||||||
return MHD_NO;
|
return MHD_NO;
|
||||||
|
|||||||
Reference in New Issue
Block a user