Skip to content

Commit b2de75a

Browse files
Fix ETag header formatting issue (because of updated dependency)
1 parent ae399b9 commit b2de75a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

NuGet.config

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<packageSources>
4-
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
5-
<add key="Umbraco Prereleases" value="https://www.myget.org/F/umbracoprereleases/api/v3/index.json" />
6-
<add key="Umbraco Nightly" value="https://www.myget.org/F/umbraconightly/api/v3/index.json" />
7-
</packageSources>
3+
<packageSources>
4+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
5+
<add key="Umbraco Prereleases" value="https://www.myget.org/F/umbracoprereleases/api/v3/index.json" />
6+
<add key="Umbraco Nightly" value="https://www.myget.org/F/umbraconightly/api/v3/index.json" />
7+
</packageSources>
88
</configuration>

src/Umbraco.StorageProviders.AzureBlob/AzureBlobFileSystemMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private async Task HandleRequestAsync(HttpContext context, RequestDelegate next)
164164
};
165165

166166
responseHeaders.LastModified = properties.Value.LastModified;
167-
responseHeaders.ETag = new EntityTagHeaderValue($"\"{properties.Value.ETag}\"");
167+
responseHeaders.ETag = new EntityTagHeaderValue(properties.Value.ETag.ToString("H"));
168168
responseHeaders.Append(HeaderNames.Vary, "Accept-Encoding");
169169

170170
var requestHeaders = request.GetTypedHeaders();

src/Umbraco.StorageProviders.AzureBlob/IO/AzureBlobFileSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void AddFile(string path, Stream stream, bool overrideIfExists)
108108
if (_contentTypeProvider.TryGetContentType(path, out var contentType)) headers.ContentType = contentType;
109109

110110
blob.Upload(stream, headers,
111-
conditions: overrideIfExists ? null : new BlobRequestConditions { IfNoneMatch = new ETag("*") });
111+
conditions: overrideIfExists ? null : new BlobRequestConditions { IfNoneMatch = ETag.All });
112112
}
113113

114114
/// <inheritdoc />
@@ -126,7 +126,7 @@ public void AddFile(string path, string physicalPath, bool overrideIfExists = tr
126126
var copyFromUriOperation = destinationBlob.StartCopyFromUri(sourceBlob.Uri,
127127
destinationConditions: overrideIfExists
128128
? null
129-
: new BlobRequestConditions { IfNoneMatch = new ETag("*") });
129+
: new BlobRequestConditions { IfNoneMatch = ETag.All });
130130

131131
if (copyFromUriOperation?.HasCompleted == false)
132132
Task.Run(async () => await copyFromUriOperation.WaitForCompletionAsync().ConfigureAwait(false))

0 commit comments

Comments
 (0)