all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#53923: ‘http-fetch’ is unable to fetch <https://repology.org/api/v1/project/emacs:modus-themes>
@ 2022-02-10 17:58 Xinglu Chen
  2022-02-16 14:42 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Xinglu Chen @ 2022-02-10 17:58 UTC (permalink / raw)
  To: 53923

[-- Attachment #1: Type: text/plain, Size: 7095 bytes --]

Hi,

For some reason, the ‘http-fetch’ procedure in (guix http-client) is
unable to fetch
<https://repology.org/api/v1/project/emacs:modus-themes>.

--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")
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? _)
--8<---------------cut here---------------end--------------->8---

The URL opens just fine in Icecat.  ‘http-request’ from (web client) is
able to handle it as well.

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(web client)
scheme@(guile-user)> (http-request "https://repology.org/api/v1/project/emacs:modus-themes")
$1 = #<<response> version: (1 . 1) code: 200 reason-phrase: "OK" headers: ((server . "nginx") (date . #<date nanosecond: 0 second: 48 minute: 54 hour: 17 day: 10 month: 2 year: 2022 zone-offset: 0>) (content-type application/json) (content-length . 1325) (connection close) (expires . #<date nanosecond: 0 second: 48 minute: 54 hour: 18 day: 10 month: 2 year: 2022 zone-offset: 0>) (cache-control (max-age . 3600)) (x-content-type-options . "nosniff") (strict-transport-security . "max-age=31536000; includeSubDomains; preload") (referrer-policy . "unsafe-url") (vary accept-encoding cookie) (permissions-policy . "interest-cohort=()") (content-security-policy . "default-src 'none'; style-src 'self'; script-src 'self'; img-src 'self'; font-src 'self'; frame-ancestors 'none'; base-uri 'none'; form-action 'self'") (x-frame-options . "DENY")) port: #<closed: file 7f7bb3bda540>>
$2 = #vu8(91 123 34 114 101 112 111 34 58 34 109 101 108 112 97 95 115 116 97 98 108 101 34 44 34 110 97 109 101 34 58 34 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 105 115 105 98 108 101 110 97 109 101 34 58 34 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 101 114 115 105 111 110 34 58 34 50 46 48 46 48 34 44 34 109 97 105 110 116 97 105 110 101 114 115 34 58 91 34 105 110 102 111 64 112 114 111 116 101 115 105 108 97 111 115 46 99 111 109 34 93 44 34 115 117 109 109 97 114 121 34 58 34 72 105 103 104 108 121 32 97 99 99 101 115 115 105 98 108 101 32 116 104 101 109 101 115 32 40 87 67 65 71 32 65 65 65 41 34 44 34 115 116 97 116 117 115 34 58 34 110 101 119 101 115 116 34 44 34 111 114 105 103 118 101 114 115 105 111 110 34 58 110 117 108 108 125 44 123 34 114 101 112 111 34 58 34 103 110 117 95 101 108 112 97 34 44 34 110 97 109 101 34 58 34 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 105 115 105 98 108 101 110 97 109 101 34 58 34 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 101 114 115 105 111 110 34 58 34 50 46 48 46 48 34 44 34 109 97 105 110 116 97 105 110 101 114 115 34 58 91 34 105 110 102 111 64 112 114 111 116 101 115 105 108 97 111 115 46 99 111 109 34 93 44 34 115 117 109 109 97 114 121 34 58 34 72 105 103 104 108 121 32 97 99 99 101 115 115 105 98 108 101 32 116 104 101 109 101 115 32 40 87 67 65 71 32 65 65 65 41 34 44 34 115 116 97 116 117 115 34 58 34 110 101 119 101 115 116 34 44 34 111 114 105 103 118 101 114 115 105 111 110 34 58 110 117 108 108 125 44 123 34 114 101 112 111 34 58 34 103 110 117 103 117 105 120 34 44 34 115 114 99 110 97 109 101 34 58 34 101 109 97 99 115 45 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 98 105 110 110 97 109 101 34 58 34 101 109 97 99 115 45 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 105 115 105 98 108 101 110 97 109 101 34 58 34 101 109 97 99 115 45 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 101 114 115 105 111 110 34 58 34 50 46 48 46 48 34 44 34 115 117 109 109 97 114 121 34 58 34 65 99 99 101 115 115 105 98 108 101 32 116 104 101 109 101 115 32 40 87 67 65 71 32 65 65 65 41 34 44 34 115 116 97 116 117 115 34 58 34 110 101 119 101 115 116 34 44 34 111 114 105 103 118 101 114 115 105 111 110 34 58 110 117 108 108 125 44 123 34 114 101 112 111 34 58 34 109 101 108 112 97 34 44 34 110 97 109 101 34 58 34 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 105 115 105 98 108 101 110 97 109 101 34 58 34 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 101 114 115 105 111 110 34 58 34 50 48 50 50 48 50 49 48 46 49 53 50 52 34 44 34 109 97 105 110 116 97 105 110 101 114 115 34 58 91 34 105 110 102 111 64 112 114 111 116 101 115 105 108 97 111 115 46 99 111 109 34 93 44 34 115 117 109 109 97 114 121 34 58 34 72 105 103 104 108 121 32 97 99 99 101 115 115 105 98 108 101 32 116 104 101 109 101 115 32 40 87 67 65 71 32 65 65 65 41 34 44 34 115 116 97 116 117 115 34 58 34 114 111 108 108 105 110 103 34 44 34 111 114 105 103 118 101 114 115 105 111 110 34 58 110 117 108 108 125 44 123 34 114 101 112 111 34 58 34 110 105 120 95 115 116 97 98 108 101 95 50 49 95 49 49 34 44 34 110 97 109 101 34 58 34 101 109 97 99 115 45 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 105 115 105 98 108 101 110 97 109 101 34 58 34 101 109 97 99 115 45 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 101 114 115 105 111 110 34 58 34 50 48 50 49 49 49 49 52 46 49 50 48 57 34 44 34 109 97 105 110 116 97 105 110 101 114 115 34 58 91 34 102 97 108 108 98 97 99 107 45 109 110 116 45 110 105 120 64 114 101 112 111 108 111 103 121 34 93 44 34 99 97 116 101 103 111 114 105 101 115 34 58 91 34 101 109 97 99 115 50 55 80 97 99 107 97 103 101 115 34 93 44 34 115 116 97 116 117 115 34 58 34 117 110 116 114 117 115 116 101 100 34 44 34 111 114 105 103 118 101 114 115 105 111 110 34 58 110 117 108 108 125 44 123 34 114 101 112 111 34 58 34 110 105 120 95 117 110 115 116 97 98 108 101 34 44 34 110 97 109 101 34 58 34 101 109 97 99 115 45 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 105 115 105 98 108 101 110 97 109 101 34 58 34 101 109 97 99 115 45 109 111 100 117 115 45 116 104 101 109 101 115 34 44 34 118 101 114 115 105 111 110 34 58 34 50 48 50 50 48 50 48 54 46 55 53 49 34 44 34 109 97 105 110 116 97 105 110 101 114 115 34 58 91 34 102 97 108 108 98 97 99 107 45 109 110 116 45 110 105 120 64 114 101 112 111 108 111 103 121 34 93 44 34 99 97 116 101 103 111 114 105 101 115 34 58 91 34 101 109 97 99 115 50 55 80 97 99 107 97 103 101 115 34 93 44 34 115 116 97 116 117 115 34 58 34 117 110 116 114 117 115 116 101 100 34 44 34 111 114 105 103 118 101 114 115 105 111 110 34 58 110 117 108 108 125 93)
--8<---------------cut here---------------end--------------->8---

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#53923: ‘http-fetch’ is unable to fetch <https://repology.org/api/v1/project/emacs:modus-themes>
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2022-02-16 14:42 UTC (permalink / raw)
  To: Xinglu Chen; +Cc: 53923

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’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-16 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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.