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
1 changed files with 2 additions and 4 deletions

View File

@ -21,10 +21,8 @@
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 @@ private URI getRedirect( HttpResponseStatus status, HttpHeaders headers )
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;
}