mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
Fixed checking headers longer than actually needed
The prevents matching header like "Content-Length-Anything:" as "Content-Length:" header.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user