Skip to content

Commit c06199e

Browse files
authored
HttpContentHeadersExtensions.AddHeaders: Bugfix: Remove undesired header validation (#25)
HttpContentHeadersExtensions.AddHeaders is used by DecompressedContent to copy response content headers to the DecompressedContent headers. Content header validation is not needed and not performed on uncompressed content.
1 parent 85c6489 commit c06199e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

StandardSocketsHttpHandler/Net/Http/Extensions/HttpContentHeadersExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static void AddHeaders(this HttpContentHeaders headers, HttpContentHeader
1010
{
1111
foreach (KeyValuePair<string, IEnumerable<string>> header in sourceHeaders)
1212
{
13-
headers.Add(header.Key, header.Value);
13+
headers.TryAddWithoutValidation(header.Key, header.Value);
1414
}
1515
}
1616
}

0 commit comments

Comments
 (0)