anchor.diff:  %%                         Cowboy HTTP REST
   %% ===================================================================
   
  -rest_init(Rq, Opts) ->
  -    {dir, Dir} = lists:keyfind(dir, 1, Opts),
  -    {ok, bookshelf_req:with_amz_request_id(Rq), #req_state{dir = Dir}}.
  +rest_init(Rq, _Opts) ->
  +    %% We dont actually make use of state here at all
  +    {ok, bookshelf_req:with_amz_request_id(Rq), undefined}.
   
   allowed_methods(Rq, St) ->
       {['HEAD', 'GET', 'PUT', 'DELETE'], Rq, St}.
  
positive.code:                  socket=Socket,
                   transport=Transport,
                   buffer=Buffer}=Rq,
         #req_state{dir=Dir}=St) ->
      {Length, Rq2} = cowboy_http_req:parse_header('Content-Length', Rq),
      case ?BACKEND:obj_recv(Dir, Bucket, Path,
                             Transport, Socket, Buffer, Length) of
          {ok, Digest} ->
              OurMd5 = bookshelf_format:to_hex(Digest),
              case cowboy_http_req:parse_header('Content-MD5', Rq2) of
  
negative.code:                    raw_path= <<"/",Path/binary>>,
                     transport=Transport,
                     socket=Socket}=Rq,
           St) ->
      case bookshelf_store:obj_meta(Bucket, Path) of
          {ok, #object{size=Size}} ->
              SFun = fun() ->
                             Bridge = bkss_transport:new(bksw_socket_transport,
                                                         [Transport, Socket,
                                                          ?TIMEOUT_MS]),
                             case bookshelf_store:obj_send(Bucket, Path, Bridge) of
                                 {ok, Size} -> sent;
                                 _          -> {error, "Download unsuccessful"}
                             end
  