Skip to content

Commit

Permalink
Conform to current XHR spec for overrideMimeType
Browse files Browse the repository at this point in the history
As per the updated XHR spec, you need to call open before calling
`overrideMimeType`.  While they are most likely rolling back this portion
of the spec, it is currently required in Edge and is harmless to keep
this pay even after the spec is reverted.

Fixes #7085
  • Loading branch information
mramato committed Sep 27, 2018
1 parent c1c8e93 commit bea6f9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Change Log
* Fixed entity show issues. [#7048](https://github.com/AnalyticalGraphicsInc/cesium/issues/7048)
* Fixed a bug where polylines on terrain covering very large portions of the globe would cull incorrectly in 3d-only scenes. [#7043](https://github.com/AnalyticalGraphicsInc/cesium/issues/7043)
* Fixed bug causing crash on entity geometry material change [#7047](https://github.com/AnalyticalGraphicsInc/cesium/pull/7047)
* Fixed MIME type behavior for `Resource` requests in recent versions of Edge [#7085](https://github.com/AnalyticalGraphicsInc/cesium/issues/7085).
### 1.49 - 2018-09-04
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -1853,12 +1853,12 @@ define([
xhr.withCredentials = true;
}

xhr.open(method, url, true);

if (defined(overrideMimeType) && defined(xhr.overrideMimeType)) {
xhr.overrideMimeType(overrideMimeType);
}

xhr.open(method, url, true);

if (defined(headers)) {
for (var key in headers) {
if (headers.hasOwnProperty(key)) {
Expand Down

0 comments on commit bea6f9c

Please sign in to comment.