X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fmain.c;h=c895c4eeb4e5de19dd13e4409dfc8d53245a9281;hb=c9c0e4c6418350d913638d73e0a50bebdb5fd983;hp=2b42d2d7235eda6c1d7295b974423a6bb13c1084;hpb=54fd8de415cd31e015cf3a391818d3c83fce21c6;p=wget diff --git a/src/main.c b/src/main.c index 2b42d2d7..c895c4ee 100644 --- a/src/main.c +++ b/src/main.c @@ -1397,6 +1397,13 @@ for details.\n\n")); } } + /* Set various options as required for opt.method. */ + + /* When user specifies HEAD as the method, we do not wish to download any + files. Hence, set wget to run in spider mode. */ + if (opt.method && strcasecmp (opt.method, "HEAD") == 0) + setoptval ("spider", "1", "spider"); + /* Convert post_data to body-data and post_file_name to body-file options. This is required so as to remove redundant code later on in gethttp(). The --post-data and --post-file options may also be removed in