httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: Handling invalid requests
Date Wed, 26 Jun 2002 08:16:47 GMT
On Wed, 26 Jun 2002, Aaron Bannert wrote:

> On Wed, Jun 26, 2002 at 09:51:51AM +0200, Sander Striker wrote:
> > 62.211.25.97 - - [26/Jun/2002:04:55:35 +0200] "GET http://www.yahoo.com/ HTTP/1.1"
200 1456
> >                                                                                
   ^^^
> > I went: "uh, why isn't that 4xx??".
> > I tried it myself and it seems that we are returning the contents of / (which
> > is the default page installed by apache in my case) instead of failing.  This
> > is with HEAD.
>
> Sounds like a bug in the request-line parser. Until this gets fixed,
> maybe it is something to add to STATUS?

That is the correct behavior!!!  According to the RFC, we have to support
fully-qualified URL's in the request (eg "http://www.yahoo.com/" here).
So Apache sees that request, notices that it doesn't have a matching
virtual host, reverts to the default host, and serves up the URI "/",
which exists.  200 is correct.  Now if you asked for
"http://dir.yahoo.com/Computers_and_Internet/" or something, then unless
"/Computers_and_Internet/" happens to be valid in the namespace of your
default vhost, you'll get the typical 404.

All of this is completely normal.

--Cliff


Mime
View raw message