Skip to content

Commit

Permalink
fix response header in IE9
Browse files Browse the repository at this point in the history
  • Loading branch information
ON10N committed Jun 27, 2018
1 parent fd0dbae commit e850970
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fly.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class Fly {
}

engine.onload = () => {
// The xhr of IE9 has not response filed
// The xhr of IE9 has not response field
var response = engine.response || engine.responseText;
if (options.parseJson && (engine.getResponseHeader(contentType) || "").indexOf("json") !== -1
// Some third engine implementation may transform the response text to json object automatically,
Expand All @@ -227,6 +227,7 @@ class Fly {
var items = (engine.getAllResponseHeaders() || "").split("\r\n");
items.pop();
items.forEach((e) => {
if(!e) return;
var key = e.split(":")[0]
headers[key] = engine.getResponseHeader(key)
})
Expand Down

0 comments on commit e850970

Please sign in to comment.