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

feat(httpBackend) Patch for Firefox bug w/ CORS and resonse headers #1835

Closed
wants to merge 3 commits into from
Closed

feat(httpBackend) Patch for Firefox bug w/ CORS and resonse headers #1835

wants to merge 3 commits into from

Conversation

willthemoor
Copy link
Contributor

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/

Closes #1468

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/

Closes #1468
@IgorMinar
Copy link
Contributor

This looks good to me. Can you just add a note to the comment that the FF bug has been already fixed and mention which FF version contains the fix. that way we'll know when it's "safe" to drop the workaround.

@ghost ghost assigned IgorMinar Jan 30, 2013
Will Moore added 2 commits February 13, 2013 12:47
Adding a note about Firefox fix version and cleaned up formatting.

Closes #1468
@willthemoor
Copy link
Contributor Author

@IgorMinar Updated. Added a link to this ticket in the test note as well.

I'm not really clear on the Mozilla release cycle but the Bugzilla ticket says 'Target Milestone: mozilla21' which I'm assuming aligns to v21 of FF.

@ghost ghost assigned vojtajina Feb 15, 2013
@vojtajina
Copy link
Contributor

Merged as e19b04c

@vojtajina vojtajina closed this Feb 15, 2013
@kkurni
Copy link

kkurni commented Feb 25, 2013

How about custom header with firefox ?

From the changes, I only can see simple header but not custom header.

Is there any other patch regarding this ?

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CORS access to $http response headers broken in Firefox -- consider workaround for bugzilla 608735
4 participants