Last week I started quite a fuss in my Computer Networks class over the need for a mandatory
Host clause in the header of HTTP 1.1 GET messages.
The reason I'm provided with, be it written on the Web or shouted at me by my classmates, is always the same: the need to support virtual hosting. However, and I'll try to be as clear as possible, this does not appear to make sense.
I understand that in order to allow two domains to be hosted in a single machine (and by consequence, share the same IP address), there has to exist a way of differentiating both domain names.
What I don't understand is why it isn't possible to achieve this without a
Host clause (HTTP 1.0style) by using an absolute URL (e.g.
GET http://www.example.org/index.html) instead of a relative one (e.g.
GET /index.html). When the HTTP message got to the server, it (the server) would redirect the message to the appropriate host, not by looking at the
Host clause but, instead, by looking at the hostname in the URL present in the message's request line.
I would be very grateful if any of you hardcore hackers could help me understand what exactly am I missing here.