Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 90133 invoked from network); 10 Dec 2006 08:55:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Dec 2006 08:55:53 -0000 Received: (qmail 94352 invoked by uid 500); 10 Dec 2006 08:55:55 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 94086 invoked by uid 500); 10 Dec 2006 08:55:53 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 94075 invoked by uid 99); 10 Dec 2006 08:55:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Dec 2006 00:55:53 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [217.199.181.93] (HELO faraday.net.versatilia.com) (217.199.181.93) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Dec 2006 00:55:42 -0800 Received: from spc1-burn4-0-0-cust553.bagu.broadband.ntl.com ([86.22.10.42] helo=[192.168.87.153]) by faraday.net.versatilia.com with esmtpa (Exim 4.43) id 1GtKUr-0004br-DO; Sun, 10 Dec 2006 08:57:21 +0000 Message-ID: <457BCA86.50705@o-rourke.org> Date: Sun, 10 Dec 2006 08:51:18 +0000 From: John ORourke User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Marc Lambrichs CC: mod_perl List Subject: Re: reset multiple cookies References: <457A0ED1.4000309@melange-it.nl> <457BBA42.5080002@versatilia.com> <457BBB61.7030209@melange-it.nl> In-Reply-To: <457BBB61.7030209@melange-it.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Versatilia-MailScanner-Information: See http://www.versatilia.com/mailscanning.html X-Versatilia-MailScanner: Found to be virus free Envelope-From: john-modperl@o-rourke.org X-Virus-Checked: Checked by ClamAV on apache.org Very strange then... My best guess is the browser will only accept one cookie with a given name in a given set of headers - check the response headers to see that they're all there, then you know it's the browser. I found the Web Developers Toolbar for Firefox very useful when doing my cookie code - you can view, manually add, clear session cookies, clear domain cookies, view which cookies will be sent to the server, view response headers etc. Marc Lambrichs wrote: > That's exactly what I'm trying to do now. But, like I said, only the > last one is changed/set. > > Marc > > John ORourke wrote: > >> Marc Lambrichs wrote: >> >>> I'm trying to reset multiple cookies. However, only the last one of >>> the @cookies array is reset. How come? >>> >>> foreach ( @domains ){ >>> ( domain => $_ ), >>> foreach my $cookie ( @cookies ){ >>> $r->err_headers_out->add( 'Set-Cookie' => >>> $cookie->as_string ); >>> } >> >> >> This would only work if all the domains have an ending containing 2 >> dots matching the host setting it - eg. www.yoursite.com can set >> cookies for something.yoursite.com and another.yoursite.com, but not >> for www.microsoft.com. Imagine if your favourite warez site set a >> cookie with domain microsoft.com... >> >> Of course, this rule was invented by short-sighted inhabitants of >> .com/net/org, so when .co.uk came along it became a bit worthless but >> nobody's ever decided to fix it. >> >> http://blog.javido.net/index.php?tag=cookies >> >> cheers >> John >> > >