Hrvoje Niksic wrote:
Is it intentional that the Wget from the repository is still not
printing the file name it uses for download? I (and some other users)
tend to use the Wget from "CVS", so this is making Wget less useful
for me.
For example:
$ ./wget http://download.skype.com/linux/skype_1.2.0.18-1_i386.deb
--13:41:42-- http://download.skype.com/linux/skype_1.2.0.18-1_i386.deb
Resolving download.skype.com... 212.72.49.140, 198.63.211.251, 195.215.8.138
Connecting to download.skype.com|212.72.49.140|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7906384 (7.5M) [application/x-debian-package]
0% [ ] 22,482 52.9K/s
As you can see, there is no indication whether the file is written to
"skype_1.2.0.18-1_i386.deb", "skype_1.2.0.18-1_i386.deb.1" or
something else entirely.
it's a small bug in the current http code. the logprintf call that
prints the destination filename used LOG_VERBOSE instead of LOG_NOTQUIET.
however, i propose the switch to a new output format, consistent with
the new http implementation, that delays the choice of the filename
after the parsing of http response headers. this is the new output
format that i suggest:
[EMAIL PROTECTED]:~/code/svn/wget/src$ ./wget http://www.tortonesi.com
--13:20:41-- http://www.tortonesi.com/ (try:02)
Resolving www.tortonesi.com... 62.149.140.31
Connecting to www.tortonesi.com|62.149.140.31|:80... connected.
HTTP richiesta inviata, aspetto la risposta... 200 OK
Lunghezza: non specificato [text/html]
Storing resource in file: `index.html'
[ <=> ] 3.359 --.-K/s in 0s
13:20:42 (7,21 MB/s) - `index.html' saved [3359]
the two modifications are:
1) in case of a further download attempt the (try:##) string is appended
to the first line:
--13:20:41-- http://www.tortonesi.com/ (try:02)
the second line of output is always blank.
2) the destination filename is printed immediately before the progess
bar:
Storing resource in file: `index.html'
i will posted a patch implementing the new output format to wget-patches
in a few minutes. i will commit the patch into svn as soon as we reach
consensus about the new output format. let me know what you think about it.
--
Aequam memento rebus in arduis servare mentem...
Mauro Tortonesi http://www.tortonesi.com
University of Ferrara - Dept. of Eng. http://www.ing.unife.it
GNU Wget - HTTP/FTP file retrieval tool http://www.gnu.org/software/wget
Deep Space 6 - IPv6 for Linux http://www.deepspace6.net
Ferrara Linux User Group http://www.ferrara.linux.it