Skip to content

Commit

Permalink
* xover.Response - bug fixed for octect-stream files
Browse files Browse the repository at this point in the history
  • Loading branch information
uriel-online committed Feb 29, 2024
1 parent a01823a commit dd02cb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xo.js
Original file line number Diff line number Diff line change
Expand Up @@ -8378,7 +8378,7 @@ xover.Response = function (response, request) {
return "html";
} else if ((contentType.toLowerCase().indexOf("json") != -1 || contentType.toLowerCase().indexOf("manifest") != -1 || (request.url.href || '').match(/(\.manifest|\.json)$/i)) && xover.json.isValid(xover.json.tryParse(responseContent))) {
return "json";
} else if ((contentType.toLowerCase().indexOf("xml") != -1 || contentType.toLowerCase().indexOf("xsl") != -1 || body.toLowerCase().indexOf("<?xml ") != -1 || contentType.toLowerCase().indexOf('application/octet-stream') != -1) && xover.xml.isValid(xover.xml.tryParse(responseContent))) {
} else if ((contentType.toLowerCase().indexOf("xml") != -1 || contentType.toLowerCase().indexOf("xsl") != -1 || responseContent.toLowerCase().indexOf("<?xml ") != -1 || contentType.toLowerCase().indexOf('application/octet-stream') != -1) && xover.xml.isValid(xover.xml.tryParse(responseContent))) {
return "xml"
} else {
return "text";
Expand Down

0 comments on commit dd02cb6

Please sign in to comment.