mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-11-29 10:53:43 +00:00
Update http.js
This commit is contained in:
parent
f41bd517f4
commit
5d1817eef3
16
lib/http.js
16
lib/http.js
|
|
@ -33,11 +33,13 @@ var HTTPObject = function(engine) {
|
||||||
"base64json": function(v) {
|
"base64json": function(v) {
|
||||||
return BASE64.encode(JSON.stringify(v));
|
return BASE64.encode(JSON.stringify(v));
|
||||||
},
|
},
|
||||||
"unixnow": function() {
|
"unixnow": function(diff) {
|
||||||
return Math.floor(new Date().getTime() / 1000);
|
var t = parseInt(diff);
|
||||||
|
return Math.floor(new Date().getTime() / 1000) - t;
|
||||||
},
|
},
|
||||||
"unixnowms": function() {
|
"unixnowms": function(diff) {
|
||||||
return new Date().getTime();
|
var t = parseInt(diff);
|
||||||
|
return new Date().getTime() - t;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.connectTimeout = 0;
|
this.connectTimeout = 0;
|
||||||
|
|
@ -613,13 +615,17 @@ var HTTPObject = function(engine) {
|
||||||
|
|
||||||
case "object":
|
case "object":
|
||||||
s4 = this.variables[s3];
|
s4 = this.variables[s3];
|
||||||
for (var k in s4) s4[k] = this.evaluate(s4[k]);
|
for (var k in s4) {
|
||||||
|
s4[k] = this.evaluate(s4[k]);
|
||||||
|
}
|
||||||
s2 = s4;
|
s2 = s4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
s2 = this.variables[s3];
|
s2 = this.variables[s3];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
s2 = s3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
str = str.substring(0, Lpos) + s2 + str.substring(Rpos + 1);
|
str = str.substring(0, Lpos) + s2 + str.substring(Rpos + 1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user