Commits

Anonymous committed 17329ca Merge

merge

Comments (0)

Files changed (2)

 5ffa6ae7e6999f9c765930c36a8b24d0e8b5874d riak-0.5.3
 11895faae1cec4e14f76ec1fb55b87e739299e05 riak-0.6
 93750f3fbbe2b4ca7cba3dbac16bad4039b84822 riak-0.6.1
+46af62b77937ee39060d55011ffc74768b88a011 riak-0.6.2

src/jiak_resource.erl

 copy_unreadable1([H|T], OldObj, NewObj) ->
     copy_unreadable1(T, OldObj,
                      case proplists:lookup(H, OldObj) of
-                         {H, Val} -> [{H, Val}|NewObj];
-                         none     -> NewObj
+                         {H, Val} ->
+                             case proplists:lookup(H, NewObj) of
+                                 {H, _} ->
+                                     %% client included a value
+                                     %% catch any potential mismatch in
+                                     %% check_write_mask
+                                     NewObj;
+                                 none ->
+                                     [{H, Val}|NewObj]
+                             end;
+                         none -> NewObj
                      end).
 
 %% @spec pretty_print(webmachine:wrq(), context()) ->