mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Hrvoje didn't regenerate the .info files after changing wget.texi.
Got rid of newly-introduced nested-if warnings in ftp.c and http.c. Fixed apparently completely untested code in main.c that was trying to provide --wait / --waitretry backwards compatibility, but had multiple fundamental bugs.
This commit is contained in:
parent
a04bf0f734
commit
d2e1d7fe9d
102
doc/wget.info
102
doc/wget.info
@ -26,8 +26,8 @@ notice identical to this one.
|
||||
|
||||
Indirect:
|
||||
wget.info-1: 961
|
||||
wget.info-2: 50395
|
||||
wget.info-3: 89018
|
||||
wget.info-2: 50388
|
||||
wget.info-3: 89138
|
||||
|
||||
Tag Table:
|
||||
(Indirect)
|
||||
@ -35,54 +35,54 @@ Node: Top961
|
||||
Node: Overview1850
|
||||
Node: Invoking5024
|
||||
Node: URL Format5833
|
||||
Node: Option Syntax8164
|
||||
Node: Basic Startup Options9588
|
||||
Node: Logging and Input File Options10288
|
||||
Node: Download Options12682
|
||||
Node: Directory Options18467
|
||||
Node: HTTP Options20945
|
||||
Node: FTP Options24541
|
||||
Node: Recursive Retrieval Options25734
|
||||
Node: Recursive Accept/Reject Options27623
|
||||
Node: Recursive Retrieval29706
|
||||
Node: Following Links32002
|
||||
Node: Relative Links33034
|
||||
Node: Host Checking33548
|
||||
Node: Domain Acceptance35581
|
||||
Node: All Hosts37251
|
||||
Node: Types of Files37678
|
||||
Node: Directory-Based Limits40128
|
||||
Node: FTP Links42768
|
||||
Node: Time-Stamping43638
|
||||
Node: Time-Stamping Usage45275
|
||||
Node: HTTP Time-Stamping Internals46844
|
||||
Node: FTP Time-Stamping Internals48314
|
||||
Node: Startup File49522
|
||||
Node: Wgetrc Location50395
|
||||
Node: Wgetrc Syntax51210
|
||||
Node: Wgetrc Commands51925
|
||||
Node: Sample Wgetrc58763
|
||||
Node: Examples63055
|
||||
Node: Simple Usage63662
|
||||
Node: Advanced Usage66056
|
||||
Node: Guru Usage68807
|
||||
Node: Various70469
|
||||
Node: Proxies70993
|
||||
Node: Distribution73758
|
||||
Node: Mailing List74108
|
||||
Node: Reporting Bugs74807
|
||||
Node: Portability76592
|
||||
Node: Signals77967
|
||||
Node: Appendices78621
|
||||
Node: Robots79036
|
||||
Node: Introduction to RES80183
|
||||
Node: RES Format82076
|
||||
Node: User-Agent Field83180
|
||||
Node: Disallow Field83944
|
||||
Node: Norobots Examples84555
|
||||
Node: Security Considerations85509
|
||||
Node: Contributors86505
|
||||
Node: Copying89018
|
||||
Node: Concept Index108181
|
||||
Node: Option Syntax8163
|
||||
Node: Basic Startup Options9587
|
||||
Node: Logging and Input File Options10287
|
||||
Node: Download Options12681
|
||||
Node: Directory Options18466
|
||||
Node: HTTP Options20944
|
||||
Node: FTP Options24540
|
||||
Node: Recursive Retrieval Options25733
|
||||
Node: Recursive Accept/Reject Options27622
|
||||
Node: Recursive Retrieval29705
|
||||
Node: Following Links32003
|
||||
Node: Relative Links33035
|
||||
Node: Host Checking33549
|
||||
Node: Domain Acceptance35574
|
||||
Node: All Hosts37244
|
||||
Node: Types of Files37671
|
||||
Node: Directory-Based Limits40121
|
||||
Node: FTP Links42761
|
||||
Node: Time-Stamping43631
|
||||
Node: Time-Stamping Usage45268
|
||||
Node: HTTP Time-Stamping Internals46837
|
||||
Node: FTP Time-Stamping Internals48307
|
||||
Node: Startup File49515
|
||||
Node: Wgetrc Location50388
|
||||
Node: Wgetrc Syntax51203
|
||||
Node: Wgetrc Commands51918
|
||||
Node: Sample Wgetrc58756
|
||||
Node: Examples63048
|
||||
Node: Simple Usage63655
|
||||
Node: Advanced Usage66049
|
||||
Node: Guru Usage68800
|
||||
Node: Various70462
|
||||
Node: Proxies70986
|
||||
Node: Distribution73751
|
||||
Node: Mailing List74102
|
||||
Node: Reporting Bugs74801
|
||||
Node: Portability76586
|
||||
Node: Signals77961
|
||||
Node: Appendices78615
|
||||
Node: Robots79030
|
||||
Node: Introduction to RES80177
|
||||
Node: RES Format82070
|
||||
Node: User-Agent Field83174
|
||||
Node: Disallow Field83938
|
||||
Node: Norobots Examples84549
|
||||
Node: Security Considerations85503
|
||||
Node: Contributors86499
|
||||
Node: Copying89138
|
||||
Node: Concept Index108301
|
||||
|
||||
End Tag Table
|
||||
|
@ -186,7 +186,7 @@ is an example:
|
||||
ftp://host/directory/file;type=a
|
||||
|
||||
Two alternative variants of URL specification are also supported,
|
||||
because of historical (hysterical?) reasons and their wide-spreadedness.
|
||||
because of historical (hysterical?) reasons and their widespreaded use.
|
||||
|
||||
FTP-only syntax (supported by `NcFTP'):
|
||||
host:/dir/file
|
||||
@ -811,7 +811,7 @@ through the network; all of this may hamper other users' work. The
|
||||
same stands for the foreign server you are mirroring--the more requests
|
||||
it gets in a rows, the greater is its load.
|
||||
|
||||
Careless retrieving can also fill your file system unctrollably,
|
||||
Careless retrieving can also fill your file system uncontrollably,
|
||||
which can grind the machine to a halt.
|
||||
|
||||
The load can be minimized by lowering the maximum recursion level
|
||||
@ -872,8 +872,7 @@ Host Checking
|
||||
The drawback of following the relative links solely is that humans
|
||||
often tend to mix them with absolute links to the very same host, and
|
||||
the very same page. In this mode (which is the default mode for
|
||||
following links) all URLs the that refer to the same host will be
|
||||
retrieved.
|
||||
following links) all URLs that refer to the same host will be retrieved.
|
||||
|
||||
The problem with this option are the aliases of the hosts and
|
||||
domains. Thus there is no way for Wget to know that `regoc.srce.hr' and
|
||||
@ -883,7 +882,7 @@ DNS-looked-up with `gethostbyname' to check whether we are maybe
|
||||
dealing with the same hosts. Although the results of `gethostbyname'
|
||||
are cached, it is still a great slowdown, e.g. when dealing with large
|
||||
indices of home pages on different hosts (because each of the hosts
|
||||
must be and DNS-resolved to see whether it just *might* an alias of the
|
||||
must be DNS-resolved to see whether it just *might* be an alias of the
|
||||
starting host).
|
||||
|
||||
To avoid the overhead you may use `-nh', which will turn off
|
||||
@ -891,15 +890,15 @@ DNS-resolving and make Wget compare hosts literally. This will make
|
||||
things run much faster, but also much less reliable (e.g. `www.srce.hr'
|
||||
and `regoc.srce.hr' will be flagged as different hosts).
|
||||
|
||||
Note that modern HTTP servers allows one IP address to host several
|
||||
"virtual servers", each having its own directory hieratchy. Such
|
||||
Note that modern HTTP servers allow one IP address to host several
|
||||
"virtual servers", each having its own directory hierarchy. Such
|
||||
"servers" are distinguished by their hostnames (all of which point to
|
||||
the same IP address); for this to work, a client must send a `Host'
|
||||
header, which is what Wget does. However, in that case Wget *must not*
|
||||
try to divine a host's "real" address, nor try to use the same hostname
|
||||
for each access, i.e. `-nh' must be turned on.
|
||||
|
||||
In other words, the `-nh' option must be used to enabling the
|
||||
In other words, the `-nh' option must be used to enable the
|
||||
retrieval from virtual servers distinguished by their hostnames. As the
|
||||
number of such server setups grow, the behavior of `-nh' may become the
|
||||
default in the future.
|
||||
@ -963,8 +962,8 @@ Types of Files
|
||||
|
||||
When downloading material from the web, you will often want to
|
||||
restrict the retrieval to only certain file types. For example, if you
|
||||
are interested in downloading GIFS, you will not be overjoyed to get
|
||||
loads of Postscript documents, and vice versa.
|
||||
are interested in downloading GIFs, you will not be overjoyed to get
|
||||
loads of PostScript documents, and vice versa.
|
||||
|
||||
Wget offers two options to deal with this problem. Each option
|
||||
description lists a short name, a long name, and the equivalent command
|
||||
@ -1005,7 +1004,7 @@ in `.wgetrc'.
|
||||
The `-A' and `-R' options may be combined to achieve even better
|
||||
fine-tuning of which files to retrieve. E.g. `wget -A "*zelazny*" -R
|
||||
.ps' will download all the files having `zelazny' as a part of their
|
||||
name, but *not* the postscript files.
|
||||
name, but *not* the PostScript files.
|
||||
|
||||
Note that these two options do not affect the downloading of HTML
|
||||
files; Wget must load all the HTMLs to know where to go at
|
||||
@ -1059,7 +1058,7 @@ equivalent command in `.wgetrc'.
|
||||
`no_parent = on'
|
||||
The simplest, and often very useful way of limiting directories is
|
||||
disallowing retrieval of the links that refer to the hierarchy
|
||||
"upper" than the beginning directory, i.e. disallowing ascent to
|
||||
"above" than the beginning directory, i.e. disallowing ascent to
|
||||
the parent directory/directories.
|
||||
|
||||
The `--no-parent' option (short `-np') is useful in this case.
|
||||
|
@ -710,7 +710,7 @@ Distribution
|
||||
Like all GNU utilities, the latest version of Wget can be found at
|
||||
the master GNU archive site prep.ai.mit.edu, and its mirrors. For
|
||||
example, Wget 1.5.3+dev can be found at
|
||||
`ftp://prep.ai.mit.edu/pub/gnu/wget-1.5.3+dev.tar.gz'
|
||||
`ftp://prep.ai.mit.edu/gnu/wget/wget-1.5.3+dev.tar.gz'
|
||||
|
||||
|
||||
File: wget.info, Node: Mailing List, Next: Reporting Bugs, Prev: Distribution, Up: Various
|
||||
@ -860,7 +860,7 @@ robots `META' tag.
|
||||
|
||||
The description of the norobots standard was written, and is
|
||||
maintained by Martijn Koster <m.koster@webcrawler.com>. With his
|
||||
permission, I contribute a (slightly modified) texified version of the
|
||||
permission, I contribute a (slightly modified) TeXified version of the
|
||||
RES.
|
||||
|
||||
* Menu:
|
||||
@ -928,7 +928,7 @@ contains lines of the form:
|
||||
|
||||
The field name is case insensitive.
|
||||
|
||||
Comments can be included in file using UNIX bourne shell conventions:
|
||||
Comments can be included in file using UNIX Bourne shell conventions:
|
||||
the `#' character is used to indicate that preceding space (if any) and
|
||||
the remainder of the line up to the line termination is discarded.
|
||||
Lines containing only a comment are discarded completely, and therefore
|
||||
@ -1065,7 +1065,7 @@ patches, or letters saying "Thanks!".
|
||||
|
||||
* Darko Budor--initial port to Windows.
|
||||
|
||||
* Antonio Rosella--help and suggestions, plust the Italian
|
||||
* Antonio Rosella--help and suggestions, plus the Italian
|
||||
translation.
|
||||
|
||||
* Tomislav Petrovic, Mario Mikocevic--many bug reports and
|
||||
@ -1086,19 +1086,21 @@ suggestions, beta testing services, fan mail and all the other things
|
||||
that make maintenance so much fun:
|
||||
|
||||
Tim Adam, Martin Baehr, Dieter Baron, Roger Beeman and the Gurus at
|
||||
Cisco, Mark Boyns, John Burden, Wanderlei Cavassin, Gilles Cedoc, Tim
|
||||
Charron, Noel Cragg, Kristijan Conkas, Damir Dzeko, Andrew Davison,
|
||||
Ulrich Drepper, Marc Duponcheel, Aleksandar Erkalovic, Andy Eskilsson,
|
||||
Masashi Fujita, Howard Gayle, Marcel Gerrits, Hans Grobler, Mathieu
|
||||
Guillaume, Karl Heuer, Gregor Hoffleit, Erik Magnus Hulthen, Richard
|
||||
Huveneers, Simon Josefsson, Mario Juric, Goran Kezunovic, Robert Kleine,
|
||||
Fila Kolodny, Alexander Kourakos, Martin Kraemer, Simos KSenitellis,
|
||||
Tage Stabell-Kulo, Hrvoje Lacko, Dave Love, Jordan Mendelson, Lin Zhe
|
||||
Min, Charlie Negyesi, Andrew Pollock, Steve Pothier, Marin Purgar, Jan
|
||||
Prikryl, Keith Refson, Tobias Ringstrom, Juan Jose Rodrigues, Heinz
|
||||
Salzmann, Robert Schmidt, Toomas Soome, Sven Sternberger, Markus
|
||||
Strasser, Szakacsits Szabolcs, Mike Thomas, Russell Vincent, Douglas E.
|
||||
Wegscheid, Jasmin Zainul, Bojan Zdrnja, Kristijan Zimmer.
|
||||
Cisco, Dan Berger, Mark Boyns, John Burden, Wanderlei Cavassin, Gilles
|
||||
Cedoc, Tim Charron, Noel Cragg, Kristijan Conkas, Andrew Deryabin,
|
||||
Damir Dzeko, Andrew Davison, Ulrich Drepper, Marc Duponcheel,
|
||||
Aleksandar Erkalovic, Andy Eskilsson, Masashi Fujita, Howard Gayle,
|
||||
Marcel Gerrits, Hans Grobler, Mathieu Guillaume, Dan Harkless, Heiko
|
||||
Herold, Karl Heuer, HIROSE Masaaki, Gregor Hoffleit, Erik Magnus
|
||||
Hulthen, Richard Huveneers, Simon Josefsson, Mario Juric, Goran
|
||||
Kezunovic, Robert Kleine, Fila Kolodny, Alexander Kourakos, Martin
|
||||
Kraemer, Simos KSenitellis, Hrvoje Lacko, Daniel S. Lewart, Dave Love,
|
||||
Jordan Mendelson, Lin Zhe Min, Charlie Negyesi, Andrew Pollock, Steve
|
||||
Pothier, Jan Prikryl, Marin Purgar, Keith Refson, Tobias Ringstrom,
|
||||
Juan Jose Rodrigues, Edward J. Sabol, Heinz Salzmann, Robert Schmidt,
|
||||
Toomas Soome, Tage Stabell-Kulo, Sven Sternberger, Markus Strasser,
|
||||
Szakacsits Szabolcs, Mike Thomas, Russell Vincent, Charles G Waldman,
|
||||
Douglas E. Wegscheid, Jasmin Zainul, Bojan Zdrnja, Kristijan Zimmer.
|
||||
|
||||
Apologies to all who I accidentally left out, and many thanks to all
|
||||
the subscribers of the Wget mailing list.
|
||||
|
@ -1,3 +1,16 @@
|
||||
2000-03-02 Dan Harkless <dan-wget@dilvish.speed.net>
|
||||
|
||||
* ftp.c (ftp_loop_internal): Heiko introduced "suggest explicit
|
||||
braces to avoid ambiguous `else'" warnings. Eliminated them.
|
||||
|
||||
* http.c (http_loop): Heiko introduced "suggest explicit
|
||||
braces to avoid ambiguous `else'" warnings. Eliminated them.
|
||||
|
||||
* main.c: Heiko's --wait / --waitretry backwards compatibility
|
||||
code looks to have been totally untested -- automatic variable
|
||||
'wr' was used without being initialized, and a long int was passed
|
||||
into setval()'s char* val parameter.
|
||||
|
||||
1999-08-25 Heiko Herold <Heiko.Herold@previnet.it>
|
||||
|
||||
* ftp.c: Respect new option waitretry.
|
||||
|
16
src/ftp.c
16
src/ftp.c
@ -855,13 +855,17 @@ ftp_loop_internal (struct urlinfo *u, struct fileinfo *f, ccon *con)
|
||||
retrieval).
|
||||
Check if we are retrying or not, wait accordingly - HEH */
|
||||
if (!first_retrieval && (opt.wait || (count && opt.waitretry)))
|
||||
if (count)
|
||||
if (count<opt.waitretry)
|
||||
sleep(count);
|
||||
{
|
||||
if (count)
|
||||
{
|
||||
if (count<opt.waitretry)
|
||||
sleep(count);
|
||||
else
|
||||
sleep(opt.waitretry);
|
||||
}
|
||||
else
|
||||
sleep(opt.waitretry);
|
||||
else
|
||||
sleep (opt.wait);
|
||||
sleep (opt.wait);
|
||||
}
|
||||
if (first_retrieval)
|
||||
first_retrieval = 0;
|
||||
if (con->st & ON_YOUR_OWN)
|
||||
|
16
src/http.c
16
src/http.c
@ -961,13 +961,17 @@ File `%s' already there, will not retrieve.\n"), u->local);
|
||||
retrieval).
|
||||
Check if we are retrying or not, wait accordingly - HEH */
|
||||
if (!first_retrieval && (opt.wait || (count && opt.waitretry)))
|
||||
if (count)
|
||||
if (count<opt.waitretry)
|
||||
sleep(count);
|
||||
{
|
||||
if (count)
|
||||
{
|
||||
if (count<opt.waitretry)
|
||||
sleep(count);
|
||||
else
|
||||
sleep(opt.waitretry);
|
||||
}
|
||||
else
|
||||
sleep(opt.waitretry);
|
||||
else
|
||||
sleep (opt.wait);
|
||||
sleep (opt.wait);
|
||||
}
|
||||
if (first_retrieval)
|
||||
first_retrieval = 0;
|
||||
/* Get the current time string. */
|
||||
|
@ -198,7 +198,7 @@ main (int argc, char *const *argv)
|
||||
{
|
||||
char **url, **t;
|
||||
int i, c, nurl, status, append_to_log;
|
||||
int wr;
|
||||
int wr = 0;
|
||||
|
||||
static struct option long_options[] =
|
||||
{
|
||||
@ -586,7 +586,12 @@ GNU General Public License for more details.\n"));
|
||||
A simple check on the values is not enough, I could have set
|
||||
wait to n>0 and waitretry to 0 - HEH */
|
||||
if (opt.wait && !wr)
|
||||
setval ("waitretry", opt.wait);
|
||||
{
|
||||
char opt_wait_str[256]; /* bigger than needed buf to prevent overflow */
|
||||
|
||||
sprintf(opt_wait_str, "%ld", opt.wait);
|
||||
setval ("waitretry", opt_wait_str);
|
||||
}
|
||||
|
||||
/* Sanity checks. */
|
||||
if (opt.verbose && opt.quiet)
|
||||
|
Loading…
Reference in New Issue
Block a user