]> mj.ucw.cz Git - libucw.git/commitdiff
url_component_separators has a default value "" to accelerate
authorRobert Spalek <robert@ucw.cz>
Thu, 27 Sep 2001 09:54:22 +0000 (09:54 +0000)
committerRobert Spalek <robert@ucw.cz>
Thu, 27 Sep 2001 09:54:22 +0000 (09:54 +0000)
url_has_repeated_component() if not reconfigured

lib/url.c

index 7b0548ca9f193f6bf4811b3e63277cf027296e70..73e3b50134b1d3e6a75c7a0385a19be8c99944b6 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -18,7 +18,7 @@
 
 static uns url_ignore_spaces;
 static uns url_ignore_underflow;
-static byte *url_component_separators = "/&?";
+static byte *url_component_separators = "";
 static uns url_min_repeat_count = 0x7fffffff;
 static uns url_max_repeat_length = 0;
 
@@ -630,6 +630,8 @@ url_has_repeated_component(byte *url)
                if (c)
                        c++;
        }
+       if (comps < url_min_repeat_count)
+               return 0;
        comp = alloca(comps * sizeof(struct component));
        for (i=0, c=url; c; i++)
        {