I have a Perl-based website that is trying to set multiple cookies for the first time users visit, and I just noticed that Safari has stopped setting all but the first cookie that is being sent. On the first visit, two cookies must be set, which are the "location" and the "referrer". In IE and Firefox, cookies are set correctly, but Safari only sets the cookie "location". I tried changing names, values, etc., and I came to the conclusion that Safari simply sets the first of two cookies:
Here is the code that sets cookies:
# Add location cookie if necessary if(!$query->cookie('location') && $user_location) { my $cookie = $query->cookie(-name=>'location',-value=>qq|$user_lcoation|,-domain=>".domain.com",-path=>'/',-expires=>'+1Y'); push(@cookies,$cookie); }
Here is what I get when I try to access a website from curl:
curl -so /dev/null -D - http://domain.com HTTP/1.1 200 OK Date: Thu, 18 Feb 2010 20:19:17 GMT Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.8 mod_perl/2.0.4 Perl/v5.8.8 Set-Cookie: location=Dallas; domain=.domain.com; path=/; expires=+1Y Set-Cookie: referrer=unknown; domain=.domain.com; path=/; expires=Wed, 19-May-2010 20:19:20 GMT Transfer-Encoding: chunked Content-Type: text/html; charset=ISO-8859-1
Any ideas? I do not understand what I can do to help solve this problem, as it seems that my script is passing them correctly. Thank you in advance for any ideas or ideas you may have!
source share