diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-05-09 12:31:05 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-05-09 12:31:05 +0300 |
commit | 4809ee654a51fd76bb41830337d5859d5bb9b5a5 (patch) | |
tree | 77008f23748aa65ac742df827a3a71a51a9d8fc3 | |
parent | 6894504f51ecd271f7471c69935329b1402f49c2 (diff) | |
download | libmicrohttpd-4809ee654a51fd76bb41830337d5859d5bb9b5a5.tar.gz libmicrohttpd-4809ee654a51fd76bb41830337d5859d5bb9b5a5.zip |
Revert: continue match footers in MHD_get_response_header().
This is a partial revert of 6894504f51ecd271f7471c69935329b1402f49c2
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/microhttpd/response.c | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -1,3 +1,7 @@ | |||
1 | Tue May 9 12:28:00 MSK 2017 | ||
2 | Revert: continue match footers in MHD_get_response_header() for backward | ||
3 | compatibility. -EG | ||
4 | |||
1 | Mon May 8 19:30:00 MSK 2017 | 5 | Mon May 8 19:30:00 MSK 2017 |
2 | Fixed: use case-insensitive matching for header name in | 6 | Fixed: use case-insensitive matching for header name in |
3 | MHD_get_response_header(), match only headers (not footers). -EG | 7 | MHD_get_response_header(), match only headers (not footers). -EG |
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index 50ec521e..4326da07 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -241,8 +241,7 @@ MHD_get_response_header (struct MHD_Response *response, | |||
241 | return NULL; | 241 | return NULL; |
242 | for (pos = response->first_header; NULL != pos; pos = pos->next) | 242 | for (pos = response->first_header; NULL != pos; pos = pos->next) |
243 | { | 243 | { |
244 | if ( (pos->kind == MHD_HEADER_KIND) && | 244 | if ( MHD_str_equal_caseless_ (pos->header, key) ) |
245 | MHD_str_equal_caseless_ (pos->header, key) ) | ||
246 | return pos->value; | 245 | return pos->value; |
247 | } | 246 | } |
248 | return NULL; | 247 | return NULL; |