Skip to content

Commit

Permalink
Revert "Resolves #928"
Browse files Browse the repository at this point in the history
This reverts commit ce61789.
  • Loading branch information
JakeChampion committed Jul 20, 2023
1 parent 64ce761 commit b8338ff
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8338ff

Please sign in to comment.