Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
<!-- Please add your release notes in the following format:
- My change description (#PR/#issue)
-->
- Fixed bugs causing large input payloads to fail.
- Fixed a bug causing a crash when attempting to log before the gRPC communication to Functions Host is set up.
- Hosting configuration now applies `AZURE_FUNCTIONS_` prefixed environment variables by default.
This is a behavior change that provides the expected behavior when debugging locally or adding the variable to an environment.
- Updated behavior of the HttpHeadersCollection implementation to avoid double validation of headers processed by the host.
4 changes: 2 additions & 2 deletions src/DotNetWorker.Core/Http/HttpHeadersCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public HttpHeadersCollection(IEnumerable<KeyValuePair<string, IEnumerable<string
{
foreach (var header in headers)
{
base.Add(header.Key, header.Value);
base.TryAddWithoutValidation(header.Key, header.Value);
}
}

Expand All @@ -40,7 +40,7 @@ public HttpHeadersCollection(IEnumerable<KeyValuePair<string, string>> headers)
{
foreach (var header in headers)
{
base.Add(header.Key, header.Value);
base.TryAddWithoutValidation(header.Key, header.Value);
}
}
}
Expand Down
31 changes: 31 additions & 0 deletions test/DotNetWorkerTests/HttpHeadersCollectionTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System.Collections.Generic;
using Microsoft.Azure.Functions.Worker.Http;
using Xunit;

namespace Microsoft.Azure.Functions.Worker.Tests
{
public class HttpHeadersCollectionTests
{
[Theory]
[InlineData("headername", "headervalue")]
[InlineData("headername", "header(test)value")]
[InlineData("headername", "header-value")]
[InlineData("From", "test(at)test")]
public void HeaderValidationResult(string name, string value)
{
IEnumerable<KeyValuePair<string, string>> headers = new Dictionary<string, string>()
{
{ name, value },
};

var headersCollection = new HttpHeadersCollection(headers);


Assert.Single(headersCollection);
}
}
}

1 change: 1 addition & 0 deletions test/DotNetWorkerTests/HttpRequestDataExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ public class RequestPoco
}
}
}