anchor.diff:  -record(ctx, {prefix,     %% string() - prefix for resource urls
                 riak,       %% local | {node(), atom()} - params for riak client
                 bucket,     %% binary() - Bucket name (from uri)
  -              key,        %% binary() - Key (from uri)
  +              key,        %% binary() - Key (from uri),
  +              linkquery,
                 start,      %% riak_object() - the starting point of the walk
                 cache_secs, %% integer() - number of seconds to add for expires header
                 client      %% riak_client() - the store client
  
positive.code: %% webmachine resource exports
  -export([
           init/1,
           service_available/2,
           allowed_methods/2,
           content_types_provided/2,
  
negative.code:               riak=proplists:get_value(riak, Props),
                cache_secs=proplists:get_value(cache_secs, Props, 600)
               }}.
  
  %% @spec malformed_request(reqdata(), context()) ->
  %%           {boolean(), reqdata(), context()}
  %% @doc Parse link walk query and determine if it's
  %%      valid.
  malformed_request(RD, Ctx) ->
      case catch extract_query(RD) of
          {'EXIT', _} ->
              RD1 = send_malformed_error(RD),
              {true, RD1, Ctx};
          Query0 ->
              Query = case Query0 of
                          [{Bucket, Tag, false}] ->
                              [{Bucket, Tag, true}];
                          _ ->
                              Query0
                      end,
              {false, RD, Ctx#ctx{linkquery=Query}}
      end.
  
  
  %% @spec service_available(reqdata(), context()) ->
  %%          {boolean(), reqdata(), context()}
  