diff options
| author | jquadrin | 2013-08-24 03:42:14 -0400 |
|---|---|---|
| committer | Brian Ford | 2013-10-01 10:26:08 -0700 |
| commit | 0ca5426184f6900048588f3d2c2a4a65f9abe248 (patch) | |
| tree | f033e8d93f8579a70ee591db4542fe5409f4c661 | |
| parent | 025c92190376414c15f15fd20a75b41489a4e70a (diff) | |
| download | angular.js-0ca5426184f6900048588f3d2c2a4a65f9abe248.tar.bz2 | |
chore: remove Firefox CORS workaround
See #1468
| -rw-r--r-- | src/ng/httpBackend.js | 20 | ||||
| -rw-r--r-- | test/ng/httpBackendSpec.js | 3 |
2 files changed, 0 insertions, 23 deletions
diff --git a/src/ng/httpBackend.js b/src/ng/httpBackend.js index 69711df2..37108209 100644 --- a/src/ng/httpBackend.js +++ b/src/ng/httpBackend.js @@ -66,26 +66,6 @@ function createHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument, if (xhr.readyState == 4) { var responseHeaders = xhr.getAllResponseHeaders(); - // TODO(vojta): remove once Firefox 21 gets released. - // begin: workaround to overcome Firefox CORS http response headers bug - // https://bugzilla.mozilla.org/show_bug.cgi?id=608735 - // Firefox already patched in nightly. Should land in Firefox 21. - - // CORS "simple response headers" http://www.w3.org/TR/cors/ - var value, - simpleHeaders = ["Cache-Control", "Content-Language", "Content-Type", - "Expires", "Last-Modified", "Pragma"]; - if (!responseHeaders) { - responseHeaders = ""; - forEach(simpleHeaders, function (header) { - var value = xhr.getResponseHeader(header); - if (value) { - responseHeaders += header + ": " + value + "\n"; - } - }); - } - // end of the workaround. - // responseText is the old-school way of retrieving response (supported by IE8 & 9) // response and responseType properties were introduced in XHR Level2 spec (supported by IE10) completeRequest(callback, diff --git a/test/ng/httpBackendSpec.js b/test/ng/httpBackendSpec.js index d533d5f8..f82c1750 100644 --- a/test/ng/httpBackendSpec.js +++ b/test/ng/httpBackendSpec.js @@ -190,9 +190,6 @@ describe('$httpBackend', function() { }; this.getAllResponseHeaders = valueFn(''); - // for temporary Firefox CORS workaround - // see https://github.com/angular/angular.js/issues/1468 - this.getResponseHeader = valueFn(''); } callback.andCallFake(function(status, response) { |
