Fixed checking headers longer than actually needed

The prevents matching header like "Content-Length-Anything:" as
"Content-Length:" header.
This commit is contained in:
Evgeny Grin (Karlson2k)
2026-04-14 19:39:50 +02:00
parent 0d33a88f35
commit a083613d84
+3 -4
View File
@@ -4902,10 +4902,9 @@ parse_connection_headers (struct MHD_Connection *connection)
for (pos = connection->rq.headers_received; NULL != pos; pos = pos->next)
if ( (0 != (pos->kind & MHD_HEADER_KIND)) &&
(MHD_str_equal_caseless_bin_n_ (MHD_HTTP_HEADER_CONTENT_LENGTH,
pos->header,
MHD_STATICSTR_LEN_ (
MHD_HTTP_HEADER_CONTENT_LENGTH))) )
(MHD_str_equal_caseless_s_bin_n_ (MHD_HTTP_HEADER_CONTENT_LENGTH,
pos->header,
pos->header_size)) )
{
const char *clen;
size_t val_len;