Merge remote-tracking branch 'main/master' into develop

This commit is contained in:
Chad Weider 2012-03-11 15:58:36 -07:00
commit 0944670fb7
3 changed files with 8 additions and 4 deletions

View file

@ -169,8 +169,10 @@ function getAceFile(callback) {
var request = require('request');
var baseURI = 'http://localhost:' + settings.port
var resourceURI = baseURI + path.normalize(path.join('/static/', filename));
resourceURI = resourceURI.replace(/\\/g, '/'); // Windows (safe generally?)
request(baseURI + path.normalize(path.join('/static/', filename)), function (error, response, body) {
request(resourceURI, function (error, response, body) {
if (!error && response.statusCode == 200) {
data += 'Ace2Editor.EMBEDED[' + JSON.stringify(filename) + '] = '
+ JSON.stringify(body || '') + ';\n';

View file

@ -85,7 +85,7 @@ CachingMiddleware.prototype = new function () {
&& new Date(res.getHeader('last-modified')));
res.writeHead = old_res.writeHead;
if (status == 200 || status == 404) {
if (status == 200) {
// Update cache
var buffer = '';