all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Xinglu Chen <public@yoctocell.xyz>
Cc: 53923@debbugs.gnu.org
Subject: bug#53923: ‘http-fetch’ is unable to fetch <https://repology.org/api/v1/project/emacs:modus-themes>
Date: Wed, 16 Feb 2022 15:42:43 +0100	[thread overview]
Message-ID: <87wnhux47w.fsf@gnu.org> (raw)
In-Reply-To: <87czjuwqlj.fsf@yoctocell.xyz> (Xinglu Chen's message of "Thu, 10 Feb 2022 18:58:48 +0100")

Hi,

Xinglu Chen <public@yoctocell.xyz> skribis:

> scheme@(guile-user)> ,use(guix http-client)
> scheme@(guile-user)> (http-fetch "https://repology.org/api/v1/project/emacs:modus-themes")
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Bad Read-Header-Line header: #<eof>
>
>
> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guile-user) [1]> ,bt
> In guix/http-client.scm:
>    120:21  5 (http-fetch _ #:port _ #:text? _ #:buffered? _ # _ # _ # …)
> In web/client.scm:
>    530:24  4 (http-request _ #:body _ #:verify-certificate? _ #:port …)
> In web/response.scm:
>    198:31  3 (read-response #<input-output: string 7f7bb290c0e0>)
> In web/http.scm:
>   1188:15  2 (read-response-line _)
>     250:2  1 (read-header-line _)
> In ice-9/boot-9.scm:
>   1685:16  0 (raise-exception _ #:continuable? _)
>
>
> The URL opens just fine in Icecat.  ‘http-request’ from (web client) is
> able to handle it as well.

It works if you strip the ‘User-Agent’ header that ‘http-fetch’ provides
by default:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(guix http-client)
scheme@(guile-user)> (http-fetch "https://repology.org/api/v1/project/emacs:modus-themes" #:headers '())
$13 = #<input: file 7fdd94cb5930>
$14 = 1342
scheme@(guile-user)> ,use(rnrs io ports)
scheme@(guile-user)> (get-string-all $13)
$15 = "[{\"repo\":\"gnu_elpa\",\"name\":\"modus-themes\",\"visiblename\":\"modus-themes\",\"version\":\"2.0.0\",\"maintainers\":[\"info@protesilaos.com\"],\"summary\":\"Highly accessible themes (WCAG AAA)\",\"status\":\"newest\",\"origversion\":null},{\"repo\":\"gnuguix\",\"srcname\":\"emacs-modus-themes\",\"binname\":\"emacs-modus-themes\",\"visiblename\":\"emacs-modus-themes\",\"version\":\"2.0.0\",\"summary\":\"Accessible themes (WCAG AAA)\",\"status\":\"newest\",\"origversion\":null},{\"repo\":\"melpa\",\"name\":\"modus-themes\",\"visiblename\":\"modus-themes\",\"version\":\"20220215.1631\",\"maintainers\":[\"info@protesilaos.com\"],\"summary\":\"Highly accessible and customizable themes (WCAG AAA)\",\"status\":\"rolling\",\"origversion\":null},{\"repo\":\"melpa_stable\",\"name\":\"modus-themes\",\"visiblename\":\"modus-themes\",\"version\":\"2.0.0\",\"maintainers\":[\"info@protesilaos.com\"],\"summary\":\"Highly accessible themes (WCAG AAA)\",\"status\":\"newest\",\"origversion\":null},{\"repo\":\"nix_stable_21_11\",\"name\":\"emacs-modus-themes\",\"visiblename\":\"emacs-modus-themes\",\"version\":\"20211114.1209\",\"maintainers\":[\"fallback-mnt-nix@repology\"],\"categories\":[\"emacs27Packages\"],\"status\":\"untrusted\",\"origversion\":null},{\"repo\":\"nix_unstable\",\"name\":\"emacs-modus-themes\",\"visiblename\":\"emacs-modus-themes\",\"version\":\"20220206.751\",\"maintainers\":[\"fallback-mnt-nix@repology\"],\"categories\":[\"emacs27Packages\"],\"status\":\"untrusted\",\"origversion\":null}]"
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.




      reply	other threads:[~2022-02-16 14:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 17:58 bug#53923: ‘http-fetch’ is unable to fetch <https://repology.org/api/v1/project/emacs:modus-themes> Xinglu Chen
2022-02-16 14:42 ` 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

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

  git send-email \
    --in-reply-to=87wnhux47w.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=53923@debbugs.gnu.org \
    --cc=public@yoctocell.xyz \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.