Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 859956d

Browse files
Touch #276
1 parent 7a23569 commit 859956d

File tree

1 file changed

+8
-2
lines changed
  • src/Plugins/ImageProcessor.Web/ImageProcessor.Web.Plugins.AzureBlobCache

1 file changed

+8
-2
lines changed

src/Plugins/ImageProcessor.Web/ImageProcessor.Web.Plugins.AzureBlobCache/AzureBlobCache.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,17 @@ public override void RewritePath(HttpContext context)
381381
{
382382
HttpResponse contextResponse = context.Response;
383383
cachedStream.CopyTo(contextResponse.OutputStream);
384-
ImageProcessingModule.SetHeaders(context, this.mimeType, null, this.MaxDays, response.StatusCode);
384+
385+
// Mimetype can be null when returning from the cache.
386+
ImageProcessingModule.SetHeaders(
387+
context,
388+
string.IsNullOrWhiteSpace(this.mimeType) ? contextResponse.ContentType : this.mimeType,
389+
null,
390+
this.MaxDays,
391+
response.StatusCode);
385392
}
386393
}
387394
});
388-
389395
}
390396
else
391397
{

0 commit comments

Comments
 (0)