From 2ac024832c909afe554e13ba94d798fe72a86ee3 Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Sun, 6 Oct 2024 05:35:04 -0500 Subject: [PATCH] Removed invalid check when doing service invocation using HttpRequestMessage - it was improperly checking the destination host against the httpClient host when of course this wouldn't match up Signed-off-by: Whit Waldo --- src/Dapr.Client/DaprClientGrpc.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Dapr.Client/DaprClientGrpc.cs b/src/Dapr.Client/DaprClientGrpc.cs index af245afc3..8daba69c9 100644 --- a/src/Dapr.Client/DaprClientGrpc.cs +++ b/src/Dapr.Client/DaprClientGrpc.cs @@ -423,12 +423,7 @@ public override HttpRequestMessage CreateInvokeMethodRequest(HttpMetho public override async Task InvokeMethodWithResponseAsync(HttpRequestMessage request, CancellationToken cancellationToken = default) { ArgumentVerifier.ThrowIfNull(request, nameof(request)); - - if (!this.httpEndpoint.IsBaseOf(request.RequestUri)) - { - throw new InvalidOperationException("The provided request URI is not a Dapr service invocation URI."); - } - + // Note: we intentionally DO NOT validate the status code here. // This method allows you to 'invoke' without exceptions on non-2xx. try