Re: [http-state] non-ASCII cookie values (was Re: Closing Ticket 3: Public Suffixes)

Julian Reschke <julian.reschke@gmx.de> Mon, 01 February 2010 18:44 UTC

Return-Path: <julian.reschke@gmx.de>
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 67D1F3A6988 for <http-state@core3.amsl.com>; Mon, 1 Feb 2010 10:44:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.58
X-Spam-Level:
X-Spam-Status: No, score=-4.58 tagged_above=-999 required=5 tests=[AWL=-1.981, BAYES_00=-2.599]
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 klU-qG8gzlXk for <http-state@core3.amsl.com>; Mon, 1 Feb 2010 10:44:52 -0800 (PST)
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by core3.amsl.com (Postfix) with SMTP id 0E36F3A686A for <http-state@ietf.org>; Mon, 1 Feb 2010 10:44:51 -0800 (PST)
Received: (qmail invoked by alias); 01 Feb 2010 18:44:58 -0000
Received: from p508FBE86.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.190.134] by mail.gmx.net (mp015) with SMTP; 01 Feb 2010 19:44:58 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/LvA54kXLL5LY7ou5bB3PICJr0Xc4OG1cI4ZQI5v yTQqziOA2sDCFX
Message-ID: <4B67210F.3020709@gmx.de>
Date: Mon, 01 Feb 2010 19:44:31 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.4) Gecko/20060516 Thunderbird/1.5.0.4 Mnenhy/0.7.4.666
MIME-Version: 1.0
To: Adam Barth <ietf@adambarth.com>
References: <7789133a1002011014x5d587436j663a73bc92270a65@mail.gmail.com>
In-Reply-To: <7789133a1002011014x5d587436j663a73bc92270a65@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.62
Cc: eric bianchetti <eric_bianchetti@yahoo.com>, http-state@ietf.org
Subject: Re: [http-state] non-ASCII cookie values (was Re: Closing Ticket 3: Public Suffixes)
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: Mon, 01 Feb 2010 18:44:53 -0000

Adam Barth wrote:
> On Sun, Jan 31, 2010 at 2:37 PM, eric bianchetti
> <eric_bianchetti@yahoo.com> wrote:
>> That part does not please :
>>
>> The cookie-value is opaque to the user agent and MAY be anything the
>>    origin server chooses to send, possibly in a server-selected
>>    printable ASCII encoding.
>>
>> Livng and working in a non ASCII country, I tend to think we shall prepare for the coming of the other languages (Thai, Chines, Korean ....), IF a person get a cookie from a Thai server , can we securely suppose that person(computer) went to a thai site, and that person is using Thai on a daily basis? (Replace Thai by any multi bytes languages).
> 
> The part of that sentence after the "possibly" doesn't haven any
> normative force (it's just advice that the server can take or leave).
> I can remove the reference to ASCII here if you like.  Julian please
> correct me if I'm wrong, but I believe that HTTP headers typically
> contain only ASCII characters.

I think the current thinking is: "it is opaque data, but for anything 
non-ASCII you need to negotiate it out-of-band between client and 
server, and furthermore intermediaries and libraries may screw things up".

So if the cookie is supposed to carry information that can't directly be 
encoded in ASCII, the best way is to use an encoding on top of it, such 
as base64.

BR, Julian