Skip to content

Commit

Permalink
Merge pull request #79061 from mjbvz/fix-webview-port-forward-encoding
Browse files Browse the repository at this point in the history
Skip using vscode's encoding for port forwarded uris
  • Loading branch information
mjbvz authored Aug 13, 2019
2 parents f3d50de + 272cf3f commit 57007c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/vs/workbench/contrib/webview/common/portMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ export class WebviewPortMappingManager extends Disposable {
if (this.extensionLocation && this.extensionLocation.scheme === REMOTE_HOST_SCHEME) {
const tunnel = await this.getOrCreateTunnel(mapping.extensionHostPort);
if (tunnel) {
return uri.with({
return encodeURI(uri.with({
authority: `127.0.0.1:${tunnel.tunnelLocalPort}`,
}).toString();
}).toString(true));
}
}

if (mapping.webviewPort !== mapping.extensionHostPort) {
return uri.with({
return encodeURI(uri.with({
authority: `${requestLocalHostInfo.address}:${mapping.extensionHostPort}`
}).toString();
}).toString(true));
}
}
}
Expand Down Expand Up @@ -84,4 +84,4 @@ export class WebviewPortMappingManager extends Disposable {
}
return tunnel;
}
}
}

0 comments on commit 57007c2

Please sign in to comment.