See https://github.com/jeroen/curl/issues/160. The error is related to neurovault by https://ci.appveyor.com/project/neuroconductor-releases/neurovault/build/job/gmb9iv0f0oy6sbju#L1441
curl --head -v https://neurovault.org/media/images/264/JHU-ICBM-labels-2mm.nii.gz
* Trying 54.149.190.168...
* TCP_NODELAY set
* Connected to neurovault.org (54.149.190.168) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=neurovault.org
* start date: Oct 26 15:18:09 2019 GMT
* expire date: Jan 24 15:18:09 2020 GMT
* subjectAltName: host "neurovault.org" matched cert's "neurovault.org"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7fecf1000000)
> HEAD /media/images/264/JHU-ICBM-labels-2mm.nii.gz HTTP/2
> Host: neurovault.org
> User-Agent: curl/7.54.0
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 200
HTTP/2 200
< server: nginx/1.15.6
server: nginx/1.15.6
< date: Wed, 11 Dec 2019 03:47:14 GMT
date: Wed, 11 Dec 2019 03:47:14 GMT
< content-type: application/octet-stream
content-type: application/octet-stream
< content-length: 9611
content-length: 9611
< last-modified: Tue, 16 Dec 2014 00:57:24 GMT
last-modified: Tue, 16 Dec 2014 00:57:24 GMT
< content-encoding: utf-8
content-encoding: utf-8
< strict-transport-security: max-age=31536000
strict-transport-security: max-age=31536000
< access-control-allow-origin: *
access-control-allow-origin: *
< access-control-allow-credentials: true
access-control-allow-credentials: true
< access-control-allow-methods: GET, POST, OPTIONS
access-control-allow-methods: GET, POST, OPTIONS
< access-control-allow-headers: Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type
access-control-allow-headers: Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type
<
* Connection #0 to host neurovault.org left intact
where you see content-encoding: utf-8
, which apparently is not a correct content encoding based on https://github.com/jeroen/curl/issues/160#issuecomment-396287899, which notes https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding.
What can be done with problems such as these’