bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Curious behavior with -c and --content-disposition


From: Tim Rühsen
Subject: Re: Curious behavior with -c and --content-disposition
Date: Sun, 1 Dec 2019 17:58:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

Hi,

On 01.12.19 09:05, Hanno Böck wrote:
> 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.

With --content-disposition wget uses HEAD requests first, which Github
doesn't like - that is the 203 Forbidden answer. Not why there are HEAD
requests here.

Not sure why we see 'The name is too long, 448 chars total. Trying to
shorten...' at this time. It's irritating and unneeded here (a side
effect that I will look into).

Just leave away --content-disposition and
roundcubemail-1.4.1-complete.tar.gz is being downloaded and saved.

Regards, Tim

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]