[livejournal] r17093: LJRU-2138: Special URLs to count how man...
Committer: gariev
LJRU-2138: Special URLs to count how many people hit the link (and redirect them to their actual link)U trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm 2010-08-06 04:20:44 UTC (rev 17092)
+++ trunk/cgi-bin/Apache/LiveJournal.pm 2010-08-06 04:54:08 UTC (rev 17093)
@@ -459,11 +459,13 @@
##
if ($host eq $LJ::DOMAIN_WEB && $uri =~ m!^/redirect/!) {
my $url = $GET{'url'};
- $url = $LJ::SITE_ROOT
- unless $url
- && $url =~ m! ^ https?:// [-\w.]*? ([-\w]+ \. [-\w]+) / !x
- && $LJ::ALLOWED_REDIRECT_TO_DOMAIN{$1};
- return redir($url);
+ if ($url
+ && $url =~ m! ^ https?:// [-\w.]*? ([-\w]+ \. [-\w]+) / !x
+ && $LJ::ALLOWED_REDIRECT_TO_DOMAIN{$1})
+ {
+ return redir($url);
+ }
+ ## else - returns 404
}
