function getErrorHeaders (err) {
  if (!err.headers || typeof err.headers !== 'object') {
    return undefined
  }

  var headers = Object.create(null);
  var keys = Object.keys(err.headers);

  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    headers[key] = err.headers[key];
  }

  return headers
}
Parse "Range" header `str` relative to the given file `size`.

@param {Number} size
@param {String} str
@param {Object} [options]
@return {Array}
@public