mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-09 13:16:05 +00:00
Update http.js
This commit is contained in:
parent
92fdc2ff57
commit
be6937156f
14
lib/http.js
14
lib/http.js
|
@ -617,13 +617,15 @@ var HTTPObject = function(engine) {
|
||||||
var out = PipeIPC.connect("volatile");
|
var out = PipeIPC.connect("volatile");
|
||||||
|
|
||||||
if (this.method !== "GET") {
|
if (this.method !== "GET") {
|
||||||
cmd = cmd.concat(["/download", "/priority", job_priority, url, out.path]);
|
cmd = cmd.concat(["/download", "/priority", job_priority, url, out.path]); // build a BITS command
|
||||||
_interface.exec(cmd);
|
_interface.exec(cmd); // launch the download job
|
||||||
out.reload();
|
out.reload(); // read the downloaded data
|
||||||
responseText = out.read()
|
responseText = out.read() // set the downloaded data to response text
|
||||||
|
|
||||||
var err = _interface.exec(["/geterror", job_name]);
|
var err = _interface.exec(["/geterror", job_name]); // get error information
|
||||||
debuggingText = err.stdout.read();
|
debuggingText = err.stdout.read(); // set the error information to debugging text
|
||||||
|
|
||||||
|
out.destroy(); // destroy the downloaded data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user