anchor.diff:          UrlHandlers, DbUrlHandlers, DesignUrlHandlers).
   
   handle_request(MochiReq, DefaultFun,
  -    UrlHandlers, DbUrlHandlers, DesignUrlHandlers, VirtualHosts) ->
  +    UrlHandlers, DbUrlHandlers, DesignUrlHandlers, VirtualHosts, VhostGlobals) ->
   
       % grab Host from Req
       Vhost = MochiReq:get_header_value("Host"),
   
       % find Vhost in config
       case couch_util:get_value(Vhost, VirtualHosts) of
  -        undefined -> % business as usual
  +    undefined -> % business as usual
  +        handle_request_int(MochiReq, DefaultFun,
  +            UrlHandlers, DbUrlHandlers, DesignUrlHandlers);
  +    VhostTarget ->
  +        case vhost_global(VhostGlobals, MochiReq) of
  +        true ->% global handler for vhosts
               handle_request_int(MochiReq, DefaultFun,
  -                    UrlHandlers, DbUrlHandlers, DesignUrlHandlers);
  -        VhostTarget ->
  +                UrlHandlers, DbUrlHandlers, DesignUrlHandlers);
  +        _Else ->
  +            % do rewrite
               redirect_to_vhost(MochiReq, DefaultFun,
                   UrlHandlers, DbUrlHandlers, DesignUrlHandlers, VhostTarget)
  +        end
       end.
   
   
  
positive.code: -module(couch_httpd).
  -include("couch_db.hrl").
  
  -export([start_link/0, stop/0, handle_request/6]).
  
  -export([header_value/2,header_value/3,qs_value/2,qs_value/3,qs/1,path/1,absolute_uri/2,body_length/1]).
  -export([verify_is_server_admin/1,unquote/1,quote/1,recv/2,recv_chunked/4,error_info/1]).
  
negative.code:     Loop = fun(Req)->
          apply(?MODULE, handle_request, [
              Req, DefaultFun, UrlHandlers, DbUrlHandlers, DesignUrlHandlers,
                  VirtualHosts, VhostGlobals
          ])
      end,
  
  