minor changes

This commit is contained in:
coderaiser 2012-12-11 04:34:11 -05:00
parent 6dd8a0b1fc
commit 9e837833ee

View file

@ -52,6 +52,7 @@
/* Functions */
exports.generateHeaders = generateHeaders,
exports.sendFile = sendFile,
exports.require = mrequire,
exports.librequire = librequire,
exports.srvrequire = srvrequire,
@ -91,7 +92,7 @@
* second initializing after all modules load, so global var is
* totally filled of all information that should know all modules
*/
var main = global.cloudcmd.main = exports;
global.cloudcmd.main = exports;
/**
* function do safe require of needed module
@ -99,7 +100,7 @@
*/
function mrequire(pSrc){
var lModule,
lError = Util.tryCatch(function(){
lError = Util.tryCatchLog(function(){
lModule = require(pSrc);
});
@ -112,7 +113,7 @@
function rootrequire(pSrc){ return mrequire(DIR + pSrc); }
function librequire(pSrc){ return mrequire(LIBDIR + pSrc); }
function srvrequire(pSrc){ return mrequire(SRVDIR + pSrc); }
/**
@ -167,8 +168,8 @@
lRet['content-encoding'] = 'gzip';
return lRet;
}
}
/**
* send file to client thru pipe
* and gzip it if client support