refactored

This commit is contained in:
coderaiser 2013-01-31 06:35:00 -05:00
parent 0472827aa9
commit 31aa6672bb
2 changed files with 6 additions and 8 deletions

View file

@ -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');
}
};

View file

@ -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;