fetch-ponyfill
Advanced tools
Comparing version 7.0.0 to 7.1.0
@@ -442,10 +442,18 @@ (function (global) { | ||
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' '); | ||
preProcessedHeaders.split(/\r?\n/).forEach(function(line) { | ||
var parts = line.split(':'); | ||
var key = parts.shift().trim(); | ||
if (key) { | ||
var value = parts.join(':').trim(); | ||
headers.append(key, value); | ||
} | ||
}); | ||
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill | ||
// https://github.com/github/fetch/issues/748 | ||
// https://github.com/zloirock/core-js/issues/751 | ||
preProcessedHeaders | ||
.split('\r') | ||
.map(function(header) { | ||
return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header | ||
}) | ||
.forEach(function(line) { | ||
var parts = line.split(':'); | ||
var key = parts.shift().trim(); | ||
if (key) { | ||
var value = parts.join(':').trim(); | ||
headers.append(key, value); | ||
} | ||
}); | ||
return headers | ||
@@ -452,0 +460,0 @@ } |
# History | ||
# 7.1.0 | ||
- Updates whatwg-fetch to 3.5.0 to address an issue with IE11. | ||
## 7.0.0 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "fetch-ponyfill", | ||
"version": "7.0.0", | ||
"version": "7.1.0", | ||
"description": "A ponyfill (doesn't overwrite the native fetch) for the Fetch specification https://fetch.spec.whatwg.org.", | ||
@@ -49,3 +49,3 @@ "main": "fetch-node.js", | ||
"webpack-cli": "^4.1.0", | ||
"whatwg-fetch": "~3.4.1" | ||
"whatwg-fetch": "^3.5.0" | ||
}, | ||
@@ -52,0 +52,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29744
614