public class ContainerUtils extends Object
Constructor and Description |
---|
ContainerUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
encodeUnsafeCharacters(String originalQueryString)
Encodes (predefined subset of) unsafe/unwise URI characters with the percent-encoding.
|
static String |
getHandlerPath(String uri)
Splits URI address from query params and returns it.
|
static String |
reduceLeadingSlashes(String path)
Reduces the number of slashes before the path to only one slash.
|
public static String encodeUnsafeCharacters(String originalQueryString)
Replaces the predefined set of unsafe URI characters in the query string with its percent-encoded counterparts. The reserved characters (as defined by the RFC) are automatically encoded by browsers, but some characters are in the "gray zone" - are not explicitly forbidden, but not recommended and known to cause issues.
originalQueryString
- URI query string (the part behind the question mark character).public static String reduceLeadingSlashes(String path)
path
- path stringCopyright © 2007-2023, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.