mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactored
This commit is contained in:
parent
0472827aa9
commit
31aa6672bb
2 changed files with 6 additions and 8 deletions
|
|
@ -354,7 +354,7 @@
|
|||
CloudServer._stated = function(pError, pStat){
|
||||
if(pError){
|
||||
CloudServer.Statuses[DirPath] = 404;
|
||||
CloudServer.sendResponse('OK', pError.toString(), DirPath);
|
||||
CloudServer.sendResponse(null, pError.toString(), DirPath);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -383,12 +383,11 @@
|
|||
Util.log(pError);
|
||||
|
||||
CloudServer.Statuses[DirPath] = 404;
|
||||
CloudServer.sendResponse('OK', pError.toString(),
|
||||
DirPath);
|
||||
CloudServer.sendResponse(null, pError.toString(), DirPath);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Если мы не в корне добавляем слеш к будующим ссылкам */
|
||||
/* Если мы не в корне добавляем слеш к будующим ссылкам */
|
||||
if(DirPath !== '/')
|
||||
DirPath += '/';
|
||||
|
||||
|
|
@ -584,9 +583,9 @@
|
|||
|
||||
/* sending page not found */
|
||||
lSrv.Statuses[pName] = 404;
|
||||
lSrv.sendResponse('file not found', pError.toString(), pName);
|
||||
lSrv.sendResponse(null, pError.toString(), pName);
|
||||
}else
|
||||
lSrv.sendResponse('OK', 'passwd.json');
|
||||
lSrv.sendResponse(null, 'passwd.json');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -133,8 +133,7 @@
|
|||
lContentEncoding = '',
|
||||
lCacheControl = 0,
|
||||
|
||||
lDot = pName.lastIndexOf('.'),
|
||||
lExt = pName.substr(lDot);
|
||||
lExt = Util.getExtension(pName);
|
||||
|
||||
if( Util.strCmp(lExt, '.appcache') )
|
||||
lCacheControl = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue