fix httpd log spam

fix httpd log spam with invalid url encoded strings (lol)
This commit is contained in:
ayunami2000 2022-04-17 14:58:58 -07:00 committed by GitHub
parent 733f002a87
commit e6a20e1757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,12 +337,12 @@ public abstract class NanoHTTPD
*/
protected String decodePercent(String str)
{
String decoded = null;
String decoded = str;
try
{
decoded = URLDecoder.decode(str, "UTF8");
}
catch (UnsupportedEncodingException ignored)
catch (UnsupportedEncodingException | IllegalArgumentException ignored)
{
}
return decoded;