mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-13 23:52:10 +00:00
Polishing.
(cherry picked from commit d3e8c9fce5f788cc1d5a6289eda6ce34325234fe) (cherry picked from commit deae205fd41a80ea051d05fc2bfc50893baee702)
This commit is contained in:
parent
67cab66062
commit
aa78e4f026
@ -1319,7 +1319,8 @@ public class RequestConverters {
|
|||||||
// encode each part (e.g. index, type and id) separately before merging them into the path
|
// 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
|
// we prepend "/" to the path part to make this path absolute, otherwise there can be issues with
|
||||||
// paths that start with `-` or contain `:`
|
// 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
|
// manually encode any slash that each part may contain
|
||||||
return uri.getRawPath().substring(1).replaceAll("/", "%2F");
|
return uri.getRawPath().substring(1).replaceAll("/", "%2F");
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user