do not retry on http status 406

This commit is contained in:
Andreas Schildbach 2013-03-13 09:32:30 +01:00
parent bfb3b64eca
commit 96fe89286c

View file

@ -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);
}