Previous commit broke spaces in URLs

This commit is contained in:
2021-05-25 17:50:41 +02:00
parent 952dfd1d4e
commit 713ab1b84b

View File

@@ -63,9 +63,9 @@ public class FileResource {
FileInfoBase fileInfoBase = fileInfoService.getInfo(names, fileTokenProvider);
if (fileInfoBase instanceof FolderInfo) {
if (!uriInfo.getRequestUri().getPath().endsWith("/")) {
if (!uriInfo.getRequestUri().getRawPath().endsWith("/")) {
return Response.status(Response.Status.MOVED_PERMANENTLY)
.location(URI.create(uriInfo.getRequestUri().getPath() + "/")).build();
.location(URI.create(uriInfo.getRequestUri().getRawPath() + "/")).build();
}
return fileServeService.serveFolder((FolderInfo) fileInfoBase);
} else if (fileInfoBase instanceof FileInfo) {