melbahja / got

Got: Simple golang package and CLI tool to download large files faster 🏃 than cURL and Wget!
MIT License
722 stars 46 forks source link

Fall back to filename from URL when don't have it in the header #39

Closed ant1k9 closed 2 years ago

ant1k9 commented 2 years ago

In case we have a valid header, we'll try to get unsafeName from it but we cannot do it:

content-disposition: attachment

So, we fall back to a default case, getting the filename right from the URL and fix it, if we have a filename in the content-disposition.