diff --git a/lib/util.js b/lib/util.js index d86e06f73..28724e401 100644 --- a/lib/util.js +++ b/lib/util.js @@ -440,7 +440,6 @@ if (nodeJSVersion && nodeJSVersion.startsWith('v')) } // user-agent HTTP header const userAgent = 'JavaScript' + '/' + driverVersion - + '/' + 'NodeJS' + '/' + nodeJSVersion - + '/' + process.platform + '-' + process.arch; + + ' (' + process.platform + '-' + process.arch + ') ' + 'NodeJS' + '/' + nodeJSVersion; exports.userAgent = userAgent; diff --git a/package.json b/package.json index e073c9d18..070460b76 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "snowflake-sdk", - "version": "1.3.0", + "version": "1.3.1", "description": "Node.js driver for Snowflake", "dependencies": { "agent-base": "^2.1.1", diff --git a/scripts/hang_webserver.py b/scripts/hang_webserver.py index dccb39b6d..c08d6c85b 100755 --- a/scripts/hang_webserver.py +++ b/scripts/hang_webserver.py @@ -16,10 +16,10 @@ def do_POST(self): self.send_header('Content-Type', 'text/plain') self.end_headers() elif self.path.startswith('/hang'): + time.sleep(300) self.send_response(200, 'OK') self.send_header('Content-Type', 'text/plain') self.end_headers() - time.sleep(300) else: self.send_response(200, 'OK') self.send_header('Content-Type', 'text/plain') diff --git a/test/integration/testConnectionWithOCSP.js b/test/integration/testConnectionWithOCSP.js index 9008be95b..1364f0a0a 100644 --- a/test/integration/testConnectionWithOCSP.js +++ b/test/integration/testConnectionWithOCSP.js @@ -70,7 +70,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false; // inject validity error process.env.SF_OCSP_TEST_INJECT_VALIDITY_ERROR = 'true'; @@ -101,7 +100,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false; // inject validity error process.env.SF_OCSP_TEST_INJECT_VALIDITY_ERROR = 'true'; @@ -134,7 +132,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false; // inject validity error process.env.SF_OCSP_TEST_INJECT_UNKNOWN_STATUS = 'true'; @@ -165,7 +162,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false; // inject validity error process.env.SF_OCSP_TEST_INJECT_UNKNOWN_STATUS = 'true'; @@ -197,7 +193,7 @@ describe('Connection with OCSP test', function () done ); }); - + /* it('OCSP Revoked Cert - Fail Open', function (done) { snowflake.configure({ocspFailOpen: true}); @@ -239,13 +235,12 @@ describe('Connection with OCSP test', function () ], done ); - }); + });*/ it('OCSP Cache Server Timeout - Fail Open', function (done) { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; // cache server is used SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = true; // fake OCSP responder. @@ -282,7 +277,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; // cache server is used SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = true; // fake OCSP responder. @@ -323,7 +317,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; // no cache server is used SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false; // fake OCSP responder. @@ -360,7 +353,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; // no cache server is used SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false; // fake OCSP responder. @@ -405,7 +397,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; // no cache server is used SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = true; // fake OCSP responder. @@ -444,7 +435,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; // no cache server is used SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false; // fake OCSP responder. @@ -487,7 +477,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; // no cache server is used SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false; // fake OCSP responder. @@ -521,7 +510,6 @@ describe('Connection with OCSP test', function () { deleteCache(); SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined; - SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true; // no cache server is used SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false; // fake OCSP responder. @@ -557,15 +545,6 @@ describe('Connection with OCSP test', function () }); const testInvalidCertConnectionOptions = [ - { - connectString: { - accessUrl: 'https://untrusted-root.badssl.com', - username: 'fakeuser', - password: 'fakepasword', - account: 'fakeaccount', - }, - errorCode: 'SELF_SIGNED_CERT_IN_CHAIN' - }, { connectString: { accessUrl: 'https://expired.badssl.com',