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

Commit 9698f53

Browse files
authored
Add IHttpMaxRequestBodySizeFeature (#852)
1 parent a55b818 commit 9698f53

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
namespace Microsoft.AspNetCore.Http.Features
5+
{
6+
/// <summary>
7+
/// Feature to inspect and modify the maximum request body size for a single request.
8+
/// </summary>
9+
public interface IHttpMaxRequestBodySizeFeature
10+
{
11+
/// <summary>
12+
/// The maximum allowed size of the current request body in bytes.
13+
/// When set to null, the maximum request body size is unlimited.
14+
/// This cannot be modified after the reading the request body has started.
15+
/// This limit does not affect upgraded connections which are always unlimited.
16+
/// </summary>
17+
/// <remarks>
18+
/// Defaults to the server's global max request body size limit.
19+
/// </remarks>
20+
long? MaxRequestBodySize { get; set; }
21+
}
22+
}

0 commit comments

Comments
 (0)