String encoding = getCharacterEncoding();
if (encoding == null)
encoding = "ISO-8859-1";
- try {
- RequestUtil.parseParameters
- (queryParameters, queryParamString, encoding);
- } catch (Exception e) {
- // Ignore
- }
+ RequestUtil.parseParameters(queryParameters, queryParamString,
+ encoding);
Iterator<String> keys = parameters.keySet().iterator();
while (keys.hasNext()) {
String key = keys.next();
extensionValidator.extension-not-found-error=ExtensionValidator[{0}][{1}]: Required extension "{2}" not found.
extensionValidator.extension-validation-error=ExtensionValidator[{0}]: Failure to find {1} required extension(s).
extensionValidator.failload=Failure loading extension {0}
+requestUtil.parseParameters.uee=Unable to parse the parameters since the encoding [{0}] is not supported.
+requestUtil.urlDecode.uee=Unable to URL decode the specified input since the encoding [{0}] is not supported.
SecurityUtil.doAsPrivilege=An exception occurs when running the PrivilegedExceptionAction block.
*
* @param map Map that accumulates the resulting parameters
* @param data Input string containing request parameters
- *
- * @exception IllegalArgumentException if the data is malformed
+ * @param encoding The encoding to use; if null, the default encoding is
+ * used. If an unsupported encoding is specified the parameters will not be
+ * parsed and the map will not be modified
*/
public static void parseParameters(Map<String,String[]> map, String data,
- String encoding) throws UnsupportedEncodingException {
+ String encoding) {
if ((data != null) && (data.length() > 0)) {
} else {
bytes = data.getBytes(encoding);
}
+ parseParameters(map, bytes, encoding);
} catch (UnsupportedEncodingException uee) {
+ log.debug(sm.getString("requestUtil.parseParameters.uee",
+ encoding), uee);
}
- parseParameters(map, bytes, encoding);
}
}
*
* @param map Map that accumulates the resulting parameters
* @param data Input string containing request parameters
- * @param encoding Encoding to use for converting hex
+ * @param encoding The encoding to use; if null, the default encoding is
+ * used
*
- * @exception UnsupportedEncodingException if the data is malformed
+ * @exception UnsupportedEncodingException if the requested encoding is not
+ * supported.
*/
public static void parseParameters(Map<String,String[]> map, byte[] data,
String encoding) throws UnsupportedEncodingException {