Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5E266CE41 for ; Thu, 17 May 2012 09:08:11 +0000 (UTC) Received: (qmail 23319 invoked by uid 500); 17 May 2012 09:08:11 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 23179 invoked by uid 500); 17 May 2012 09:08:10 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 23151 invoked by uid 99); 17 May 2012 09:08:10 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 09:08:10 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3CCAD16656; Thu, 17 May 2012 09:08:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: benoitc@apache.org To: commits@couchdb.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: vhosts values should not be empty. Message-Id: <20120517090809.3CCAD16656@tyr.zones.apache.org> Date: Thu, 17 May 2012 09:08:09 +0000 (UTC) Updated Branches: refs/heads/master 46d3ce1b1 -> 325cee6f4 vhosts values should not be empty. A vhost value can be empty when removed with the couch_config module. Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/325cee6f Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/325cee6f Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/325cee6f Branch: refs/heads/master Commit: 325cee6f48c9e1627a9ce9ac0cc90ce0d726bd6e Parents: 46d3ce1 Author: benoitc Authored: Thu May 17 11:03:07 2012 +0200 Committer: benoitc Committed: Thu May 17 11:06:30 2012 +0200 ---------------------------------------------------------------------- src/couchdb/couch_httpd_vhost.erl | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/325cee6f/src/couchdb/couch_httpd_vhost.erl ---------------------------------------------------------------------- diff --git a/src/couchdb/couch_httpd_vhost.erl b/src/couchdb/couch_httpd_vhost.erl index b63565b..59f05ce 100644 --- a/src/couchdb/couch_httpd_vhost.erl +++ b/src/couchdb/couch_httpd_vhost.erl @@ -244,7 +244,10 @@ bind_path(_, _) -> %% create vhost list from ini make_vhosts() -> - Vhosts = lists:foldl(fun({Vhost, Path}, Acc) -> + Vhosts = lists:foldl(fun + ({_, ""}, Acc) -> + Acc; + ({Vhost, Path}, Acc) -> [{parse_vhost(Vhost), split_path(Path)}|Acc] end, [], couch_config:get("vhosts")),