diff --git a/test/dotnet.Tests/CommandTests/Test/HttpTestHostGatewayTests.cs b/test/dotnet.Tests/CommandTests/Test/HttpTestHostGatewayTests.cs index 9b0689eed488..6014651a3eac 100644 --- a/test/dotnet.Tests/CommandTests/Test/HttpTestHostGatewayTests.cs +++ b/test/dotnet.Tests/CommandTests/Test/HttpTestHostGatewayTests.cs @@ -129,7 +129,7 @@ public async Task Options_WrongPathCannotPinCorsPolicy() using var client = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false }); using var wrongPathRequest = new HttpRequestMessage( HttpMethod.Options, - new Uri(gateway.Endpoint.GetLeftPart(UriPartial.Authority) + "/")); + new Uri(gateway.Endpoint, "wrong-path")); wrongPathRequest.Headers.Add("Origin", "http://127.0.0.1:5001"); using HttpResponseMessage wrongPathResponse = await client.SendAsync(wrongPathRequest, TestContext.CancellationToken);