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 49e4399 commit bd075152879858aa3ea5dffd534cdb755c30028d @benoitc benoitc committed May 17, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 apps/couch_httpd/src/couch_httpd_vhost.erl
View
5 apps/couch_httpd/src/couch_httpd_vhost.erl
@@ -245,7 +245,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 bd07515

Please sign in to comment.