/** * Decode the given source string with a URLDecoder. The encoding will be taken * from the request, falling back to the default "ISO-8859-1". * <p>The default implementation uses {@code URLDecoder.decode(input, enc)}. * @param request current HTTP request * @param source the String to decode * @return the decoded String * @see WebUtils#DEFAULT_CHARACTER_ENCODING * @see javax.servlet.ServletRequest#getCharacterEncoding * @see java.net.URLDecoder#decode(String, String) * @see java.net.URLDecoder#decode(String) */ public String decodeRequestString(HttpServletRequest request, String source) { if (this.urlDecode) { return decodeInternal(request, source); } return source; }
/** * Decode the given source string with a URLDecoder. The encoding will be taken * from the request, falling back to the default "ISO-8859-1". * <p>The default implementation uses {@code URLDecoder.decode(input, enc)}. * @param request current HTTP request * @param source the String to decode * @return the decoded String * @see WebUtils#DEFAULT_CHARACTER_ENCODING * @see javax.servlet.ServletRequest#getCharacterEncoding * @see java.net.URLDecoder#decode(String, String) * @see java.net.URLDecoder#decode(String) */ public String decodeRequestString(HttpServletRequest request, String source) { if (this.urlDecode) { return decodeInternal(request, source); } return source; }
/** * Decode the given URI path variables via * {@link #decodeRequestString(HttpServletRequest, String)} unless * {@link #setUrlDecode(boolean)} is set to {@code true} in which case it is * assumed the URL path from which the variables were extracted is already * decoded through a call to * {@link #getLookupPathForRequest(HttpServletRequest)}. * @param request current HTTP request * @param vars the URI variables extracted from the URL path * @return the same Map or a new Map instance */ public Map<String, String> decodePathVariables(HttpServletRequest request, Map<String, String> vars) { if (this.urlDecode) { return vars; } else { Map<String, String> decodedVars = new LinkedHashMap<>(vars.size()); vars.forEach((key, value) -> decodedVars.put(key, decodeInternal(request, value))); return decodedVars; } }
/** * Decode the given URI path variables via * {@link #decodeRequestString(HttpServletRequest, String)} unless * {@link #setUrlDecode(boolean)} is set to {@code true} in which case it is * assumed the URL path from which the variables were extracted is already * decoded through a call to * {@link #getLookupPathForRequest(HttpServletRequest)}. * @param request current HTTP request * @param vars the URI variables extracted from the URL path * @return the same Map or a new Map instance */ public Map<String, String> decodePathVariables(HttpServletRequest request, Map<String, String> vars) { if (this.urlDecode) { return vars; } else { Map<String, String> decodedVars = new LinkedHashMap<>(vars.size()); vars.forEach((key, value) -> decodedVars.put(key, decodeInternal(request, value))); return decodedVars; } }
/** * Decode the given matrix variables via * {@link #decodeRequestString(HttpServletRequest, String)} unless * {@link #setUrlDecode(boolean)} is set to {@code true} in which case it is * assumed the URL path from which the variables were extracted is already * decoded through a call to * {@link #getLookupPathForRequest(HttpServletRequest)}. * @param request current HTTP request * @param vars the URI variables extracted from the URL path * @return the same Map or a new Map instance */ public MultiValueMap<String, String> decodeMatrixVariables(HttpServletRequest request, MultiValueMap<String, String> vars) { if (this.urlDecode) { return vars; } else { MultiValueMap<String, String> decodedVars = new LinkedMultiValueMap<>(vars.size()); vars.forEach((key, values) -> { for (String value : values) { decodedVars.add(key, decodeInternal(request, value)); } }); return decodedVars; } }
/** * Decode the given matrix variables via * {@link #decodeRequestString(HttpServletRequest, String)} unless * {@link #setUrlDecode(boolean)} is set to {@code true} in which case it is * assumed the URL path from which the variables were extracted is already * decoded through a call to * {@link #getLookupPathForRequest(HttpServletRequest)}. * @param request current HTTP request * @param vars the URI variables extracted from the URL path * @return the same Map or a new Map instance */ public MultiValueMap<String, String> decodeMatrixVariables(HttpServletRequest request, MultiValueMap<String, String> vars) { if (this.urlDecode) { return vars; } else { MultiValueMap<String, String> decodedVars = new LinkedMultiValueMap<>(vars.size()); vars.forEach((key, values) -> { for (String value : values) { decodedVars.add(key, decodeInternal(request, value)); } }); return decodedVars; } }
path = getRemainingPath(decodeInternal(request, pathWithinApp), servletPath, false); if (path != null) { return pathWithinApp;
path = getRemainingPath(decodeInternal(request, pathWithinApp), servletPath, false); if (path != null) { return pathWithinApp;
/** * Decode the given source string with a URLDecoder. The encoding will be taken * from the request, falling back to the default "ISO-8859-1". * <p>The default implementation uses {@code URLDecoder.decode(input, enc)}. * @param request current HTTP request * @param source the String to decode * @return the decoded String * @see WebUtils#DEFAULT_CHARACTER_ENCODING * @see javax.servlet.ServletRequest#getCharacterEncoding * @see java.net.URLDecoder#decode(String, String) * @see java.net.URLDecoder#decode(String) */ public String decodeRequestString(HttpServletRequest request, String source) { if (this.urlDecode) { return decodeInternal(request, source); } return source; }
/** * Decode the given source string with a URLDecoder. The encoding will be taken * from the request, falling back to the default "ISO-8859-1". * <p>The default implementation uses {@code URLDecoder.decode(input, enc)}. * @param request current HTTP request * @param source the String to decode * @return the decoded String * @see WebUtils#DEFAULT_CHARACTER_ENCODING * @see javax.servlet.ServletRequest#getCharacterEncoding * @see java.net.URLDecoder#decode(String, String) * @see java.net.URLDecoder#decode(String) */ public String decodeRequestString(HttpServletRequest request, String source) { if (this.urlDecode) { return decodeInternal(request, source); } return source; }
/** * Decode the given URI path variables via * {@link #decodeRequestString(HttpServletRequest, String)} unless * {@link #setUrlDecode(boolean)} is set to {@code true} in which case it is * assumed the URL path from which the variables were extracted is already * decoded through a call to * {@link #getLookupPathForRequest(HttpServletRequest)}. * @param request current HTTP request * @param vars URI variables extracted from the URL path * @return the same Map or a new Map instance */ public Map<String, String> decodePathVariables(HttpServletRequest request, Map<String, String> vars) { if (this.urlDecode) { return vars; } else { Map<String, String> decodedVars = new LinkedHashMap<>(vars.size()); vars.forEach((key, value) -> decodedVars.put(key, decodeInternal(request, value))); return decodedVars; } }
/** * Decode the given URI path variables via * {@link #decodeRequestString(HttpServletRequest, String)} unless * {@link #setUrlDecode(boolean)} is set to {@code true} in which case it is * assumed the URL path from which the variables were extracted is already * decoded through a call to * {@link #getLookupPathForRequest(HttpServletRequest)}. * @param request current HTTP request * @param vars the URI variables extracted from the URL path * @return the same Map or a new Map instance */ public Map<String, String> decodePathVariables(HttpServletRequest request, Map<String, String> vars) { if (this.urlDecode) { return vars; } else { Map<String, String> decodedVars = new LinkedHashMap<>(vars.size()); vars.forEach((key, value) -> decodedVars.put(key, decodeInternal(request, value))); return decodedVars; } }
/** * Decode the given matrix variables via * {@link #decodeRequestString(HttpServletRequest, String)} unless * {@link #setUrlDecode(boolean)} is set to {@code true} in which case it is * assumed the URL path from which the variables were extracted is already * decoded through a call to * {@link #getLookupPathForRequest(HttpServletRequest)}. * @param request current HTTP request * @param vars the URI variables extracted from the URL path * @return the same Map or a new Map instance */ public MultiValueMap<String, String> decodeMatrixVariables(HttpServletRequest request, MultiValueMap<String, String> vars) { if (this.urlDecode) { return vars; } else { MultiValueMap<String, String> decodedVars = new LinkedMultiValueMap<>(vars.size()); vars.forEach((key, values) -> { for (String value : values) { decodedVars.add(key, decodeInternal(request, value)); } }); return decodedVars; } }
/** * Decode the given matrix variables via * {@link #decodeRequestString(HttpServletRequest, String)} unless * {@link #setUrlDecode(boolean)} is set to {@code true} in which case it is * assumed the URL path from which the variables were extracted is already * decoded through a call to * {@link #getLookupPathForRequest(HttpServletRequest)}. * @param request current HTTP request * @param vars URI variables extracted from the URL path * @return the same Map or a new Map instance */ public MultiValueMap<String, String> decodeMatrixVariables(HttpServletRequest request, MultiValueMap<String, String> vars) { if (this.urlDecode) { return vars; } else { MultiValueMap<String, String> decodedVars = new LinkedMultiValueMap<>(vars.size()); vars.forEach((key, values) -> { for (String value : values) { decodedVars.add(key, decodeInternal(request, value)); } }); return decodedVars; } }
path = getRemainingPath(decodeInternal(request, pathWithinApp), servletPath, false); if (path != null) { return pathWithinApp;
path = getRemainingPath(decodeInternal(request, pathWithinApp), servletPath, false); if (path != null) { return pathWithinApp;