anchor.diff:  format_query_params([{Key, []} | RestParams], QS) ->
       format_query_params(RestParams, [[Key, "&"] | QS]);
   format_query_params([{Key, Value} | RestParams], []) ->
  -    format_query_params(RestParams, [Key, "=", Value]);
  +    format_query_params(RestParams, [Key, "=", mochiweb_util:quote_plus(Value)]);
   format_query_params([{Key, Value} | RestParams], QS) ->
  -    format_query_params(RestParams, [[Key, "=", Value, "&"] | QS]).
  +    format_query_params(RestParams, [[Key, "=", mochiweb_util:quote_plus(Value), "&"] | QS]).
   
   %% @doc Parse the valid subresources from the raw path.
   -spec get_subresources(string()) -> {subresources(), query_params()}.
  
positive.code: %% @doc Function to rewrite headers prior to processing by webmachine.
  -spec rewrite(atom(), atom(), {integer(), integer()}, gb_tree(), string()) ->
                       {gb_tree(), string()}.
  rewrite(Method, _Scheme, _Vsn, Headers, RawPath) ->
      riak_cs_dtrace:dt_wm_entry(?MODULE, <<"rewrite">>),
      Host = mochiweb_headers:get_value("host", Headers),
      HostBucket = bucket_from_host(Host),
      %% Unquote the URL to accomodate some naughty client libs (looking
      %% at you Fog)
      {Path, QueryString, _} = mochiweb_util:urlsplit_path(
                                 mochiweb_util:unquote(RawPath)),
      RewrittenPath = rewrite_path(Method, Path, QueryString, HostBucket),
      RewrittenHeaders = mochiweb_headers:default(?RCS_REWRITE_HEADER,
                                                  rcs_rewrite_header(RawPath, HostBucket),
                                                  Headers),
      {RewrittenHeaders, RewrittenPath}.
  
  
negative.code: %% @doc Format an object operation query string to conform the the
  %% rewrite rules.
  -spec format_object_qs({subresources(), query_params()}) -> string().
  format_object_qs({SubResources, QueryParams}) ->
      UploadId = proplists:get_value("uploadId", SubResources, []),
      PartNum = proplists:get_value("partNumber", SubResources, []),
      format_object_qs(SubResources, QueryParams, UploadId, PartNum).
  
  %% @doc Format an object operation query string to conform the the
  %% rewrite rules.
  -spec format_object_qs(subresources(), query_params(), string(), string()) -> string().
  format_object_qs(SubResources, QueryParams, [], []) ->
      [format_subresources(SubResources), format_query_params(QueryParams)];
  format_object_qs(_SubResources, _QueryParams, UploadId, []) ->
      ["/uploads/", UploadId];
  format_object_qs(_SubResources, _QueryParams, UploadId, PartNum) ->
      ["/uploads/", UploadId, "?partNumber=", PartNum].
  
  %% @doc Format a string that expresses the subresource request
  