matomo-log-analytics icon indicating copy to clipboard operation
matomo-log-analytics copied to clipboard

Unclear how to enable "xml" as download

Open Krinkle opened this issue 4 years ago • 3 comments

The xml extension is listed in both STATIC_EXTENSIONS and DOWNLOAD_EXTENSIONS.

It would appear that --download-extensions xml not work as expected because internally all check methods are required to return True, which check_static won't. However, setting --enable-static for this seems undesirable.

Krinkle avatar Sep 22 '19 22:09 Krinkle

Looks like this may've regressed. Currently static is checked before downloads given the methods are enumerated in order, and static rejects the static file extension always unless --enable-static is set.

https://github.com/matomo-org/matomo-log-analytics/blob/e211bf0ace8a5e0e92ef33b0b9604ce009d6ccf5/import_logs.py#L2103-L2123

In an earlier version, downloads was checked first, and the static check looked out for its result, at:

https://github.com/matomo-org/matomo-log-analytics/blob/ffe787e9de194c11bae6e009763623d8a8bcdf40/import-logs.py#L862-L867

Krinkle avatar Sep 22 '19 23:09 Krinkle

Honestly I think it is weird that xml is in both lists. (And apparently since the first version) Would it fix the issue if it is removed from the static files list? I can't think of any reason why a xml file would show up in a server access log while being used as a ressource.

Findus23 avatar Sep 23 '19 19:09 Findus23

@Findus23 Indeed. I'd like to track for RSS feeds, e.g. as download.

Krinkle avatar Sep 23 '19 19:09 Krinkle