Re: [http-state] Ticket 6: host-only cookies

Dave Kristol <dmk-http-state@kristol.org> Tue, 02 February 2010 19:13 UTC

Return-Path: <dmk-http-state@kristol.org>
X-Original-To: http-state@core3.amsl.com
Delivered-To: http-state@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 69D313A68D0 for <http-state@core3.amsl.com>; Tue, 2 Feb 2010 11:13:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.47
X-Spam-Level:
X-Spam-Status: No, score=-1.47 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_DSL=1.129]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0hi7Vxk4xpz5 for <http-state@core3.amsl.com>; Tue, 2 Feb 2010 11:13:41 -0800 (PST)
Received: from mail.megapathdsl.net (front3.mail.megapathdsl.net [66.80.60.32]) by core3.amsl.com (Postfix) with ESMTP id B6E473A67B4 for <http-state@ietf.org>; Tue, 2 Feb 2010 11:13:41 -0800 (PST)
Received: from [66.80.251.88] (HELO gsp.whatexit.org) by fe.mail.megapathdsl.net (CommuniGate Pro SMTP 5.1.10) with ESMTP id 706886904; Tue, 02 Feb 2010 11:14:20 -0800
Received: from localhost (localhost [127.0.0.1]) by gsp.whatexit.org (Postfix) with ESMTP id E33B4171AE; Tue, 2 Feb 2010 14:14:19 -0500 (EST)
X-Virus-Scanned: amavisd-new at whatexit.org
Received: from gsp.whatexit.org ([127.0.0.1]) by localhost (gsp.whatexit.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DANuwja6ROO5; Tue, 2 Feb 2010 14:14:19 -0500 (EST)
Received: from [IPv6:::1] (localhost [127.0.0.1]) by gsp.whatexit.org (Postfix) with ESMTP id B4477171AC; Tue, 2 Feb 2010 14:14:17 -0500 (EST)
Message-ID: <4B687989.9080003@kristol.org>
Date: Tue, 02 Feb 2010 14:14:17 -0500
From: Dave Kristol <dmk-http-state@kristol.org>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: Adam Barth <ietf@adambarth.com>
References: <7789133a1001220050m56cc438x35099b7972639331@mail.gmail.com> <4B59B834.3030500@gmail.com> <4C374A2653EB5E43AF886CE70DFC567213CE9BE2B4@34093-MBX-C03.mex07a.mlsrvr.com> <7789133a1002012300k4627d9a2sad7f5b776c544487@mail.gmail.com> <4B6854C8.4040602@kristol.org> <7789133a1002020913p13f48804x1174904f3eec9c7d@mail.gmail.com>
In-Reply-To: <7789133a1002020913p13f48804x1174904f3eec9c7d@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: http-state <http-state@ietf.org>
Subject: Re: [http-state] Ticket 6: host-only cookies
X-BeenThere: http-state@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discuss HTTP State Management Mechanism <http-state.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/http-state>
List-Post: <mailto:http-state@ietf.org>
List-Help: <mailto:http-state-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Feb 2010 19:13:42 -0000

Adam Barth wrote:
> On Tue, Feb 2, 2010 at 8:37 AM, Dave Kristol <dmk-http-state@kristol.org> wrote:
>> Adam Barth wrote:
>>> I've added the following text to the server section, as recommend by
>>> Dan Winship:
>>>
>>>              <t>WARNING: Some legacy user agents treat an absent Domain
>>>              attribute as if the Domain attribute were present and
>>> contained
>>>              the current host name. For example, if example.com returns a
>>>              Set-Cookie header without a Domain attribute, these user
>>> agents
>>>              will send the cookie to www.example.com.</t>
>> If the implied Domain attribute is example.com, then the user agent may only
>> return the cookie to example.com.
> 
> Do you mean that
> 
> Set-Cookie: foo=bar; Domain=example.com
> 
> and
> 
> Set-Cookie: foo=bar; Domain=.example.com
> 
> are treated differently by user agents?  That might be true according
> to 2109 (I'd have to check), but I don't think that's how user agents
> work in practice.  They appear to ignore the leading dot.  If you have
> a test case that show a difference, I'd be very interested in seeing
> it.

That is what I meant, and I do not have a test case.  That is what 2109 
said, and I believe (though it's been many years now... ugh!) I adopted 
that from Netscape's spec.  Generally speaking, the idea was that, in 
the absence of Domain=, the cookie should be returned only to the server 
that sent it.

Dave Kristol