public class RequestUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isSameOrigin(HttpServletRequest request,
String origin) |
static boolean |
isValidOrigin(String origin)
Checks if a given origin is valid or not.
|
static String |
normalize(String path)
Normalize a relative URI path that may have relative values ("/./",
"/../", and so on ) it it.
|
static String |
normalize(String path,
boolean replaceBackSlash)
Normalize a relative URI path that may have relative values ("/./",
"/../", and so on ) it it.
|
public static String normalize(String path)
path - Relative path to be normalizednull if the path cannot be
normalizedpublic static String normalize(String path, boolean replaceBackSlash)
path - Relative path to be normalizedreplaceBackSlash - Should '\\' be replaced with '/'null if the path cannot be
normalizedpublic static boolean isSameOrigin(HttpServletRequest request, String origin)
public static boolean isValidOrigin(String origin)
URIorigin - The origin URItrue if the origin was validCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.