mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 02:29:23 +00:00
minor changes
This commit is contained in:
parent
0d21917896
commit
a484e87da4
3 changed files with 28 additions and 24 deletions
20
cloudcmd.js
20
cloudcmd.js
|
|
@ -253,10 +253,12 @@
|
|||
else
|
||||
main.sendFile(p);
|
||||
else
|
||||
sendError(pParams, pError);
|
||||
main.sendError(pParams, pError);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
return lRet;
|
||||
}
|
||||
|
||||
function processCommanderContent(pParams){
|
||||
|
|
@ -287,28 +289,16 @@
|
|||
main.sendResponse(p);
|
||||
}
|
||||
else
|
||||
sendError(pParams, pError);
|
||||
main.sendError(pParams, pError);
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
sendError(pParams, pError);
|
||||
main.sendError(pParams, pError);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function sendError(pParams, pError){
|
||||
var lRet = Util.checkObjTrue(pParams,
|
||||
['name', 'data', 'request', 'response']);
|
||||
|
||||
if(lRet){
|
||||
var p = pParams;
|
||||
p.status = main.FILE_NOT_FOUND;
|
||||
p.data = pError;
|
||||
main.sendResponse(p);
|
||||
}
|
||||
}
|
||||
|
||||
function noJSTMPRedirection(pParams){
|
||||
var MOVED_PERMANENTLY = 301,
|
||||
lPath = Util.removeStr(pParams.name, 'no-js/');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue