From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] url: Wrap cookie headers in url-http--encode-string. Date: Thu, 08 Sep 2016 16:14:23 +0200 Message-ID: <87inu6iim8.fsf@toke.dk> References: <20160907153014.15752-1-toke@toke.dk> <87inu7k5z4.fsf@toke.dk> <83bmzzaawr.fsf@gnu.org> <877fank1oc.fsf@toke.dk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1473350000 13334 195.159.176.226 (8 Sep 2016 15:53:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Sep 2016 15:53:20 +0000 (UTC) Cc: Eli Zaretskii , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 08 17:53:16 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bi1dY-0002R7-4C for ged-emacs-devel@m.gmane.org; Thu, 08 Sep 2016 17:53:12 +0200 Original-Received: from localhost ([::1]:48869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi1dW-0008K0-3J for ged-emacs-devel@m.gmane.org; Thu, 08 Sep 2016 11:53:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi06D-0005ph-5Z for emacs-devel@gnu.org; Thu, 08 Sep 2016 10:14:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bi067-00080h-8X for emacs-devel@gnu.org; Thu, 08 Sep 2016 10:14:40 -0400 Original-Received: from mail2.tohojo.dk ([77.235.48.147]:43271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bi061-0007yP-Ar; Thu, 08 Sep 2016 10:14:29 -0400 X-Virus-Scanned: amavisd-new at mail2.tohojo.dk DKIM-Filter: OpenDKIM Filter v2.10.3 mail2.tohojo.dk D986540D5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=201310; t=1473344064; bh=J1i8nr7wLa7Cj5LtQdMGPmTQcWof4nkFgjwN7GGGOVA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=XTUBCWUJbPnJayoIDZvhPrzfe+DWniPGJ09aUD/I/ewgyA2gAdZnsKyPPMGY6vw/u YaRlTqHPRxn6ePIPKqvnBP/Bms9Jm/pn+Xz1FyX5Md4c0oZQiIsggYQhr/sYulUp5U t94uicPpXZUyb2DE93wCSd/tr4Sem63NxtRdCioc= Original-Received: by alrua-kau.kau.toke.dk (Postfix, from userid 1000) id 022B5C4027D; Thu, 8 Sep 2016 16:14:23 +0200 (CEST) In-Reply-To: (Dmitry Gutov's message of "Thu, 8 Sep 2016 17:06:52 +0300") X-Clacks-Overhead: GNU Terry Pratchett X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.235.48.147 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207288 Archived-At: Dmitry Gutov writes: > On 07.09.2016 21:25, Toke H=C3=B8iland-J=C3=B8rgensen wrote: > >> Appears to be any request with an UTF-8 encoded payload that goes >> to a host that has cookies stored. >> >> This snippet triggers the error for me if I replace example.org with a >> domain that has cookies stored in ~/.emacs.d/url/cookies: >> >> (let* ((url-request-data (encode-coding-string "=C3=A6=C3=B8=C3=A5" 'utf= -8))) >> (url-retrieve-synchronously "http://example.org")) > > What are the contents of ~/.emacs.d/url/cookies in this example? Without = them, > the test case is hard to reproduce. I believe you can generate that by first retriving a site that will set a cookie (and making sure cookie support is enabled). At runtime they are stored in url-cookie-storage or url-cookie-secure-storage. -Toke