diff --git a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdRedirectHandler.java b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdRedirectHandler.java index 551c764fc21..93aa40153d5 100644 --- a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdRedirectHandler.java +++ b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdRedirectHandler.java @@ -1162,18 +1162,28 @@ protected XrootdResponse doOnPrepare(ChannelHandlerContext ctx, Restriction restriction = loginSessionInfo.getRestriction(); InetSocketAddress clientAddress = getSourceAddress(); - if (request.getOptions() == 0 - || (request.isStage() && !(request.isEvict() || request.isCancel()))) { - _door.pin(paths, clientAddress, subject, restriction); - return new PrepareResponse(request, kXR_ok, new byte[paths.length]); - } else if (request.isStage() && (request.isEvict() || request.isCancel())) { - throw new XrootdException(kXR_InvalidRequest, - "Invalid parameters / conflicting options"); - } else if (request.isCancel() || request.isEvict()) { - _door.unpin(paths, subject, restriction); - return new PrepareResponse(request, kXR_ok, new byte[paths.length]); + // if no options specified just return success + + if (request.getOptions() == 0 && request.getOptionX() == 0) { + return new PrepareResponse(request, + kXR_ok, new byte[paths.length]); + } + + if (request.isStage()) { + if (request.isEvict() || request.isCancel()) { + throw new XrootdException(kXR_InvalidRequest, + "Invalid parameters / conflicting options"); + } else { + _door.pin(paths, clientAddress, subject, restriction); + return new PrepareResponse(request, kXR_ok, new byte[paths.length]); + } } else { - throw new XrootdException(kXR_Unsupported, "Unsupported option(s)"); + if (request.isCancel() || request.isEvict()) { + _door.unpin(paths, subject, restriction); + return new PrepareResponse(request, kXR_ok, new byte[paths.length]); + } else { + throw new XrootdException(kXR_Unsupported, "Unsupported option(s)"); + } } } catch (PermissionDeniedCacheException e) { throw xrootdException(e); diff --git a/pom.xml b/pom.xml index 84b8e89e923..925887c7543 100644 --- a/pom.xml +++ b/pom.xml @@ -69,7 +69,7 @@ 7.6.0 2.12.0 9.4.57.v20241219 - 4.6.5 + 4.6.6 2.47 3.0.0 3.0.0