Re: Proposal: Cookie Priorities

Adam Barth <w3c@adambarth.com> Mon, 07 March 2016 17:20 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfc.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfc.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfc.amsl.com (Postfix) with ESMTP id DF2431CD5E8 for <ietfarch-httpbisa-archive-bis2Juki@ietfc.amsl.com>; Mon, 7 Mar 2016 09:20:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.021
X-Spam-Level:
X-Spam-Status: No, score=-5.021 tagged_above=-999 required=5 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.41]) by localhost (ietfc.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0Nn3ZGDmFxNZ for <ietfarch-httpbisa-archive-bis2Juki@ietfc.amsl.com>; Mon, 7 Mar 2016 09:20:29 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfc.amsl.com (Postfix) with ESMTPS id CDE171CD5D2 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 7 Mar 2016 09:20:26 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1acyjm-00076W-4G for ietf-http-wg-dist@listhub.w3.org; Mon, 07 Mar 2016 17:14:30 +0000
Resent-Date: Mon, 07 Mar 2016 17:14:30 +0000
Resent-Message-Id: <E1acyjm-00076W-4G@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <adam@adambarth.com>) id 1acyje-00075k-6A for ietf-http-wg@listhub.w3.org; Mon, 07 Mar 2016 17:14:22 +0000
Received: from mail-wm0-f51.google.com ([74.125.82.51]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <adam@adambarth.com>) id 1acyjb-0007uH-S0 for ietf-http-wg@w3.org; Mon, 07 Mar 2016 17:14:21 +0000
Received: by mail-wm0-f51.google.com with SMTP id l68so96029942wml.0 for <ietf-http-wg@w3.org>; Mon, 07 Mar 2016 09:13:58 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=m1TYtzua5YlHuIT89fjCJEqcb/aUIqfmlUSIHJTXWkI=; b=amNsQygSqtsWrEDvAMrfEReSxpYE/ibMgu53UECZAek2mni1IYhyGDTaiPsdJIPfdv Eqd1aehEbyTYJuUhOj5iHYi0Q9ohvJ3zxOmJMcbg+OYVN6N/QEfLfi9HiV+5ap5lMaFs yXnqiiOLElrY4yyVhkPNstGxnH27vkA9KSM//I5ze+Hh0QysyS4Amxr5bUtFY+R3co2P DRJ8a4iAG7j4NUH9P+rKE1CUZar6TMlk9EVROw0mwRF9YNtP0qq8pz7jUhrX19q3HyfO 3s4Dg9GYnYRDMscM+q9Pl31QJI4/BtcOVuIgGVKkE+bKfJaOSP6XlzqXARL6cOJm1YT6 VzSQ==
X-Gm-Message-State: AD7BkJJWSAbA5bi18QOU9Ky02CnEyxkcFgHaTPxSJZcUuUaSuD4g1QOOJZak4GpofzdMq608qqmCjQriwk4HrQ==
X-Received: by 10.194.5.36 with SMTP id p4mr24576061wjp.167.1457370832040; Mon, 07 Mar 2016 09:13:52 -0800 (PST)
MIME-Version: 1.0
Received: by 10.27.218.81 with HTTP; Mon, 7 Mar 2016 09:13:32 -0800 (PST)
In-Reply-To: <alpine.DEB.2.20.1603071332180.25615@tvnag.unkk.fr>
References: <CAKXHy=dvxE5f25_xx3mKTc+XRDU_Hp=uFDy-iL-_c0s+xHGydw@mail.gmail.com> <alpine.DEB.2.20.1603070855070.25615@tvnag.unkk.fr> <CAKXHy=fZkRnThojTU8V9s-Vyps8jG3xOTEF-yKrDs9cqh546mg@mail.gmail.com> <alpine.DEB.2.20.1603071033570.25615@tvnag.unkk.fr> <CAKXHy=fTSzgYJaj8P7HkofzKfhx-JEt8SJkxriz8dqmM99Tb_g@mail.gmail.com> <alpine.DEB.2.20.1603071113470.25615@tvnag.unkk.fr> <alpine.DEB.2.20.1603071300010.25615@tvnag.unkk.fr> <CAKXHy=cY+i9mykHDH=MMMXGPTEGu4L6iwtEcXL55YJ_4sx9i_A@mail.gmail.com> <alpine.DEB.2.20.1603071332180.25615@tvnag.unkk.fr>
From: Adam Barth <w3c@adambarth.com>
Date: Mon, 07 Mar 2016 09:13:32 -0800
Message-ID: <CADBiRd0n97NbiFa6RH4=FF13XjyaqEDF6hR897AN0sOUDkaNtg@mail.gmail.com>
To: Daniel Stenberg <daniel@haxx.se>
Cc: Mike West <mkwst@google.com>, HTTP Working Group <ietf-http-wg@w3.org>, Samuel Huang <huangs@google.com>, Mark Nottingham <mnot@mnot.net>
Content-Type: multipart/alternative; boundary="047d7b5d9c3bc01342052d78963f"
Received-SPF: none client-ip=74.125.82.51; envelope-from=adam@adambarth.com; helo=mail-wm0-f51.google.com
X-W3C-Hub-Spam-Status: No, score=-6.8
X-W3C-Hub-Spam-Report: AWL=-0.151, BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1acyjb-0007uH-S0 a32ff6897c9d6bb2b2c8c691b05016a4
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Proposal: Cookie Priorities
Archived-At: <http://www.w3.org/mid/CADBiRd0n97NbiFa6RH4=FF13XjyaqEDF6hR897AN0sOUDkaNtg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31219
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Mon, Mar 7, 2016 at 4:37 AM, Daniel Stenberg <daniel@haxx.se> wrote:

> On Mon, 7 Mar 2016, Mike West wrote:
>
> I'm confused. Are there clients that process things in the reverse order
>> from what RFC6265 lays out?
>>
>
> I'm sure there are several. The curl one just happens to be the one I know
> the best.
>
> I mean, according to the algorithm I quoted in the previous response,
>> `Priority=Low; favcolor=blue` _is_ a cookie named `Priority`. Just like
>> `Max-Age=1; favcolor=blue` is a cookie named `Max-Age` today. I think
>> that's the way browsers process cookies today. Does `curl` do things
>> differently?
>>
>
> It does! It basically detects a set of names used for properties and
> treats the first unknown name value pair on the header as the cookie name,
> in a left-to-right order on the header.
>
> (I'm not suggesting it is a "proper" or "good" implementation, just that
> it works with the vast majority of sites using cookies and it was written
> long before we created RFC 6265 and I guess nobody felt the need to update
> it since to that aspect.)


It might be worth improving the libcurl implementation to match RFC6265.
The vast majority of user agents using the parsing approach described in
RFC6265.  Having a hard-coded list of attribute names makes it (even more)
difficult to extend and improve cookies over time.  Regardless of what you
think of this particular extension, I think most people would agree that
extensibility in protocols is valuable.

Adam