Skip to content

Commit

Permalink
webstorm check update
Browse files Browse the repository at this point in the history
  • Loading branch information
kaven276 committed Apr 27, 2013
1 parent 9dd5e59 commit 95a7784
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 32 deletions.
4 changes: 2 additions & 2 deletions lib/Cache.js
Expand Up @@ -113,15 +113,15 @@ MD5Content.prototype.respond = function(req, res){
res.end();
}
}
}
};

MD5Content.prototype.dump = function(){
console.log(this.md5, this.finished);
console.log(this.headers);
this.chunks.forEach(function(chunk){
console.log(chunk.toString('utf8'));
});
}
};

exports.findCacheHit = findCacheHit;
exports.MD5Content = MD5Content;
2 changes: 1 addition & 1 deletion lib/DBCall.js
Expand Up @@ -22,7 +22,7 @@ DBCall.init = function(setting){
require('./util.js').override2(require('./cfg.js'), setting || {});
DBInMgr = require('./db.js');
console.log('listening for oracle reverse connect');
}
};

DBCall.evDBMsg = 'message';
mUtil.inherits(DBCall, EV);
Expand Down
10 changes: 5 additions & 5 deletions lib/MD5Calc.js
Expand Up @@ -25,24 +25,24 @@ MD5Calc.prototype.write = function(data){
this.count += data.length;
this.hash.update(data, 'binary');
return true;
}
};

MD5Calc.prototype.end = function(data){
this.write(data);
this.callback(this.count, this.hash.digest('base64'), this.chunks);
}
};

MD5Calc.prototype.removeListener = function(){
;
}
};

MD5Calc.prototype.on = function(evt, func){
;
}
};

MD5Calc.prototype.emit = function(evt, data){
;
}
};

exports.Class = MD5Calc;

