mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
[feature] Fix TestValue to avoid double // in Urls (#4920)
•Adds logic in Get-WebListenerUrl to only apply the TestValue part of the path if it was supplied.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user