unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: 宋文武 <iyzsong@member.fsf.org>
Cc: 21888-done@debbugs.gnu.org
Subject: bug#21888: guix-publish  gets ERROR when serve gtk+.
Date: Wed, 08 Jun 2016 19:09:04 +0200	[thread overview]
Message-ID: <87twh3d2vj.fsf@gnu.org> (raw)
In-Reply-To: <8737wanlzc.fsf@member.fsf.org> ("宋文武"'s message of "Fri, 13 Nov 2015 20:05:11 +0800")

iyzsong@member.fsf.org (宋文武) skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> 宋文武 <iyzsong@openmailbox.org> 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=utf-8
>>>
>>> ---response end---
>>> Registered socket 3 for persistent reuse.
>>> URI content encoding = 'utf-8'
>>> Skipping 69 bytes of body: [Resource not found: /nar/1dlz1am0qmj1579f5p6j5cvfx9l2aw50-gtk+-3.18.2] done.
>>
>> Here ‘guix publish’ 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.

‘guix publish’ correctly decodes URIs in ‘request-path-components’, but
‘uri-decode’ does this:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(web uri)
scheme@(guile-user)> (uri-decode "/gtk+")
$12 = "/gtk "
scheme@(guile-user)> (string-ref $12 4)
$13 = #\space
--8<---------------cut here---------------end--------------->8---

I think that ‘uri-decode’ is right, and that Wget is wrong when it fails
to replace ‘+’ with ‘%2B’.

Regardless, the problem is that the faulty /nar/…-gtk+ URI comes from a
.narinfo generated by ‘guix publish’ itself.  The fix is for ‘guix
publish’ to properly percent-encode it in the narinfo.

Done in 93961f02987cf738d116cc85cc32d97c2a488222.

Thanks,
Ludo’.

      parent reply	other threads:[~2016-06-08 17:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12  4:41 bug#21888: guix-publish gets ERROR when serve gtk+ 宋文武
2015-11-12 20:28 ` Ludovic Courtès
2015-11-13  5:21   ` 宋文武
2015-11-13  8:07     ` Ludovic Courtès
2015-11-13 12:05       ` 宋文武
2015-11-13 13:29         ` Ludovic Courtès
2015-11-13 14:17           ` Thompson, David
2016-06-08 17:09         ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twh3d2vj.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=21888-done@debbugs.gnu.org \
    --cc=iyzsong@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).