Re: feature request: --second-guess-the-dns

2003-11-18 Thread Tony Lewis
Hrvoje Niksic wrote:

> Have you seen the rest of the discussion?  Would it do for you if Wget
> correctly handled something like:
> 
> wget --header='Host: jidanni.org' http://216.46.192.85/

I think that is an elegant solution.

Tony


Re: feature request: --second-guess-the-dns

2003-11-17 Thread Dan Jacobson
H> It's not very hard to fix `--header' to replace Wget-generated
H> values.

H> Is there consensus that this is a good replacement for
H> `--connect-address'?

I don't want to tamper with headers.
I want to be able to do experiments leaving all variables alone except
for IP address.  Thus --connect-address is still needed.


Re: feature request: --second-guess-the-dns

2003-11-17 Thread Hrvoje Niksic
Dan Jacobson <[EMAIL PROTECTED]> writes:

> I sure hope that when one sees
>   Connecting to jidanni.org[216.46.192.85]:80... connected.
> that there is no interference along the way, that that IP is really
> where we are going, to wget's best ability.

I can guarantee that much -- the entire point of printing the IP
address is for knowledgable people to be able to tell where the hell
they're *really* connecting.

> By the way, /etc/hosts affects other users on the system, and other
> jobs than the current one; and one might be using various caching
> DNSs, etc. Just one more justification for this wishlist
> item. --connect-address sounds ok... whatever.

Have you seen the rest of the discussion?  Would it do for you if Wget
correctly handled something like:

wget --header='Host: jidanni.org' http://216.46.192.85/

(I'm trying to avoid new command-line options except where absolutely
necessary.  Wget has a *lot* of them already.)



Re: feature request: --second-guess-the-dns

2003-11-17 Thread Dan Jacobson
> "P" == Post, Mark K <[EMAIL PROTECTED]> writes:

P> You can do this now:
P> wget http://216.46.192.85/

P> Using DNS is just a convenience after all, not a requirement.

but then one doesn't get the HTTP Host field set to what he wants.


Re: feature request: --second-guess-the-dns

2003-11-17 Thread Dan Jacobson
By the way, I did edit /etc/hosts to do one experiment
http://groups.google.com/groups?threadm=vrf7007pbg2136%40corp.supernews.com
i.e. <[EMAIL PROTECTED]>
to test an IP/name combination, without waiting for DNS's to update.
Good thing I was root so I could do it.

I sure hope that when one sees
  Connecting to jidanni.org[216.46.192.85]:80... connected.
that there is no interference along the way, that that IP is really
where we are going, to wget's best ability.

By the way, /etc/hosts affects other users on the system, and other
jobs than the current one; and one might be using various caching
DNSs, etc. Just one more justification for this wishlist
item. --connect-address sounds ok... whatever.


Re: feature request: --second-guess-the-dns

2003-11-17 Thread Hrvoje Niksic
"Maciej W. Rozycki" <[EMAIL PROTECTED]> writes:

> Hmm, couldn't --header "Host: " work?  I think it could,
> but now wget appends it instead of replacing its own generated
> one...

It's not very hard to fix `--header' to replace Wget-generated
values.

Is there consensus that this is a good replacement for
`--connect-address'?



Re: feature request: --second-guess-the-dns

2003-11-17 Thread Maciej W. Rozycki
On Sun, 16 Nov 2003, Hrvoje Niksic wrote:

> > You can do this now:
> >
> > wget http://216.46.192.85/
> >
> > Using DNS is just a convenience after all, not a requirement.
> 
> Unfortunately, widespread use of name-based virtual hosting made it a
> requirement in practice.  ISP's typically host a bunch of web sites on
> the same interface, and http://DOTTED-DECIMAL-ADDR will get you a
> default page, if even that.

 Hmm, couldn't --header "Host: " work?  I think it could, but 
now wget appends it instead of replacing its own generated one...

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--+
+e-mail: [EMAIL PROTECTED], PGP key available+


Re: feature request: --second-guess-the-dns

2003-11-17 Thread Daniel Stenberg
On Mon, 17 Nov 2003, Hrvoje Niksic wrote:

> Come to think of it, I've had need for this before; the switch makes at
> least as much sense as `--bind-address', which I've never needed myself.
>
> Maybe `--connect-address' would be a good name for the option?  It would
> nicely parallel `--bind-address'.
>
> Are there any takers to implement it?

In curl land we offer this functionality in a more implicit way, by allowing
the user to override any tool-generated header from the command line. It might
not be as easily accessible as this proposed option, but it offers even more
power.

In the case where you want to connect to 1.2.3.4, asking for the host abc.com
you would use 'curl -H "Host: abc.com" http://1.2.3.4'. This of course also
lets you fool around with port numbers like 'curl -H "Host: abc.com:8080"
http://1.2.3.4:2003'

I don't claim this is a better way, I'm only providing food for thought here.

-- 
 -=- Daniel Stenberg -=- http://daniel.haxx.se -=-
  ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol


Re: feature request: --second-guess-the-dns

2003-11-17 Thread Hrvoje Niksic
Herold Heiko <[EMAIL PROTECTED]> writes:

>> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]
>
>> Maybe `--connect-address' would be a good name for the option?  It
>> would nicely parallel `--bind-address'.
>
> I was wondering if it should be possibile to pass more than one name
> to address change (for recursive behaviour with absolute links).
> This would mean we need to associate names and address, and either a
> syntax which can specify multiple name/address couples or multiple
> invocations - e.g.
>
> wget
> --connect-address=site.dot.com:1.2.3.4,site2.dot.com:5.6.7.8,www.internal.si
> te:10.1.2.3

