From: eldy <> Date: Tue, 11 Feb 2003 13:20:36 +0000 (+0000) Subject: Fixed rare bug of login detection when LogFormat=1 or 6. X-Git-Tag: AWSTATS_5_4_RELEASE~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a58c8e1449377056013a2fa68447d770eeb4c90;p=thirdparty%2FAWStats.git Fixed rare bug of login detection when LogFormat=1 or 6. --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 79b307a8..b4edad4a 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -3102,7 +3102,7 @@ sub Save_History { if ($sectiontosave eq 'general') { if ($LastUpdate < int("$nowyear$nowmonth$nowday$nowhour$nowmin$nowsec")) { $LastUpdate=int("$nowyear$nowmonth$nowday$nowhour$nowmin$nowsec"); } print HISTORYTMP "\n"; - print HISTORYTMP "# LastLine = Date of last record processed - Last line offset in last log - Last line signature value\n"; + print HISTORYTMP "# LastLine = Date of last record processed - Last record offset in last log - Last record signature value\n"; print HISTORYTMP "# FirstTime = Date of first visit for history file\n"; print HISTORYTMP "# LastTime = Date of last visit for history file\n"; print HISTORYTMP "# LastUpdate = Date of last update - Nb of lines read - Nb of old records - Nb of new records - Nb of corrupted - Nb of dropped\n"; @@ -4292,7 +4292,7 @@ sub DefinePerlParsingFormat() { if ($LogFormat =~ /^[1-6]$/) { # Pre-defined log format if ($LogFormat eq '1' || $LogFormat eq '6') { # Same than "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"". # %u (user) is "(.+)" instead of "[^ ]+" because can contain space (Lotus Notes). referer and ua might be "". - $PerlParsingFormat="([^ ]+) [^ ]+ (.+) \\[([^ ]+) [^ ]+\\] \\\"([^ ]+) ([^ ]+) [^\\\"]+\\\" ([\\d|-]+) ([\\d|-]+) \\\"(.*)\\\" \\\"([^\\\"]*)\\\""; + $PerlParsingFormat="([^ ]+) [^ ]+ ([^\\[]+) \\[([^ ]+) [^ ]+\\] \\\"([^ ]+) ([^ ]+) [^\\\"]+\\\" ([\\d|-]+) ([\\d|-]+) \\\"(.*)\\\" \\\"([^\\\"]*)\\\""; $pos_host=0;$pos_logname=1;$pos_date=2;$pos_method=3;$pos_url=4;$pos_code=5;$pos_size=6;$pos_referer=7;$pos_agent=8; @fieldlib=('host','logname','date','method','url','code','size','referer','ua'); }