0

Consider the download link

http://trac-hacks.org/changeset/latest/accountmanagerplugin/tags/acct_mgr-0.4.4?old_path=/&filename=accountmanagerplugin/tags/acct_mgr-0.4.4&format=zip

with the query part

?old_path=/&filename=accountmanagerplugin/tags/acct_mgr-0.4.4&format=zip

Downloading the file in firefox 37.0 causes the query to be resolved and a download of a .zip file while

wget 'http://trac-hacks.org/changeset/latest/accountmanagerplugin/tags/acct_mgr-0.4.4?old_path=/&filename=accountmanagerplugin/tags/acct_mgr-0.4.4&format=zip'

retrieves a file named acct_mgr-0.4.4?old_path=%2F&filename=accountmanagerplugin%2Ftags%2Facct_mgr-0.4.4&format=zip which one definitely should rename in order to work with it on the command line.

How to get wget to store the download as .zip with the correct name without the need to figure out this name (diff-from-_-14559-to-accountmanagerplugin_tags_acct_mgr-0.4.4-14559.zip in the example) and specify it to the -O/--output-document= option?

I checked How can I make wget rename downloaded files to not include the query string?, but adding --content-disposition doesn't help.

Kalle Richter
  • 2,472
  • 6
  • 44
  • 64

0 Answers0