mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-15 17:10:30 +00:00
do not retry on http status 406
This commit is contained in:
parent
bfb3b64eca
commit
96fe89286c
1 changed files with 4 additions and 2 deletions
|
@ -192,7 +192,8 @@ public final class ParserUtils
|
|||
throw new IOException(message + ": " + url);
|
||||
}
|
||||
}
|
||||
else if (responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_BAD_REQUEST)
|
||||
else if (responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_BAD_REQUEST
|
||||
|| responseCode == HttpURLConnection.HTTP_NOT_ACCEPTABLE)
|
||||
{
|
||||
throw new BlockedException(url);
|
||||
}
|
||||
|
@ -342,7 +343,8 @@ public final class ParserUtils
|
|||
return is;
|
||||
}
|
||||
}
|
||||
else if (responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_BAD_REQUEST)
|
||||
else if (responseCode == HttpURLConnection.HTTP_FORBIDDEN || responseCode == HttpURLConnection.HTTP_BAD_REQUEST
|
||||
|| responseCode == HttpURLConnection.HTTP_NOT_ACCEPTABLE)
|
||||
{
|
||||
throw new BlockedException(url);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue