提交 b8338ff0 编写于 作者: J Jake Champion

Revert "Resolves https://github.com/JakeChampion/fetch/issues/928"

This reverts commit ce617892.
上级 64ce761b
......@@ -537,15 +537,10 @@ export function fetch(input, init) {
}
xhr.onload = function() {
var responseHeaders = xhr.getAllResponseHeaders();
var setCookie = xhr.getResponseHeader('set-cookie');
if (setCookie) {
responseHeaders = responseHeaders.replace(setCookie, setCookie.replace(/\r?\n/g, ', '));
}
var options = {
status: xhr.status,
statusText: xhr.statusText,
headers: parseHeaders(responseHeaders || '')
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
}
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
var body = 'response' in xhr ? xhr.response : xhr.responseText
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册