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

Julian Reschke <julian.reschke@gmx.de> Wed, 03 February 2010 08:01 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 9117B3A6991 for <http-state@core3.amsl.com>; Wed, 3 Feb 2010 00:01:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.506
X-Spam-Level:
X-Spam-Status: No, score=-2.506 tagged_above=-999 required=5 tests=[AWL=-2.357, BAYES_00=-2.599, MIME_CHARSET_FARAWAY=2.45]
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 Y78Q9C34TS+3 for <http-state@core3.amsl.com>; Wed, 3 Feb 2010 00:01:39 -0800 (PST)
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by core3.amsl.com (Postfix) with SMTP id 204B43A6A01 for <http-state@ietf.org>; Wed, 3 Feb 2010 00:01:38 -0800 (PST)
Received: (qmail invoked by alias); 03 Feb 2010 08:02:17 -0000
Received: from p508FC23D.dip.t-dialin.net (EHLO [192.168.178.33]) [80.143.194.61] by mail.gmx.net (mp044) with SMTP; 03 Feb 2010 09:02:17 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+2WegJvPW28cC7LyyLNx+t5BOrDhkIpsraI1Ui51 /fjJe/S+mws1qh
Message-ID: <4B692D7C.900@gmx.de>
Date: Wed, 03 Feb 2010 09:02:04 +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> <E1E6C8DE-EFB6-4226-93EE-AF20053FF315@apple.com> <Pine.LNX.4.64.1002012105180.6765@egate.xpasc.com> <7789133a1002012254oafc43aehe32f16e2640cbcdc@mail.gmail.com> <92003C09-05E0-4D51-B17B-05C26A41C209@apple.com> <7789133a1002021630n65bed91q2ffc975a94b1d2cb@mail.gmail.com> <143E98B7-BFA6-4F77-9685-E57FFD2449A6@apple.com> <7789133a1002021737v2a50be07u3eea61a2fe870c79@mail.gmail.com> <4B6926FC.5030107@gmx.de> <67660F71-01A3-4B66-B546-B740A1314E49@apple.com> <7789133a1002022348h57a61611me73b95e110c72ea3@mail.gmail.com>
In-Reply-To: <7789133a1002022348h57a61611me73b95e110c72ea3@mail.gmail.com>
Content-Type: text/plain; charset="GB2312"
Content-Transfer-Encoding: 8bit
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.56999999999999995
Cc: 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: Wed, 03 Feb 2010 08:01:40 -0000

Adam Barth wrote:
> On Tue, Feb 2, 2010 at 11:34 PM, Julian Reschke <julian.reschke@gmx.de> wrote:
>> Adam Barth wrote:
>>> ...
>>> I've added some basic tests using non-ASCII characters (in this case
>>> Chinese): charset0001, charset0002, charset0003.  IE, Firefox, Chrome,
>>> and Opera handle these cookies fine.  Safari does something strange
>>> that I haven't tracked down yet.
>>> ...
>> Could you please elaborate on what means "handles fine"? After all, it's not
>> specified, right?
> 
> I mean the bytes are treated opaquely, which is what the draft
> specifies.  The draft specifies what to do with every sequence of
> bytes a user agent can receive from a server.

Understood (when I was saying "not specified" I was thinking of historic
Cookie specs).

> On Tue, Feb 2, 2010 at 11:38 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>> I assume he means that the same bytes that come in as part of the value in a Set-Cookie header get sent out in a future Cookie header, even if they are non-ASCII.
> 
> Precisely.
> 
>> I am curious if the Cookie name, and not just the value, can contain non-ASCII in existing implementations.
> 
> Yes, it can.  charset0002 tests a non-ASCII name and value.
> charset0003 tests a non-ASCII name, value, and custom attribute, all
> of which acts naturally in IE/Firefox/Chrome/Opera:
> 
> == charset0001 ==
> Set-Cookie: foo=春节回家路・春运完全手册
> Cookie: foo=春节回家路・春运完全手册
> 
> == charset0002 ==
> Set-Cookie: 春节回=家路・春运完全手册
> Cookie: 春节回=家路・春运完全手册
> 
> == charset0003 ==
> Set-Cookie: 春节回=家路・春运; 完全手册
> Cookie: 春节回=家路・春运

So what does happen with Safari?

Best regards, Julian