Last week, I started quite noisy in my Computer Networks class over the need for a mandatory Host offer in the HTTP 1.1 GET message header.
The reason I am provided, whether it is written on the Internet or screams to me by my classmates, is always the same: the need to support shared hosting . However, and I will try to be as clear as possible, this, apparently, does not make sense.
I understand that in order to allow two domains to be hosted on the same machine (and therefore share the same IP address), there must be a way to differentiate both domain names.
I don’t understand why it is impossible to achieve this without a Host (HTTP 1.0 style), using an absolute URL (e.g. GET http://www.example.org/index.html ) instead of a relative (e.g. GET /index.html ). When an HTTP message arrives at the server, it (the server) redirects the message to the appropriate host, not looking at the Host offer, but instead looking at the host name in the URL present in the message request line.
I would really appreciate it if one of you hardcore hackers could help me understand what exactly I am missing here.
João Silva
source share