From 6894504f51ecd271f7471c69935329b1402f49c2 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Mon, 8 May 2017 19:35:13 +0300 Subject: Fixed MHD_get_response_header(): used case-insensitive match for header name, use only headers --- src/microhttpd/response.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/microhttpd/response.c') diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index a86e58fc..50ec521e 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c @@ -240,9 +240,11 @@ MHD_get_response_header (struct MHD_Response *response, if (NULL == key) return NULL; for (pos = response->first_header; NULL != pos; pos = pos->next) - if (0 == strcmp (key, - pos->header)) - return pos->value; + { + if ( (pos->kind == MHD_HEADER_KIND) && + MHD_str_equal_caseless_ (pos->header, key) ) + return pos->value; + } return NULL; } -- cgit v1.2.3