mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-02 00:43:35 +00:00
Fixed: error in Internet Explorer if Info.plist was served with wrong content type.
Without this fix, in Internet Explorer the plist parser would only receive an empty XML document for the main Info.plist (and any other such loaded documents) if the server did not provide the content type "text/xml". This fix parses the XML correctly even if there is no such content type. Fixes #2051.
This commit is contained in:
@@ -172,7 +172,10 @@ CFHTTPRequest.prototype.responseXML = function()
|
||||
{
|
||||
var responseXML = this._nativeRequest.responseXML;
|
||||
|
||||
if (responseXML && (NativeRequest === window.XMLHttpRequest))
|
||||
// Internet Explorer will return a non-null but empty request.responseXML if the response
|
||||
// content type wasn't "text/html", so also check that responseXML.documentRoot is set.
|
||||
// Otherwise fall back to regular parsing.
|
||||
if (responseXML && (NativeRequest === window.XMLHttpRequest) && responseXML.documentRoot)
|
||||
return responseXML;
|
||||
|
||||
return parseXML(this.responseText());
|
||||
|
||||
Reference in New Issue
Block a user