From 9d763cd3221739231a5ec3ca9561fb9c95732399 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sat, 30 Jan 2016 11:27:57 +0100 Subject: [PATCH] Regex for url matching must the whole url. --- src/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/url.c b/src/url.c index 2712953..26c475f 100644 --- a/src/url.c +++ b/src/url.c @@ -142,7 +142,7 @@ zak_cgi_url_dispatch (ZakCgiUrl *url) while (g_hash_table_iter_next (&iter, &key, &value)) { error = NULL; - str_regex = g_strdup_printf ("%s$", (gchar *)key); + str_regex = g_strdup_printf ("^%s$", (gchar *)key); regex = g_regex_new (str_regex, 0, 0, &error); g_free (str_regex); if (regex == NULL -- 2.49.0