anchor.diff:          mochi_req = MochiReq,
           peer = MochiReq:get(peer),
           method = Method,
  -        requested_path_parts = [list_to_binary(couch_httpd:unquote(Part))
  -                || Part <- string:tokens(RequestedPath, "/")],
  -        path_parts = [list_to_binary(couch_httpd:unquote(Part))
  -                || Part <- string:tokens(Path, "/")],
  +        requested_path_parts =
  +            [?l2b(unquote(Part)) || Part <- string:tokens(RequestedPath, "/")],
  +        path_parts = [?l2b(unquote(Part)) || Part <- string:tokens(Path, "/")],
           db_url_handlers = DbUrlHandlers,
           design_url_handlers = DesignUrlHandlers,
           default_fun = DefaultFun,
  
positive.code:     last_chunk(Resp).
  
  send_redirect(Req, Path) ->
       Headers = [{"Location", couch_httpd:absolute_uri(Req, Path)}],
       send_response(Req, 301, Headers, <<>>).
  
  negotiate_content_type(#httpd{mochi_req=MochiReq}) ->
      %% Determine the appropriate Content-Type header for a JSON response
  
negative.code: 
  make_etag(Term) ->
      <<SigInt:128/integer>> = couch_util:md5(term_to_binary(Term)),
      iolist_to_binary([$", io_lib:format("~.36B", [SigInt]), $"]).
  
  etag_match(Req, CurrentEtag) when is_binary(CurrentEtag) ->
      etag_match(Req, binary_to_list(CurrentEtag));
  
  etag_match(Req, CurrentEtag) ->
      EtagsToMatch = string:tokens(
          header_value(Req, "If-None-Match", ""), ", "),
      lists:member(CurrentEtag, EtagsToMatch).
  
  etag_respond(Req, CurrentEtag, RespFun) ->
      case etag_match(Req, CurrentEtag) of
      true ->
          % the client has this in their cache.
          send_response(Req, 304, [{"Etag", CurrentEtag}], <<>>);
      false ->
          % Run the function.
          RespFun()
  