Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Consider InputFormatter behavior when we can't read the charset #3961

Closed
@rynowak

Description

@rynowak

An input formatter might be confused by a content type that is supported, with a charset parameter that isn't supported (via SupportedEncodings).

Today this results in the formatter returning true from CanRead and then adding a modelstate error when it's called to read the body.

We should just make this check part of CanRead, then it would go down the normal 'unsupported content type' path when the encoding isn't supported.

We should additionally double-check the behavior where a formatter has an empty SupportedEncodings. This should be allowed for binary content types that don't support/require a charset.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions