]> err.no Git - varnish/commitdiff
Strip fragments and query strings.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 13 Jul 2007 11:31:36 +0000 (11:31 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 13 Jul 2007 11:31:36 +0000 (11:31 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1689 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-tools/fetcher/fetcher.pl

index 2f9519284b0f19bed8b39c46a4fd94f8e819209f..3e70828ab36e7407eb3e0f360e5533e20a955a81 100755 (executable)
@@ -75,7 +75,7 @@ sub run($$) {
        $0 = "[fetcher] checking $url";
        if ($resp->header('Content-Type') =~ m/^text\//) {
            my %urls = map { $_ => 1 }
-           ($resp->content =~ m/\b(?:href|src)=[\'\"](.+?)[\'\"]/g);
+               ($resp->content =~ m/\b(?:href|src)=[\'\"]([^\'\"\?\#]+)(?:[\?\#][^\'\"]*)?[\'\"]/g);
            foreach (keys(%urls)) {
                $s->write("add $_\n");
            }