Add support ARM architecture (lib/http.js)

This commit is contained in:
Namhyeon Go 2024-09-25 16:11:41 +09:00
parent ce440ae7f7
commit 4f1154f412

View File

@ -168,7 +168,9 @@ var HTTPObject = function(engine) {
// the location of cURL binary
var arch = SYS.getArch();
if (arch.indexOf("64") > -1) {
if (arch.toLowerCase().indexOf("arm") > -1) {
this.setBinPath("bin\\x64\\curl-8.10.1_1-win64a-mingw\\bin\\curl.exe");
} else if (arch.indexOf("64") > -1) {
this.setBinPath("bin\\x64\\curl-8.10.1_1-win64-mingw\\bin\\curl.exe");
} else {
this.setBinPath("bin\\x86\\curl-8.10.1_1-win32-mingw\\bin\\curl.exe");
@ -185,7 +187,7 @@ var HTTPObject = function(engine) {
};
this.setBinPath = function(binPath) {
console.info(this.engine, " is use ", binPath);
console.info(this.engine, "is use", binPath);
this._interface.setPrefix(binPath);
};
@ -1165,7 +1167,7 @@ exports.parseURL = parseURL;
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
exports.defaultUserAgent = DEFAULT_USER_AGENT; // compatible
exports.VERSIONINFO = "HTTP REST Client (http.js) version 0.7.31";
exports.VERSIONINFO = "HTTP REST Client (http.js) version 0.7.32";
exports.AUTHOR = "abuse@catswords.net";
exports.global = global;
exports.require = global.require;