Author: poeml Date: Wed Nov 25 16:32:30 2009 New Revision: 25 URL: http://svn.mirrorbrain.org/viewvc/mod_stats?rev=25&view=rev Log: OOo specific filters for request processing Added: trunk/tools/ooo.conf Added: trunk/tools/ooo.conf URL: http://svn.mirrorbrain.org/viewvc/mod_stats/trunk/tools/ooo.conf?rev=25&view=auto ============================================================================== --- trunk/tools/ooo.conf (added) +++ trunk/tools/ooo.conf Wed Nov 25 16:32:30 2009 @@ -1,0 +1,59 @@ +# pretreatment (filtering, fixups), applied in order +# syntax: suitable for inclusion into Apache config + +StatsDupWindow 200 + +# ignore requests from this IP +# that's osuosl.org's Bouncer host +StatsIgnoreIP 140.211.167.212 + +# strip prefixed protocol (normally only sent to proxies, but can occur in the wild) +StatsPrefilter "^http://[^/]+/" "" + +# remove duplicated slashes +StatsPrefilter "/+" "/" + +# strip query strings +# FIXME: should we rather ignore all requests that come with query string? +StatsPrefilter "\?.*" "" + +# remove an optional timestamp (example: _20091121) +StatsPrefilter "_[0-9]{8}" "" + +# strip leading base path +StatsPrefilter "^/files/" "" + +# strip appended .metalink suffix +StatsPrefilter "\.metalink$" "" + + +# best reference about Python regexp: http://www.amk.ca/python/howto/regex/regex.html +# +# short intro to things that *may* be special: +# (?: ) non-capturing group +# (?P<foo> ) named group +# (FIXME: need to check if all these are supported in Apache) +# + +# stable/3.1.1/OOo_3.1.1_Win32Intel_install_en-US.exe +# stable/3.1.1/OOo_3.1.1_MacOSXIntel_install_en-US.dmg +# stable/3.1.1/OOo_3.1.1_Win32Intel_install_wJRE_en-US.exe +# extended/3.1.1rc2/OOo_3.1.1rc2_20090820_Win32Intel_langpack_en-ZA.exe - +# extended/3.1.1rc2/OOo_3.1.1rc2_20090820_Win32Intel_langpack_en-ZA.exe - +# extended/3.1.1rc2/OOo_3.1.1rc2_20090820_Win32Intel_langpack_en-ZA.exe - +# extended/3.1.1rc2/OOo_3.1.1rc2_20090820_LinuxIntel_langpack_brx_deb.tar.gz +# extended/developer/DEV300_m65/OOo-Dev-SDK_DEV300_m65_Win32Intel_install_en-US.exe +StatsCount "^(?:stable|extended)/(?:developer/)?([^/]+)/(OOo|OOo-SDK|OOo-Dev|OOo-Dev-SDK)_(?P<realversion>[^_]+(?:_[0-9]+)?)_(.+)_(?P<lang>([a-zA-Z]{2}(-[a-zA-Z]{2})?|binfilter|core|l10n|extensions|system|testautomation|brx|dgo|kok|mai|mni|sat))(_deb|_rpm)?\.(exe|dmg|sh|tar\.gz|tar\.bz2)$" \ + "prod: \2 os: \4 version: \1 realversion: \g<realversion> lang: \g<lang>" +StatsCount "^(?:stable|extended)/(?:developer/)?([^/]+)/(OOo|OOo-SDK|OOo-Dev|OOo-Dev-SDK)_\1_(.+)_(?P<lang>([a-zA-Z]{2}(-[a-zA-Z]{2})?|binfilter|core|l10n|extensions|system|testautomation|brx|dgo|kok|mai|mni|sat))(_deb|_rpm)?\.(exe|dmg|sh|tar\.gz|tar\.bz2)$" \ + "prod: \2 os: \3 version: \1 lang: \g<lang>" + + +# extended/3.1.1rc2/OOo_3.1.1rc2_20090820_LinuxX86-64_langpack_zh-CN.tar.gz +# extended/3.1.1rc2/OOo_3.1.1rc2_20090820_LinuxX86-64_langpack_zh-CN_deb.tar.gz + +# localized/ru/2.4.3/OOo_2.4.3_Win32Intel_install_ru.exe - +# localized/es/2.4.3/OOo_2.4.3_Win32Intel_install_es.exe - + + +# vim: ft=apache ai ts=4 sw=4 smarttab expandtab smarttab _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Wed Nov 25 2009 - 15:32:32 GMT
This archive was generated by hypermail 2.2.0 : Wed Nov 25 2009 - 15:45:12 GMT