From: eldy <> Date: Sat, 16 Aug 2003 21:40:41 +0000 (+0000) Subject: Fix problem of corrupted record with Webstar. X-Git-Tag: AWSTATS_WEBMIN_1_0_RELEASE~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed40cdc3a8a45a0a2a348697b8a7c6e48d2af209;p=thirdparty%2FAWStats.git Fix problem of corrupted record with Webstar. --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 9cbe8dd1..da7f743c 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -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]*)"; $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) { + # HTTP request. Keep only GET, POST, HEAD, *OK* and ERR! for Webstar. Do not keep OPTIONS $protocol=1; } elsif ($field[$pos_method] eq 'SMTP') {