Hi James,
Since we've updated our packages in our project to the latest versions of ImageProcessor, we're experiencing an issue with the 304 Not Modified header. When we first load our image (without cache), everything works perfectly. But the issue arises when we reload the image again in the browser, then we get a blank screen (in Chrome).
I just dived a little into your package. And I found that the ex.InnerException returns null and therefore is304 always stays false in this code-block:
https://github.com/JimBobSquarePants/ImageProcessor/blob/8032986b9d8826b00171bc43ce7f86cb187e677a/src/ImageProcessor.Web.Plugins.AzureBlobCache/AzureBlobCache.cs#L351-L373
.NET Framework: 4.8
ImageProcessor: 2.9.0
ImageProcessor.Web: 4.12.1
ImageProcessor.Web.Config: 2.6.0
ImageProcessor.Web.Plugins.AzureBlobCache: 1.7.0
UseCachedContainerInUrl: false
StreamCachedImage: true
Thanks for the support in advance! We would really appreciate that! And stay healthy!
Regards!
I'm not completely familiar with Azure Blob Storage, but looking at the StorageException, the HTTP status code is probably stored in the RequestInformation.HttpStatusCode property (instead of the inner exception), see:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.storageexception.requestinformation?view=azure-dotnet#Microsoft_Azure_Storage_StorageException_RequestInformation.
@ronaldbarendse Yup, already started working on the fix. It's simple enough.
Fixed via #810.
See https://www.nuget.org/packages/ImageProcessor.Web.Plugins.AzureBlobCache/1.7.1
I can confirm it's now working correctly. Thank you @JimBobSquarePants and @ronaldbarendse for the quickly resolving this problem!
Most helpful comment
I can confirm it's now working correctly. Thank you @JimBobSquarePants and @ronaldbarendse for the quickly resolving this problem!