Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Passing comma-separated list of values to the header is treated differently by controller action and Minimal API endpoint during binding to array. For controller action they are parsed as separate values while for Minimal APIs - as single one:
Controller action:
Minimal API:
Expected Behavior
Should behave the same way.
Steps To Reproduce
Create controller with action:
[HttpGet]
public IActionResult Get([FromHeader] string[] hs) => Ok(new { Test = hs});
And minimal API endpoint:
app.MapGet("/test_h", ([FromHeader] string[] hs) => new {Test = hs});
And pass request header hs: 1,2,3
Exceptions (if any)
No response
.NET Version
8.0.100
Anything else?
No response