This repository was archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
ModelBinding regression in 2.1.3 #8536
Copy link
Copy link
Closed
Labels
3 - DonePRI: 0 - CriticalBlocks a critical product path. Must be handled immediatelyBlocks a critical product path. Must be handled immediatelybugcost: SWill take up to 2 days to completeWill take up to 2 days to completefeature-Model-Binding
Milestone
Description
Is this a Bug or Feature request?:
Bug
Steps to reproduce (preferably a link to a GitHub repo with a repro project):
https://github.com/Suchiman/MvcRegression
[ApiController]
[Route("api/[controller]")]
public class TestController : Controller
{
[HttpPost]
public void Test(List<TestClass> filters = null)
{
}
}
public class TestClass
{
public string Test { get; set; }
}
- Set breakpoint in the Test method of the TestController
- Issue following post request
POST https://localhost:44333/api/Test/ HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:44333
Content-Length: 37
[{"test":"value1"},{"test":"value2"}]
- Inspect the filters argument
Description of the problem:
After Upgrading from
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.2" />
to
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
filters
will be an empty list, while it used to be populated with the two elements that were posted in the previous Version.
Metadata
Metadata
Assignees
Labels
3 - DonePRI: 0 - CriticalBlocks a critical product path. Must be handled immediatelyBlocks a critical product path. Must be handled immediatelybugcost: SWill take up to 2 days to completeWill take up to 2 days to completefeature-Model-Binding