diff --git a/src/Microsoft.AspNetCore.Server.Kestrel.Core/KestrelServerOptions.cs b/src/Microsoft.AspNetCore.Server.Kestrel.Core/KestrelServerOptions.cs index e9aba3c672..ca53bb1d49 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel.Core/KestrelServerOptions.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel.Core/KestrelServerOptions.cs @@ -34,32 +34,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel /// public IServiceProvider ApplicationServices { get; set; } - /// - /// - /// This property is obsolete and will be removed in a future version. - /// Use Limits.MaxRequestBufferSize instead. - /// - /// - /// Gets or sets the maximum size of the request buffer. - /// - /// - /// - /// When set to null, the size of the request buffer is unlimited. - /// Defaults to 1,048,576 bytes (1 MB). - /// - [Obsolete("This property is obsolete and will be removed in a future version. Use Limits.MaxRequestBufferSize instead.")] - public long? MaxRequestBufferSize - { - get - { - return Limits.MaxRequestBufferSize; - } - set - { - Limits.MaxRequestBufferSize = value; - } - } - /// /// Provides access to request limit options. /// diff --git a/test/Microsoft.AspNetCore.Server.KestrelTests/KestrelServerOptionsTests.cs b/test/Microsoft.AspNetCore.Server.KestrelTests/KestrelServerOptionsTests.cs index 3d1e3eb9a2..8a33390342 100644 --- a/test/Microsoft.AspNetCore.Server.KestrelTests/KestrelServerOptionsTests.cs +++ b/test/Microsoft.AspNetCore.Server.KestrelTests/KestrelServerOptionsTests.cs @@ -1,10 +1,7 @@ // 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. -using System; -using System.Linq; using System.Net; -using System.Reflection; using Microsoft.AspNetCore.Server.Kestrel; using Xunit; @@ -12,34 +9,6 @@ namespace Microsoft.AspNetCore.Server.KestrelTests { public class KestrelServerOptionsTests { -#pragma warning disable CS0618 - [Fact] - public void MaxRequestBufferSizeIsMarkedObsolete() - { - Assert.NotNull(typeof(KestrelServerOptions) - .GetProperty(nameof(KestrelServerOptions.MaxRequestBufferSize)) - .GetCustomAttributes(false) - .OfType() - .SingleOrDefault()); - } - - [Fact] - public void MaxRequestBufferSizeGetsLimitsProperty() - { - var o = new KestrelServerOptions(); - o.Limits.MaxRequestBufferSize = 42; - Assert.Equal(42, o.MaxRequestBufferSize); - } - - [Fact] - public void MaxRequestBufferSizeSetsLimitsProperty() - { - var o = new KestrelServerOptions(); - o.MaxRequestBufferSize = 42; - Assert.Equal(42, o.Limits.MaxRequestBufferSize); - } -#pragma warning restore CS0612 - [Fact] public void NoDelayDefaultsToTrue() {