From 9698f539f0e7afdec9f487ac63e729d7c0568657 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Fri, 2 Jun 2017 12:46:36 -0700 Subject: [PATCH] Add IHttpMaxRequestBodySizeFeature (#852) --- .../IHttpMaxRequestBodySizeFeature.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/Microsoft.AspNetCore.Http.Features/IHttpMaxRequestBodySizeFeature.cs diff --git a/src/Microsoft.AspNetCore.Http.Features/IHttpMaxRequestBodySizeFeature.cs b/src/Microsoft.AspNetCore.Http.Features/IHttpMaxRequestBodySizeFeature.cs new file mode 100644 index 0000000000..114009b00f --- /dev/null +++ b/src/Microsoft.AspNetCore.Http.Features/IHttpMaxRequestBodySizeFeature.cs @@ -0,0 +1,22 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.Http.Features +{ + /// + /// Feature to inspect and modify the maximum request body size for a single request. + /// + public interface IHttpMaxRequestBodySizeFeature + { + /// + /// The maximum allowed size of the current request body in bytes. + /// When set to null, the maximum request body size is unlimited. + /// This cannot be modified after the reading the request body has started. + /// This limit does not affect upgraded connections which are always unlimited. + /// + /// + /// Defaults to the server's global max request body size limit. + /// + long? MaxRequestBodySize { get; set; } + } +} \ No newline at end of file