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

Implement an attribute and filter to configure the request body size limit #6352

Closed
Tratcher opened this issue Jun 1, 2017 · 0 comments
Closed
Assignees
Milestone

Comments

@Tratcher
Copy link
Member

Tratcher commented Jun 1, 2017

E.g. [RequestSizeLimit(Bytes=12345)] (nullable long)

This would use a Feature implemented by the servers to adjust the request size limit per request. See aspnet/KestrelHttpServer#1877.

This filter needs to be high priority so it runs before model binding or anything else that might read from the request body.

Scenario: The app has a low default limit that's acceptable for most endpoints (e.g. 1mb), but for some upload or streaming endpoints it needs a much higher or infinite limit.

Open question: What to do if the Feature can't be resolved? Throw NotSupportedException? Kestrel and HttpSysServer should support this by 2.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants