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

Daniel Stenberg <daniel@haxx.se> Thu, 04 March 2010 08:23 UTC

Return-Path: <daniel@haxx.se>
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 7A31E3A8587 for <http-state@core3.amsl.com>; Thu, 4 Mar 2010 00:23:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.249
X-Spam-Level:
X-Spam-Status: No, score=-2.249 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_SE=0.35]
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 XSF1OFmELOSN for <http-state@core3.amsl.com>; Thu, 4 Mar 2010 00:23:48 -0800 (PST)
Received: from giant.haxx.se (giant.haxx.se [83.168.254.42]) by core3.amsl.com (Postfix) with ESMTP id 21C843A8747 for <http-state@ietf.org>; Thu, 4 Mar 2010 00:23:47 -0800 (PST)
Received: from giant.haxx.se (giant.haxx.se [83.168.254.42]) by giant.haxx.se (8.14.3/8.14.3/Debian-9) with ESMTP id o248NhaS025776; Thu, 4 Mar 2010 09:23:46 +0100
Date: Thu, 04 Mar 2010 09:23:43 +0100
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: Adam Barth <ietf@adambarth.com>
In-Reply-To: <5c4444771003031532q50c574e3wdb2098a0b6d142f0@mail.gmail.com>
Message-ID: <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>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format="flowed"; charset="US-ASCII"
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 08:23:51 -0000

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.

-- 

  / daniel.haxx.se