From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Sho Takemori Newsgroups: gmane.emacs.bugs Subject: bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request Date: Tue, 2 Aug 2016 12:26:03 +0900 Message-ID: References: <83d1ltq3p6.fsf@gnu.org> <83popsocg8.fsf@gnu.org> NNTP-Posting-Host: blaine Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c1800cda672105390e46a1 X-Trace: blaine.gmane.org 1470108448 21917 195.159.176.226 (2 Aug 2016 03:27:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2016 03:27:28 +0000 (UTC) Cc: 24117@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 02 05:27:24 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bUQMV-0005Y8-FW for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Aug 2016 05:27:23 +0200 Original-Received: from localhost ([::1]:53793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUQMS-0001m8-0y for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Aug 2016 23:27:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUQMF-0001jK-UX for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 23:27:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUQM9-0001vI-Ve for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 23:27:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUQM9-0001vD-Rq for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 23:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bUQM9-0002ZL-NB for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2016 23:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sho Takemori Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2016 03:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24117 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24117-submit@debbugs.gnu.org id=B24117.14701083719816 (code B ref 24117); Tue, 02 Aug 2016 03:27:01 +0000 Original-Received: (at 24117) by debbugs.gnu.org; 2 Aug 2016 03:26:11 +0000 Original-Received: from localhost ([127.0.0.1]:53268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUQLK-0002YG-Ui for submit@debbugs.gnu.org; Mon, 01 Aug 2016 23:26:11 -0400 Original-Received: from mail-oi0-f41.google.com ([209.85.218.41]:35546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUQLK-0002Y4-BJ for 24117@debbugs.gnu.org; Mon, 01 Aug 2016 23:26:10 -0400 Original-Received: by mail-oi0-f41.google.com with SMTP id 4so9358343oih.2 for <24117@debbugs.gnu.org>; Mon, 01 Aug 2016 20:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Jhek0/DO7Rb9BNwhhIoRh/tQYImvDLkAhiKhd7A3OGc=; b=HC252aCgVcczM8ARqx62pzR0PD99Uf9C1eMzr7mViekLOPqgl4ujy6blRxwoAza5aP u4t8ebkIPVKEjHsjAm04VBAt0EOBDYf36tjaCBBF1a9JqaJ+NFjUlTNWBJKCbYQYyCVy SYkEpFplT30yoHq5fE8r/tBGID4F6AB3s44ANCbUAmxAVqtDxxMNc5g+zBAppC6BnbKU yYcuVL7H4VtyuUqq+yOFD/7nPzIL4mXLkFOs5Nn08dEhwcTKTvUFf4KZS9eeRrWJNru0 VpHsvYncKwvIVrDPd/1MSFMzpeA6kRdPm1CIlNI8nS2AsOryTX5m+wiV74hQ9mlgBibs QWKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Jhek0/DO7Rb9BNwhhIoRh/tQYImvDLkAhiKhd7A3OGc=; b=AoUdSZyfCE2wxkSokjlBpaLJckM3WpnkaB7RZ3+Sd6OIwOm50N6dsiJoVXqG8wuk44 1DH3sqT2ke+7RD8rP1cxzU//sQ64lnMxCfIP12YriXMCbaICvG756kJevEQw6q1jlqOe udcox9p1Fc2AqE/NgG/S9WgPPb7ejEu+4dQYG/xrJ+74Tqdy6iO5iYH+wqzzrr2sEGPA KC5Heg9VYLG2R7/Fa6A6TTQSsj9Ax+m0TUFPTFpRKvRSKBaybCkU0jXtgJuU93vtnHP1 UH19DKWlWl26LO5uXbI7g5qAP14x+yUkTPspBCCK9NFt/kP+OkduOgp7RCggJCVJcLbD r4Lw== X-Gm-Message-State: AEkooutNuI6l+FszA6XTZr8TOJ3GinHTRpMlYv0WgCzVozp1wvOAF6R9Qd1c4/618z4yUt7WQbTidWimHchhiw== X-Received: by 10.202.117.22 with SMTP id q22mr31510302oic.63.1470108364595; Mon, 01 Aug 2016 20:26:04 -0700 (PDT) Original-Received: by 10.157.33.77 with HTTP; Mon, 1 Aug 2016 20:26:03 -0700 (PDT) In-Reply-To: <83popsocg8.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121770 Archived-At: --001a11c1800cda672105390e46a1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > I don't see this character in the string you show. It does not contain "=E2=88=A7" but it contains "\342\210\247". That example was unnecessarily big. I should have provided a minimal one. Sho Takemori 2016-08-01 22:17 GMT+09:00 Eli Zaretskii : > > From: Sho Takemori > > Date: Mon, 1 Aug 2016 08:21:39 +0900 > > Cc: 24117@debbugs.gnu.org > > > > It seems that anaconda-mode use two global variables (url-request-metho= d > and url-request-data) > > to make generate the request. > > > > > https://github.com/proofit404/anaconda-mode/blob/master/anaconda-mode.el#= L349 > > > > url-request-method is bound to an ASCII string "POST". > > In my situation, url-request-data is bound to a unibyte string as below= . > > I don't see any non-ASCII characters in that string. So how come it > causes the error message? > > > The file contains a multibyte string "=E2=88=A7" > > I don't see this character in the string you show. > > > and anaconda-mode converts it to "\342\210\247". > > Which is a correct UTF-8 encoding of that character, and should > produce a unibyte string. > > To summarize, I still don't understand how come the error happened. > Could you perhaps step with Edebug into url-http-create-request, and > see what is going on there? Or come up with a reproducible recipe of > calling url-http-create-request that I could examine on my machine? > > Thanks. > --001a11c1800cda672105390e46a1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> I don't see this character in the string you= show.

It does not contain "=E2=88=A7" b= ut it contains "\342\210\247".
That example was unneces= sarily big. I should have provided a minimal one.

= Sho Takemori


2016-08-01 22:17 GMT+09:00 Eli Zaretskii <eliz@gnu.org>:
> From: Sho Takemori <= ;stakemorii@gmail.com>
> Date: Mon, 1 Aug 2016 08:21:39 +0900
> Cc: 24117@debbugs.gnu.org=
>
> It seems that anaconda-mode use two global variables (url-request-meth= od and url-request-data)
> to make generate the request.
>
> https://github.com= /proofit404/anaconda-mode/blob/master/anaconda-mode.el#L349
>
> url-request-method is bound to an ASCII string "POST".
> In my situation, url-request-data is bound to a unibyte string as belo= w.

I don't see any non-ASCII characters in that string.=C2=A0 So ho= w come it
causes the error message?

> The file contains a multibyte string "=E2=88=A7"

I don't see this character in the string you show.

> and anaconda-mode converts it to "\342\210\247".

Which is a correct UTF-8 encoding of that character, and should
produce a unibyte string.

To summarize, I still don't understand how come the error happened.
Could you perhaps step with Edebug into url-http-create-request, and
see what is going on there?=C2=A0 Or come up with a reproducible recipe of<= br> calling url-http-create-request that I could examine on my machine?

Thanks.

--001a11c1800cda672105390e46a1--