Allow setting Content-Length header on the response (#1158)

* Allow setting Content-Length header on the response

* fix?
This commit is contained in:
Stef Heyenrath
2024-08-16 12:14:42 +02:00
committed by GitHub
parent 7e162a00ab
commit 088444024f
5 changed files with 275 additions and 253 deletions

View File

@@ -14,12 +14,12 @@ namespace WireMock.Http;
/// </summary>
internal static class HttpKnownHeaderNames
{
// https://docs.microsoft.com/en-us/dotnet/api/system.net.webheadercollection.isrestricted
// - https://docs.microsoft.com/en-us/dotnet/api/system.net.webheadercollection.isrestricted
// - ContentLength is allowed per #720
private static readonly string[] RestrictedResponseHeaders =
{
Accept,
Connection,
ContentLength,
ContentType,
Date, // RFC1123Pattern
Expect,