Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue where the browser throws an exception on responseXML
When trying to use the XHR api set with a content type of 'text' the browser throws an error it is unable to read responseXML as the response isn't valid xml and the response type is not an empty string or 'document' as according to spec. this change was implemented due to inconsistent implementation across browsers and 3rd party network libraries which do parse xml responses even when the response type is not set according to the spec. In order to support all clients we now try to assign the responseXML property when possible but fail silently when we cannot. This will keep both behaviors consistent as incorrectly implemented clients will be able to read the XML response while still supporting the correctly implemented clients to not fail the request when trying to access responseXML on an invalid request. please see issues #86 #89 for more information.
- Loading branch information