File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ public async Task<ImageMetadata> GetMetaDataAsync()
3636 _logger . LogDebug ( "LastModified header missing from {Url}" , _url ) ;
3737 }
3838
39- return new ImageMetadata ( response . Content . Headers . LastModified . GetValueOrDefault ( ) . UtcDateTime , response . Content . Headers . ContentLength . GetValueOrDefault ( ) ) ;
39+ if ( response . Headers . CacheControl ? . MaxAge is null )
40+ {
41+ _logger . LogDebug ( "MaxAge header is null from {Url}" , _url ) ;
42+ }
43+
44+ return new ImageMetadata ( response . Content . Headers . LastModified . GetValueOrDefault ( ) . UtcDateTime , ( response . Headers . CacheControl ? . MaxAge ) . GetValueOrDefault ( ) , response . Content . Headers . ContentLength . GetValueOrDefault ( ) ) ;
4045 }
4146
4247 public async Task < Stream > OpenReadAsync ( )
You can’t perform that action at this time.
0 commit comments