proxy in infinite loop on NT

darrell starnes writes:
 > I configured Jigsaw as a proxy. Now NT has an interesting feature. It 
 > supports a server alias sort of by default. For instance, my server is 
 > named darrell in the NT space. In the IP space it is named 
 > darrell.wins.compaq.com. You can PING darrell or darrell.wins.compaq.com. 
 > They both work. However, when Jigsaw initializes, the host name he gets is 
 > darrell.wins.compaq.com.

Well, this is not in fact due to NT, same is true on Unix :-)

 > Ok, now it gets interesting.....
 > I tell my browser to go to http://darrell.wins.compaq.com/ and everything 
 > works fine...
 > 
 > I tell my browser to go to http://darrell/  and....
 > 
 > Jigsaw interprets request as a proxy request and forwards packet to 
 > darrell.
 > Jigsaw receives this request and interprets request as a proxy request 
 > and...well you get the idea. Jigsaw loops until it fails with a null 
 > pointer exception in  AgentIn (I think the debugger crashed, cafe 1.51 you 
 > know).

That's "normal" the proxy tries to match the requested host with its
own host name, to check wether he should serve the request himself or
not. In your case, the server thinks he is "darrell.wins.compaq.com",
so when he sees "darrell" flying through, he forwards it.

One way of fixing this would be to use IP addresses, but then the
proxy would have to do DNS before serving all requests (bad).
The other way is to try to get the FQDN (the long one) of any host
name as it flies through, again requires DNS (bad)

Well, I guess that's why this problem hasn't been solved yet, if
someone has some ideas, let me know :-)

 > This is not a virtual host issue. Virtual hosts have different IP 
 > addresses. IP name aliases
 > are multiple names for the same IP address.
 > 
 > Questions:
 > 
 > 1)  I am not sure if HTTP spec. requires proxy to validate host names, 
 > check for validity,
 > etc.? Can someone clarify..maybe its in the URI spec.? 

No, in fact you want to avoid any DNS access at the proxy, since it
might be behind a firewall that doesn't have a full dns.

 > 2) Should Jigsaw Proxy also check the IP address and not just the name of 
 > the host?

For the reasons above, I don't think it's a good idea.

 > 3) Should Jigsaw Proxy try to get the default name of the host he is trying 
 > to contact?  

Same as 3), but I might be wrong

 > 4) I haven't tried it yet, but NT allows multiple NICs each with a 
 > different IP address and possibly
 > different domain names but same host name. How will Jigsaw react to this 
 > situation? How should it react?

Java (1.0.2) doesn't know about multiple IP addresses on the same
machine, so does Jigsaw...However Jigsaw supports HTTP/1.1 virtual
hosting (through the Host header)

Anselm.

Received on Monday, 16 December 1996 08:03:01 UTC