Fix decodeAttribute in HttpPostRequestDecoder to take into account exception from bad format from URLDecoder.decode

This commit is contained in:
Frédéric Brégier 2012-07-22 10:59:26 +03:00
parent 6c181af6b9
commit 0b2c43f04e

View File

@ -709,6 +709,8 @@ public class HttpPostRequestDecoder {
return URLDecoder.decode(s, charset.name());
} catch (UnsupportedEncodingException e) {
throw new ErrorDataDecoderException(charset.toString(), e);
} catch (IllegalArgumentException e) {
throw new ErrorDataDecoderException("Bad string: '" + s + "'", e);
}
}