Hi,
I noticed an odd behavior with wget.
When trying to download a github URL with -c and --content-disposition
it seems on some intermediate URL (github does multiple redirects) it
will truncate the URL and subsequently fail.
I think this is probably somehow because it wants to use the long URL
as a filename, but as this is only an intermediate URL and not the
final filename this shouldn't be a problem.
Reproduce:
wget --content-disposition -c
https://github.com/roundcube/roundcubemail/releases/download/1.4.1/roundcubemail-1.4.1-complete.tar.gz
Output:
--2019-12-01 08:36:19--
https://github.com/roundcube/roundcubemail/releases/download/1.4.1/roundcubemail-1.4.1-complete.tar.gz
Resolving github.com... 140.82.118.4 Connecting to
github.com|140.82.118.4|:443... connected. HTTP request sent, awaiting
response... 302 Found Location:
https://github-production-release-asset-2e65be.s3.amazonaws.com/4224042/03651d80-0d29-11ea-8f04-eb6a003b4dca?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20191201%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191201T073619Z&X-Amz-Expires=300&X-Amz-Signature=90bda29189d7d310919d76ec13376db7edcab10cae66169e951dc3568d5122ce&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Droundcubemail-1.4.1-complete.tar.gz&response-content-type=application%2Foctet-stream
[following] --2019-12-01 08:36:19--
https://github-production-release-asset-2e65be.s3.amazonaws.com/4224042/03651d80-0d29-11ea-8f04-eb6a003b4dca?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20191201%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191201T073619Z&X-Amz-Expires=300&X-Amz-Signature=90bda29189d7d310919d76ec13376db7edcab10cae66169e951dc3568d5122ce&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Droundcubemail-1.4.1-complete.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com...
52.216.238.43 Connecting to
github-production-release-asset-2e65be.s3.amazonaws.com|52.216.238.43|:443...
connected. HTTP request sent, awaiting response... 403 Forbidden The
name is too long, 448 chars total. Trying to shorten... New name is
03651d80-0d29-11ea-8f04-eb6a003b4dca?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20191201%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191201T073619Z&X-Amz-Expires=300&X-Amz-Signature=90bda29189d7d310919d76e.
2019-12-01 08:36:20 ERROR 403: Forbidden.
--
Hanno Böck
https://hboeck.de/