Subject: Re: [http-state] [httpstate] #11: Consider defining how to map a cookie-string into unicode

From: "httpstate issue tracker" <[email-masked]>
Date: Wed, 10 Mar 2010 23:19:07 -0000

#11: Consider defining how to map a cookie-string into unicode
--------------------------------+-------------------------------------------
 Reporter:  ietf@…              |        Owner:        
     Type:  defect              |       Status:  closed
 Priority:  major               |    Milestone:        
Component:  cookie              |      Version:        
 Severity:  -                   |   Resolution:  fixed 
 Keywords:                      |  
--------------------------------+-------------------------------------------
Changes (by ietf@…):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 As discussed on the list:

 The draft treats the cookie values as opaque octets throughout for use
 on the wire.  I've added a SHOULD-level requirement to use a UTF8 when
 converting the octets to characters (e.g., for use in the user agent's
 user interface).

 Given that the encoding issue doesn't appear to affect
 interoperability on the wire, I think a SHOULD-level recommendation is
 appropriate here.  If specific APIs (e.g., document.cookie) have more
 specific needs, they can add additional requirements.

-- 
Ticket URL: <http://trac.tools.ietf.org/wg/httpstate/trac/ticket/11#comment:1>
httpstate <http://tools.ietf.org/httpstate/>

---

From: "Anne van Kesteren" <[email-masked]>
Date: Fri, 12 Mar 2010 08:06:14 +0100

> #11: Consider defining how to map a cookie-string into unicode

FWIW, XMLHttpRequest inflates/deflates bytes for HTTP header values. I.e.  
uses ISO-8859-1 (not mapped to Windows-1252 in this specific instance). I  
would assume document.cookie behaves the same in most browsers...

-- 
Anne van Kesteren
http://annevankesteren.nl/

---

From: Adam Barth <[email-masked]>
Date: Thu, 11 Mar 2010 23:19:29 -0800

> would assume document.cookie behaves the same in most browsers...

As discussed earlier, some browsers apparently use UTF-8 for
document.cookie and others use ISO-8859-1:

http://github.com/abarth/http-state/blob/master/notes/2010-02-03-Julian-Reschke.txt

Adam

---

From: "Anne van Kesteren" <[email-masked]>
Date: Fri, 12 Mar 2010 08:31:44 +0100

> http://github.com/abarth/http-state/blob/master/notes/2010-02-03-Julian-Reschke.txt

For XMLHttpRequest only Chrome uses UTF-8 currently. It seems everyone  
should just align with Fx/IE which makes the UTF-8 advice somewhat wrong  
in my opinion.

---

From: Dan Witte <[email-masked]>
Date: Mon, 15 Mar 2010 13:23:43 -0700 (PDT)

> should just align with Fx/IE which makes the UTF-8 advice somewhat

Hmm. Firefox uses UTF-8 for document.cookie, and if I read you right, you're saying we use something else?

Regards,
Dan.

---

From: "Anne van Kesteren" <[email-masked]>
Date: Mon, 15 Mar 2010 22:08:25 +0100

On Mon, 15 Mar 2010 21:23:43 +0100, Dan Witte <[email-masked]> wrote:
>> should just align with Fx/IE which makes the UTF-8 advice somewhat
>> wrong in my opinion.
>

I thought Adam was saying that.

Still sucks if these HTTP APIs differ all over :/