From e633ed071d10da4edb68dfef76c968fa30afd257 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 29 Jun 2021 14:06:06 +1000 Subject: [PATCH] canonicalPath Refactor restored removed method as deprecated --- .../src/main/java/org/eclipse/jetty/util/URIUtil.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java b/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java index 6817072ad721..7cf58627ab89 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java @@ -889,6 +889,17 @@ else if (slash) return canonical.toString(); } + /** + * @param path the encoded URI from the path onwards, which may contain query strings and/or fragments + * @return the canonical path, or null if path traversal above root. + * @deprecated Use {@link #canonicalURI(String)} + */ + @Deprecated + public static String canonicalEncodedPath(String path) + { + return canonicalURI(path); + } + /** * Convert a decoded URI path to a canonical form. *