vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17444: LJSUP-6969: Some lj.com sub-domains shou...

Committer: vsukhanov
LJSUP-6969: Some lj.com sub-domains should not send ljuniq cookie
U   trunk/cgi-bin/LJ/UniqCookie.pm
Modified: trunk/cgi-bin/LJ/UniqCookie.pm
===================================================================
--- trunk/cgi-bin/LJ/UniqCookie.pm	2010-09-24 07:44:55 UTC (rev 17443)
+++ trunk/cgi-bin/LJ/UniqCookie.pm	2010-09-24 09:17:36 UTC (rev 17444)
@@ -382,7 +382,18 @@
     return unless LJ::is_web_context();
 
     return unless LJ::Request->is_inited;
-    
+
+    ## do not set cookie from some domains:
+    ##      stat, l-stat
+    ##      files, 
+    ##      userpic, l-userpic
+    ##      ...
+    ## these are domains with public, mostly static content.
+    ##
+    my $domain = LJ::Request->header_in("Host");
+    my ($subdomain) = $domain =~ m|^(.+?)\.\Q$LJ::DOMAIN\E|;
+    return if $subdomain and $LJ::COOKIE_FREE_DOMAINS{$subdomain};
+
     my ($uniq, $uniq_time, $uniq_extra) = $class->parts_from_cookie;
 
     # set this uniq as our current

Tags: livejournal, pm, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments