fix indentation

This commit is contained in:
Namhyeon Go 2024-04-06 20:26:58 +09:00
parent db5c294ab9
commit 14145d6f70

View File

@ -72,7 +72,7 @@ var HTTPObject = function(engine) {
this.charset = FILE.CdoCharset.CdoUTF_8; this.charset = FILE.CdoCharset.CdoUTF_8;
this.isUseCharsetDetector = false; this.isUseCharsetDetector = false;
this.isVerifySSL = true; this.isVerifySSL = true;
this.create = function() { this.create = function() {
if (this.engine == "MSXML") { if (this.engine == "MSXML") {
@ -395,27 +395,27 @@ var HTTPObject = function(engine) {
// [lib/http] cURL error with non-escaped ampersand on Command Prompt #103 // [lib/http] cURL error with non-escaped ampersand on Command Prompt #103
var replaceAndExcludeCaretAnd = function(inputString) { var replaceAndExcludeCaretAnd = function(inputString) {
var result = ""; var result = "";
var i = 0; var i = 0;
while (i < inputString.length) { while (i < inputString.length) {
// If the found position is ^&, do not modify and add it as is to the result // If the found position is ^&, do not modify and add it as is to the result
if (i < inputString.length - 1 && inputString.slice(i, i + 2) === "^&") { if (i < inputString.length - 1 && inputString.slice(i, i + 2) === "^&") {
result += inputString.slice(i, i + 2); result += inputString.slice(i, i + 2);
i += 2; i += 2;
} else { } else {
// Replace & with ^& // Replace & with ^&
if (inputString.charAt(i) === "&") { if (inputString.charAt(i) === "&") {
result += "^&"; result += "^&";
} else { } else {
result += inputString.charAt(i); result += inputString.charAt(i);
} }
i++; i++;
} }
} }
return result; return result;
}; };
if (this.contentType != null) { if (this.contentType != null) {
this.setHeader("Content-Type", this.contentType); this.setHeader("Content-Type", this.contentType);