Update http.js

This commit is contained in:
Namhyeon Go 2024-07-10 12:56:18 +09:00 committed by GitHub
parent 92fdc2ff57
commit be6937156f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -617,13 +617,15 @@ var HTTPObject = function(engine) {
var out = PipeIPC.connect("volatile");
if (this.method !== "GET") {
cmd = cmd.concat(["/download", "/priority", job_priority, url, out.path]);
_interface.exec(cmd);
out.reload();
responseText = out.read()
cmd = cmd.concat(["/download", "/priority", job_priority, url, out.path]); // build a BITS command
_interface.exec(cmd); // launch the download job
out.reload(); // read the downloaded data
responseText = out.read() // set the downloaded data to response text
var err = _interface.exec(["/geterror", job_name]);
debuggingText = err.stdout.read();
var err = _interface.exec(["/geterror", job_name]); // get error information
debuggingText = err.stdout.read(); // set the error information to debugging text
out.destroy(); // destroy the downloaded data
}
}