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

Dan Winship <> Wed, 20 January 2010 14:21 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 064523A6A20 for <>; Wed, 20 Jan 2010 06:21:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.265
X-Spam-Status: No, score=-2.265 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, IP_NOT_FRIENDLY=0.334]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 6Grx73o-5tgG for <>; Wed, 20 Jan 2010 06:21:06 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 06CBA3A698D for <>; Wed, 20 Jan 2010 06:21:06 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTPA id F3E23802AE; Wed, 20 Jan 2010 09:21:01 -0500 (EST)
Message-ID: <>
Date: Wed, 20 Jan 2010 09:19:53 -0500
From: Dan Winship <>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0
MIME-Version: 1.0
To: Daniel Stenberg <>
References: <> <> <> <>
In-Reply-To: <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: http-state <>
Subject: Re: [http-state] Ticket 5: Cookie ordering
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discuss HTTP State Management Mechanism <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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