]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
robots.txt: clfmerged log files maybe not start with /
authoreldy <>
Mon, 25 May 2009 16:12:09 +0000 (16:12 +0000)
committereldy <>
Mon, 25 May 2009 16:12:09 +0000 (16:12 +0000)
docs/awstats_changelog.txt
wwwroot/cgi-bin/.cvsignore
wwwroot/cgi-bin/awstats.pl

index 9ef254cdc6452875183dbb4d76471fd13736a783..ae86fb35ad0592153f8c5027e876a4d900e9c8cb 100644 (file)
@@ -13,7 +13,7 @@ New features/improvements:
 
 Fixes:
 - awstats emmits ton of warnings with new geoipfree - ID: 2794728
-
+- fix: can detect robots with robots.txt url even if file is not root.
 
 
 ***** 6.9 *****
index 68176da6b34c7845033ceec34600f850c97a6273..4c2e9cbda47558c79ce260943d3aaa09d699ee5d 100644 (file)
@@ -1,2 +1,3 @@
 awstats.testglobal.conf
 awstats.test*.conf
+awstats.conf
index a23316e20a9637948ffc266cb9fc99fbc15a9176..7d30c02e4cf0041471e563e1be87773c6e2eb112 100644 (file)
@@ -1578,12 +1578,24 @@ sub GetSessionRange {
 # Return:              -1, 0, 1
 #------------------------------------------------------------------------------
 sub SortBrowsers {
-       $a =~ m/^(\w+?)([\d\.]+)?$/;
-       my $a_family = $1;
-       my @a_ver = split(/\./, $2);
-       $b =~ m/^(\w+?)([\d\.]+)?$/;
-       my $b_family = $1;
-       my @b_ver    = split(/\./, $2);
+       my $a_family = $a;
+       my @a_ver = ();
+       foreach my $family ( keys %BrowsersFamily ) {
+               if ( $a =~ /^$family/i ) {
+                       $a =~ m/^(\D+)([\d\.]+)?$/;
+                       $a_family = $1;
+                       @a_ver = split(/\./, $2);
+               }
+       }
+       my $b_family = $b;
+       my @b_ver = ();
+       foreach my $family ( keys %BrowsersFamily ) {
+               if ( $b =~ /^$family/i ) {
+                       $b =~ m/^(\D+)([\d\.]+)?$/;
+                       $b_family = $1;
+                       @b_ver = split(/\./, $2);
+               }
+       }
 
        my $compare = 0;
        my $done    = 0;
@@ -10384,7 +10396,7 @@ if ( $UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft' )
        # Define precompiled regex
        my $regmisc        = qr/^$miscquoted/;
        my $regfavico      = qr/\/favicon\.ico$/i;
-       my $regrobot       = qr/^\/robots\.txt$/i;
+       my $regrobot       = qr/\/robots\.txt$/i;
        my $regtruncanchor = qr/#(\w*)$/;
        my $regtruncurl    = qr/([$URLQuerySeparators])(.*)$/;
        my $regext         = qr/\.(\w{1,6})$/;