Skip to content

Commit

Permalink
Merge pull request #726 from trellis-ldp/feature/trailing-slash-on-put
Browse files Browse the repository at this point in the history
Fix duplicate slashes on PUT requests to root resource
  • Loading branch information
acoburn authored Mar 7, 2020
2 parents 53bfc2e + 74eda56 commit 6ab7251
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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() : "");
}

Expand Down

0 comments on commit 6ab7251

Please sign in to comment.