anchor.diff:  %% -------------------------------------------------------------------
   %%
  -%% riak_kv_wm_keylist - Webmachine resource for listing 
  +%% riak_kv_wm_keylist - Webmachine resource for listing
   %%                      the keys in a bucket.
   %%
   %% Copyright (c) 2007-2011 Basho Technologies, Inc.  All Rights Reserved.
  
positive.code:     Client = Ctx#ctx.client,
      Bucket = Ctx#ctx.bucket,
  
      IncludeBucketProps = (Ctx#ctx.allow_props_param == true) 
          andalso (wrq:get_qs_value(?Q_PROPS, RD) /= ?Q_FALSE),
      
      BucketPropsJson = 
          case IncludeBucketProps of
              true ->
                  [riak_kv_wm_props:get_bucket_props_json(Client, Bucket)];
              false ->
                  []
          end,
      
      case wrq:get_qs_value(?Q_KEYS, RD) of
          ?Q_STREAM ->
              %% Start streaming the keys...
  
negative.code:                         {ok, ReqId} = Client:stream_list_keys(Bucket),
                          stream_keys(ReqId)
                  end,
  
              %% For API Version 1, send back the BucketPropsJson first
              %% (if defined) or an empty resultset. For API Version 2,
              %% use an empty list, which doesn't send an resultset.
              FirstResult =
                  case Ctx#ctx.api_version of
                      1 ->
                          mochijson2:encode({struct, BucketPropsJson});
                      2 ->
                          []
                  end,
              {{stream, {FirstResult, F}}, RD, Ctx};
  
          ?Q_TRUE ->
              %% Get the JSON response...
              {ok, KeyList} = Client:list_keys(Bucket),
              JsonKeys1 = BucketPropsJson ++ [{?Q_KEYS, KeyList}],
              JsonKeys2 = {struct, JsonKeys1},
              JsonKeys3 = mochijson2:encode(JsonKeys2),
  
  