Update http.js

This commit is contained in:
Namhyeon Go 2024-05-22 18:34:45 +09:00 committed by GitHub
parent 0f07c61ad6
commit a96052ce27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,8 +73,8 @@ 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.isCompressedResponse = false;
this.create = function() { this.create = function() {
if (this.engine == "MSXML") { if (this.engine == "MSXML") {
@ -456,6 +456,10 @@ var HTTPObject = function(engine) {
cmd.push("-v"); cmd.push("-v");
} }
if (this.isCompressedResponse) {
cmd.push("--compressed");
}
if (this.isFollowRedirect) { if (this.isFollowRedirect) {
cmd.push("-L"); cmd.push("-L");
} }
@ -973,6 +977,11 @@ var HTTPObject = function(engine) {
return this.detectSSL() && (this.debuggingText.indexOf("certificate problem") < 0); return this.detectSSL() && (this.debuggingText.indexOf("certificate problem") < 0);
}; };
this.setIsCompressedResponse = function(isCompressedResponse) {
this.isCompressedResponse = isCompressedResponse;
return this;
};
this.create(); this.create();
}; };
@ -1037,7 +1046,7 @@ exports._delete = _delete;
exports.parseURL = parseURL; exports.parseURL = parseURL;
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT; exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
exports.VERSIONINFO = "HTTP request module (http.js) version 0.7.15"; exports.VERSIONINFO = "HTTP request module (http.js) version 0.7.17";
exports.AUTHOR = "abuse@catswords.net"; exports.AUTHOR = "abuse@catswords.net";
exports.global = global; exports.global = global;
exports.require = global.require; exports.require = global.require;