GNU bug report logs - #53923
‘http-fetch’ is unable to fetch <https://repology.org/api/v1/project/emacs:modus-themes>

Previous Next

Package: guix;

Reported by: Xinglu Chen <public <at> yoctocell.xyz>

Date: Thu, 10 Feb 2022 18:06:02 UTC

Severity: normal

Tags: notabug

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Xinglu Chen <public <at> yoctocell.xyz>
Cc: 53923 <at> 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
Hi,

Xinglu Chen <public <at> 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 <at> 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 <at> 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 <at> 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 <at> 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 <at> repology\"],\"categories\":[\"emacs27Packages\"],\"status\":\"untrusted\",\"origversion\":null}]"
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.




This bug report was last modified 3 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.