From dfc45371efce0ffa6033ebf2c51b7faab88395cc Mon Sep 17 00:00:00 2001 From: markekraus Date: Mon, 25 Sep 2017 20:25:49 -0500 Subject: [PATCH] [feature] Fix TestValue to avoid // Urls --- test/tools/Modules/WebListener/WebListener.psm1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/tools/Modules/WebListener/WebListener.psm1 b/test/tools/Modules/WebListener/WebListener.psm1 index 6fe0049cde1..87a5899d300 100644 --- a/test/tools/Modules/WebListener/WebListener.psm1 +++ b/test/tools/Modules/WebListener/WebListener.psm1 @@ -141,7 +141,16 @@ function Get-WebListenerUrl { $Uri.Port = $runningListener.HttpsPort $Uri.Scheme = 'Https' } - $Uri.Path = '{0}/{1}' -f $Test, $TestValue + + if ($TestValue) + { + $Uri.Path = '{0}/{1}' -f $Test, $TestValue + } + else + { + $Uri.Path = $Test + } + return [Uri]$Uri.ToString() } }