Skip to content

Commit

Permalink
MCR-3033 use Content-Digest header instead of Digest header
Browse files Browse the repository at this point in the history
  • Loading branch information
toKrause committed Nov 20, 2024
1 parent eb12bc8 commit fed7e6a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public Response getFileOrDirectoryMetadata() {
.lastModified(Date.from(fileAttributes.lastModifiedTime().toInstant()))
.header(HttpHeaders.CONTENT_LENGTH, fileAttributes.size())
.tag(getETag(fileAttributes))
.header("Digest", getDigestHeader(fileAttributes.digest().toHexString()))
.header("Content-Digest", getDigestHeader(fileAttributes.digest().toHexString()))
.build();
}

Expand Down Expand Up @@ -353,7 +353,7 @@ public Response getFileOrDirectory(@Context UriInfo uriInfo, @Context HttpHeader
content.setMimeType(context.getMimeType(mcrPath.getFileName().toString()));
try {
final List<Map.Entry<String, String>> responseHeader = List
.of(Map.entry("Digest", getDigestHeader(fileAttributes.digest().toHexString())));
.of(Map.entry("Content-Digest", getDigestHeader(fileAttributes.digest().toHexString())));
return MCRRestContentHelper.serveContent(content, uriInfo, requestHeader, responseHeader);
} catch (IOException e) {
throw MCRErrorResponse.fromStatus(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode())
Expand Down

0 comments on commit fed7e6a

Please sign in to comment.