diff --git a/src/Http/Http.Features/src/IHttpBufferingFeature.cs b/src/Http/Http.Features/src/IHttpBufferingFeature.cs deleted file mode 100644 index 81799fe6f035..000000000000 --- a/src/Http/Http.Features/src/IHttpBufferingFeature.cs +++ /dev/null @@ -1,24 +0,0 @@ -// 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; - -namespace Microsoft.AspNetCore.Http.Features -{ - /// - /// This API is obsolete. - /// - [Obsolete("See IHttpRequestBodyFeature or IHttpResponseBodyFeature DisableBuffering", error: true)] - public interface IHttpBufferingFeature - { - /// - /// This API is obsolete. - /// - void DisableRequestBuffering(); - - /// - /// This API is obsolete. - /// - void DisableResponseBuffering(); - } -} diff --git a/src/Http/Http.Features/src/IHttpSendFileFeature.cs b/src/Http/Http.Features/src/IHttpSendFileFeature.cs deleted file mode 100644 index 523baf2ce84f..000000000000 --- a/src/Http/Http.Features/src/IHttpSendFileFeature.cs +++ /dev/null @@ -1,28 +0,0 @@ -// 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.IO; -using System.Threading; -using System.Threading.Tasks; - -namespace Microsoft.AspNetCore.Http.Features -{ - /// - /// Provides an efficient mechanism for transferring files from disk to the network. - /// - [Obsolete("Use IHttpResponseBodyFeature instead.", error: true)] - public interface IHttpSendFileFeature - { - /// - /// Sends the requested file in the response body. This may bypass the IHttpResponseFeature.Body - /// . A response may include multiple writes. - /// - /// The full disk path to the file. - /// The offset in the file to start at. - /// The number of bytes to send, or null to send the remainder of the file. - /// A used to abort the transmission. - /// - Task SendFileAsync(string path, long offset, long? count, CancellationToken cancellation); - } -} diff --git a/src/Http/Http.Features/src/PublicAPI.Shipped.txt b/src/Http/Http.Features/src/PublicAPI.Shipped.txt index 18866d4bcb71..94a54545bb23 100644 --- a/src/Http/Http.Features/src/PublicAPI.Shipped.txt +++ b/src/Http/Http.Features/src/PublicAPI.Shipped.txt @@ -61,9 +61,6 @@ Microsoft.AspNetCore.Http.Features.IFormFeature.ReadFormAsync(System.Threading.C Microsoft.AspNetCore.Http.Features.IHttpBodyControlFeature Microsoft.AspNetCore.Http.Features.IHttpBodyControlFeature.AllowSynchronousIO.get -> bool Microsoft.AspNetCore.Http.Features.IHttpBodyControlFeature.AllowSynchronousIO.set -> void -Microsoft.AspNetCore.Http.Features.IHttpBufferingFeature -Microsoft.AspNetCore.Http.Features.IHttpBufferingFeature.DisableRequestBuffering() -> void -Microsoft.AspNetCore.Http.Features.IHttpBufferingFeature.DisableResponseBuffering() -> void Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature.ConnectionId.get -> string! Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature.ConnectionId.set -> void @@ -134,8 +131,6 @@ Microsoft.AspNetCore.Http.Features.IHttpResponseFeature.StatusCode.set -> void Microsoft.AspNetCore.Http.Features.IHttpResponseTrailersFeature Microsoft.AspNetCore.Http.Features.IHttpResponseTrailersFeature.Trailers.set -> void Microsoft.AspNetCore.Http.Features.IHttpResponseTrailersFeature.Trailers.get -> Microsoft.AspNetCore.Http.IHeaderDictionary! -Microsoft.AspNetCore.Http.Features.IHttpSendFileFeature -Microsoft.AspNetCore.Http.Features.IHttpSendFileFeature.SendFileAsync(string! path, long offset, long? count, System.Threading.CancellationToken cancellation) -> System.Threading.Tasks.Task! Microsoft.AspNetCore.Http.Features.IHttpUpgradeFeature Microsoft.AspNetCore.Http.Features.IHttpUpgradeFeature.IsUpgradableRequest.get -> bool Microsoft.AspNetCore.Http.Features.IHttpUpgradeFeature.UpgradeAsync() -> System.Threading.Tasks.Task! diff --git a/src/Servers/testassets/ServerComparison.TestSites/StartupResponseCompression.cs b/src/Servers/testassets/ServerComparison.TestSites/StartupResponseCompression.cs index 4f5398fe4c85..3012a89d4690 100644 --- a/src/Servers/testassets/ServerComparison.TestSites/StartupResponseCompression.cs +++ b/src/Servers/testassets/ServerComparison.TestSites/StartupResponseCompression.cs @@ -41,19 +41,6 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) return context.Response.WriteAsync(helloWorldBody); }); }); - /* If we implement DisableResponseBuffering on IISMiddleware - app.Map("/NoBuffer", subApp => - { - subApp.UseResponseCompression(); - subApp.Run(context => - { - context.Features.Get().DisableResponseBuffering(); - context.Response.ContentType = "text/plain"; - context.Response.ContentLength = helloWorldBody.Length; - return context.Response.WriteAsync(helloWorldBody); - }); - }); - */ app.Run(context => { context.Response.ContentType = "text/plain";