Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 0ca5426

Browse files
jquadrinobtford
authored andcommitted
chore: remove Firefox CORS workaround
See #1468
1 parent 025c921 commit 0ca5426

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/ng/httpBackend.js

-20
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,6 @@ function createHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument,
6666
if (xhr.readyState == 4) {
6767
var responseHeaders = xhr.getAllResponseHeaders();
6868

69-
// TODO(vojta): remove once Firefox 21 gets released.
70-
// begin: workaround to overcome Firefox CORS http response headers bug
71-
// https://bugzilla.mozilla.org/show_bug.cgi?id=608735
72-
// Firefox already patched in nightly. Should land in Firefox 21.
73-
74-
// CORS "simple response headers" http://www.w3.org/TR/cors/
75-
var value,
76-
simpleHeaders = ["Cache-Control", "Content-Language", "Content-Type",
77-
"Expires", "Last-Modified", "Pragma"];
78-
if (!responseHeaders) {
79-
responseHeaders = "";
80-
forEach(simpleHeaders, function (header) {
81-
var value = xhr.getResponseHeader(header);
82-
if (value) {
83-
responseHeaders += header + ": " + value + "\n";
84-
}
85-
});
86-
}
87-
// end of the workaround.
88-
8969
// responseText is the old-school way of retrieving response (supported by IE8 & 9)
9070
// response and responseType properties were introduced in XHR Level2 spec (supported by IE10)
9171
completeRequest(callback,

test/ng/httpBackendSpec.js

-3
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@ describe('$httpBackend', function() {
190190
};
191191

192192
this.getAllResponseHeaders = valueFn('');
193-
// for temporary Firefox CORS workaround
194-
// see https://github.com/angular/angular.js/issues/1468
195-
this.getResponseHeader = valueFn('');
196193
}
197194

198195
callback.andCallFake(function(status, response) {

0 commit comments

Comments
 (0)