Skip to content

Commit

Permalink
Allows mocking responses with multiple headers with the same name. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
waldekmastykarz authored Nov 5, 2024
1 parent e6c7873 commit 6f40ca3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dev-proxy-abstractions/ProxyUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ public static void MergeHeaders(IList<MockResponseHeader> allHeaders, IList<Mock
continue;
}

allHeaders.Remove(existingHeader);
// don't remove headers that we've just added
if (!headersToAdd.Contains(existingHeader))
{
allHeaders.Remove(existingHeader);
}
}

allHeaders.Add(header);
Expand Down

0 comments on commit 6f40ca3

Please sign in to comment.