From 1932e65dc303f0a65d1d3f7717cc68eefb388ef6 Mon Sep 17 00:00:00 2001 From: yma Date: Tue, 25 Jun 2024 18:10:23 +0800 Subject: [PATCH] Fix the HEAD request to avoid reading file for checksum digest --- .../indy/core/bind/jaxrs/ContentAccessHandler.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bindings/jaxrs/src/main/java/org/commonjava/indy/core/bind/jaxrs/ContentAccessHandler.java b/bindings/jaxrs/src/main/java/org/commonjava/indy/core/bind/jaxrs/ContentAccessHandler.java index c2bf37376d..59341751f3 100644 --- a/bindings/jaxrs/src/main/java/org/commonjava/indy/core/bind/jaxrs/ContentAccessHandler.java +++ b/bindings/jaxrs/src/main/java/org/commonjava/indy/core/bind/jaxrs/ContentAccessHandler.java @@ -380,12 +380,6 @@ public Response doHead( final String packageType, final String type, final Strin responseHelper.setInfoHeaders( builder, item, sk, path, true, contentType, httpMetadata ); - - if(!path.endsWith("/")) { - // Content hashing headers - builder.header(ApplicationHeader.md5.key(), contentDigester.digest(sk, path, new EventMetadata()).getDigests().get(ContentDigest.MD5)); - builder.header(ApplicationHeader.sha1.key(), contentDigester.digest(sk, path, new EventMetadata()).getDigests().get(ContentDigest.SHA_1)); - } if ( builderModifier != null ) {