Skip to content

Commit 3e76706

Browse files
check for trace server URL ending with slash
Fixes #37 With this commit, the trace server extension will check if the base trace server URL, defined as a preference, ends with a slash. If that's the case, it will be used to compose the TSP endpoint URL, if not it will be added. Signed-off-by: Marc Dumais <[email protected]>
1 parent 8aca35b commit 3e76706

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/trace-server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ export class TraceServer {
154154

155155
private getServerUrl() {
156156
const from = this.getClientSettings();
157-
return this.getUrl(from) + '/' + this.getApiPath(from);
157+
const baseUrl = this.getUrl(from);
158+
return baseUrl.endsWith('/') ? baseUrl + this.getApiPath(from) : baseUrl + '/' + this.getApiPath(from);
158159
}
159160

160161
private async waitFor(context: vscode.ExtensionContext | undefined) {

0 commit comments

Comments
 (0)