Skip to content

Commit e8495b0

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 340f6f0 commit e8495b0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Service.Tests/Configuration/HealthEndpointTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,11 @@ private static HttpUtilities SetupMcpTest(RuntimeConfig runtimeConfig, HttpStatu
430430
"SendAsync",
431431
ItExpr.Is<HttpRequestMessage>(req =>
432432
req.Method == HttpMethod.Post &&
433-
req.RequestUri == new Uri($"{BASE_DAB_URL}{runtimeConfig.McpPath}")),
433+
req.RequestUri == new Uri($"{BASE_DAB_URL}{runtimeConfig.McpPath}") &&
434+
req.Content != null &&
435+
req.Content.ReadAsStringAsync().Result.Contains("\"method\":\"initialize\"") &&
436+
req.Headers.TryGetValues("Accept", out IEnumerable<string>? acceptValues) &&
437+
acceptValues.Any(v => v.Contains("application/json") && v.Contains("text/event-stream"))),
434438
ItExpr.IsAny<CancellationToken>())
435439
.ReturnsAsync(new HttpResponseMessage(httpStatusCode)
436440
{

0 commit comments

Comments
 (0)