Check IHttpMaxRequestBodySizeFeature.IsReadOnly (#379)
This commit is contained in:
parent
c3ffde286b
commit
89057003b3
|
|
@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
|
||||||
}
|
}
|
||||||
|
|
||||||
var bodySizeFeature = httpContext.Features.Get<IHttpMaxRequestBodySizeFeature>();
|
var bodySizeFeature = httpContext.Features.Get<IHttpMaxRequestBodySizeFeature>();
|
||||||
if (bodySizeFeature != null)
|
if (bodySizeFeature != null && !bodySizeFeature.IsReadOnly)
|
||||||
{
|
{
|
||||||
// IIS already limits this, no need to do it twice.
|
// IIS already limits this, no need to do it twice.
|
||||||
bodySizeFeature.MaxRequestBodySize = null;
|
bodySizeFeature.MaxRequestBodySize = null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue