mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
minor changes
This commit is contained in:
parent
3e669b4f6f
commit
b1c6c5e3ed
2 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue