diff options
| author | Will Moore | 2013-01-18 14:09:19 -0800 | 
|---|---|---|
| committer | Vojta Jina | 2013-02-14 16:45:30 -0800 | 
| commit | e19b04c9ec985821edf1269c628cfa261f81d631 (patch) | |
| tree | f20a29a73a89383c90ee794d48b698de31fc9996 /test/ng | |
| parent | 37e8b12265291918396bfee65d444a8f63697b73 (diff) | |
| download | angular.js-e19b04c9ec985821edf1269c628cfa261f81d631.tar.bz2 | |
fix($httpBackend): patch for Firefox bug w/ CORS and response headers
A workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=608735
In FF getAllResponseHeaders() returns null if the request is the result of CORS.
Tried to format the code so that when a FF patch is released and gains enough
traction it can easily be selected and deleted. Heavily inspired by jQuery's
patch for the same bug. This patch falls short of passing through custom headers
but covers all of the "simple response headers" in the spec at
http://www.w3.org/TR/cors/
This commit should get reverted once Firefox 21 gets out.
Closes #1468
Diffstat (limited to 'test/ng')
| -rw-r--r-- | test/ng/httpBackendSpec.js | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/test/ng/httpBackendSpec.js b/test/ng/httpBackendSpec.js index a491ae26..a7935a7c 100644 --- a/test/ng/httpBackendSpec.js +++ b/test/ng/httpBackendSpec.js @@ -116,6 +116,9 @@ 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) { | 
