Commit Graph

6 Commits

Author SHA1 Message Date
jacalvar fe639f028f [Fixes 3961] Consider InputFormatter behavior when we can't read the charset
* Broken InputFormatter into InputFormatter and TextInputFormatter
* Added an exception to ModelState inside ReadAsync on TextInputFormatter
  when we can't find a valid encoding to read the body.
2016-02-05 10:42:36 -08:00
N. Taylor Mullen 3be7fbdf9f Rename AspNet 5 file contents.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:18:33 -08:00
Doug Bunting 42017faa21 Add `InputFormatterResult` and `InputFormatterContext.ModelName`
- #2722
- make communication of errors from formatters to `BodyModelBinder` explicit
  - `JsonInputFormatter` now adds errors to `ModelStateDictionary` with correct key
- change `InputFormatter.SelectCharacterEncoding()` to add an error and return `null` when it fails
  - one less `Exception` case and removes some duplicate code

nits:
- improve some doc comments (more `<inheritdoc/>`, `<paramref/>` and `<see/>`)
- add another two `BodyValidationIntegrationTests` tests
2015-09-19 21:36:38 -07:00
Ryan Nowak 229724c4ea Reorganize MVC namespaces 2015-09-01 22:28:33 -07:00
Ryan Nowak 39fe063aee Fix #2330 - Reimagine *FormatterContext
This change simplifies InputFormatterContext/OutputFormatterContext by
swapping ActionContext for HttpContext.

This change is important especially for InputFormatterContext as it
decouples ModelState from ActionContext - allowing us to fix a
related bug where the _wrong_ ModelState can be passed in for a
TryUpdateModel operation.
2015-05-12 11:05:56 -07:00
Ajay Bhargav Baaskaran 13e1c9d5e1 added InputFormatter base type 2015-02-11 16:48:56 -08:00