anchor.diff:                                               RawPath1,
                                                MochiReq:get(version),
                                                MochiReq:get(headers)),
  -                                             
  +
               % cleanup, It force mochiweb to reparse raw uri.
               MochiReq1:cleanup(),
  -            
  +
               #httpd{
                   db_url_handlers = DbUrlHandlers,
                   design_url_handlers = DesignUrlHandlers,
                   default_fun = DefaultFun,
                   url_handlers = UrlHandlers
               } = Req,
  -            
  -            couch_httpd:handle_request(MochiReq1, DefaultFun, 
  +
  +            couch_httpd:handle_request(MochiReq1, DefaultFun,
                       UrlHandlers, DbUrlHandlers, DesignUrlHandlers)
           end.
  -            
  +
   
   
   %% @doc Try to find a rule matching current url. If none is found
   %% 404 error not_found is raised
   try_bind_path([], _Method, _PathParts, _QueryList) ->
  -    no_dispatch_path;        
  +    no_dispatch_path;
   try_bind_path([Dispatch|Rest], Method, PathParts, QueryList) ->
       [{PathParts1, Method1}, RedirectPath, QueryArgs] = Dispatch,
       case bind_method(Method1, Method) of
  
positive.code:                 V;
              false ->
                  mochiweb_util:quote_plus(V)
          end,              
          [{K, V1} | Acc]
      end, [], Props),
      lists:flatten(mochiweb_util:urlencode(Props1)).
  
  to_atom(V) when is_atom(V) ->
      V; 
  to_atom(V) when is_binary(V) ->
      to_atom(?b2l(V));
  to_atom(V) ->
      list_to_atom(V).
      
  to_json(V) ->
      iolist_to_binary(?JSON_ENCODE(V)).
  
negative.code: -define(MATCH_ALL, '*').
  
  
  %% doc The http rewrite handler. All rewriting is done from
  %% /dbname/_design/ddocname/_rewrite by default.
  %%
  %% each rules should be in rewrites member of the design doc.
  %% Ex of a complete rule :
  %%
  %%  {
  %%      ....
  %%      "rewrites": [
  %%      {
  %%          "from": "",
  %%          "to": "index.html",
  %%          "method": "GET",
  %%          "query": {}
  %%      }
  %%      ]
  %%  }
  %%
  %%  from: is the path rule used to bind current uri to the rule. It
  %% use pattern matching for that.
  %%
  %%  to: rule to rewrite an url. It can contain variables depending on binding
  