Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 10295 invoked by uid 500); 26 Jun 2002 08:26:09 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 10282 invoked from network); 26 Jun 2002 08:26:09 -0000 From: "Sander Striker" To: Subject: RE: Handling invalid requests Date: Wed, 26 Jun 2002 10:35:19 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: 209.66.108.5 1.6.2 0/1000/N > From: Cliff Woolley [mailto:jwoolley@virginia.edu] > Sent: 26 June 2002 10:17 > 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. Whee! Thanks for the heads up Cliff. I hadn't come up with this line of reasoning yet (wasn't directly obvious to me). Sander