]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Better support for Webstar LogFormat=3.
authoreldy <>
Sat, 16 Aug 2003 23:07:45 +0000 (23:07 +0000)
committereldy <>
Sat, 16 Aug 2003 23:07:45 +0000 (23:07 +0000)
wwwroot/cgi-bin/awstats.pl

index da7f743c679b0b6ec22facb09cf3217684e8a4b8..0a0d20e16f07e5d138d8272005d13330c027b4aa 100644 (file)
@@ -4401,7 +4401,7 @@ sub DefinePerlParsingFormat {
                        @fieldlib=('date','host','logname','method','url','code','size','ua','referer');
                }
                elsif ($LogFormat eq '3') {
-                       $PerlParsingFormat="([^\\t]*\\t[^\\t]*)\\t([^\\t]*)\\t([\\d|-]*)\\t([^\\t]*)\\t([^\\t]*)\\t([^\\t]*)\\t[^\\t]*\\t.*:([^\\t]*)\\t([\\d]*)";\r
+                       $PerlParsingFormat="([^\\t]*\\t[^\\t]*)\\t([^\\t]*)\\t([\\d|-]*)\\t([^\\t]*)\\t([^\\t]*)\\t([^\\t]*)\\t[^\\t]*\\t([^\\t]*)\\t([\\d]*)";\r
                        $pos_date=0;$pos_method=1;$pos_code=2;$pos_host=3;$pos_agent=4;$pos_referer=5;$pos_url=6;$pos_size=7;
                        @fieldlib=('date','method','code','host','ua','referer','url','size');
                }
@@ -5346,6 +5346,12 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat
                        }
                }
 
+               # Convert URL for Webstar to common URL
+               if ($LogFormat eq '3') {
+                       $field[$pos_url]=~s/:/\//g;
+                       if ($field[$pos_code] eq '-') { $field[$pos_code]='200'; }
+               }
+
                # Here, field array, timerecord and yearmonthdayrecord are initialized for log record
                if ($Debug) { debug("  This is a not already processed record ($timerecord)",4); }