From: eldy <> Date: Fri, 9 Jan 2004 22:26:27 +0000 (+0000) Subject: Support http protocol for windows media streaming server 9. X-Git-Tag: AWSTATS_6_0_RELEASE~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e17176340bf06f59c3054131df2e365bdff8dd93;p=thirdparty%2FAWStats.git Support http protocol for windows media streaming server 9. --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index e887b2d0..ef69a161 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -1692,6 +1692,8 @@ sub Check_Config { error("AWStats database directory defined in config file by 'DirData' parameter ($DirData) does not exist or is not writable."); } } + + if ($LogType eq 'S') { $NOTSORTEDRECORDTOLERANCE=1000000; } } @@ -5759,7 +5761,7 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat if ($LogType eq 'W' && ($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 } - elsif (($LogType eq 'W' || $LogType eq 'S') && ($field[$pos_method] eq 'mms' || $field[$pos_method] eq 'RTP')) { + elsif (($LogType eq 'W' || $LogType eq 'S') && ($field[$pos_method] eq 'mms'|| $field[$pos_method] eq 'rtsp' || $field[$pos_method] eq 'http' || $field[$pos_method] eq 'RTP')) { # Streaming request (windows media server or darwin streaming server) } elsif ($LogType eq 'M' && $field[$pos_method] eq 'SMTP') { @@ -5776,7 +5778,7 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat if ($ShowDropped) { print "Dropped record (method/protocol '$field[$pos_method]' not qualified when LogType=$LogType): $line\n"; } next; } - + # Split DD/Month/YYYY:HH:MM:SS or YYYY-MM-DD HH:MM:SS or MM/DD/YY\tHH:MM:SS $field[$pos_date] =~ tr/,-\/ \t/:::::/; # " \t" is used instead of "\s" not known with tr my @dateparts=split(/:/,$field[$pos_date]); # tr and split faster than @dateparts=split(/[\/\-:\s]/,$field[$pos_date])