diff options
author | diosmosis <benaka@piwik.pro> | 2014-12-18 10:48:59 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-12-18 10:49:17 +0300 |
commit | f960e412c2ea520033c0ee64bb7f0e8935500b50 (patch) | |
tree | 705390439dfd5a1fb8909561d1b6d0c417e573f3 /misc | |
parent | fb9a552e716e61549675f005ffeea59862d07888 (diff) |
Refs #6795, remove quotes around referrer & host if found when parsing hits in log importer.
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/log-analytics/import_logs.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index a2cf7a5c1d..315b2ac1a1 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -1751,6 +1751,9 @@ class Parser(object): try: hit.referrer = format.get('referrer') + + if hit.referrer.startswith('"'): + hit.referrer = hit.referrer[1:-1] except BaseFormatException: hit.referrer = '' if hit.referrer == '-': @@ -1789,6 +1792,9 @@ class Parser(object): else: try: hit.host = format.get('host').lower().strip('.') + + if hit.host.startswith('"'): + hit.host = hit.host[1:-1] except BaseFormatException: # Some formats have no host. pass |