@SuppressWarnings("deprecation")
    public static String decodeRequestString(HttpServletRequest request, String source) {
        String enc = determineEncoding(request);
        try {
            return URLDecoder.decode(source, enc);
        } catch (UnsupportedEncodingException ex) {
            if (LOGGER.isWarnEnabled()) {
                LOGGER.warn("Could not decode request string [" + Encode.forHtml(source)
                        + "] with encoding '" + Encode.forHtml(enc)
                        + "': falling back to platform default encoding; exception message: " + ex.getMessage());
            }
            return URLDecoder.decode(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)</code>.

@param request current HTTP request
@param source  the String to decode
@return the decoded String
@see #DEFAULT_CHARACTER_ENCODING
@see javax.servlet.ServletRequest#getCharacterEncoding
@see java.net.URLDecoder#decode(String, String)
@see java.net.URLDecoder#decode(String)
web/src/main/java/org/apache/shiro/web/util/WebUtils.java