Wget / Wget2 differ in behavior of `--content-disposition`
From the IRC / Matrix Wget channel:
wget --content-disposition http://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw
VS wget2 --content-disposition http://list.iblocklist.com/?list=ydxerpxkpcfqjaybcssw
wget out: ydxerpxkpcfqjaybcssw.gz
wget2 out: index.html?list=ydxerpxkpcfqjaybcssw
It's a redirection to http://cdn2.iblocklist.com/files/rwxfxfibobsdewqocelx/ydxerpxkpcfqjaybcssw.gz
. Wget takes that server-provided name (this might be unsafe), while wget2 sticks with the original.
Wget2 needs --trust-server-names
to show the same behavior.
Think it the other way round. Say you want to download http://example.com/archive.tgz
and the redirection goes to http://example.com/jdskdfjksdf?addsfjwer=kdfjhsdkfjksdfj
. Wget2 would still save it as archive.tgz
. Wget would use that other name. What is better then ?