Index: sitescripts/stats/bin/logprocessor.py |
=================================================================== |
--- a/sitescripts/stats/bin/logprocessor.py |
+++ b/sitescripts/stats/bin/logprocessor.py |
@@ -374,20 +374,21 @@ def parse_record(line, ignored, geo, geo |
if log_regexp == None: |
log_regexp = re.compile(r'(\S+) \S+ \S+ \[([^]\s]+) ([+\-]\d\d)(\d\d)\] "GET ([^"\s]+) [^"]+" (\d+) (\d+) "([^"]*)" "([^"]*)"(?: "[^"]*" \S+ "[^"]*" "[^"]*" "([^"]*)")?') |
match = re.search(log_regexp, line) |
if not match: |
return None |
status = int(match.group(6)) |
- if status != 200: |
+ if status not in (200, 301, 302): |
return None |
info = { |
+ "status": status, |
"size": int(match.group(7)), |
} |
info["ip"], info["country"] = process_ip(match.group(1), geo, geov6) |
info["time"], info["month"], info["day"], info["weekday"], info["hour"] = parse_time(match.group(2), int(match.group(3)), int(match.group(4))) |
info["file"], info["query"] = parse_path(match.group(5)) |
info["referrer"] = match.group(8) |
info["ua"], info["uaversion"] = parse_ua(match.group(9)) |