commit 6fcdfd437e78b5f36c7f1df5238224721e46718e parent 0b7509755f4ba2b662dfdb0c883e9a17e42d0b1f Author: Christian Grothoff <christian@grothoff.org> Date: Tue, 28 Jul 2026 11:03:00 +0200 fix bogus assertion Diffstat:
| M | src/microhttpd/connection.c | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -6405,7 +6405,11 @@ get_req_header (struct MHD_Connection *c, else { /* Not a whitespace, not the end of the header line */ - mhd_assert ('\r' != chr); + /* A bare CR reaches this point when it is kept as an ordinary + character ('bare_cr_keep', MHD_OPTION_CLIENT_DISCIPLINE_LVL -3); + in every other mode it is either replaced with a space or + rejected before. */ + mhd_assert (('\r' != chr) || bare_cr_keep); mhd_assert ('\n' != chr); mhd_assert ('\0' != chr); if ( (! c->rq.hdrs.hdr.name_end_found) &&