From 51da417506933c651e4db67bafaea9ca775e0ad1 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Thu, 20 Mar 2025 17:03:31 +0900 Subject: [PATCH 1/2] Update http.js --- lib/http.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/http.js b/lib/http.js index 8189f21..4c447e7 100644 --- a/lib/http.js +++ b/lib/http.js @@ -86,6 +86,7 @@ var HTTPObject = function(engine) { this.isLoggingCookie = false; this.debuggingText = ''; + this.curlVersion = "8.12.1_4"; this.curlOptions = []; this.charset = FILE.CdoCharset.CdoUTF_8; @@ -118,11 +119,11 @@ var HTTPObject = function(engine) { // the location of cURL binary var arch = SYS.getArch(); if (arch.toLowerCase().indexOf("arm") > -1) { - this.setBinPath("bin\\x64\\curl-8.10.1_1-win64a-mingw\\bin\\curl.exe"); + this.setBinPath("bin\\x64\\curl-" + this.curlVersion + "-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"); + this.setBinPath("bin\\x64\\curl-" + this.curlVersion + "-win64-mingw\\bin\\curl.exe"); } else { - this.setBinPath("bin\\x86\\curl-8.10.1_1-win32-mingw\\bin\\curl.exe"); + this.setBinPath("bin\\x86\\curl-" + this.curlVersion + "-win32-mingw\\bin\\curl.exe"); } // do not clear after calling the `exec` @@ -1130,6 +1131,10 @@ var HTTPObject = function(engine) { this.isCompressedResponse = isCompressedResponse; return this; }; + + this.setCurlVersion = function(curlVersion) { + this.curlVersion = curlVersion; + }; this.create(); }; @@ -1215,7 +1220,7 @@ exports.parseURL = parseURL; exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT; exports.defaultUserAgent = DEFAULT_USER_AGENT; // compatible -exports.VERSIONINFO = "HTTP REST API client for WelsonJS framework (http.js) version 0.7.45"; +exports.VERSIONINFO = "WelsonJS framework HTTP client (http.js) version 0.7.46"; exports.AUTHOR = "abuse@catswords.net"; exports.global = global; exports.require = global.require; From 5a2a48945bdc07af48f1ab18393cde1a51d4d459 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Fri, 21 Mar 2025 10:26:54 +0900 Subject: [PATCH 2/2] Update http.js --- lib/http.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/http.js b/lib/http.js index 4c447e7..d7df4f2 100644 --- a/lib/http.js +++ b/lib/http.js @@ -143,6 +143,11 @@ var HTTPObject = function(engine) { console.info(this.engine, "is use", binPath); this._interface.setPrefix(binPath); }; + + this.setCurlVersion = function(curlVersion) { + this.curlVersion = curlVersion; + this.setEngine("CURL"); + }; this.jqEnabled = function() { return (typeof(window) !== "undefined" && typeof(window.jQuery) !== "undefined"); @@ -1131,10 +1136,6 @@ var HTTPObject = function(engine) { this.isCompressedResponse = isCompressedResponse; return this; }; - - this.setCurlVersion = function(curlVersion) { - this.curlVersion = curlVersion; - }; this.create(); }; @@ -1220,7 +1221,7 @@ exports.parseURL = parseURL; exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT; exports.defaultUserAgent = DEFAULT_USER_AGENT; // compatible -exports.VERSIONINFO = "WelsonJS framework HTTP client (http.js) version 0.7.46"; +exports.VERSIONINFO = "WelsonJS framework HTTP client (http.js) version 0.7.47"; exports.AUTHOR = "abuse@catswords.net"; exports.global = global; exports.require = global.require;