summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 29e03c0..9342eb6 100644
--- a/utils.c
+++ b/utils.c
@@ -208,6 +208,10 @@ bool uh_path_match(const char *prefix, const char *url)
{
int len = strlen(prefix);
+ /* A prefix of "/" will - by definition - match any url */
+ if (prefix[0] == '/' && len == 1)
+ return true;
+
if (strncmp(url, prefix, len) != 0)
return false;