Skip to content

Commit 05996b9

Browse files
committed
Adapt to API change in HTTP features
1 parent e742afb commit 05996b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Benchmarks/DebugInfoPageMiddleware.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using Microsoft.AspNet.Builder;
77
using Microsoft.AspNet.Hosting;
88
using Microsoft.AspNet.Http;
9+
using Microsoft.AspNet.Http.Features;
910
using Microsoft.Extensions.PlatformAbstractions;
1011

1112
namespace Benchmarks
@@ -48,7 +49,7 @@ public async Task Invoke(HttpContext httpContext)
4849
await httpContext.Response.WriteAsync($"<li>Configuration: {_configurationName}</li>");
4950
await httpContext.Response.WriteAsync($"<li>Server: {_hostingEnv.Configuration["server"]}</li>");
5051
await httpContext.Response.WriteAsync($"<li>Server URLs: {_hostingEnv.Configuration["server.urls"]}</li>");
51-
await httpContext.Response.WriteAsync($"<li>Supports Send File: {httpContext.Response.SupportsSendFile()}</li>");
52+
await httpContext.Response.WriteAsync($"<li>Supports Send File: {httpContext.Features.Get<IHttpSendFileFeature>() != null}</li>");
5253

5354
await httpContext.Response.WriteAsync($"<li>Server features:<ul>");
5455

0 commit comments

Comments
 (0)