From: Laurent Destailleur Date: Tue, 1 Mar 2016 10:01:50 +0000 (+0100) Subject: NEW Support detection of edge X-Git-Tag: AWSTATS_7_5~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f812812c57d3e540b6e369bfcf8c7afa6b454fd8;p=thirdparty%2FAWStats.git NEW Support detection of edge --- diff --git a/test/log/testglobal.log b/test/log/testglobal.log index 3cd76fd2..55df4096 100644 --- a/test/log/testglobal.log +++ b/test/log/testglobal.log @@ -6,9 +6,9 @@ # To run test: test.pl # To run test: perl '/home/ldestailleur/git/awstats/wwwroot/cgi-bin/awstats.pl' -config=/home/ldestailleur/git/awstats/test/awstats/conf/awstats.testglobal.conf --debug=3 # ---------------------------------------------------------------------------- -# This sample log file contains 13 different IPs that are : -# Viewed traffic: 8 different true human visitors making 9 human visits -# 24 hits on pages and 15 hits not pages (39 hits) +# This sample log file contains 14 different IPs that are : +# Viewed traffic: 9 different true human visitors making 10 human visits +# 25 hits on pages and 15 hits not pages (40 hits) # Not viewed traffic: 11 pages (7 from 80.8.55.5, 1 worm, 3 special status code), 15 hits # ---------------------------------------------------------------------------- # 80.8.55.1 2 visits (start at 00:00:00 and at 12:00:00 with both entry page on /) @@ -25,6 +25,7 @@ # 80.8.55.11 1 visit that come from android phone # 80.8.55.12 1 visit that come from air # 80.8.55.13 1 visit that come from ie 11 +# 80.8.55.14 1 visit that come from edge 80.8.55.1 - - [01/Jan/2001:00:00:10 +0100] "GET /page1.html HTTP/1.0" 200 7009 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)" 80.8.55.1 - - [01/Jan/2001:00:00:00 +0100] "GET / HTTP/1.0" 200 7009 "http://www.sitereferer/cgi-bin/search.pl?q=a" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)" @@ -95,3 +96,6 @@ 80.8.55.12 - - [01/Jan/2001:17:20:00 -0300] "GET /page1.html HTTP/1.1" 200 70476 "-" "Mozilla/5.0 (Windows; U; en-US) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5" 80.8.55.13 - - [01/Jan/2001:21:00:00 -0300] "GET /page1.html HTTP/1.1" 200 70476 "-" "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko" + +80.8.55.14 - - [01/Jan/2001:21:00:00 -0300] "GET /page1.html HTTP/1.1" 200 70476 "-" "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136" + diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index e02c6b7b..9b864b3a 100755 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -17965,7 +17965,7 @@ if ( $UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft' ) my $regipv4 = qr/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; my $regipv4l = qr/^::ffff:\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; my $regipv6 = qr/^[0-9A-F]*:/i; - my $regveredge = qr/edge\//i; + my $regveredge = qr/edge\/([\d]*)/i; my $regvermsie = qr/msie([+_ ]|)([\d\.]*)/i; #my $regvermsie11 = qr/trident\/7\.\d*\;([+_ ]|)rv:([\d\.]*)/i; my $regvermsie11 = qr/trident\/7\.\d*\;([a-zA-Z;+_ ]+|)rv:([\d\.]*)/i; @@ -19539,9 +19539,9 @@ if ( $UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft' ) # Edge (must be at beginning) if ($UserAgent =~ /$regveredge/o) { - $_browser_h{"edge"}++; - if ($PageBool) { $_browser_p{"edge"}++; } - $TmpBrowser{$UserAgent} = "edge"; + $_browser_h{"edge$1"}++; + if ($PageBool) { $_browser_p{"edge$1"}++; } + $TmpBrowser{$UserAgent} = "edge$1"; } # Opera ? diff --git a/wwwroot/cgi-bin/lib/browsers.pm b/wwwroot/cgi-bin/lib/browsers.pm index 981b5a85..7307d6b4 100644 --- a/wwwroot/cgi-bin/lib/browsers.pm +++ b/wwwroot/cgi-bin/lib/browsers.pm @@ -525,7 +525,7 @@ 'svn','subversion', 'msie','msie', 'netscape','netscape', -'edge','msie', +'edge','edge', 'firebird','phoenix', 'go!zilla','gozilla', diff --git a/wwwroot/icon/browser/edge.png b/wwwroot/icon/browser/edge.png new file mode 100644 index 00000000..5b82524a Binary files /dev/null and b/wwwroot/icon/browser/edge.png differ