From 9ea7fff7b5d10819f99b4a122a12bf10bdf6675a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 20:17:18 +0000 Subject: [PATCH 1/2] fix: skip empty Cookie header when no cookie parameters are present MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When an API operation has no cookie parameters (the common case), OperationCompiler was always prepending ("Cookie", "") to the headers list. fillHeaders only filters null values — not empty strings — so the empty Cookie: header was sent with every request. Fix: only prepend the Cookie header when cookieHeader is non-empty. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/SwaggerProvider.DesignTime/OperationCompiler.fs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SwaggerProvider.DesignTime/OperationCompiler.fs b/src/SwaggerProvider.DesignTime/OperationCompiler.fs index b3ee49aa..ebc37e87 100644 --- a/src/SwaggerProvider.DesignTime/OperationCompiler.fs +++ b/src/SwaggerProvider.DesignTime/OperationCompiler.fs @@ -365,7 +365,10 @@ type OperationCompiler(schema: OpenApiDocument, defCompiler: DefinitionCompiler, |> Seq.map(fun (name, value) -> $"{name}={value}") |> String.concat ";" - ("Cookie", cookieHeader) :: (%headers) + if String.IsNullOrEmpty cookieHeader then + %headers + else + ("Cookie", cookieHeader) :: (%headers) @> (path, queryParams, headers') From 3641ed78b9f4cbca5c2368b3cc64a9d5c336afcf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 27 May 2026 20:17:22 +0000 Subject: [PATCH 2/2] ci: trigger checks