diff --git a/mycore-restapi/src/main/java/org/mycore/restapi/v2/MCRRestDerivateContents.java b/mycore-restapi/src/main/java/org/mycore/restapi/v2/MCRRestDerivateContents.java index ecf8736f81..046b4c9924 100644 --- a/mycore-restapi/src/main/java/org/mycore/restapi/v2/MCRRestDerivateContents.java +++ b/mycore-restapi/src/main/java/org/mycore/restapi/v2/MCRRestDerivateContents.java @@ -254,7 +254,7 @@ private static int getUploadMemThreshold() { */ private static String getDigestHeader(String md5sum) { final String md5Base64 = Base64.getEncoder().encodeToString(HexFormat.of().parseHex(md5sum)); - return "MD5=" + md5Base64; + return "md5=:" + md5Base64 + ":"; } @HEAD @@ -298,7 +298,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("Repr-Digest", getDigestHeader(fileAttributes.digest().toHexString())) .build(); } @@ -338,7 +338,7 @@ public Response getFileOrDirectory(@Context UriInfo uriInfo, @Context HttpHeader content.setMimeType(context.getMimeType(mcrPath.getFileName().toString())); try { final List> responseHeader = List - .of(Map.entry("Digest", getDigestHeader(fileAttributes.digest().toHexString()))); + .of(Map.entry("Repr-Digest", getDigestHeader(fileAttributes.digest().toHexString()))); return MCRRestContentHelper.serveContent(content, uriInfo, requestHeader, responseHeader); } catch (IOException e) { throw MCRErrorResponse.fromStatus(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode())