[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: Fri, 9 Sep 2016 21:21:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt)

Eli Zaretskii <address@hidden> writes:

>> From: Alain Schneble <address@hidden>
>> CC: Dmitry Gutov <address@hidden>, Eli Zaretskii <address@hidden>,
>>      <address@hidden>, <address@hidden>
>> Date: Fri, 9 Sep 2016 20:02:43 +0200
>> 2. The reason why it crashes in this example is not because the cookie
>>    contains some non-ascii characters but because the ascii-only
>>    cookie-value gets converted into a multibyte string internally.
> Of course, that part is clear.  ASCII strings can be either unibyte or
> multibyte, depending on how they were produced.

I was not fully aware of the details how and when that happens, sorry.

> But why did you think this was worth mentioning?  How does it help us
> find the proper solution?

Just because the question was raised in this thread whether or not a
cookie-value can or will ever contain any non-ascii characters.  And I
think we still do not have any strong evidence that any server out there
really uses non-ascii characters on purpose.  So my comment was just to
consider all alternatives that fix this issue.  Because another approach
would be to explicitly convert the cookie-value to unibyte if it's an
us-ascii string in `url-cookie-store', for instance.  That would fix the
example that was shown and maybe all real use cases while still
signalling an error for the "yet unexpected non-ascii" ones.  I'm not
saying that this is better than what was proposed.

So sorry for the noise.

reply via email to

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