From: eldy <>
Date: Mon, 27 May 2002 02:34:51 +0000 (+0000)
Subject: Empty user agent "" does not make line corrupted.
X-Git-Tag: AWSTATS_4_1_BETA~40
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fa4d8f8f02ff749607a1841d6715b676fca9a35;p=thirdparty%2FAWStats.git
Empty user agent "" does not make line corrupted.
---
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index ab90e12d..b6a1cd0b 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -544,7 +544,10 @@ sub error {
print "111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] \"GET / HTTP/1.1\" 200 1234\n";
print ($HTMLOutput?"
":"");
}
- if ($LogFormat != 1 && $LogFormat != 2 && $LogFormat != 3 && $LogFormat != 4) {
+ if ($LogFormat == 5) {
+ print "\"ISA native log format\"
\n";
+ }
+ if ($LogFormat !~ /^[1-5]$/) {
print "the following personalized log format:
\n";
print ($HTMLOutput?"":"");
print "$LogFormat\n";
@@ -2902,7 +2905,7 @@ if ($UpdateStats) {
if ($Debug) { debug("Generate PerlParsingFormat from LogFormatString=$LogFormatString"); }
$PerlParsingFormat="";
if ($LogFormat eq "1") {
- $PerlParsingFormat="([^\\s]+) [^\\s]+ ([^\\s]+) \\[([^\\s]+) [^\\s]+\\] \\\"([^\\s]+) ([^\\s]+) [^\\\"]+\\\" ([\\d|-]+) ([\\d|-]+) \\\"(.*)\\\" \\\"([^\\\"]+)\\\"";
+ $PerlParsingFormat="([^\\s]+) [^\\s]+ ([^\\s]+) \\[([^\\s]+) [^\\s]+\\] \\\"([^\\s]+) ([^\\s]+) [^\\\"]+\\\" ([\\d|-]+) ([\\d|-]+) \\\"(.*)\\\" \\\"([^\\\"]*)\\\""; # referer and ua might be ""
$pos_rc=1;$pos_logname=2;$pos_date=3;$pos_method=4;$pos_url=5;$pos_code=6;$pos_size=7;$pos_referer=8;$pos_agent=9;
$lastrequiredfield=9;
}