Package org.apache.tomcat.util.http
Class RequestUtil
- java.lang.Object
-
- org.apache.tomcat.util.http.RequestUtil
-
public class RequestUtil extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
normalize(java.lang.String path)
Normalize a relative URI path that may have relative values ("/./", "/../", and so on ) it it.static java.lang.String
normalize(java.lang.String path, boolean replaceBackSlash)
Normalize a relative URI path that may have relative values ("/./", "/../", and so on ) it it.
-
-
-
Method Detail
-
normalize
public static java.lang.String normalize(java.lang.String path)
Normalize a relative URI path that may have relative values ("/./", "/../", and so on ) it it. WARNING - This method is useful only for normalizing application-generated paths. It does not try to perform security checks for malicious input.- Parameters:
path
- Relative path to be normalized- Returns:
- The normalized path or
null
if the path cannot be normalized
-
normalize
public static java.lang.String normalize(java.lang.String path, boolean replaceBackSlash)
Normalize a relative URI path that may have relative values ("/./", "/../", and so on ) it it. WARNING - This method is useful only for normalizing application-generated paths. It does not try to perform security checks for malicious input.- Parameters:
path
- Relative path to be normalizedreplaceBackSlash
- Should '\\' be replaced with '/'- Returns:
- The normalized path or
null
if the path cannot be normalized
-
-