Accept 2xx statuses even for file requests

This commit is contained in:
Hargobind S. Khalsa
2011-09-06 16:04:49 -06:00
parent a3384fa922
commit bddedfcd21

View File

@@ -233,7 +233,7 @@ function xhr(url, type, callback, errback) {
xhr.send(null);
if (isFileProtocol) {
if (xhr.status === 0) {
if (xhr.status === 0 || (xhr.status >= 200 && xhr.status < 300)) {
callback(xhr.responseText);
} else {
errback(xhr.status, url);