3 ms·
One point where I would argue wget doesn't have a sensible default is on filenames - it really should make --content-disposition the default, at least for singl
by tomatocracy 3y ago
One point where I would argue wget doesn't have a sensible default is on filenames - it really should make --content-disposition the default, at least for single file downloads. Otherwise it will often use the wrong name if there is a redirect or similar in the chain, which seems increasingly common.
- joshspankit 3y agoAlso (annoyingly) URL params
- yencabulator 3y agoI'll argue not trusting the server to dictate the saved file name is the only correct default behavior, and taking the filename from the user input (URL) is reasonable.
- hunter2_ 3y agoA server configured with a docroot to serve a static site will map requested URLs to hierarchical filesystem paths, but that isn't the only possibility; it's a common but quite loose coupling of ideas. But the filename directive of the content-disposition response header is entirely coupled to the idea of a filename. Therefore, it ought to take precedence.
- yencabulator 3y agoI don't want the stranger deciding to save the content as .bash_profile or such.
- hunter2_ 3y agoFair enough, but do you have that fear when using a browser? I guess a Downloads folder is lower stakes than whatever other working directory you're wgetting from, though.