From 3f16818d5b20a28cf39aa99d59f28ad3006cd30d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 22 Nov 2012 08:03:42 -0500 Subject: [PATCH] minor changes --- lib/server/main.js | 3 ++- server.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/server/main.js b/lib/server/main.js index 34556c64..284a5f5a 100644 --- a/lib/server/main.js +++ b/lib/server/main.js @@ -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); } diff --git a/server.js b/server.js index b1fccefd..82e64e5c 100644 --- a/server.js +++ b/server.js @@ -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; }