strip the query string before dividing the file into path and filename so that we don't divide on a slash in the query string by accident

This commit is contained in:
myk%mozilla.org 2004-06-18 00:12:51 +00:00
Родитель 9bdf1ae706
Коммит 71e5a4ebd3
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -206,6 +206,9 @@ sub process_log {
# Count only successful requests (whether partial or full).
next unless $status == 200 || $status == 206;
# Strip the URL query string, if any, from the file string.
$file = (split(/\?/, $file))[0];
# Split up the file string into a path and a name.
$file =~ /^(.*)\/([^\/]*)$/;
($path, $filename) = ($1, $2);
@ -213,9 +216,6 @@ sub process_log {
# Only deal with releases, extensions, webtools, and language packs at this point.
next if $path !~ /releases/ && $path !~ /extensions/ && $path !~ /webtools/ && $path !~ /mozilla\/l10n\/lang/;
# Strip the URL query string, if any, from the filename.
$filename = (split(/\?/, $filename))[0];
# Don't bother storing directory accesses, since we don't do anything with them.
next if !$filename;