Check IHttpMaxRequestBodySizeFeature.IsReadOnly (#379)

This commit is contained in:
Stephen Halter 2017-06-06 16:02:36 -07:00 committed by GitHub
parent c3ffde286b
commit 89057003b3
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
}
var bodySizeFeature = httpContext.Features.Get<IHttpMaxRequestBodySizeFeature>();
if (bodySizeFeature != null)
if (bodySizeFeature != null && !bodySizeFeature.IsReadOnly)
{
// IIS already limits this, no need to do it twice.
bodySizeFeature.MaxRequestBodySize = null;