Skip to content

Commit

Permalink
Merge pull request #1 from Rafiot/add_ipv6
Browse files Browse the repository at this point in the history
add suport ipv6
  • Loading branch information
lethain committed May 12, 2011
2 parents 5c1cd28 + c8d5b09 commit 3d4aa9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apache_parser.py
Expand Up @@ -21,7 +21,7 @@ def make_entry(x):
'referral':x.group('referral'),
'agent':x.group('agent'),
}
log_re = '(?P<ip>[.\d]+) - - \[(?P<time>.*?)\] "GET (?P<uri>.*?) HTTP/1.\d" (?P<status_code>\d+) \d+ "(?P<referral>.*?)" "(?P<agent>.*?)"'
log_re = '(?P<ip>[.:0-9a-fA-F]+) - - \[(?P<time>.*?)\] "GET (?P<uri>.*?) HTTP/1.\d" (?P<status_code>\d+) \d+ "(?P<referral>.*?)" "(?P<agent>.*?)"'
search = re.compile(log_re).search
matches = (search(line) for line in file(filename))
return (make_entry(x) for x in matches if x)
Expand Down

0 comments on commit 3d4aa9f

Please sign in to comment.