incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH] [PATCH] Fix for DTACLOUD-18 : Missing Host header not handled
Date Tue, 27 Sep 2011 23:44:00 GMT
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
>  




Mime
View raw message