[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] url: Wrap cookie headers in url-http--encode-string.

From: Alain Schneble
Subject: Re: [PATCH] url: Wrap cookie headers in url-http--encode-string.
Date: Thu, 8 Sep 2016 22:29:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt)

Eli Zaretskii <address@hidden> writes:

>> From: Stefan Monnier <address@hidden>
>> Cc: Toke Høiland-Jørgensen <address@hidden>,
>>         address@hidden, address@hidden
>> Date: Thu, 08 Sep 2016 13:47:46 -0400
>> > If that file is guaranteed to be pure ASCII, we can indeed force the
>> > string returned by url-cookie-generate-header to be unibyte.
>> > Otherwise we need to encode it.
>> AFAIK the cookie data is "sequence of bytes", i.e. not "pure ASCII".
> Not according to my reading of the Wikipedia, but maybe that is
> inaccurate.

FWIW, Mozilla refers to RFC6265

Bottom of Page 26 says:

   NOTE: Despite its name, the cookie-string is actually a sequence of
   octets, not a sequence of characters.  To convert the cookie-string
   (or components thereof) into a sequence of characters (e.g., for
   presentation to the user), the user agent might wish to try using the
   UTF-8 character encoding [RFC3629] to decode the octet sequence.
   This decoding might fail, however, because not every sequence of
   octets is valid UTF-8.

See also

reply via email to

[Prev in Thread] Current Thread [Next in Thread]