You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by qu...@apache.org on 2004/04/21 03:08:21 UTC
svn commit: rev 10141 - incubator/spamassassin/trunk/lib/Mail/SpamAssassin
Author: quinlan
Date: Tue Apr 20 18:08:19 2004
New Revision: 10141
Modified:
incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
Log:
fixes for T_REDIRECTOR
Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm (original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm Tue Apr 20 18:08:19 2004
@@ -3267,13 +3267,10 @@
my ($self) = @_;
foreach ($self->get_uri_list()) {
- while (s{^https?://([^/:\?]+).+?(https?://([^/:\?]+).+)$}{$2}g) {
- my ($redir, $dest) = ($1,$3);
- foreach ($redir,$dest) {
- # Strip down to domain.tld
- s/^(?:.+\.)([^.]+\.[^.]+)$/$1/;
- # make sure we do things case-insensitively
- $_ = lc $_;
+ while (s{^https?://([^/:\?]+).+?(https?://([^/:\?]+).*)$}{$2}) {
+ my ($redir, $dest) = ($1, $3);
+ foreach ($redir, $dest) {
+ $_ = Mail::SpamAssassin::Util::uri_to_domain(lc($_));
}
next if ($redir eq $dest);
dbg("redirect: found $redir to $dest, flagging");