[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] support for HTTP 1.0?



On Thu, 13 Sep 2001, Jeff Meininger wrote:

> 
> I'm not 100% up to speed on how linux/apache/cobalt provides virtual site
> features (that is, how 1 Raq can behave as multiple servers based on the
> hostname to which you try connecting).
> 
> If I enter a HTTP 1.0 request by telnetting to port 80 of a Raq4-served
> virtual site www.mydomain.com and typing "GET / HTTP/1.0", I get a
> HTTP/1.1 302 Found response redirecting me to
> http://actual-hostname-of-raq.isp.com/ complete with text saying:
> The document has moved <A
> HREF="http://actual-hostname-of-raq.isp.com/";>here</A>.<P>
> 
> Does raq4 rely on the hostname provided in the HTTP request?  If so, I'm
> confused because if I perform the same test (telnet to port 80, issue
> simple HTTP 1.0 request for /) on a different (generic, non-cobalt) linux
> machine (www.my-other-virtual-site.com) running apache, I get the actual
> index.html I'd expect to get.
> 
> How can I configure a Raq to respond properly to HTTP 1.0 requests for
> virtual sites?

You are seeing this behaviour due to the rewrite rules added by cobalt,
it's basiclly to make the user URL cleaner, but you could turn it off if
you really wanted to, you would be limited to ONE DOMAIN name per IP
address tho, HTTP 1.0 doesn't , in theory support virtual hosting. I say
in theory because many browsers do in fact add the necessary http 1.1
information even when speaking 1.0, so the other question is, why do you
really WANT to disable this feature?

Keep in mind, one of the prices you will pay is that 1.0 doesn't do
persistant connections, this means every element in a web page opens and
closes a new server connection, the overhead for this is significant...

(Disabling the redirect means all requests that have only IP numbers, or
mismatched hostnames MUST be handled via an Actual 1.0 session, hostnames
are manditory for 1.1 protocol support.....adding them with the redirect
means the client/server will manage to establish an http 1.1 session if it
is at all possible...

ps: I have seen the 'redirect to name' configuration  on other
(non-cobalt) servers here and there...

Short example of hybrid 1.0 request with 1.1 Host btw:

Connected to www.apache.org.
Escape character is '^]'.
GET / HTTP/1.0
Host: www.spache.org

HTTP/1.1 200 OK
[note that the server replies 1.1 even tho you made a 1.0 request because
it recognizes the hack ;)]

The way you can tell the difference is that the server will still close
the connection from the server end (ala 1.0) , if it was really a fully
negotiated 1.1 session, the connection wouldn't have closed, letting the
client send additional requests....

gsh