mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
fix indentation
This commit is contained in:
parent
db5c294ab9
commit
14145d6f70
40
lib/http.js
40
lib/http.js
|
@ -72,7 +72,7 @@ var HTTPObject = function(engine) {
|
|||
this.charset = FILE.CdoCharset.CdoUTF_8;
|
||||
this.isUseCharsetDetector = false;
|
||||
|
||||
this.isVerifySSL = true;
|
||||
this.isVerifySSL = true;
|
||||
|
||||
this.create = function() {
|
||||
if (this.engine == "MSXML") {
|
||||
|
@ -395,27 +395,27 @@ var HTTPObject = function(engine) {
|
|||
|
||||
// [lib/http] cURL error with non-escaped ampersand on Command Prompt #103
|
||||
var replaceAndExcludeCaretAnd = function(inputString) {
|
||||
var result = "";
|
||||
var i = 0;
|
||||
var result = "";
|
||||
var i = 0;
|
||||
|
||||
while (i < inputString.length) {
|
||||
// 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) === "^&") {
|
||||
result += inputString.slice(i, i + 2);
|
||||
i += 2;
|
||||
} else {
|
||||
// Replace & with ^&
|
||||
if (inputString.charAt(i) === "&") {
|
||||
result += "^&";
|
||||
} else {
|
||||
result += inputString.charAt(i);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
while (i < inputString.length) {
|
||||
// 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) === "^&") {
|
||||
result += inputString.slice(i, i + 2);
|
||||
i += 2;
|
||||
} else {
|
||||
// Replace & with ^&
|
||||
if (inputString.charAt(i) === "&") {
|
||||
result += "^&";
|
||||
} else {
|
||||
result += inputString.charAt(i);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
return result;
|
||||
};
|
||||
|
||||
if (this.contentType != null) {
|
||||
this.setHeader("Content-Type", this.contentType);
|
||||
|
|
Loading…
Reference in New Issue
Block a user