http.c: Do not look for '&' if no prior '?' is found

Otherwise, client requests to a resource such as '/me & you' would fail.
This commit is contained in:
Xavier Del Campo Romero 2023-07-05 23:34:36 +02:00
parent 15c905f150
commit fc022e49bf
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
1 changed files with 1 additions and 1 deletions

2
http.c
View File

@ -260,7 +260,7 @@ static int parse_args(struct ctx *const c, const char *const res,
{
int error;
const char *const arg_start = strchr(res, '?'),
*const ad_arg = strchr(res, '&');
*const ad_arg = arg_start ? strchr(res, '&') : NULL;
if (!arg_start)
{