#868 Report-Specific Override for Entries in mime.pm


I was originally going to submit this as a bug, but I think the way it's working is what was intended, so I've decided to enter this as a feature request. Please feel free to move this to the bug tracker if deemed appropriate.

My team and I have noticed that removing an image file extension (e.g. GIF) from the NotPageList does not allow for files with that extension to be tracked as a page view or download. Awstats.pl still checks against the mime.pm file, which specifies the GIF extension to be within the 'image' family of type 'i', whereas the application looks for extensions of type 'p' to count them as a page or 'd' for a download.

For most use cases, I think treating a GIF as a non-page and non-download is legitimate. However, we have a scenario with a certain report that requires us to treat GIFs as page views. We know that we can work around this by specifying that GIFs are of type 'p' in mime.pm, but in our opinion this is not ideal for two reasons:

  1. This would apply globally to all reports. Specifying the GIF as a page (type 'p') is OK since all other reports have GIF in the NotPageList parameter and therefore won't count it, but this would cause a problem if we wanted to track GIFs as downloads instead (type 'd'). Since there is no NotDownloadList parameter, specifying it as a download would clutter the downloads section of our other reports with GIF hits.

  2. We would need to change mime.pm after every upgrade. There is also no guarantee that the mime.pm file will continue to be used in the same way across versions.

To accommodate for scenarios like ours, I would like to suggest the introduction of a report-specific override similar to NotPageList to allow for the handling of extensions differently for each report by specifying a different type ('i', 'd' or 'p'). Perhaps the new parameter could be called something like MimeHashLibOverride?


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks