code: function getResponseHeaders(xhr) {
      let raw = xhr.getAllResponseHeaders();
      let parts = raw.replace(/\s+$/, '').split(/\n/);
      for (let i = 0; i < parts.length; i++) {
          parts[i] = parts[i].replace(/\r/g, '').replace(/^\s+/, '').replace(/\s+$/, '');
      }
      return parts;
  }
docs: Normalize the getAllResponseHeaders output