Re: [http-state] Ticket 11: Character encoding for non-ASCII cookies values

Adam Barth <ietf@adambarth.com> Thu, 04 March 2010 13:33 UTC

Return-Path: <ietf@adambarth.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 4F4BF3A8BC3 for <http-state@core3.amsl.com>; Thu, 4 Mar 2010 05:33:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 z3pn2pKqdZlp for <http-state@core3.amsl.com>; Thu, 4 Mar 2010 05:33:09 -0800 (PST)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id 778DE3A8879 for <http-state@ietf.org>; Thu, 4 Mar 2010 05:33:09 -0800 (PST)
Received: by vws20 with SMTP id 20so1381723vws.31 for <http-state@ietf.org>; Thu, 04 Mar 2010 05:33:08 -0800 (PST)
Received: by 10.224.43.159 with SMTP id w31mr905509qae.270.1267709588077; Thu, 04 Mar 2010 05:33:08 -0800 (PST)
Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.223.182]) by mx.google.com with ESMTPS id 23sm558746iwn.10.2010.03.04.05.33.06 (version=SSLv3 cipher=RC4-MD5); Thu, 04 Mar 2010 05:33:06 -0800 (PST)
Received: by iwn12 with SMTP id 12so1926046iwn.21 for <http-state@ietf.org>; Thu, 04 Mar 2010 05:33:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.168.136 with SMTP id u8mr1474397iby.56.1267709586234; Thu, 04 Mar 2010 05:33:06 -0800 (PST)
In-Reply-To: <alpine.DEB.2.00.1003040850520.3143@tvnag.unkk.fr>
References: <5c4444771003021624qc0b00cet27e348cb6d023b08@mail.gmail.com> <CB794A2E-2F2F-4CE4-8B15-BBE1A1E1B50F@apple.com> <alpine.DEB.2.00.1003032150381.3143@tvnag.unkk.fr> <5c4444771003031516u445525d1le174512ef46bad30@mail.gmail.com> <alpine.DEB.2.00.1003040019500.3143@tvnag.unkk.fr> <5c4444771003031532q50c574e3wdb2098a0b6d142f0@mail.gmail.com> <alpine.DEB.2.00.1003040850520.3143@tvnag.unkk.fr>
From: Adam Barth <ietf@adambarth.com>
Date: Thu, 4 Mar 2010 05:32:46 -0800
Message-ID: <5c4444771003040532x1c7f7973v65a601cf56db103a@mail.gmail.com>
To: Daniel Stenberg <daniel@haxx.se>
Content-Type: text/plain; charset=ISO-8859-1
Cc: http-state <http-state@ietf.org>
Subject: Re: [http-state] Ticket 11: Character encoding for non-ASCII cookies values
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: Thu, 04 Mar 2010 13:33:10 -0000

On Thu, Mar 4, 2010 at 12:23 AM, Daniel Stenberg <daniel@haxx.se> wrote:
> On Wed, 3 Mar 2010, Adam Barth wrote:
>>> I read the section 4.1.1 and it says that servers "SHOULD NOT send
>>> Set-Cookie headers that fail to conform to the following". Where is the text
>>> saying that clients MUST accept all those other characters?
>>
>> It's a consequence of the parsing algorithm in
>> <http://tools.ietf.org/html/draft-ietf-httpstate-cookie-04#section-5.2>. In
>> particular, how the name-value-pair and the cookie-value are extracted from
>> the set-cookie-string.
>
> Yeah, that is in my eyes strikingly hard to comprehend and find info in when
> used as a reference. The step-by-step parsing algorithm is to me a very
> strange way to document a protocol syntax. Not the least because there's
> already ABNF syntax for 4.1.1 and even in 5.1.1.
>
> I'm not sure how I'd like to see this fixed but I would prefer an ABNF
> approach with added appropriate prose rather than the long free text
> algorithm in 5.2. We're documenting a protocol, and if that protocol can be
> implemented using other code flows then I don't think it is our spec's job
> to limit that as long as the protocol is followed.
>
> I'll try to write up a suggestion for this soonish.

Thanks.  I too would prefer a declarative presentation, but we need to
be careful not to sacrifice accuracy.

Adam