Skip to content

Commit 7512784

Browse files
Remove unnecessary checks
1 parent 653c131 commit 7512784

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ImageSharp.Web.Providers.Azure/Resolvers/AzureBlobStorageImageResolver.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Apache License, Version 2.0.
33

4-
using System;
54
using System.IO;
65
using System.Threading.Tasks;
76
using Azure;
@@ -26,8 +25,10 @@ public class AzureBlobStorageImageResolver : IImageResolver
2625
/// <inheritdoc/>
2726
public async Task<ImageMetadata> GetMetaDataAsync()
2827
{
28+
// I've had a good read through the SDK source and I believe we cannot get
29+
// a 304 here since 'If-Modified-Since' header is not set by default.
2930
Response<BlobProperties> properties = await this.blob.GetPropertiesAsync();
30-
return new ImageMetadata(properties?.Value.LastModified.DateTime ?? DateTime.UtcNow);
31+
return new ImageMetadata(properties.Value.LastModified.DateTime);
3132
}
3233

3334
/// <inheritdoc/>

0 commit comments

Comments
 (0)