Closed davideaster closed 1 year ago
Thanks for the detailed information. I've updated the commands to use --compressed
/ --compression=auto
. This is available as of version 7.5.6. Let me know if you run into any issues with it. Thanks again!
I'm glad I could help. I'm enjoying learning to use nb
.
After #246, servers may send a response compressed using an algorithm that
curl
doesn't understand.curl
saves the result as the compressed blob in this case, causingnb
to discard it as unrecognized.Using
--compressed
in place of--header "Accept-Encoding: *"
may be a better option. With--compressed
,curl
still sendsAccept-Encoding
, but it only lists the encodings thatcurl
recognizes.For
wget
,--compression=auto
is a similar option.curl
Without
Accept-Encoding
$ curl -sSLv https://hyperscript.org/ |& egrep -i 'encoding:|content-length:'
$ curl -sSL https://hyperscript.org/ | wc -c
$ curl -sSL https://hyperscript.org/ | file -
With
--header 'Accept-Encoding: *'
$ curl -sSLv --header 'Accept-Encoding: *' https://hyperscript.org/ |& egrep -i 'encoding:|content-length:'
$ curl -sSL --header 'Accept-Encoding: *' https://hyperscript.org/ | wc -c
$ curl -sSL --header 'Accept-Encoding: *' https://hyperscript.org/ | file -
With
--compressed
$ curl -sSLv --compressed https://hyperscript.org/ |& egrep -i 'encoding:|content-length:'
$ curl -sSL --compressed https://hyperscript.org/ | wc -c
$ curl -sSL --compressed https://hyperscript.org/ | file -
wget
Without
Accept-Encoding
$ wget -d https://hyperscript.org/ -O - |& egrep -i 'begin---|encoding:|content-length:'
$ wget -q https://hyperscript.org/ -O - | wc -c
$ wget -q https://hyperscript.org/ -O - | file -
With
--header='Accept-Encoding: *'
$ wget -d --header='Accept-Encoding: *' https://hyperscript.org/ -O - |& egrep -i 'begin---|encoding:|content-length:'
$ wget -q --header='Accept-Encoding: *' https://hyperscript.org/ -O - | wc -c
$ wget -q --header='Accept-Encoding: *' https://hyperscript.org/ -O - | file -
With
--compression=auto
$ wget -d --compression=auto https://hyperscript.org/ -O - |& egrep -i 'begin---|encoding:|content-length:'
$ wget -q --compression=auto https://hyperscript.org/ -O - | wc -c
$ wget -q --compression=auto https://hyperscript.org/ -O - | file -