Hughen / apachelog

Automatically exported from code.google.com/p/apachelog
0 stars 0 forks source link

Provided format string does not match parser regex case #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The provided format for the Apache combined log on line 268 has the case as
"User-agent". The regex in the method _parse_format is looking for it as
"User-Agent" (capital A). This causes the generated regex to use the wrong
regex piece resulting in failed parsing on complex user agents.

Suggested fix (patch included): 
Alter the findreferreragent regex on line 134 to search case-insensitive as
Apache allows its conf file to be case-insensitive
("user-agent","User-agent",User-Agent").

Original issue reported on code.google.com by cart...@gmail.com on 25 Jul 2007 at 3:36

Attachments: