libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 026525d584cc7c790965b787e4ebdcce8e3d4f80
parent d6fc384fc40814b44ee4ad4eebd1a813544e1f59
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Wed,  8 Jul 2026 12:12:58 +0200

match content-type only at beginning of the line

Diffstat:
Msrc/microhttpd/postprocessor.c | 14+++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c @@ -595,16 +595,12 @@ try_match_header (const char *prefix, { if (NULL != *suffix) return MHD_NO; - while (0 != *line) + if (MHD_str_equal_caseless_n_ (prefix, + line, + prefix_len)) { - if (MHD_str_equal_caseless_n_ (prefix, - line, - prefix_len)) - { - *suffix = strdup (&line[prefix_len]); - return MHD_YES; - } - ++line; + *suffix = strdup (&line[prefix_len]); + return MHD_YES; } return MHD_NO; }