anchor.diff:  %% ====================================================================
   parse_byte_range(State, Range) when is_binary(Range) ->
       Ranges = parse_byte_range(State, binary:split(Range, <<",">>, [global])),
  -    case lists:member(invalid,Ranges) of
  +    case lists:member(invalid, Ranges) of
           true -> invalid;
           false -> Ranges
       end;
  
positive.code:     % get optional 'Range' header
      {RawRange, _} = cowboy_req:header(<<"range">>, Req),
      Ranges = case RawRange of
                   undefined -> [{0,Size-1}];
                   RawRange -> parse_byte_range(State,RawRange)
               end,
  
      % return bad request if Range is invalid
      case Ranges of
          invalid -> cdmi_error:error_reply(Req,State,?error_bad_request_code,"Invalid range: ~p",[RawRange]);
          Ranges ->
              % prepare data size and stream function
              StreamSize = lists:foldl(fun({From,To},Acc) when To >= From -> Acc+To-From+1 end, 0, Ranges),
              UserDN = fslogic_context:get_user_dn(),
              StreamFun = fun (Socket,Transport) ->
                  try
                      fslogic_context:set_user_dn(UserDN),
                      {ok,BufferSize} = application:get_env(veil_cluster_node, control_panel_download_buffer),
                      lists:foreach(fun (Rng) -> stream_file(Socket, Transport, State, Rng, <<"utf-8">>, BufferSize) end, Ranges)
                  catch Type:Message ->
                      % Any exceptions that occur during file streaming must be caught here for cowboy to close the connection cleanly
                      ?error_stacktrace("Error while streaming file '~p' - ~p:~p", [Filepath, Type, Message])
  
negative.code: -spec ceil(N :: number()) -> integer().
  %% ====================================================================
  ceil(N) when trunc(N) == N -> N;
  ceil(N) -> trunc(N + 1).
  
  %% parse_byte_range/1
  %% ====================================================================
  