[10059] in www-talk@info.cern.ch

home help back first fref pref prev next nref lref last post

Re: Getting the domain from a request under HTTP/1.0

daemon@ATHENA.MIT.EDU (Martin Hamilton)
Thu Jun 13 10:11:14 1996

To: matt@wdi.co.uk
Cc: www-talk@w3.org
In-Reply-To: Your message of "Thu, 13 Jun 1996 07:14:01 BST."
             <31BFB1A9.663D@wdi.co.uk> 
Date: Thu, 13 Jun 1996 15:04:56 +0100
From: Martin Hamilton <martin@mrrl.lut.ac.uk>
Resent-From: www-talk@w3.org

Matthew Denner writes:

| Simple enough, however, some people have put out their URL as
| 'http://www.xxx.co.uk/' without the directory name.  My question is 
| this: under HTTP/1.1 the client should send through the entire URI
| in it's header (GET http://www.westwind.co.uk/ HTTP/1.1) or include 
| the 'Host:' field.  However, HTTP/1.0 is not as clever and, as I have
| noticed, clients don't send through the address.  So, how can I get
| it from an HTTP/1.0 request?

Your best bet for this sort of thing is probably to bring up multiple 
interfaces on the machine (if you want/have to use just one machine) 
using virtual interfaces, aka IP address aliasing, if your operating 
system supports it.  Off the top of my head, Linux (recent kernel 
versions only?), SunOS (with the vif loadable module), and Solaris do, 
and recent *BSDs too, but your mileage will vary on any others.

You can either run a separate server bound to each IP address, or have 
a smart server which knows about the multiple (virtual) interfaces and 
routes requests accordingly - like Apache does, for instance.

Hope that helps!

Martin




home help back first fref pref prev next nref lref last post