From 74eda568f72c3fbfcf1cb448d5ea0f6c5c7b0fbb Mon Sep 17 00:00:00 2001 From: Aaron Coburn Date: Sat, 7 Mar 2020 15:24:55 -0500 Subject: [PATCH] Fix duplicate slashes on PUT requests to root resource Resolves #725 --- .../src/main/java/org/trellisldp/http/impl/PutHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/http/src/main/java/org/trellisldp/http/impl/PutHandler.java b/core/http/src/main/java/org/trellisldp/http/impl/PutHandler.java index 33b8d41be..3502d4abf 100644 --- a/core/http/src/main/java/org/trellisldp/http/impl/PutHandler.java +++ b/core/http/src/main/java/org/trellisldp/http/impl/PutHandler.java @@ -177,7 +177,8 @@ protected IRI getInternalId() { @Override protected String getIdentifier() { - return super.getIdentifier() + (HttpUtils.isContainer(getLdpType()) ? "/" : "") + final String iri = super.getIdentifier(); + return iri + (HttpUtils.isContainer(getLdpType()) && !iri.endsWith("/") ? "/" : "") + (getExtensionGraphName() != null ? "?ext=" + getRequest().getExt() : ""); }