Closed mtippett closed 4 years ago
On first look this might be even more complicated - S3 explicitly responds HTTP/1.1 416 Requested Range Not Satisfiable
which doesn't imply that ranges aren't supported (that's just curl
's assumption). In fact when resuming a partially downloaded file, curl will happily continue the download from S3:
> GET /196753436/38ff0400-bfa4-11ea-8f76-84dc3568b461?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200803%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200803T124450Z&X-Amz-Expires=300&X-Amz-Signature=fc41fb82e78068752f7b853eb4ad83831972201708ff94b1ee3638dc5ddb5c7d&X-Amz-SignedHeaders=host&actor_id=0&repo_id=196753436&response-content-disposition=attachment%3B%20filename%3Dmacos-deps-2020-07-06.tar.gz&response-content-type=application%2Foctet-stream HTTP/1.1
> Host: github-production-release-asset-2e65be.s3.amazonaws.com
> Range: bytes=9404416-
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 206 Partial Content
< x-amz-id-2: LDSIKqlZwObM8Yf4/5jjDs2Q22j7Mib2PzrnZMurNqWDPJvdWAdLLIa5KbzTJ33/iQFtQw+6iVk=
< x-amz-request-id: 96BDBD4EB8FC4738
< Date: Mon, 03 Aug 2020 12:44:56 GMT
< Last-Modified: Mon, 06 Jul 2020 16:17:46 GMT
< ETag: "eec3e2bdc55d45adf64dc0a9c196bd93"
< Content-Disposition: attachment; filename=macos-deps-2020-07-06.tar.gz
< Accept-Ranges: bytes
< Content-Range: bytes 9404416-17909555/17909556
< Content-Type: application/octet-stream
< Content-Length: 8505140
< Server: AmazonS3
<
{ [8492 bytes data]
100 8305k 100 8305k 0 0 4446k 0 0:00:01 0:00:01 --:--:-- 5425k
* Connection #1 to host github-production-release-asset-2e65be.s3.amazonaws.com left intact
* Closing connection 0
* Closing connection 1
And even though doing the same with a fully downloaded file yields the HTTP/1.1 416 Requested Range Not Satisfiable
error, curl doesn't exit with a non-zero return code in my tests:
> GET /196753436/38ff0400-bfa4-11ea-8f76-84dc3568b461?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200803%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200803T125109Z&X-Amz-Expires=300&X-Amz-Signature=7cb29fa8e49ca9bb63944bd485e5f1f5199d608a8de1316e1de2c10dd50b57df&X-Amz-SignedHeaders=host&actor_id=0&repo_id=196753436&response-content-disposition=attachment%3B%20filename%3Dmacos-deps-2020-07-06.tar.gz&response-content-type=application%2Foctet-stream HTTP/1.1
> Host: github-production-release-asset-2e65be.s3.amazonaws.com
> Range: bytes=17909556-
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 416 Requested Range Not Satisfiable
< x-amz-request-id: CA087BECB302A83C
< x-amz-id-2: 5j674QxqiIFkCoJvuxaAzw74De77HvONp+EE12e3JqwA7Witk2gUOmjqtvuy6qGo+XUbokODN3A=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Mon, 03 Aug 2020 12:51:26 GMT
< Server: AmazonS3
<
{ [373 bytes data]
100 361 0 361 0 0 617 0 --:--:-- --:--:-- --:--:-- 617
* Connection #1 to host github-production-release-asset-2e65be.s3.amazonaws.com left intact
* Closing connection 0
* Closing connection 1
It's the same error, but curl
returns 0
- can you check the return code on your machine when you run curl -vv -L -C - -O https://github.com/obsproject/obs-deps/releases/download/2020-07-06/macos-deps-2020-07-06.tar.gz
twice in the same directory?
Also your curl -V
output would be helpful, it's possible that this behaviour changed between macOS-packaged curl
and e.g. the Homebrew package.
Both Mojave macOS-packaged curl (7.54) and brew curl (7.71) are installed. You are correct, the macOS-packaged curl seems incompatible
$ curl -L -C - -O https://github.com/obsproject/obs-deps/releases/download/2020-07-06/macos-deps-2020-07-06.tar.gz
** Resuming transfer from byte position 17909556
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 641 100 641 0 0 2464 0 --:--:-- --:--:-- --:--:-- 2465
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.
$ echo $?
33
$ /usr/local/opt/curl/bin/curl -L -C - -O https://github.com/obsproject/obs-deps/releases/download/2020-07-06/macos-deps-2020-07-06.tar.gz
** Resuming transfer from byte position 17909556
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 641 100 641 0 0 2187 0 --:--:-- --:--:-- --:--:-- 2187
100 361 0 361 0 0 313 0 --:--:-- 0:00:01 --:--:-- 539
$ echo $?
0
Repeated curl below
$ curl -vv -L -C - -O https://github.com/obsproject/obs-deps/releases/download/2020-07-06/macos-deps-2020-07-06.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 192.30.255.112...
* TCP_NODELAY set
* Connected to github.com (192.30.255.112) 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):
} [216 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [108 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2971 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [300 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [37 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: May 5 00:00:00 2020 GMT
* expire date: May 10 12:00:00 2022 GMT
* subjectAltName: host "github.com" matched cert's "github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
* SSL certificate verify ok.
> GET /obsproject/obs-deps/releases/download/2020-07-06/macos-deps-2020-07-06.tar.gz HTTP/1.1
> Host: github.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 302 Found
< date: Mon, 03 Aug 2020 17:54:11 GMT
< content-type: text/html; charset=utf-8
< server: GitHub.com
< status: 302 Found
< vary: X-PJAX, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding
< location: https://github-production-release-asset-2e65be.s3.amazonaws.com/196753436/38ff0400-bfa4-11ea-8f76-84dc3568b461?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200803%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200803T175411Z&X-Amz-Expires=300&X-Amz-Signature=8e70d774259187a997383101fe64c486454bd2d942bf6f20656f44f7701d3160&X-Amz-SignedHeaders=host&actor_id=0&repo_id=196753436&response-content-disposition=attachment%3B%20filename%3Dmacos-deps-2020-07-06.tar.gz&response-content-type=application%2Foctet-stream
< cache-control: no-cache
< strict-transport-security: max-age=31536000; includeSubdomains; preload
< x-frame-options: deny
< x-content-type-options: nosniff
< x-xss-protection: 1; mode=block
< expect-ct: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
< content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com www.githubstatus.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src 'self' data: github.githubassets.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; manifest-src 'self'; media-src 'none'; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; worker-src github.com/socket-worker.js gist.github.com/socket-worker.js
< Set-Cookie: _gh_sess=wOwdNTrUula%2BCO%2Fj8yDexc17L36rRZ3TVRlKJ7jk86L4bPgBC00oVOmYRMH5W%2F5lLjc4WWluOqdd%2Bh5P6JlKCub4BQcX9nTP8GBFCBr6yAA8VkrEDClqJMnu5zvYF3H7zs9GJnC5UEL1BGtR%2F6SOI01b3rU6ohGL5BuRWLHqUzdJeyg05uwFAQ%2F6BIJYnW89z4w8NHfyo1s3hjOEHGL%2FvA%2BuVfAMKw90ljtqC4hiy9RNv7miy7pvxB7u22UyTR%2B7Eo3BSbM3vTa7kU59sGVRiQ%3D%3D--9%2BMCG4rtl5M9KPKv--nWeigZF%2Fn1K9AaU89rsbgQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
< Set-Cookie: _octo=GH1.1.555907235.1596477251; Path=/; Domain=github.com; Expires=Tue, 03 Aug 2021 17:54:11 GMT; Secure; SameSite=Lax
< Set-Cookie: logged_in=no; Path=/; Domain=github.com; Expires=Tue, 03 Aug 2021 17:54:11 GMT; HttpOnly; Secure; SameSite=Lax
< Content-Length: 641
< X-GitHub-Request-Id: 32BC:588C:AD5D9B:F57E47:5F284F43
<
* Ignoring the response-body
{ [641 bytes data]
100 641 100 641 0 0 1326 0 --:--:-- --:--:-- --:--:-- 1327
* Connection #0 to host github.com left intact
* Issue another request to this URL: 'https://github-production-release-asset-2e65be.s3.amazonaws.com/196753436/38ff0400-bfa4-11ea-8f76-84dc3568b461?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200803%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200803T175411Z&X-Amz-Expires=300&X-Amz-Signature=8e70d774259187a997383101fe64c486454bd2d942bf6f20656f44f7701d3160&X-Amz-SignedHeaders=host&actor_id=0&repo_id=196753436&response-content-disposition=attachment%3B%20filename%3Dmacos-deps-2020-07-06.tar.gz&response-content-type=application%2Foctet-stream'
* Trying 52.216.242.148...
* TCP_NODELAY set
* Connected to github-production-release-asset-2e65be.s3.amazonaws.com (52.216.242.148) port 443 (#1)
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 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):
} [261 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [91 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2900 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=Washington; L=Seattle; O=Amazon.com, Inc.; CN=*.s3.amazonaws.com
* start date: Nov 9 00:00:00 2019 GMT
* expire date: Mar 12 12:00:00 2021 GMT
* subjectAltName: host "github-production-release-asset-2e65be.s3.amazonaws.com" matched cert's "*.s3.amazonaws.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert Baltimore CA-2 G2
* SSL certificate verify ok.
> GET /196753436/38ff0400-bfa4-11ea-8f76-84dc3568b461?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200803%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200803T175411Z&X-Amz-Expires=300&X-Amz-Signature=8e70d774259187a997383101fe64c486454bd2d942bf6f20656f44f7701d3160&X-Amz-SignedHeaders=host&actor_id=0&repo_id=196753436&response-content-disposition=attachment%3B%20filename%3Dmacos-deps-2020-07-06.tar.gz&response-content-type=application%2Foctet-stream HTTP/1.1
> Host: github-production-release-asset-2e65be.s3.amazonaws.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< x-amz-id-2: hRQmlDHYVK3Y29tfblTCTCSuU5fGALBCqCOfmn6BvOl/4pgJjGBbd8cDdIQM2gV2AYSYAt1OG+g=
< x-amz-request-id: 73FCCF96B292F337
< Date: Mon, 03 Aug 2020 17:54:13 GMT
< Last-Modified: Mon, 06 Jul 2020 16:17:46 GMT
< ETag: "eec3e2bdc55d45adf64dc0a9c196bd93"
< Content-Disposition: attachment; filename=macos-deps-2020-07-06.tar.gz
< Accept-Ranges: bytes
< Content-Type: application/octet-stream
< Content-Length: 17909556
< Server: AmazonS3
<
{ [16360 bytes data]
100 17.0M 100 17.0M 0 0 857k 0 0:00:20 0:00:20 --:--:-- 1357k
* Connection #1 to host github-production-release-asset-2e65be.s3.amazonaws.com left intact
$ curl -vv -L -C - -O https://github.com/obsproject/obs-deps/releases/download/2020-07-06/macos-deps-2020-07-06.tar.gz
** Resuming transfer from byte position 17909556
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 192.30.255.113...
* TCP_NODELAY set
* Connected to github.com (192.30.255.113) 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):
} [216 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [108 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2971 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [300 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [37 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: May 5 00:00:00 2020 GMT
* expire date: May 10 12:00:00 2022 GMT
* subjectAltName: host "github.com" matched cert's "github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
* SSL certificate verify ok.
> GET /obsproject/obs-deps/releases/download/2020-07-06/macos-deps-2020-07-06.tar.gz HTTP/1.1
> Host: github.com
> Range: bytes=17909556-
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 302 Found
< date: Mon, 03 Aug 2020 17:54:11 GMT
< content-type: text/html; charset=utf-8
< server: GitHub.com
< status: 302 Found
< vary: X-PJAX, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding
< location: https://github-production-release-asset-2e65be.s3.amazonaws.com/196753436/38ff0400-bfa4-11ea-8f76-84dc3568b461?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200803%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200803T175411Z&X-Amz-Expires=300&X-Amz-Signature=8e70d774259187a997383101fe64c486454bd2d942bf6f20656f44f7701d3160&X-Amz-SignedHeaders=host&actor_id=0&repo_id=196753436&response-content-disposition=attachment%3B%20filename%3Dmacos-deps-2020-07-06.tar.gz&response-content-type=application%2Foctet-stream
< cache-control: no-cache
< strict-transport-security: max-age=31536000; includeSubdomains; preload
< x-frame-options: deny
< x-content-type-options: nosniff
< x-xss-protection: 1; mode=block
< expect-ct: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
< content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com www.githubstatus.com collector.githubapp.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src 'self' data: github.githubassets.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com; manifest-src 'self'; media-src 'none'; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; worker-src github.com/socket-worker.js gist.github.com/socket-worker.js
< Set-Cookie: _gh_sess=WZjiIwGGXOmEic6P082jnvLO6%2B94FhvJLBUJoMcDN%2BZcYnfNkfW22swBVcaYHZ0WHeXE%2FOQAQecycB1c68a41VYMat4j1lrshly%2B8orM5ajWd4%2BFIodImUlMOMh7lCEVV8U2Y8UWeY5HUgFsxepq4M0HOgXRna%2BKW7MsFQEcCNAZYch8%2B%2Bc1IayKAxnakgIdSDlWFTt5j8odppFGPufuj3NAyDZ213qopL%2FYw85%2BCQsBLedExvFyZQROBUo1OQ09YxMQ%2BPQeZr6IC14Kc09nag%3D%3D--Zo7vRhfWen6S8bdO--Z066GvLg%2FLPZ7G%2Bd%2FWM1Lg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
< Set-Cookie: _octo=GH1.1.2127576458.1596477279; Path=/; Domain=github.com; Expires=Tue, 03 Aug 2021 17:54:39 GMT; Secure; SameSite=Lax
< Set-Cookie: logged_in=no; Path=/; Domain=github.com; Expires=Tue, 03 Aug 2021 17:54:39 GMT; HttpOnly; Secure; SameSite=Lax
< Content-Length: 641
< X-GitHub-Request-Id: 1114:2F44:B04AC0:F971EC:5F284F5F
<
* Ignoring the response-body
{ [641 bytes data]
100 641 100 641 0 0 1999 0 --:--:-- --:--:-- --:--:-- 2003
* Connection #0 to host github.com left intact
* Issue another request to this URL: 'https://github-production-release-asset-2e65be.s3.amazonaws.com/196753436/38ff0400-bfa4-11ea-8f76-84dc3568b461?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200803%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200803T175411Z&X-Amz-Expires=300&X-Amz-Signature=8e70d774259187a997383101fe64c486454bd2d942bf6f20656f44f7701d3160&X-Amz-SignedHeaders=host&actor_id=0&repo_id=196753436&response-content-disposition=attachment%3B%20filename%3Dmacos-deps-2020-07-06.tar.gz&response-content-type=application%2Foctet-stream'
* Trying 52.216.206.51...
* TCP_NODELAY set
* Connected to github-production-release-asset-2e65be.s3.amazonaws.com (52.216.206.51) port 443 (#1)
* 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):
} [261 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [91 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2900 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=Washington; L=Seattle; O=Amazon.com, Inc.; CN=*.s3.amazonaws.com
* start date: Nov 9 00:00:00 2019 GMT
* expire date: Mar 12 12:00:00 2021 GMT
* subjectAltName: host "github-production-release-asset-2e65be.s3.amazonaws.com" matched cert's "*.s3.amazonaws.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert Baltimore CA-2 G2
* SSL certificate verify ok.
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0> GET /196753436/38ff0400-bfa4-11ea-8f76-84dc3568b461?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200803%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200803T175411Z&X-Amz-Expires=300&X-Amz-Signature=8e70d774259187a997383101fe64c486454bd2d942bf6f20656f44f7701d3160&X-Amz-SignedHeaders=host&actor_id=0&repo_id=196753436&response-content-disposition=attachment%3B%20filename%3Dmacos-deps-2020-07-06.tar.gz&response-content-type=application%2Foctet-stream HTTP/1.1
> Host: github-production-release-asset-2e65be.s3.amazonaws.com
> Range: bytes=17909556-
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 416 Requested Range Not Satisfiable
< x-amz-request-id: E346BCA5B580C83F
< x-amz-id-2: QooIiDkuGCKMxERki6HQ1336q2gstNG9YOOQwLSqk1q8eDkleRdfxn3m+GB9DTTzqTtspkvGLt0=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Mon, 03 Aug 2020 17:54:39 GMT
< Server: AmazonS3
<
* HTTP server doesn't seem to support byte ranges. Cannot resume.
* stopped the pause stream!
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
* Closing connection 1
* TLSv1.2 (OUT), TLS alert, Client hello (1):
} [2 bytes data]
curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.
$
I'll be updating my system later this week to Catalina. So I'll be happy to have this closed as not-a-bug, although documentation indicating a floor version of macOS might be useful.
As we support macOS 10.13, the build script should work on 10.13 without custom cURL as well - I'll have to think how to enable this more gracefully, but good find.
Also definitely looks like something that was changed/implemented in curl at a later point to handle specifically: https://github.com/curl/curl/issues/1163#issuecomment-294125077
Seems to have been changed in or around 2017 and Apple is very conservative when it comes to their shipped toolchain versions, so it looks like Mojave's built-in curl still has the "bad" behaviour. I'll probably cover for return code 33
or similar.
I was able to fix this issue as per someone's suggesting using an upgraded curl:
brew install curl
I add the path to my bash_profile:
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.bash_profile
then
source ~/.bash_profile
now curl -V is 7.71 and ran the build step again.
so far its going better
got vlc downloaded and now building project
It's the same error, but curl returns 0
It's worth noting that curl will frequently have an exit code of 0 when there is an http error, unless you use the --fail
flag.
Platform
Operating system and version: macOS Mojave 10.14.6 OBS Studio version: 25.0.8 (git)
Expected Behavior
Rebuilding with CI/full-build-macos.sh should succeed without issue.
Current Behavior
When rebuilding, the following failure will occur
Root cause is associated with
curl -s -L -C - -O https://github.com/obsproject/obs-deps/releases/download/2020-07-06/macos-deps-2020-07-06.tar.gz
command with exit on error being set for the bash script.Steps to Reproduce
CI/full-build-macos.sh
CI/full-build-macos.sh
Additional information
It appears that -C - allows curl to auto-continue if it can determine it is safe to do so. This appears to have been possibly compatible a previous version of the hosting service, but that now fails. The error code for curl is 33 -
33 HTTP range error. The range "command" didn't work.
from the man page for curl.Looking at the debug mode for curl shows the failure occurs at the interaction with AWS S3. The original request to
https://github.com/obsproject/obs-deps/releases/download/2020-07-06/macos-deps-2020-07-06.tar.gz
is redirected tohttps://github-production-release-asset-2e65be.s3.amazonaws.com/196753436/38ff0400-bfa4-11ea-8f76-84dc3568b461?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200803%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200803T081043Z&X-Amz-Expires=300&X-Amz-Signature=a17004196ee02059ccfab25e5b086fde278d959b40b5ecac62c9917694195179&X-Amz-SignedHeaders=host&actor_id=0&repo_id=196753436&response-content-disposition=attachment%3B%20filename%3Dmacos-deps-2020-07-06.tar.gz&response-content-type=application%2Foctet-stream
The negative impact of this issue is that an incomplete file will be downloaded without continuation. An alternative approach to avoid fetch each time is to make a simplistic check for existence, or start tracking sha1 of the object.