bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#53923: ‘http-fetch’ is unable to fetch <https://repology.org/api/v1/


From: Ludovic Courtès
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]