This repository has been 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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for #1681 - Model state errors are wrong with attributes like [Fr…
…omHeader] The issue here is that a model state error is added with the model name 'doubled'. This is on a fairly obscure code path and the code dates back to the original WSR git checkin of webapi. There are no wsr tests that verify this behavior. The cause here is that our 'greedy' model binders (like FromHeaderModelBinder) return 'true' whether or not they successfully found a model, because they don't want other model binders to run. This also has an effect on the validation system. That means that validators will run and attempt to validate the model (which may be null). That's that rare case where we get to this code path.
- Loading branch information
Showing
3 changed files
with
30 additions
and
6 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