[Slackbuilds-users] Updates - 20170701.1 youtube-dl

Andrzej Telszewski atelszewski at gmail.com
Sun Jul 2 12:25:16 UTC 2017

On 02/07/17 12:51, Audrius Kažukauskas wrote:
> On Sat, 2017-07-01 at 22:19:39 +0200, Andrzej Telszewski wrote:
>> On 01/07/17 03:11, Willy Sudiarto Raharjo wrote:
>>> network/youtube-dl: Updated for version 2017.06.25.
>> I'm facing the same download error as I mentioned previously regarding
>> youtube-dl, i.e. the tarball is saved with underscore replaced with hyphen.
> The underscore is actually not replaced, whatever you're using to
> download the file honours Content-Disposition header which tells what
> filename to use when saving a file.  In this case it's
> youtube-dl-2017.06.25.tar.gz
> You can inspect that yourself by invoking the following:
> curl -sIL https://github.com/rg3/youtube-dl/archive/2017.06.25/youtube_dl-2017.06.25.tar.gz | grep ^Content-Disposition
> For download URL to work the same way regardless of Content-Disposition,
> the last component of URL should use hyphen instead of underscore.  In
> other words, your patch is correct fix.

You're correct:

Content-Disposition: attachment; filename=youtube-dl-2017.06.25.tar.gz

But still, plain wget happily saves with the filename as in the last url 
path component.

This all adds up to the confusion.

Would telling maintainers to use wget with --content-disposition help 
solving the problem?

>> As a side note, when the tarball is saved:
>> - Firefox replaces the underscore _ with hyphen - ,
>> - wget keeps whatever it was invoked with,
>> - slackrepo behaves like Firefox.
> It seems that the way GitHub handles download URLs still confuses
> people, though I can't blame them, it really isn't obvious at first.
> I'd recommend to read this really good explanation by David Spencer:
> https://lists.slackbuilds.org/pipermail/slackbuilds-users/2017-February/018447.html

That's really valuable reading.
But I don't think it talks about the problem we have here.

Best regards,
Andrzej Telszewski

More information about the SlackBuilds-users mailing list