In my opinion, that's going too far.  If you need that kind of stuff,
edit /etc/hosts or the equivalent.  I really don't think that such
level of elaboration is appropriate for a fairly rarely needed
feature.  Besides, imagine every single network application
implementing its own "alternative" resolver.

If I implement --connect-address, it will be in the form of
`--connect-address=HOST[:PORT]', meaning that all network connections
performed by Wget connect to HOST[:PORT] instead of to the hosts and
ports specified by URLs.  I believe that handles Dan's case and those
encountered by me, and nicely parallels `--bind-address', which will
also be extended to allow port.


RE: feature request: --second-guess-the-dns

2003-11-17 Thread Herold Heiko
> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]

> Maybe `--connect-address' would be a good name for the option?  It
> would nicely parallel `--bind-address'.

I was wondering if it should be possibile to pass more than one name to
address change (for recursive behaviour with absolute links). 
This would mean we need to associate names and address, and either a syntax
which can specify multiple name/address couples or multiple invocations -
e.g.

wget
--connect-address=site.dot.com:1.2.3.4,site2.dot.com:5.6.7.8,www.internal.si
te:10.1.2.3

or

wget --connect-address site.dot.com:1.2.3.4 \
 --connect-address site2.dot.com:5.6.7.8 \
 --connect-address www.internal.site:10.1.2.3 \
 http://www.internal.site

Also, what should the rule be in case of failure ? Should these be mandatory
or only a first-try, followed by normal resolution in case of failure ? I'd
say mandatory, don't use dns at all for these. Or have a different syntax
for "dns after failure".

> Are there any takers to implement it?

Not me :)

Heiko

-- 
-- PREVINET S.p.A. www.previnet.it
-- Heiko Herold [EMAIL PROTECTED]
-- +39-041-5907073 ph
-- +39-041-5907472 fax


Re: feature request: --second-guess-the-dns

2003-11-17 Thread Hrvoje Niksic
Come to think of it, I've had need for this before; the switch makes
at least as much sense as `--bind-address', which I've never needed
myself.

Maybe `--connect-address' would be a good name for the option?  It
would nicely parallel `--bind-address'.

Are there any takers to implement it?


RE: feature request: --second-guess-the-dns

2003-11-17 Thread Herold Heiko
> From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]

> Dan Jacobson <[EMAIL PROTECTED]> writes:
> 
> > But I want a
> >--second-guess-the-dns=ADDRESS
> 
> Aside from `--second-guess-the-dns' being an awful name (sorry), what
> is the usage scenario for this kind of option?  I.e. why would anyone
> want to use it?

Just yesterday I did something similar (by changing local /etc/hosts) in
order to directly test different web servers behind a farming device.
Multiple servers behind a round robin dns or similar stuff could be another
possible scenario where this would be useful. Not your daily usage though.
Heiko

-- 
-- PREVINET S.p.A. www.previnet.it
-- Heiko Herold [EMAIL PROTECTED]
-- +39-041-5907073 ph
-- +39-041-5907472 fax


Re: feature request: --second-guess-the-dns

2003-11-16 Thread Hrvoje Niksic
"Post, Mark K" <[EMAIL PROTECTED]> writes:

> You can do this now:
>
> wget http://216.46.192.85/
>
> Using DNS is just a convenience after all, not a requirement.

Unfortunately, widespread use of name-based virtual hosting made it a
requirement in practice.  ISP's typically host a bunch of web sites on
the same interface, and http://DOTTED-DECIMAL-ADDR will get you a
default page, if even that.



Re: feature request: --second-guess-the-dns

2003-11-16 Thread Hrvoje Niksic
Dan Jacobson <[EMAIL PROTECTED]> writes:

> But I want a
>--second-guess-the-dns=ADDRESS

Aside from `--second-guess-the-dns' being an awful name (sorry), what
is the usage scenario for this kind of option?  I.e. why would anyone
want to use it?

> Perhaps the user should do all this in the name server or something,
> but lets say he isn't root, and doesn't want to use netcat
> etc. either.

The simplest way is to edit /etc/hosts, but you do have to be root for
that.

Also, `wget http://DOTTED-DECIMAL' works as long as name-based virtual
hosting is not in use.



RE: feature request: --second-guess-the-dns

2003-11-15 Thread Post, Mark K
You can do this now:

wget http://216.46.192.85/

Using DNS is just a convenience after all, not a requirement.


Mark Post

-Original Message-
From: Dan Jacobson [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 15, 2003 4:00 PM
To: [EMAIL PROTECTED]
Subject: feature request: --second-guess-the-dns


I see there is
   --bind-address=ADDRESS
   When making client TCP/IP connections, "bind()" to ADDRESS on the
local machine.
   ADDRESS may be specified as a hostname or IP address.  This
option can be useful
   if your machine is bound to multiple IPs.

But I want a
   --second-guess-the-dns=ADDRESS
so I can
$ wget http://jidanni.org/
Resolving jidanni.org... done.
Connecting to jidanni.org[216.46.203.182]:80... connected.
HTTP request sent, awaiting response... 503 Service Unavailable
$ wget --second-guess-the-dns=216.46.192.85 http://jidanni.org/
Connecting to jidanni.org[216.46.192.85]:80... connected...

Even allow different port numbers there, even though we can add them
after the url already:

$ wget --second-guess-the-dns=216.46.192.85:66 http://jidanni.org:888/
or whatever. Also pick a better name than --second-guess-the-dns --
which is just a first guess for a name.

Perhaps the user should do all this in the name server or something,
but lets say he isn't root, and doesn't want to use netcat etc. either.