Github messages for voidlinux
 help / color / mirror / Atom feed
From: unspecd <unspecd@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [ISSUE] xbps-src update-check: curl does not decompress responses
Date: Sat, 13 Mar 2021 06:49:49 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29429@inbox.vuxu.org> (raw)

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

New issue by unspecd on void-packages repository

https://github.com/void-linux/void-packages/issues/29429

Description:
### Steps to reproduce the behavior
```console
$ ./xbps-src update-check llvm11
NO VERSION found for llvm11
```
```console
$ curl https://releases.llvm.org
Warning: Binary output can mess up your terminal. Use "--output -" to tell 
Warning: curl to output it to your terminal anyway, or consider "--output 
Warning: <FILE>" to save to a file.
$ curl -sI https://releases.llvm.org | grep encoding
content-encoding: gzip
```
### Possible solution
```diff
@@ -85,7 +85,7 @@ update_check() {
                 echo "(folder) fetching $urlpfx" 1>&2
             fi
             skipdirs=
-            curl -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$urlpfx" |
+            curl --compressed -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$urlpfx" |
                 grep -Po -i "$rx" |
                 # sort -V places 1.1/ before 1/, but 1A/ before 1.1A/
                 sed -e 's:$:A:' -e 's:/A$:A/:' | sort -Vru | sed -e 's:A/$:/A:' -e 's:A$::' |
@@ -171,7 +171,7 @@ update_check() {
         if [ -n "$XBPS_UPDATE_CHECK_VERBOSE" ]; then
             echo "fetching $url" 1>&2
         fi
-        curl -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" |
+        curl --compressed -H 'Accept: text/html,application/xhtml+xml,application/xml,text/plain,application/rss+xml' -A "xbps-src-update-check/$XBPS_SRC_VERSION" --max-time 10 -Lsk "$url" |
             grep -Po -i "$rx"
         fetchedurls[$url]=yes
     done |
```

             reply	other threads:[~2021-03-13  5:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13  5:49 unspecd [this message]
2021-04-27 23:48 ` ericonr
2021-04-30  9:29 ` unspecd
2021-05-17  8:01 ` Johnnynator
2022-05-08  2:12 ` github-actions
2022-05-23  2:11 ` [ISSUE] [CLOSED] " github-actions

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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29429@inbox.vuxu.org \
    --to=unspecd@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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.
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 NNTP newsgroup(s).