We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce1daa4 commit 7497953Copy full SHA for 7497953
src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs
@@ -499,7 +499,10 @@ private async Task SendResponseAsync(
499
this.logger.LogImageServed(imageContext.GetDisplayUrl(), key);
500
501
// When stream is null we're sending from the cache.
502
- await imageContext.SendAsync(await cacheResolver.OpenReadAsync(), metadata);
+ using (var stream = await cacheResolver.OpenReadAsync())
503
+ {
504
+ await imageContext.SendAsync(stream, metadata);
505
+ }
506
return;
507
508
case ImageContext.PreconditionState.NotModified:
0 commit comments