mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(cloudcmd) change logs: rm pathname, request, name; add method, data
This commit is contained in:
parent
5a9c75975e
commit
fed2eccdfb
3 changed files with 7 additions and 11 deletions
|
|
@ -325,7 +325,7 @@
|
|||
main.sendResponse(p, indexProcessing({
|
||||
additional : lList,
|
||||
data : pData.toString(),
|
||||
}));
|
||||
}), true);
|
||||
}
|
||||
else
|
||||
main.sendError(pParams, pError);
|
||||
|
|
|
|||
|
|
@ -150,9 +150,7 @@
|
|||
|
||||
/* added supporting of Russian language in directory names */
|
||||
lPath = Querystring.unescape(lPath);
|
||||
Util.log('pathname: ' + lPath);
|
||||
|
||||
Util.log("request for " + lPath + " received...");
|
||||
Util.log(pReq.method + ': ' + lPath);
|
||||
|
||||
var lData = {
|
||||
name : lPath,
|
||||
|
|
@ -168,14 +166,11 @@
|
|||
|
||||
if(!lRet) {
|
||||
lName = lData.name;
|
||||
Util.log('reading ' + lName);
|
||||
|
||||
/* watching is file changed */
|
||||
if(lConfig.appcache)
|
||||
AppCache.watch(lName);
|
||||
|
||||
Util.log(Path.basename(lName));
|
||||
|
||||
lName = Path.join(DIR, lName);
|
||||
lMin = Minify.allowed,
|
||||
lExt = Util.getExtension(lName),
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@
|
|||
* @param Data - данные
|
||||
* @param pName - имя отсылаемого файла
|
||||
*/
|
||||
function sendResponse(pParams, pData){
|
||||
function sendResponse(pParams, pData, pNotLog) {
|
||||
var lRet = checkParams(pParams);
|
||||
|
||||
if(lRet){
|
||||
|
|
@ -273,7 +273,10 @@
|
|||
gzip : lGzip,
|
||||
query : lQuery
|
||||
});
|
||||
|
||||
|
||||
if (!pNotLog)
|
||||
Util.log(pData || p.data);
|
||||
|
||||
/* если браузер поддерживает gzip-сжатие - сжимаем данные*/
|
||||
Util.ifExec(!lGzip,
|
||||
function(pParams) {
|
||||
|
|
@ -286,8 +289,6 @@
|
|||
|
||||
p.response.writeHead(p.status || OK, lHead);
|
||||
p.response.end(p.data);
|
||||
|
||||
Util.log( p.name + ' sended');
|
||||
},
|
||||
|
||||
function(pCallBack) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue