mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
Fix encoding of uris for data protocol (#6723)
* fix encoding or uris * fix tests
This commit is contained in:
@@ -195,7 +195,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
// Connection Management handlers
|
||||
$connect(handle: number, connectionUri: string, connection: azdata.ConnectionInfo): Thenable<boolean> {
|
||||
if (this.uriTransformer) {
|
||||
connectionUri = URI.from(this.uriTransformer.transformIncoming(URI.parse(connectionUri))).toString();
|
||||
connectionUri = URI.from(this.uriTransformer.transformIncoming(URI.parse(connectionUri))).toString(true);
|
||||
}
|
||||
return this._resolveProvider<azdata.ConnectionProvider>(handle).connect(connectionUri, connection);
|
||||
}
|
||||
@@ -235,7 +235,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
|
||||
$onConnectComplete(handle: number, connectionInfoSummary: azdata.ConnectionInfoSummary): void {
|
||||
if (this.uriTransformer) {
|
||||
connectionInfoSummary.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(connectionInfoSummary.ownerUri))).toString();
|
||||
connectionInfoSummary.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(connectionInfoSummary.ownerUri))).toString(true);
|
||||
}
|
||||
this._proxy.$onConnectionComplete(handle, connectionInfoSummary);
|
||||
}
|
||||
@@ -261,7 +261,7 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
|
||||
$runQuery(handle: number, ownerUri: string, selection: azdata.ISelectionData, runOptions?: azdata.ExecutionPlanOptions): Thenable<void> {
|
||||
if (this.uriTransformer) {
|
||||
ownerUri = URI.from(this.uriTransformer.transformIncoming(URI.parse(ownerUri))).toString();
|
||||
ownerUri = URI.from(this.uriTransformer.transformIncoming(URI.parse(ownerUri))).toString(true);
|
||||
}
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).runQuery(ownerUri, selection, runOptions);
|
||||
}
|
||||
@@ -292,51 +292,51 @@ export class ExtHostDataProtocol extends ExtHostDataProtocolShape {
|
||||
|
||||
$getQueryRows(handle: number, rowData: azdata.QueryExecuteSubsetParams): Thenable<azdata.QueryExecuteSubsetResult> {
|
||||
if (this.uriTransformer) {
|
||||
rowData.ownerUri = URI.from(this.uriTransformer.transformIncoming(URI.parse(rowData.ownerUri))).toString();
|
||||
rowData.ownerUri = URI.from(this.uriTransformer.transformIncoming(URI.parse(rowData.ownerUri))).toString(true);
|
||||
}
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).getQueryRows(rowData);
|
||||
}
|
||||
|
||||
$disposeQuery(handle: number, ownerUri: string): Thenable<void> {
|
||||
if (this.uriTransformer) {
|
||||
ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(ownerUri))).toString();
|
||||
ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(ownerUri))).toString(true);
|
||||
}
|
||||
return this._resolveProvider<azdata.QueryProvider>(handle).disposeQuery(ownerUri);
|
||||
}
|
||||
|
||||
$onQueryComplete(handle: number, result: azdata.QueryExecuteCompleteNotificationResult): void {
|
||||
if (this.uriTransformer) {
|
||||
result.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(result.ownerUri))).toString();
|
||||
result.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(result.ownerUri))).toString(true);
|
||||
}
|
||||
this._proxy.$onQueryComplete(handle, result);
|
||||
}
|
||||
$onBatchStart(handle: number, batchInfo: azdata.QueryExecuteBatchNotificationParams): void {
|
||||
if (this.uriTransformer) {
|
||||
batchInfo.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(batchInfo.ownerUri))).toString();
|
||||
batchInfo.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(batchInfo.ownerUri))).toString(true);
|
||||
}
|
||||
this._proxy.$onBatchStart(handle, batchInfo);
|
||||
}
|
||||
$onBatchComplete(handle: number, batchInfo: azdata.QueryExecuteBatchNotificationParams): void {
|
||||
if (this.uriTransformer) {
|
||||
batchInfo.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(batchInfo.ownerUri))).toString();
|
||||
batchInfo.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(batchInfo.ownerUri))).toString(true);
|
||||
}
|
||||
this._proxy.$onBatchComplete(handle, batchInfo);
|
||||
}
|
||||
$onResultSetAvailable(handle: number, resultSetInfo: azdata.QueryExecuteResultSetNotificationParams): void {
|
||||
if (this.uriTransformer) {
|
||||
resultSetInfo.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(resultSetInfo.ownerUri))).toString();
|
||||
resultSetInfo.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(resultSetInfo.ownerUri))).toString(true);
|
||||
}
|
||||
this._proxy.$onResultSetAvailable(handle, resultSetInfo);
|
||||
}
|
||||
$onResultSetUpdated(handle: number, resultSetInfo: azdata.QueryExecuteResultSetNotificationParams): void {
|
||||
if (this.uriTransformer) {
|
||||
resultSetInfo.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(resultSetInfo.ownerUri))).toString();
|
||||
resultSetInfo.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(resultSetInfo.ownerUri))).toString(true);
|
||||
}
|
||||
this._proxy.$onResultSetUpdated(handle, resultSetInfo);
|
||||
}
|
||||
$onQueryMessage(handle: number, message: azdata.QueryExecuteMessageParams): void {
|
||||
if (this.uriTransformer) {
|
||||
message.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(message.ownerUri))).toString();
|
||||
message.ownerUri = URI.from(this.uriTransformer.transformOutgoing(URI.parse(message.ownerUri))).toString(true);
|
||||
}
|
||||
this._proxy.$onQueryMessage(handle, message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user