gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed MHD_get_respon


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: Fixed MHD_get_response_header(): used case-insensitive match for header name, use only headers
Date: Tue, 09 May 2017 11:23:37 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 6894504f Fixed MHD_get_response_header(): used case-insensitive match 
for header name, use only headers
6894504f is described below

commit 6894504f51ecd271f7471c69935329b1402f49c2
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Mon May 8 19:35:13 2017 +0300

    Fixed MHD_get_response_header(): used case-insensitive match for header 
name, use only headers
---
 ChangeLog                 | 6 +++++-
 src/microhttpd/response.c | 8 +++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7de19bd1..a8a69d8d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-Tue May  5 20:57:00 MSK 2017
+Mon May  8 19:30:00 MSK 2017
+       Fixed: use case-insensitive matching for header name in
+       MHD_get_response_header(), match only headers (not footers). -EG
+
+Fri May  5 20:57:00 MSK 2017
        Fixed null dereference when connection has "Upgrade" request and 
        connection is not upgraded.  -JB/EG
        Better handle Keep-Alive/Close. -EG
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;
 }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]