Return-Path: X-Original-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9DB309084 for ; Tue, 27 Sep 2011 23:44:30 +0000 (UTC) Received: (qmail 75284 invoked by uid 500); 27 Sep 2011 23:44:30 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 75269 invoked by uid 500); 27 Sep 2011 23:44:30 -0000 Mailing-List: contact deltacloud-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-dev@incubator.apache.org Received: (qmail 75255 invoked by uid 99); 27 Sep 2011 23:44:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Sep 2011 23:44:30 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lutter@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Sep 2011 23:44:23 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8RNi0NS015487 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Sep 2011 19:44:00 -0400 Received: from [10.3.113.160] (ovpn-113-160.phx2.redhat.com [10.3.113.160]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p8RNi0bZ004403; Tue, 27 Sep 2011 19:44:00 -0400 Subject: Re: [PATCH] [PATCH] Fix for DTACLOUD-18 : Missing Host header not handled From: David Lutterkort To: deltacloud-dev@incubator.apache.org Cc: Davanum Srinivas Date: Tue, 27 Sep 2011 16:44:00 -0700 In-Reply-To: <1317044288-30855-1-git-send-email-dims@apache.org> References: <32209D7D-FE81-4882-B869-52849E61E3EC@mifo.sk> <1317044288-30855-1-git-send-email-dims@apache.org> Organization: Red Hat Inc Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit Message-ID: <1317167040.6215.75.camel@avon.watzmann.net> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Virus-Checked: Checked by ClamAV on apache.org ACK. Committed. Since I committed your other patch first, had to do this by hand, too. Sorry about the confusion. David On Mon, 2011-09-26 at 09:38 -0400, Davanum Srinivas wrote: > --- > server/server.rb | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/server/server.rb b/server/server.rb > index 072e888..9d9035c 100644 > --- a/server/server.rb > +++ b/server/server.rb > @@ -77,6 +77,11 @@ error do > report_error > end > > +before do > + # Respond with 400, If we don't get a http Host header, > + halt 400, "Unable to find HTTP Host header" if @env['HTTP_HOST'] == nil > +end > + > # Redirect to /api > get '/' do redirect root_url, 301; end >