From af737d619d8705a1d1b5d9157b4725a52bce1811 Mon Sep 17 00:00:00 2001 From: DanyLE Date: Wed, 18 Jan 2023 18:27:34 +0100 Subject: [PATCH] Ingore cookie header in header dictionary as it is handled specially --- http_server.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/http_server.c b/http_server.c index a872087..3b17349 100644 --- a/http_server.c +++ b/http_server.c @@ -1148,8 +1148,17 @@ void *decode_request_header(void *data) trim(line, ' '); if (token && line && strlen(line) > 0) { - verify_header(token); - dput(xheader, token, strdup(line)); + if(strcasecmp(token, "Cookie") != 0) + { + /** + * @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) {