Remove loopback from Minify.

pull/977/head
Chad Weider 2012-09-03 14:37:41 -07:00
parent 024a26f272
commit 02c22d7b89
1 changed files with 4 additions and 3 deletions

View File

@ -239,10 +239,11 @@ function getAceFile(callback) {
var resourceURI = baseURI + path.normalize(path.join('/static/', filename));
resourceURI = resourceURI.replace(/\\/g, '/'); // Windows (safe generally?)
request(resourceURI, function (error, response, body) {
if (!error && response.statusCode == 200) {
requestURI(resourceURI, 'GET', {}, function (status, headers, body) {
var error = !(status == 200 || status == 404);
if (!error) {
data += 'Ace2Editor.EMBEDED[' + JSON.stringify(filename) + '] = '
+ JSON.stringify(body || '') + ';\n';
+ JSON.stringify(status == 200 ? body || '' : null) + ';\n';
} else {
// Silence?
}