1
0
Fork 0

Fix: Do not strcasecmp() content-type if unset (NULL)

Thanks to lns for finding it.
This commit is contained in:
Philipp Schafft 2020-02-12 10:59:49 +00:00
parent 5de3e8b3b0
commit c45b02414a
1 changed files with 3 additions and 0 deletions

View File

@ -280,6 +280,9 @@ int httpp_parse_postdata(http_parser_t *parser, const char *body_data, size_t le
{
const char *header = httpp_getvar(parser, "content-type");
if (!header)
return -1;
if (strcasecmp(header, "application/x-www-form-urlencoded") != 0) {
return -1;
}