Skip to content

Commit c69fa04

Browse files
fix
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent ea98202 commit c69fa04

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/connection/connections/HttpConnection.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ export default class HttpConnection implements IConnectionProvider {
9898

9999
this.connection = new ThriftHttpConnection(
100100
{
101-
url: `${options.https ? 'https' : 'http'}://${options.host.replace(/\/$/, '')}:${options.port}${options.path ? (options.path.startsWith('/') ? '' : '/') + options.path.replace(/\/$/, '') : '/'}`,
101+
url: `${options.https ? 'https' : 'http'}://${options.host.replace(/\/$/, '')}:${options.port}${
102+
options.path ? (options.path.startsWith('/') ? '' : '/') + options.path.replace(/\/$/, '') : '/'
103+
}`,
102104
transport: thrift.TBufferedTransport,
103105
protocol: thrift.TBinaryProtocol,
104106
getRetryPolicy: () => this.getRetryPolicy(),

tests/unit/connection/connections/HttpConnection.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@ describe('HttpConnection.connect', () => {
162162
input: { host: 'xyz.com', path: 'sql/v1/' },
163163
expected: 'https://xyz.com:443/sql/v1',
164164
},
165-
{
166-
input: { host: 'https://xyz.com', path: 'sql/v1' },
167-
expected: 'https://xyz.com:443/sql/v1',
168-
},
169165
];
170166

171167
for (const testCase of testCases) {

0 commit comments

Comments
 (0)