$username = $tmp[2]; if ($username eq '') { $username='-'; };
$method = $tmp[3];
- $xlrator_url = $source_url;
+ $xlrator_url = "";
if (($method eq 'GET') || ($method eq 'HEAD'))
{
# -----------------------------------------------------------
if (
- ($source_url =~ m@^[h|f]t?tp://[^?]+\.(deb|rpm)$@i) ||
- ($source_url =~ m@^[h|f]t?tp://[^?]+/distfiles/[^?]+\.(tar\.gz|tar\.bz2|tgz|zip|patch\.bz2|gz|docx|patch|pdf|exe)$@i)
+ ($source_url =~ m@^[h|f]t?tp://[^?]+\.(pkg\.tar\.xz|deb|rpm)$@i) ||
+ ($source_url =~ m@^[h|f]t?tp://[^?]+/distfiles/[^?]+\.(tar\.gz|tar\.bz2|tar\.xz|tgz|zip|patch\.bz2|gz|docx|patch|pdf|exe)$@i)
)
{
$xlrator_url = &check_cache($source_url,$hostaddr,$username,"Linux",$mirror);
# Section: Avast Downloads
# -----------------------------------------------------------
- if ($source_url =~ m@^http://download[\d]+\.avast\.com/.*\.(exe|vpu)$@i)
+ if ($source_url =~ m@^http://(ion|download)[\d]+\.avast\.com/.*\.(exe|vpu|vpx)$@i)
{
$xlrator_url = &check_cache($source_url,$hostaddr,$username,"Avast",$mirror);
}
+ # -----------------------------------------------------------
+ # Section: Mozilla Downloads
+ # -----------------------------------------------------------
+
+ if ($source_url=~ m@^http://.*\.mozilla\.net/.*\.((complete|partial)\.mar|exe)$@i)
+ {
+ $xlrator_url = &check_cache($source_url,$hostaddr,$username,"Mozilla",$unique);
+ }
+
# -----------------------------------------------------------
+ # Section: Mcafee
+ # -----------------------------------------------------------
+
+ if ($source_url =~ m@^http://update\.nai\.com/.*\.(mcs|z|gem|dat|zip)$@i)
+ {
+ $xlrator_url = &check_cache($source_url,$hostaddr,$username,"mcafee",$mirror);
+ }
# -----------------------------------------------------------
# Section: Avira Downloads
# ----------- ADD NEW SOURCES BEFORE THIS LINE !!! ------------------
}
- $request="$xlrator_url $hostaddr $username $method\n";
-
- print $request;
+ if ($xlrator_url) {
+ print "OK rewrite-url=\"$xlrator_url\"\n";
+ } else {
+ print "ERR\n";
+ }
}
# -------------------------------------------------------------------
my $sourceurl=$_[0];
my $cfmirror=$_[4];
+ $sourceurl =~ s@\%2b@+@ig;
$sourceurl =~ s@\%2f@/@ig;
+ $sourceurl =~ s@\%7e@~@ig;
$updfile = substr($sourceurl,rindex($sourceurl,"/")+1);
$updfile =~ s@\%20@ @ig;