Skip to content

Commit

Permalink
Revert "Resolves JakeChampion/fetch#928"
Browse files Browse the repository at this point in the history
This reverts commit ce6178923aca5cabd2cbf031770e5672e4e2ca62.
  • Loading branch information
cr313 committed Jul 20, 2023
1 parent e50fccd commit ec71ca0
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 ec71ca0

Please sign in to comment.