mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 06:54:58 +00:00
Update http.js
This commit is contained in:
parent
0764d2793d
commit
f2239e75a9
15
lib/http.js
15
lib/http.js
|
@ -103,6 +103,9 @@ var HTTPObject = function(engine) {
|
||||||
} else if (this.engine == "BITS") {
|
} else if (this.engine == "BITS") {
|
||||||
this._interface = SHELL.create();
|
this._interface = SHELL.create();
|
||||||
this._interface.setPrefix("bitsadmin.exe"); // the location of BITS binary
|
this._interface.setPrefix("bitsadmin.exe"); // the location of BITS binary
|
||||||
|
} else if (this.engine == "CERT") {
|
||||||
|
this._interface = SHELL.create();
|
||||||
|
this._interface.setPrefix("certutil.exe"); // the location of Certutil binary
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -453,7 +456,7 @@ var HTTPObject = function(engine) {
|
||||||
if (this.states.length > 0) {
|
if (this.states.length > 0) {
|
||||||
// Make CURL context
|
// Make CURL context
|
||||||
var state = this.states[this.states.length - 1];
|
var state = this.states[this.states.length - 1];
|
||||||
var cmd = ["bin\\curl"];
|
var cmd = [];
|
||||||
var url = state.url;
|
var url = state.url;
|
||||||
|
|
||||||
if (this.isDebugging) {
|
if (this.isDebugging) {
|
||||||
|
@ -611,6 +614,14 @@ var HTTPObject = function(engine) {
|
||||||
|
|
||||||
out.destroy(); // destroy the downloaded data
|
out.destroy(); // destroy the downloaded data
|
||||||
}
|
}
|
||||||
|
} else if (this.engine == "CERT") {
|
||||||
|
var state = this.states[this.states.length - 1];
|
||||||
|
var out = PipeIPC.connect("volatile");
|
||||||
|
var cmd = ["-urlcache", "-split", "-f", state.url, out.path];
|
||||||
|
this._interface.exec(cmd);
|
||||||
|
out.reload();
|
||||||
|
responseText = out.read();
|
||||||
|
out.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof responseText === "string") {
|
if (typeof responseText === "string") {
|
||||||
|
@ -1077,7 +1088,7 @@ exports.parseURL = parseURL;
|
||||||
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
|
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
|
||||||
exports.defaultUserAgent = DEFAULT_USER_AGENT; // compatible with the specific case
|
exports.defaultUserAgent = DEFAULT_USER_AGENT; // compatible with the specific case
|
||||||
|
|
||||||
exports.VERSIONINFO = "HTTP client module (http.js) version 0.7.22";
|
exports.VERSIONINFO = "HTTP client module (http.js) version 0.7.24";
|
||||||
exports.AUTHOR = "abuse@catswords.net";
|
exports.AUTHOR = "abuse@catswords.net";
|
||||||
exports.global = global;
|
exports.global = global;
|
||||||
exports.require = global.require;
|
exports.require = global.require;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user