[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Output filename not same as from browser save...reason?..
Re: [Bug-wget] Output filename not same as from browser save...reason?...bug?
Fri, 09 Jan 2009 22:26:47 -0800
Thunderbird 18.104.22.168 (X11/20081125)
-----BEGIN PGP SIGNED MESSAGE-----
Linda Walsh wrote:
> I just noticed (actually noticed this before, but just now got around
> to _really_ noticing enough to write a question about it :-) )
> When I do a file save in Firefox of a file, it saves it by a name I
> (it's a mod/extension for Oblivion)..
> filename: origin_of_the_mages_guild_6.1.zip
> But when I copy the address and go into a shell window and allow wget to
> it, I get some 'semi-random' (random from perspective of relation to
> filename, not from URL content).
> I was wondering why the browser gets the filename "right", but wget
> stores it according to some intermediate URL-based name...
> Is this something that could be considered a "bug" -- i.e. it's not
> the file into the filename I *want* (I know I can override the output
> filename with
> -O). I.e. -- it may be following some "spec", BUT if it is, how is it
> that the
> browser gets the filename right?
The browser is probably going by the (non-standard, de facto standard)
Content-Disposition header. Wget supports this in versions 1.11 and
higher, but in a somewhat experimental fashion. It can result in
significantly less efficient downloads, so you have to explicitly ask
for it with the --content-disposition flag. You can also specify
"content_disposition = on" in your .wgetrc/wget.ini
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
GNU Maintainer: wget, screen, teseq
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----