1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-12 11:10:29 +00:00

Fix double URL decode

Closes #613
This commit is contained in:
Jonathan Coates 2020-12-20 19:57:31 +00:00
parent f5eb6ce03e
commit 663859d2e5

View File

@ -21,10 +21,8 @@ import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http.*;
import java.io.Closeable;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLDecoder;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
@ -244,9 +242,9 @@ public final class HttpRequestHandler extends SimpleChannelInboundHandler<HttpOb
try
{
return uri.resolve( new URI( URLDecoder.decode( location, "UTF-8" ) ) );
return uri.resolve( new URI( location ) );
}
catch( UnsupportedEncodingException | IllegalArgumentException | URISyntaxException e )
catch( IllegalArgumentException | URISyntaxException e )
{
return null;
}