anchor.diff:  
   %% Detect the mimetype of the file.
   
  --spec content_types_provided(Req, State)
  -			    -> {[{binary(), get_file}], Req, State}
  -				   when State::state().
  +-spec content_types_provided(cowboy_req:req(), state())
  +			    -> {[{binary(), get_file}], cowboy_req:req(), state()}.
   content_types_provided(Req, State={Path, _, _}) ->
       {[{cow_mimetypes:all(Path), get_file}], Req, State}.
   
   %% Assume the resource doesn't exist if it's not a regular file.
   
  --spec resource_exists(Req, State) -> {boolean(), Req, State} when State::state().
  +-spec resource_exists(cowboy_req:req(), state()) -> {boolean(), cowboy_req:req(), state()}.
   resource_exists(Req, State={_, {ok, #file_info{type=regular}}, _}) ->
       {true, Req, State};
   resource_exists(Req, State) ->
  
positive.code: %% Reject requests that tried to access a file outside
  %% the target directory.
  
  -spec malformed_request(Req, State)
  		       -> {boolean(), Req, State}.
  malformed_request(Req, State) ->
      {State =:= error, Req, State}.
  
  
  -spec is_authorized(Req, State) -> {true, Req, State} | {{false, binary()}, Req, State}.
  is_authorized(Req, State) ->
      {true, Req, State}.
  
  %% Directories, files that can't be accessed at all and
  %% files with no read flag are forbidden.
  
  -spec forbidden(Req, State)
  	       -> {boolean(), Req, State}
  		      when State::state().
  forbidden(Req, State={_, {ok, #file_info{type=directory}}, _}) ->
      {true, Req, State};
  forbidden(Req, State={_, {error, eacces}, _}) ->
  
negative.code: -type state() :: {binary(), {ok, #file_info{}} | {error, atom()}, avlinfos(), extra()}.
  
  
  -spec init(cowboy_req:req(), opts()) -> {cowboy_rest, cowboy_req:req(), error | state()}.
  init(Req, Path) when is_list(Path) ->
      init(Req, list_to_binary(Path));
  init(Req, Path) ->
  