anchor.diff:  bind_port(Port, Port) -> ok;
   bind_port(_,_) -> fail.
   
  -% bind bhost
  +%% bind bhost
   bind_vhost([],[], Bindings) -> {ok, Bindings, []};
   bind_vhost([?MATCH_ALL], [], _Bindings) -> fail;
   bind_vhost([?MATCH_ALL], Rest, Bindings) -> {ok, Bindings, Rest};
  
positive.code:     bind_vhost(Rest, RestHost, Bindings);
  bind_vhost(_, _, _) -> fail.
  
  % utilities
  
  
  %% create vhost list from ini
  make_vhosts() ->
      lists:foldl(fun({Vhost, Path}, Acc) ->
          {H, P} = split_host_port(Vhost),
          H1 = make_spec(H, []),
          [{{H1,P}, split_path(Path)}|Acc]
      end, [], couch_config:get("vhosts")).
  
  
  split_host_port(HostAsString) ->
      case string:rchr(HostAsString, $:) of
  
negative.code:         Value -> Value
      end,
      {VHostParts, VhostPort} = split_host_port(VHost),
      FinalMochiReq = case try_bind_vhost(VHosts, lists:reverse(VHostParts),
              VhostPort, VPathParts) of
          no_vhost_matched -> MochiReq;
          {VhostTarget, NewPath} ->
              case vhost_global(VHostGlobals, MochiReq) of
                  true ->
                      MochiReq;
                  _Else ->
                      NewPath1 = mochiweb_util:urlunsplit_path({NewPath, Query,
                                            Fragment}),
                      MochiReq1 = mochiweb_request:new(MochiReq:get(socket),
                                        MochiReq:get(method),
                                        NewPath1,
                                        MochiReq:get(version),
                                        MochiReq:get(headers)),
                      Fun(MochiReq1, VhostTarget)
              end
      end,
      {reply, {ok, FinalMochiReq}, State}; 
          
  % update vhosts
  handle_call(vhosts_changed, _From, State) ->
  