Ingore cookie header in header dictionary as it is handled specially
All checks were successful
gitea-sync/ant-http/pipeline/head This commit looks good

This commit is contained in:
DanyLE 2023-01-18 18:27:34 +01:00
parent eed2e9c1af
commit af737d619d

View File

@ -1148,8 +1148,17 @@ void *decode_request_header(void *data)
trim(line, ' '); trim(line, ' ');
if (token && line && strlen(line) > 0) if (token && line && strlen(line) > 0)
{ {
verify_header(token); if(strcasecmp(token, "Cookie") != 0)
dput(xheader, token, strdup(line)); {
/**
* @brief Ignore Cookie header in the header dict
* as Cookie is handled in a dedicated dictionary
*
*/
verify_header(token);
dput(xheader, token, strdup(line));
}
} }
if (token != NULL && strcasecmp(token, "Cookie") == 0) if (token != NULL && strcasecmp(token, "Cookie") == 0)
{ {