appolo-agent
Advanced tools
Comparing version 6.0.2 to 6.0.3
@@ -116,7 +116,2 @@ "use strict"; | ||
this.sending = true; | ||
//check if need to gzip | ||
if (this.useGzip) { | ||
gzipResponse(this, data); | ||
return; | ||
} | ||
let isEmptyStatusCode = statusEmpty[this.statusCode || (this.statusCode = 200)]; | ||
@@ -141,2 +136,7 @@ //send empty | ||
} | ||
//check if need to gzip | ||
if (this.useGzip && data) { | ||
gzipResponse(this, data); | ||
return; | ||
} | ||
this.setHeader('Content-Length', Buffer.byteLength(data, 'utf8')); | ||
@@ -143,0 +143,0 @@ this.req.method[0] == 'H' ? this.end() : this.end(data); |
@@ -194,9 +194,4 @@ import http = require('http'); | ||
this.sending = true; | ||
//check if need to gzip | ||
if (this.useGzip) { | ||
gzipResponse(this, data); | ||
return; | ||
} | ||
let isEmptyStatusCode = statusEmpty[this.statusCode || (this.statusCode = 200)] | ||
let isEmptyStatusCode = statusEmpty[this.statusCode || (this.statusCode = 200)]; | ||
@@ -221,2 +216,8 @@ //send empty | ||
//check if need to gzip | ||
if (this.useGzip && data) { | ||
gzipResponse(this, data); | ||
return; | ||
} | ||
this.setHeader('Content-Length', Buffer.byteLength(data as string, 'utf8')); | ||
@@ -223,0 +224,0 @@ |
@@ -22,3 +22,3 @@ { | ||
"main": "./index.js", | ||
"version": "6.0.2", | ||
"version": "6.0.3", | ||
"license": "MIT", | ||
@@ -25,0 +25,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68659