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

fix($httpBackend): use ActiveX XHR when making PATCH requests on IE8 #5579

Closed
wants to merge 2 commits into from

Conversation

wesleycho
Copy link
Contributor

IE8's native XHR doesn't support PATCH requests, but the ActiveX one does.

Closes #2518
Closes #5043

The feature is mainly implemented by @IgorMinar in #5390 - the text above is from his commit. @caitp found the bug that caused the tests to fail, and I suggested a refactor of her fix, which appears in my commit.

Unfortunately, I don't have a backend running currently that responds to a PATCH request, so I cannot test this in IE8 atm.

IE8's native XHR doesn't support PATCH requests, but the ActiveX one does.

Closes angular#2518
Closes angular#5043
@@ -149,6 +149,9 @@
/* ng/parse.js */
"setter": false,

/* ng/httpBackend.js */
"ActiveXObject": false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original code added a jshint directive

/* global ActiveXObject */

Either way is fine, but adding that would be a slightly more concise diff

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted - just fixed.

@IgorMinar
Copy link
Contributor

@caitp this looks related to the PR you are reviewing

@caitp
Copy link
Contributor

caitp commented Dec 31, 2013

@IgorMinar actually, looking at jashkenas/backbone#2152 I'm not totally sure this is such a straight forward thing to deal with at all... Have you verified that the original fix works? Judging from the last comment, it might be enough, but I am not equipped to verify this

seems like another place where an e2e test would help a lot. I'm hearing that it is probably good enough, but really, tests are a big deal :[

@IgorMinar
Copy link
Contributor

@caitp I invited you to our saucelabs orgs. this invite will give you access to a ton of browsers you can use for interactive or automated testing.

@IgorMinar
Copy link
Contributor

as explained at #5390 (comment) this change should not be needed.

thanks nevertheless

@IgorMinar IgorMinar closed this Jan 3, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using the HTTP PATCH method with $http results in a "Invalid argument" exception on IE8
3 participants