module Rack::Utils

def byte_ranges(env, size)

Returns an empty array if none of the ranges are satisfiable.
Returns nil if the header is missing or syntactically invalid.
Parses the "Range:" header, if present, into an array of Range objects.
def byte_ranges(env, size)
  get_byte_ranges env['HTTP_RANGE'], size
end