Expand Down
4 changes: 2 additions & 2 deletions lib/RSParser.js
Expand Up @@ -6,7 +6,7 @@ function Record(attrs, vals){
}
Record.prototype.print = function(){
console.log('I am object with class.');
}
};
function Attr(name, dataType){
this.name = name;
this.dataType = dataType;
Expand All @@ -31,7 +31,7 @@ function parse(data){
attrsCur = attrsCur.map(function(v, i){
var tp = v.split(':'); // attr should be in format attrName:attrTypeId
return new Attr(tp[0], tp[1]);
})
});
rss[rsNameCur] = {
name : rsNameCur,
attrs : attrsCur,
Expand Down
2 changes: 1 addition & 1 deletion lib/SidGuard.js
Expand Up @@ -61,7 +61,7 @@ function checkUpdate(host, bsid, guard, cip){
var stats = {
cleans : 0,
totalTime : 0
}
};

function cleanUp(){
var now = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion lib/StreamSpliter.js
Expand Up @@ -79,7 +79,7 @@ if (bUnitText) {
var spliter = new ByLeadingSize(c, 'readInt32BE');
spliter.on('test', function(str){
console.log(str);
})
});
spliter.on('message', function(msg){
console.log('received message : ' + msg.toString('utf8', 4));
});
Expand Down
2 changes: 1 addition & 1 deletion lib/constant.js
@@ -1,3 +1,3 @@
module.exports = {
REQ_END_MARK : '-- end of req --'
}
};
1 change: 0 additions & 1 deletion lib/db.js
Expand Up @@ -221,7 +221,6 @@ setInterval(function(){
var oraSock = busyRec.oraSock;
if (busyRec.response) {
// todo: find too long executions that has partial response returned, timeout it
return;
} else {
if (now - busyRec.date > cfg.ExecTimeout) {
waitTimeoutStats.resp++;
Expand Down
6 changes: 3 additions & 3 deletions lib/monitor.js
Expand Up @@ -20,7 +20,7 @@ exports.showStatus = function(req, res){
res.write('<br/>');
}

res.write('<head><style>body{line-height: 1.3em;}</style></head>')
res.write('<head><style>body{line-height: 1.3em;}</style></head>');

w('Server started at ' + startTime);
w('');
Expand Down Expand Up @@ -88,8 +88,8 @@ exports.showStatus = function(req, res){
w('Session count by host:port :');
Object.keys(sids).forEach(function(host){
w(fmt('%s > %d', host, Object.keys(sids[host]).length));
})
});
w('</br/> Clean Statistics:');

res.end();
}
};
5 changes: 2 additions & 3 deletions lib/psp.web.js
Expand Up @@ -21,7 +21,6 @@ var cfg = require('./cfg.js')
, guidMgr = require('./guidMgr.js')
, fmt = require('util').format
, utl = require('./util.js')
, base64alt = utl.base64alt
, mGuard = require('./SidGuard.js')
;

Expand Down Expand Up @@ -89,7 +88,7 @@ function pspdweb(req, res, next){

case 'feedback' :
stat.fbCnt++;
fbseq = parseInt(rb.search.split('=')[1]);
var fbseq = parseInt(rb.search.split('=')[1]);
fbItem = fbBuffer[fbseq];
if (fbItem) {
delete fbBuffer[fbseq];
Expand Down Expand Up @@ -254,7 +253,7 @@ function pspdweb(req, res, next){
computeHost();
if (!msid) {
msid = guidMgr.create();
var tEnd = new Date(Date.UTC(9999, 1, 1, 0, 0, 0, 0)).toGMTString();
// var tEnd = new Date(Date.UTC(9999, 1, 1, 0, 0, 0, 0)).toGMTString();
setCookies.push(fmt('MSID=%s%s;Version=1;Max-Age=%s;Path=/', msid, host ? (';Domain=.' + host) : '', 10000 * 24 * 60 * 60));
}
if (!bsid) {
Expand Down
2 changes: 1 addition & 1 deletion lib/secret.js
Expand Up @@ -18,7 +18,7 @@ function random(){
function Secret(){
this.time = new Date();
this.value = random();
secrets.push(combined)
secrets.push(combined);
return fmt(time) + this.value;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/static.js
Expand Up @@ -8,6 +8,6 @@ module.exports = function(setting){

common.mount_static(app);
common.start_static(app);
}
};


1 change: 0 additions & 1 deletion lib/upload.js
Expand Up @@ -97,7 +97,6 @@ module.exports = function(req, oraSock, next){
if (err) console.warn('html upload file "%s" can not be striped of script tag !');
});
});
return;
}
})
.on('end', function(){
Expand Down
14 changes: 7 additions & 7 deletions lib/util.js
Expand Up @@ -26,7 +26,7 @@ exports.ensureDir = function(path){
tryPath = uploadDir + sects.slice(0, j + 1).join('/');
fs.mkdirSync(tryPath);
}
}
};

exports.override = function(def, setting){
var cfg = {};
Expand All @@ -36,7 +36,7 @@ exports.override = function(def, setting){
else
cfg[n] = def[n];
return cfg;
}
};

exports.override2 = function(def, setting){
setting = setting || {};
Expand All @@ -46,7 +46,7 @@ exports.override2 = function(def, setting){
else
def[n] = def[n];
return def;
}
};

exports.find = function(arr, item, func){
func = func || function(p){
Expand All @@ -57,17 +57,17 @@ exports.find = function(arr, item, func){
return i;
}
return -1;
}
};

exports.makeArray = function(size){
var r = new Array(size);
for (var i = 0; i < size; i++) r[i] = i;
return r;
}
};

exports.dummy = function(){
;
}
};

var ranges = [
[32, 42],
Expand Down Expand Up @@ -106,7 +106,7 @@ exports.hash2 = hash2;

exports.random = function(){
return crypto.randomBytes(4).toString('hex');
}
};

exports.gracefulExit = function(beforeExit){
process.on('SIGTERM', beforeExit); // kill or kill -15
Expand Down
4 changes: 2 additions & 2 deletions lib/zip.js
Expand Up @@ -3,7 +3,7 @@ var zlib = require('zlib');
exports.zipMap = {
'gzip' : zlib.createGzip,
'deflate' : zlib.createDeflateRaw
}
};

exports.chooseZip = function(req){
// from the NodeJS available methods, choose the client supported method with the highest priority
Expand All @@ -17,4 +17,4 @@ exports.chooseZip = function(req){
if (~v_zips.indexOf('deflate')) {
return 'deflate';
}
}
};

0 comments on commit 95a7784

Please sign in to comment.