minor changes

This commit is contained in:
coderaiser 2012-11-22 08:03:42 -05:00
parent 3e669b4f6f
commit b1c6c5e3ed
2 changed files with 3 additions and 2 deletions

View file

@ -172,6 +172,7 @@
lEnc = lReq.headers['accept-encoding'] || '',
lGzip = lEnc.match(/\bgzip\b/),
lReadStream,
/* compitability with old versions of node */
lExists = main.fs.exists || main.path.exists;
lExists(lName, function(pExist){
@ -188,7 +189,7 @@
lReadStream.pipe(lRes);
}
else{
lRes.writeHead(OK, generateHeaders('error.json', lGzip) );
lRes.writeHead(ERROR, 'OK');
var lJson = JSON.stringify({error: 'File not Found'});
lRes.end(lJson);
}

View file

@ -422,7 +422,7 @@
CloudServer._stated = function(pError, pStat){
if(pError){
CloudServer.Statuses[DirPath] = 404;
CloudServer.sendResponse('OK',pError.toString(), DirPath);
CloudServer.sendResponse('OK', pError.toString(), DirPath);
return;
}