anchor.diff:  
                       % build new path, reencode query args, eventually convert
                       % them to json
  -                    Path = lists:append(
  -                        string:join(Parts, [?SEPARATOR]),
  -                        case Bindings of
  -                            [] -> [];
  -                            _ -> [$?, encode_query(Bindings)]
  -                        end),
  +                    Bindings1 = maybe_encode_bindings(Bindings),
  +                    Path = binary_to_list(
  +                        iolist_to_binary([
  +                                string:join(Parts, [?SEPARATOR]),
  +                                [["?", mochiweb_util:urlencode(Bindings1)] 
  +                                    || Bindings1 =/= [] ]
  +                            ])),
                       
                       % if path is relative detect it and rewrite path
                       case mochiweb_util:safe_relative_path(Path) of
  
positive.code:         Rules ->
              % create dispatch list from rules
              DispatchList =  [make_rule(Rule) || {Rule} <- Rules],
  
              %% get raw path by matching url to a rule.
              RawPath = case try_bind_path(DispatchList, couch_util:to_binary(Method), PathParts,
                                      QueryList1) of
                  no_dispatch_path ->
                      throw(not_found);
                  {NewPathParts, Bindings} ->
  
negative.code:     % we are in a design handler
      DesignId = <<"_design/", DesignName/binary>>,
      Prefix = <<"/", DbName/binary, "/", DesignId/binary>>,
      QueryList = lists:map(fun decode_query_value/1, couch_httpd:qs(Req)),
  
      #doc{body={Props}} = DDoc,
  
  