couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject git commit: vhosts values should not be empty.
Date Thu, 17 May 2012 09:08:09 GMT
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 <bchesneau@gmail.com>
Authored: Thu May 17 11:03:07 2012 +0200
Committer: benoitc <benoitc@apache.org>
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")),
 


Mime
View raw message