]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fix problem of corrupted record with Webstar.
authoreldy <>
Sat, 16 Aug 2003 21:40:41 +0000 (21:40 +0000)
committereldy <>
Sat, 16 Aug 2003 21:40:41 +0000 (21:40 +0000)
wwwroot/cgi-bin/awstats.pl

index 9cbe8dd1f1cd5206463a606a45480184a5a11789..da7f743c679b0b6ec22facb09cf3217684e8a4b8 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]*)";
+                       $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');
                }
@@ -5266,8 +5266,8 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') {  # Updat
                # Check protocol (Note: Use of TmpProtocol does not increase speed)
                #----------------------------------------------------------------------
                my $protocol=0;
-               if ($field[$pos_method] eq 'GET' || $field[$pos_method] eq 'POST' || $field[$pos_method] eq 'HEAD' || $field[$pos_method] =~ /OK/i) {
-                       # HTTP request. Keep only GET, POST, HEAD, *OK* with Webstar but not OPTIONS
+               if ($field[$pos_method] eq 'GET' || $field[$pos_method] eq 'POST' || $field[$pos_method] eq 'HEAD' || $field[$pos_method] =~ /OK/i || $field[$pos_method] =~ /ERR\!/i) {\r
+                       # HTTP request. Keep only GET, POST, HEAD, *OK* and ERR! for Webstar. Do not keep OPTIONS\r
                        $protocol=1;
                }
                elsif ($field[$pos_method] eq 'SMTP') {