Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter illegal header fields (#2842)
Filter out illegal header fields.
- Loading branch information
1 parent
1088d70
commit 05409d5
Showing
5 changed files
with
160 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
test/WebSites/Basic/Controllers/FromHeaderParamsController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace Basic.Controllers | ||
{ | ||
[Produces("application/json")] | ||
public class FromHeaderParamsController | ||
{ | ||
[HttpGet("country/validate")] | ||
public IActionResult Get( | ||
[FromHeader]string accept, | ||
[FromHeader(Name = "Content-Type")] string contentType, | ||
[FromHeader] string authorization, | ||
[FromQuery] string country) | ||
{ | ||
return new NoContentResult(); | ||
} | ||
} | ||
} |