Re: [http-state] Ticket 5: Cookie ordering

Dan Winship <dan.winship@gmail.com> Wed, 20 January 2010 14:21 UTC

Return-Path: <dan.winship@gmail.com>
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 064523A6A20 for <http-state@core3.amsl.com>; Wed, 20 Jan 2010 06:21:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.265
X-Spam-Level:
X-Spam-Status: No, score=-2.265 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, IP_NOT_FRIENDLY=0.334]
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 6Grx73o-5tgG for <http-state@core3.amsl.com>; Wed, 20 Jan 2010 06:21:06 -0800 (PST)
Received: from mysterion.org (mysterion.org [69.25.196.35]) by core3.amsl.com (Postfix) with ESMTP id 06CBA3A698D for <http-state@ietf.org>; Wed, 20 Jan 2010 06:21:06 -0800 (PST)
Received: from x61.home.mysterion.org (c-76-111-61-212.hsd1.ga.comcast.net [76.111.61.212]) by mysterion.org (Postfix) with ESMTPA id F3E23802AE; Wed, 20 Jan 2010 09:21:01 -0500 (EST)
Message-ID: <4B571109.1010206@gmail.com>
Date: Wed, 20 Jan 2010 09:19:53 -0500
From: Dan Winship <dan.winship@gmail.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0
MIME-Version: 1.0
To: Daniel Stenberg <daniel@haxx.se>
References: <7789133a1001191410l48530adar28098a03e6de0fb1@mail.gmail.com> <alpine.DEB.2.00.1001192327190.27499@tvnag.unkk.fr> <7789133a1001191729g4e0a4827w43a12879d23e289c@mail.gmail.com> <alpine.DEB.2.00.1001200832220.11282@tvnag.unkk.fr>
In-Reply-To: <alpine.DEB.2.00.1001200832220.11282@tvnag.unkk.fr>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: http-state <http-state@ietf.org>
Subject: Re: [http-state] Ticket 5: Cookie ordering
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: Wed, 20 Jan 2010 14:21:08 -0000

On 01/20/2010 03:13 AM, Daniel Stenberg wrote:
> Some of those non-web tools that deal with cookies know how to import
> cookies from the traditional cookies file in the netscape file format,
> and that format has no "creation time" field and thus importing cookies
> from such a file makes it impossible to send the cookies back sorted on
> the original "creation time" but instead it could only do it based on
> the time of the read from a file.

FTR, Netscape/Mozilla/Firefox always write the cookie file out in
creation-time-order, so while you can't recover the *exact* creation
time of each cookie, you can still sort by creation time. (Rather than
talking about "creation time", it probably makes more sense in this case
to think about "serial number", assigning the cookies in the cookies.txt
file numbers from 1 to N, and then assigning each cookie received after
that point the next number in sequence.)

(Yes, I'm sure there are non-mozilla-based tools that write out
cookies.txt files that *don't* do it in creation order.)

-- Dan