Herold Heiko <[EMAIL PROTECTED]> writes: >> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED] > >> > This is a binary compiled and run on windows nt 4, which >> doesn't support >> > IPV6, so the -4 should probably be a no-op ? >> >> Or not work at all. > > I was thinking (rather late, I see you have changed other IPV6 stuff in the > meantime),
Not late at all, this stuff is still very much in flux, and Mauro might still come and change it again. (He was to implement -4 and -6, but he was very busy with other things so I went ahead and provided a reference implementation which he's free to ignore.) > why cut the -4 switch if no IPV6 is present ? The principle of least > surprise would say leave the switch there in order to avoid a > "unknown switch" error. > > Suppose you have a bunch of machines, some with, some without IPV6 > support. You always want to enforce IPV4 usage. With a -4 switch > always supported a simple wget -4 would do the trick in any script > used on all those machines. Without that you'd need to have some > mean to detect the IPV6 support and change the wget switches used > accordingly. > > Same thing for -6 in fact - leave the switch even if no IPV6 is > present and supported, die with a meaningful error message (much > better than a "unknown switch" failure). In principle, I agree with this. `-4' should be a no-op on an IPv6-challenged Wget. Note that, in the current code, it's not so easy to just "disable" a switch or a `.wgetrc' command, but it's doable. If someone wants to work on this, please do.