Polishing.

This commit is contained in:
Peter-Josef Meisch 2021-07-17 19:15:30 +02:00
parent d88fb037da
commit d3e8c9fce5
No known key found for this signature in database
GPG Key ID: DE108246970C7708

View File

@ -1435,7 +1435,8 @@ public class RequestConverters {
// encode each part (e.g. index, type and id) separately before merging them into the path
// we prepend "/" to the path part to make this path absolute, otherwise there can be issues with
// paths that start with `-` or contain `:`
URI uri = new URI((String)null, "", "/" + pathPart, (String)null, (String)null);
// the authority must be an empty string and not null, else paths that being with slashes could have them
URI uri = new URI((String) null, "", "/" + pathPart, (String) null, (String) null);
// manually encode any slash that each part may contain
return uri.getRawPath().substring(1).replaceAll("/", "%2F");
} catch (URISyntaxException e) {