Permalink
Browse files

vhosts values should not be empty.

A vhost value can be empty when removed with the couch_config module.
  • Loading branch information...
1 parent 46d3ce1 commit 325cee6f48c9e1627a9ce9ac0cc90ce0d726bd6e @benoitc benoitc committed with benoitc May 17, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 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")),

0 comments on commit 325cee6

Please sign in to comment.