From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#21888: guix-publish gets ERROR when serve gtk+. Date: Wed, 08 Jun 2016 19:09:04 +0200 Message-ID: <87twh3d2vj.fsf@gnu.org> References: <3c53a2735955b91d3849beb2e2159947@openmailbox.org> <87a8qjufn3.fsf@gnu.org> <6d1b7b7f7b8c2f50ef10335c11d212fd@openmailbox.org> <8737waqq4x.fsf@gnu.org> <8737wanlzc.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAgzX-00060X-MO for bug-guix@gnu.org; Wed, 08 Jun 2016 13:10:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAgzS-0007Mb-F9 for bug-guix@gnu.org; Wed, 08 Jun 2016 13:10:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAgzS-0007MW-Bu for bug-guix@gnu.org; Wed, 08 Jun 2016 13:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bAgzS-0007yr-8S for bug-guix@gnu.org; Wed, 08 Jun 2016 13:10:02 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <8737wanlzc.fsf@member.fsf.org> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Fri, 13 Nov 2015 20:05:11 +0800") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 21888-done@debbugs.gnu.org iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: >> >>> ---request begin--- >>> GET /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 HTTP/1.1 >>> User-Agent: Wget/1.16.3 (linux-gnu) >>> Accept: */* >>> Accept-Encoding: identity >>> Host: localhost:8080 >>> Connection: Keep-Alive >>> >>> ---request end--- >>> >>> ---response begin--- >>> HTTP/1.1 404 Not Found >>> Content-Length: 69 >>> Content-Type: text/plain;charset=3Dutf-8 >>> >>> ---response end--- >>> Registered socket 3 for persistent reuse. >>> URI content encoding =3D 'utf-8' >>> Skipping 69 bytes of body: [Resource not found: /nar/1dlz1am0qmj1579f5p= 6j5cvfx9l2aw50-gtk+-3.18.2] done. >> >> Here =E2=80=98guix publish=E2=80=99 returns 404, presumably because >> /gnu/store/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2 is not on disk >> or not valid. >> >> Is this correct? > No, the gtk+ item is valid, and replace 'gtk+' with 'gtk%2B' in the url > will make wget download it happily. =E2=80=98guix publish=E2=80=99 correctly decodes URIs in =E2=80=98request-p= ath-components=E2=80=99, but =E2=80=98uri-decode=E2=80=99 does this: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use(web uri) scheme@(guile-user)> (uri-decode "/gtk+") $12 =3D "/gtk " scheme@(guile-user)> (string-ref $12 4) $13 =3D #\space --8<---------------cut here---------------end--------------->8--- I think that =E2=80=98uri-decode=E2=80=99 is right, and that Wget is wrong = when it fails to replace =E2=80=98+=E2=80=99 with =E2=80=98%2B=E2=80=99. Regardless, the problem is that the faulty /nar/=E2=80=A6-gtk+ URI comes fr= om a .narinfo generated by =E2=80=98guix publish=E2=80=99 itself. The fix is fo= r =E2=80=98guix publish=E2=80=99 to properly percent-encode it in the narinfo. Done in 93961f02987cf738d116cc85cc32d97c2a488222. Thanks, Ludo=E2=80=99.