dont add content headers if there is no contemnt
This commit is contained in:
parent
dc9dc182c9
commit
03628aa2e5
1 changed files with 1 additions and 1 deletions
|
|
@ -218,7 +218,7 @@ app.Use(async (context, next) =>
|
||||||
// Add non-body headers to message.Headers for GET and other bodyless requests
|
// Add non-body headers to message.Headers for GET and other bodyless requests
|
||||||
foreach (var header in context.Request.Headers)
|
foreach (var header in context.Request.Headers)
|
||||||
{
|
{
|
||||||
if (!message.Headers.Contains(header.Key) && header.Key != "Host")
|
if (header.Key != "Content-Length" && header.Key != "Content-Type" && header.Key != "Content-Disposition")
|
||||||
{
|
{
|
||||||
message.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray());
|
message.Headers.TryAddWithoutValidation(header.Key, header.Value.ToArray());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue