Commit a6c2c2a1 authored by Sergey Lyubka's avatar Sergey Lyubka

Comparing URI prefix when looking for URI handler

parent fbe19142
...@@ -1714,7 +1714,7 @@ static struct uri_handler *find_uri_handler(struct mg_server *server, ...@@ -1714,7 +1714,7 @@ static struct uri_handler *find_uri_handler(struct mg_server *server,
LINKED_LIST_FOREACH(&server->uri_handlers, lp, tmp) { LINKED_LIST_FOREACH(&server->uri_handlers, lp, tmp) {
uh = LINKED_LIST_ENTRY(lp, struct uri_handler, link); uh = LINKED_LIST_ENTRY(lp, struct uri_handler, link);
if (!strcmp(uh->uri, uri)) return uh; if (!strncmp(uh->uri, uri, strlen(uh->uri))) return uh;
} }
return NULL; return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment