mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-13 16:20:34 +00:00
allow redirect if staying on same host
This commit is contained in:
parent
ae4d78cbbc
commit
6ac291eb5f
1 changed files with 2 additions and 2 deletions
|
@ -119,7 +119,7 @@ public final class ParserUtils
|
|||
{
|
||||
final String contentType = connection.getContentType();
|
||||
final String contentEncoding = connection.getContentEncoding();
|
||||
if (!url.equals(connection.getURL()))
|
||||
if (!url.getHost().equals(connection.getURL().getHost()))
|
||||
throw new UnexpectedRedirectException(url, connection.getURL());
|
||||
|
||||
final InputStream is;
|
||||
|
@ -270,7 +270,7 @@ public final class ParserUtils
|
|||
final String contentType = connection.getContentType();
|
||||
final String contentEncoding = connection.getContentEncoding();
|
||||
final InputStream is = connection.getInputStream();
|
||||
if (!url.equals(connection.getURL()))
|
||||
if (!url.getHost().equals(connection.getURL().getHost()))
|
||||
throw new UnexpectedRedirectException(url, connection.getURL());
|
||||
|
||||
if (sessionCookieName != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue