为什么适用于 Chrome 的合法 cors 请求在 FireFox 上会失败?

Why does a legitimate cors request that works on Chrome fail on FireFox?

我正在尝试处理从服务器获取的 csv 文件,该文件与提供脚本的服务器不同:

fetch("https://raw.githubusercontent.com/webflo/countries/master/countries.csv").then(response=>{
    console.log(response.body)
})

这适用于 Chrome,response.body 是一个 ReadableStream,我可以从中阅读内容。

但是在 FireFox 上 response 没有 body,所以它是 undefined

这是什么原因?我该如何修改脚本以使其也适用于 FireFox?

使用本机 fetchresponse.text() 以下内容在 Firefox 中对我来说工作正常

fetch("https://raw.githubusercontent.com/webflo/countries/master/countries.csv")
  .then(response => response.text())
  .then(data => {
    console.log('Data length =', data.length)
    let arr = data.split('\n').map(line => line.replace(/\"/g, '').split(','));
    console.log(arr);
  })